Skip to main content
Glama

apm__ShowSpanSearch

Search APM span data by trace ID, span ID, status, errors, duration, and tags to troubleshoot distributed requests and analyze performance.

Instructions

[APM] span数据查询接口。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "biz_id": "<biz_id>",
      "region": "<region>"
    },
    "name": "apm__ShowSpanSearch"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo状态码,针对http的调用有效。
pageNo查询第几页的数据,默认查询第一页。
tagsNo包含用户自定义参数,header或body体里的内容,httpMethod, bizCode,以及后续可能新增参数。
typeNo类型。
codesNo字符串格式的的状态码,用于支持多个状态码查询。
app_idNo组件id。
biz_idYes应用id。
env_idNo环境id。
regionYesregion名称。
sourceNo只有是根event也就是span的时候有值。
span_idNo代表一次rpc的调用的id,对于root的调用,值为字符串1,对于当前span调用的下一个spanId编号为1-1,1-2等格式,以此往后类推。
biz_codeNo业务状态码的采集。
is_asyncNo是否异步的event。
trace_idNo在root的span调用产生的全局id,以此往后透传。
domain_idNo租户id。
has_errorNo是否有错误。
page_sizeNo每一页返回的行数。
time_usedNo耗时。
class_nameNo类名。
parametersNo参数。
start_timeNo开始时间。
global_pathNo虚拟traceId经过的path路径。
http_methodNo这里的method实际上是tags里面的http_method,只有url监控项才有。
instance_idNo实例id。
order_paramNo排序参数。
real_sourceNo根event 的时候存在,实际调用的url。
tags_contentNoheader或body体,或自定义参数,或其他tags里字段的关键词搜索。
error_reasonsNo错误类型。
time_used_maxNo最大耗时。
time_used_minNo最小耗时。
end_time_stringNo结束时间。
global_trace_idNovTraceId,虚拟traceId,一个vTraceId对应多个实际的traceId, vTraceId会从开始一直往下应用传输。
source_full_matchNo全匹配搜索。
start_time_stringNo开始时间。
contain_tags_contentNo搜索结果是否包含tags内容详情。
real_source_full_matchNo是否为精确搜索。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden and delivers essentially none of it. It does not state that this is a read-only query, how pagination/defaults behave, what the 36 filters are combined with (AND/OR), or what the response shape looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with no wasted words, but for a 36-parameter, nested-object query interface this is under-specification rather than conciseness. There is no structure a reader can navigate and nothing is front-loaded beyond the tool's own name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 36 parameters, nested objects, two required filters (biz_id, region), no annotations, and no output schema, one sentence is wholly inadequate. Required-parameter semantics (that a region and app id are mandatory) and the shape of returned span data are left entirely undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every one of the 36 parameters carries its own inline description (e.g. span_id semantics, order_param fields, tags_content keyword search). The description adds no parameter meaning of its own, so the baseline 3 applies — the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

"[APM] span数据查询接口。" restates the tool name (ShowSpanSearch) almost verbatim: 'span' + 'search'. There is no statement of what a span is in this system, what a query can be constrained by, or how this differs from siblings such as ShowTraceEvents, ShowRawTable, or ShowSumTable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no exclusions, and no reference to any alternative tool. An agent cannot tell from this sentence whether to reach for ShowSpanSearch, ShowTraceEvents, or ShowRawTable when investigating trace data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools