signoz-managing-views
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseManaging Saved Views
管理已保存视图
Create, read, update, and delete SigNoz saved Explorer views via the
SigNoz MCP server. A saved view is a reusable snapshot of an Explorer query
on the Logs, Traces, or Metrics page — name + filters + panel type, scoped
to one . They are not dashboards and not alerts.
sourcePageThis skill covers the full CRUD surface in one place because the operations
share the same schema, the same identity model (UUID per view), and the same
prerequisite resources. The only operation with real blast radius is delete,
and update has a sharp edge (full-body replace) — both get explicit guards
below.
通过SigNoz MCP服务器创建、读取、更新和删除SigNoz 已保存Explorer视图。已保存视图是Logs、Traces或Metrics页面上Explorer查询的可复用快照——包含名称+筛选器+面板类型,作用范围限定为单个。它们不是仪表盘,也不是告警。
sourcePage本技能将完整的CRUD操作整合在一处,因为这些操作共享相同的 schema、相同的身份模型(每个视图对应一个UUID)以及相同的前置资源。唯一具有实际影响范围的操作是删除,而更新操作有一个需要注意的点(全量替换)——以下会对这两个操作给出明确的防护说明。
Prerequisites
前置条件
This skill calls SigNoz MCP server tools (,
, ,
, ,
, ). Before
running the workflow, confirm the tools are available. If
they are not, the SigNoz MCP server is not installed or configured — stop
and direct the user to set it up:
https://signoz.io/docs/ai/signoz-mcp-server/. Do not fall back to raw HTTP
calls or fabricate view payloads without the MCP tools.
signoz:signoz_create_viewsignoz:signoz_list_viewssignoz:signoz_get_viewsignoz:signoz_update_viewsignoz:signoz_delete_viewsignoz:signoz_get_field_keyssignoz:signoz_get_field_valuessignoz:signoz_*本技能会调用SigNoz MCP服务器工具(、、、、、、)。在执行工作流之前,请确认工具可用。如果不可用,说明SigNoz MCP服务器未安装或配置——请停止操作并引导用户进行设置:https://signoz.io/docs/ai/signoz-mcp-server/。不要退回到原始HTTP调用,也不要在没有MCP工具的情况下手动构造视图负载。
signoz:signoz_create_viewsignoz:signoz_list_viewssignoz:signoz_get_viewsignoz:signoz_update_viewsignoz:signoz_delete_viewsignoz:signoz_get_field_keyssignoz:signoz_get_field_valuessignoz:signoz_*When to use
使用场景
Use this skill when the user wants to:
- Create a saved view from a current or described Explorer query.
- List / find existing views (by , name, or category).
sourcePage - Inspect a single view's filter or panel type.
- Update a view — rename, recategorize, or change its filter, panel type, or aggregations.
- Delete a view that is no longer useful.
Do NOT use when the user wants to:
- Build a dashboard panel → /
signoz-creating-dashboards.signoz-modifying-dashboards - Run an ad-hoc Explorer query without saving it → .
signoz-generating-queries - Create or change an alert rule → .
signoz-creating-alerts
当用户想要执行以下操作时,使用本技能:
- 创建:基于当前或描述的Explorer查询创建已保存视图。
- 列出/查找:现有视图(按、名称或类别)。
sourcePage - 查看:单个视图的筛选器或面板类型。
- 更新:视图——重命名、重新分类,或修改其筛选器、面板类型或聚合方式。
- 删除:不再有用的视图。
请勿在以下场景使用本技能:
- 构建仪表盘面板 → 使用/
signoz-creating-dashboards。signoz-modifying-dashboards - 运行临时Explorer查询但不保存 → 使用。
signoz-generating-queries - 创建或修改告警规则 → 使用。
signoz-creating-alerts
Schema reference
Schema参考
Read both resources BEFORE composing any create or update payload. Do not
hand-compose a from memory — the correct schema is not the
legacy format; it is the v5 spec described in these
resources. Sending a legacy payload causes a silent HTTP 400.
compositeQuerybuilder.queryDataRead both MCP resources by URI using your client's resource-read mechanism:
- — SavedView field reference,
signoz://view/instructionsrules, the GET-then-PUT update flow, the minimal create body.sourcePage - — three round-tripped payloads (traces list, logs list, metrics graph) you can adapt verbatim.
signoz://view/examples
The server returns HTTP 400 on legacy v3/v4 fields (, ,
, top-level , , ) — the failure
mode is silent for the user, so reading the resources first is mandatory, not
optional.
builderpromqlunitidqueryFormulasqueryTraceOperator在编写任何创建或更新负载之前,请务必阅读这两个资源。不要凭记忆手动编写——正确的schema不是旧版的格式;而是以下资源中描述的v5规范。发送旧版负载会导致静默HTTP 400错误。
compositeQuerybuilder.queryData使用客户端的资源读取机制,通过URI读取这两个MCP资源:
- —— SavedView字段参考、
signoz://view/instructions规则、先GET后PUT的更新流程、最小化创建体。sourcePage - —— 三个可直接复用的往返负载(追踪列表、日志列表、指标图表)。
signoz://view/examples
服务器会针对旧版v3/v4字段(、、、顶层、、)返回HTTP 400错误——用户不会收到明确提示,因此提前读取资源是必须的,而非可选操作。
builderpromqlunitidqueryFormulasqueryTraceOperatorOperation flows
操作流程
Create a view
创建视图
- Resolve — must be exactly one of
sourcePage,traces,logs. If the user's intent is ambiguous ("save this query"), ask which Explorer they mean. It cannot be inferred from filter strings alone.metrics - Read the schema resources. Read both and
signoz://view/instructionsusing your client's resource-read mechanism before composing any payload. Do not skip this step even if you think you know the schema — the legacysignoz://view/examplesformat is rejected with HTTP 400.builder.queryData - Build the query using — mandatory. Use the
signoz-generating-queriestool to invokeSkill. The sub-skill handles field discovery, type checking, and live-data validation in one pass — adapting an example payload fromsignoz-generating-queriesor running a baresignoz://view/examplescall skips the field-type checks and service-name resolution that catch silent 400s before they become permanent bad views. Skipping it means a malformed filter becomes a saved view that must be deleted and recreated.signoz:signoz_search_traces - Enforce in every
signal == sourcePagespec. Abuilder_queryview withsourcePage:"traces"is a server-side error.signal:"logs" - Preview before writing — this step is not optional. Before calling
, show the user a summary: name, sourcePage, panelType, and the full filter expression. For a human in the loop, wait for confirmation. For an autonomous agent, log the preview and proceed.
signoz:signoz_create_view - Call . The server populates
signoz:signoz_create_view,id,createdAt/By— never send those.updatedAt/By
- 确定—— 必须是
sourcePage、traces、logs中的一个。如果用户的意图不明确(例如“保存此查询”),请询问他们指的是哪个Explorer。无法仅通过筛选器字符串推断出该值。metrics - 读取schema资源。在编写任何负载之前,使用客户端的资源读取机制读取和
signoz://view/instructions。即使你认为自己了解schema,也不要跳过此步骤——旧版signoz://view/examples格式会被拒绝并返回HTTP 400错误。builder.queryData - 使用构建查询——必须执行。使用
signoz-generating-queries工具调用Skill。该子技能可一次性完成字段发现、类型检查和实时数据验证——直接改编signoz-generating-queries中的示例负载或仅调用signoz://view/examples会跳过字段类型检查和服务名称解析,而这些步骤可以在错误的视图被永久保存前发现静默400错误。跳过此步骤会导致格式错误的筛选器被保存为视图,后续必须删除并重新创建。signoz:signoz_search_traces - 强制要求每个规范中的
builder_query。如果signal == sourcePage的视图中包含sourcePage:"traces",会导致服务器端错误。signal:"logs" - 写入前预览——此步骤不可选。在调用之前,向用户展示摘要信息:名称、sourcePage、panelType和完整的筛选表达式。如果有人工参与,请等待确认。如果是自主Agent,请记录预览信息后继续。
signoz:signoz_create_view - 调用。服务器会自动填充
signoz:signoz_create_view、id、createdAt/By——请勿主动发送这些字段。updatedAt/By
List or find views
列出或查找视图
signoz:signoz_list_viewssourcePagenamecategoryThe response paginates. Always check before
concluding a view does not exist. Default page size is 50; pass to continue. A view is only confirmed missing for a
given once you have walked pages until . As
long as , keep paginating — there is no page-count cap.
pagination.hasMoreoffset = pagination.nextOffsetsourcePagehasMore = falsehasMore = truesignoz:signoz_list_viewssourcePagenamecategory响应结果支持分页。务必检查,再得出视图不存在的结论。默认页面大小为50;传递以继续分页。只有当遍历到时,才能确认某个下不存在指定视图。只要,就继续分页——没有页数上限。
pagination.hasMoreoffset = pagination.nextOffsethasMore = falsesourcePagehasMore = trueGet a single view
获取单个视图
Use with the UUID. The returned object is
the canonical SavedView shape — it is what you pass back to
. Treat that data as the source of truth, not
whatever the user described from memory.
signoz:signoz_get_viewdatasignoz:signoz_update_view使用并传入UUID。返回的对象是标准的SavedView格式——这也是你传递给的内容。请将该数据视为唯一可信来源,而非用户凭记忆描述的内容。
signoz:signoz_get_viewdatasignoz:signoz_update_viewUpdate a view (GET-then-PUT)
更新视图(先GET后PUT)
signoz:signoz_update_view- with the view's
signoz:signoz_get_view→ returnsid.{ "status": "success", "data": { ...SavedView... } } - Take the object. Strip server-populated fields (
data,id,createdAt,createdBy,updatedAt) — the MCP server strips them for you, but omitting them up front makes the diff readable.updatedBy - If the update changes (new filter, different panel type, different aggregation), invoke
compositeQueryto build and validate the new query before proceeding. Do not hand-editsignoz-generating-queriesfrom the user's description — the samecompositeQueryrule applies, andsignal == sourcePagechanges often imply apanelTypechange too. For pure metadata tweaks (rename, recategorize), skip this step and do not touchstepInterval.compositeQuery - Modify only the field(s) the user asked to change.
- Show a diff-style preview before writing. One line per changed
field: . Explicitly note any fields that are unchanged (e.g. "compositeQuery: unchanged"). This prevents silent mistakes and gives the user a chance to catch a wrong target view. Wait for confirmation on any change to
name: "slow-checkout" → "slow-checkout-p99", since that changes what the view actually shows.compositeQuery - Call with
signoz:signoz_update_view.{ "viewId": "<id>", "view": <modified data> }
signoz:signoz_update_view- 使用视图的调用
id→ 返回signoz:signoz_get_view。{ "status": "success", "data": { ...SavedView... } } - 获取对象。移除服务器自动填充的字段(
data、id、createdAt、createdBy、updatedAt)——MCP服务器会自动移除这些字段,但提前移除可以让差异更易读。updatedBy - 如果更新涉及修改(新筛选器、不同的面板类型、不同的聚合方式),在继续之前调用
compositeQuery来构建并验证新查询。不要根据用户的描述手动编辑signoz-generating-queries——同样需要遵守compositeQuery规则,且signal == sourcePage的变更通常意味着panelType也需要变更。对于纯元数据调整(重命名、重新分类),可跳过此步骤且不要修改stepInterval。compositeQuery - 仅修改用户要求变更的字段。
- 写入前展示差异式预览。每个变更字段占一行:。明确标注未变更的字段(例如“compositeQuery: 未变更”)。这可以防止静默错误,并让用户有机会发现目标视图错误。对于
name: "slow-checkout" → "slow-checkout-p99"的任何变更,请等待用户确认,因为这会改变视图实际展示的内容。compositeQuery - 使用调用
{ "viewId": "<id>", "view": <修改后的data> }。signoz:signoz_update_view
Delete a view
删除视图
Deletion is permanent — there is no undo, and any team member who had the
view bookmarked will see it disappear. Treat this like dropping a row from
a shared table:
- List to locate. Call to find the view by name. If
signoz:signoz_list_viewsis unknown, search all three signals.sourcePage - Get to confirm — mandatory. Call with the UUID from step 1. Do NOT skip this step even when you got the UUID from a list result that looks correct. List results are paginated and a name match is not a UUID guarantee —
signoz:signoz_get_viewis the confirmation that the UUID maps to the view the user named. Never callsignoz:signoz_get_viewon a UUID without a priorsignoz:signoz_delete_viewconfirming the matching name andsignoz:signoz_get_view.sourcePage - Show and ask. Present the resolved view's name, , and category, and explicitly ask for confirmation. Do not auto-confirm based on the original prompt, even an emphatic one — destructive operations get a fresh confirmation against the resolved target.
sourcePage - Call . Report success with the deleted view's name (not just the UUID), so the user can recognize it.
signoz:signoz_delete_view
For autonomous agents without a human in the loop: refuse delete unless
the calling context has been explicitly authorized for destructive
operations on saved views, and log the resolved view metadata before the
call.
删除操作是永久性的——无法撤销,所有收藏该视图的团队成员都会看到它消失。请将此操作视为删除共享表格中的一行数据:
- 列出以定位。调用按名称查找视图。如果未知
signoz:signoz_list_views,请搜索所有三个信号。sourcePage - 获取以确认——必须执行。使用步骤1中得到的UUID调用。即使列表结果看起来正确,也不要跳过此步骤。列表结果是分页的,名称匹配并不等同于UUID正确——
signoz:signoz_get_view是确认UUID对应用户指定视图的唯一方式。在未调用signoz:signoz_get_view确认名称和signoz:signoz_get_view匹配之前,切勿调用sourcePage。signoz:signoz_delete_view - 展示并确认。展示已定位视图的名称、和类别,并明确请求用户确认。即使原始提示语气坚决,也不要自动确认——破坏性操作需要针对已定位的目标进行新的确认。
sourcePage - 调用。返回成功信息时请包含已删除视图的名称(而非仅UUID),以便用户识别。
signoz:signoz_delete_view
对于无人工参与的自主Agent:除非调用上下文已明确授权对已保存视图执行破坏性操作,否则拒绝删除请求,并在调用前记录已定位视图的元数据。
Quick reference
快速参考
| Operation | Tools called | Key guard |
|---|---|---|
| Create | read | Preview before write; no legacy fields |
| List | | Check |
| Get | | Returns canonical body for update |
| Update | | Full-body replace; diff preview required |
| Delete | | Get-before-delete mandatory; fresh confirmation |
| 操作 | 调用的工具 | 关键防护措施 |
|---|---|---|
| 创建 | 读取 | 写入前预览;禁止使用旧版字段 |
| 列出 | | 检查 |
| 获取 | | 返回用于更新的标准格式内容 |
| 更新 | | 全量替换;必须展示差异预览 |
| 删除 | | 必须先获取再删除;需要新的确认 |
Common mistakes
常见错误
| Mistake | Fix |
|---|---|
Hand-composing | Use the |
Skipping | Always call |
Sending legacy fields: | Read schema resources; server returns HTTP 400 silently |
| Every |
| Partial update body (omitting unchanged fields) | GET full body first → modify only changed fields → PUT entire body |
| Declaring "no such view" after only page 1 | Check |
| Using PromQL or raw ClickHouse in a view | Only |
Setting | |
| 错误 | 修复方案 |
|---|---|
凭示例或记忆手动编写 | 使用 |
删除前跳过 | 在调用 |
发送旧版字段: | 读取schema资源;服务器会静默返回HTTP 400错误 |
构建器查询中 | 每个 |
| 发送部分更新负载(省略未变更字段) | 先获取完整内容 → 仅修改需要变更的字段 → PUT完整内容 |
| 仅查看第一页后就断言“不存在该视图” | 检查 |
| 在视图中使用PromQL或原生ClickHouse语句 | 仅支持 |
将 | |
Reporting back
结果反馈
After any write (create / update / delete), include in your reply:
- The view's name and UUID.
- The .
sourcePage - A direct link only if the MCP response or SigNoz frontend provides a
canonical URL, or the user explicitly asks for one. Do not fabricate
frontend routes — saved-view paths differ per signal and change over
time. When in doubt, omit the link and report the UUID + .
sourcePage - For updates, what changed (one-line diff).
- For deletes, an explicit "deleted" confirmation with the name.
Read-only operations (list, get) should report concisely — name, id,
sourcePage, filter expression, panel type — and stop. Don't narrate
the schema back to the user.
在执行任何写入操作(创建/更新/删除)后,回复中应包含:
- 视图的名称和UUID。
- 。
sourcePage - 仅当MCP响应或SigNoz前端提供了标准URL,或者用户明确要求时,才提供直接链接。不要自行构造前端路由——已保存视图的路径因信号而异,且会随时间变化。如有疑问,请省略链接并返回UUID + 。
sourcePage - 对于更新操作,说明变更内容(一行差异)。
- 对于删除操作,明确确认“已删除”并包含视图名称。
只读操作(列出、获取)应简洁反馈——名称、ID、sourcePage、筛选表达式、面板类型——无需向用户解释schema。",