Skip to main content
Glama

ces__ShowMetricData

Query CES metric monitoring data for a specified namespace, metric, dimensions, time range, and aggregation period.

Instructions

[CES] 查询指定时间范围指定指标的指定粒度的监控数据,可以通过参数指定需要查询的数据维度。

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": {
      "dim.0": "<dim.0>",
      "filter": "<filter>",
      "from": "<from>",
      "metric_name": "<metric_name>",
      "namespace": "<namespace>",
      "period": "<period>",
      "project_id": "<project_id>",
      "to": "<to>"
    },
    "name": "ces__ShowMetricData"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes查询数据截止时间UNIX时间戳,单位毫秒。from必须小于to;如:1607150598177。
fromYes查询数据起始时间,UNIX时间戳,单位毫秒。建议from的值相对于当前时间向前偏移至少1个周期。由于聚合运算的过程是将一个聚合周期范围内的数据点聚合到周期起始边界上,如果将from和to的范围设置在聚合周期内,会因为聚合未完成而造成查询数据为空,所以建议from参数相对于当前时间向前偏移至少1个周期。以5分钟聚合周期为例:假设当前时间点为10:35,10:30~10:35之间的原始数据会被聚合到10:30这个点上,所以查询5分钟数据点时from参数应为10:30或之前。云监控会根据所选择的聚合粒度向前取整from参数;如:1607146998177。
dim.0Yes指标的第一层维度,目前最大支持4个维度,维度编号从0开始;维度格式为dim.0=key,value,如mongodb_cluster_id,4270ff17-aba3-4138-89fa-820594c39755;key为指标的维度信息,如:文档数据库服务,则第一层维度为mongodb_cluster_id,value为文档数据库实例ID;各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
dim.1No指标的第二层维度,目前最大支持4个维度,维度编号从0开始;维度格式为dim.1=key,value,如mongos_instance_id,c65d39d7-185c-4616-9aca-ad65703b15f9;key为指标的维度信息,如:文档数据库服务,则第二层维度为mongos_instance_id,value为文档数据库集群实例下的mongos节点ID;各资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
dim.2No指标的第三层维度,目前最大支持4个维度,维度编号从0开始;维度格式为dim.2=key,value,如mongod_primary_instance_id,5f9498e9-36f8-4317-9ea1-ebe28cba99b4;key为指标的维度信息,如:文档数据库服务,则第三层维度为mongod_primary_instance_id,value为文档数据库实例下的主节点ID;各资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
dim.3No指标的第四层维度,目前最大支持4个维度,维度编号从0开始;维度格式为dim.3=key,value,如mongod_secondary_instance_id,b46fa2c7-aac6-4ae3-9337-f4ea97f885cb;key为指标的维度信息,如:文档数据库服务,则第四层维度为mongod_secondary_instance_id,value为文档数据库实例下的备节点ID;各资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
filterYes数据聚合方式。支持的值为max, min, average, sum, variance。
periodYes指标监控数据的聚合粒度,取值范围:1,300,1200,3600,14400,86400;1为监控资源的实时数据;300为聚合5分钟粒度数据,表示5分钟一个数据点;1200为聚合20分钟粒度数据,表示20分钟一个数据点;3600为聚合1小时粒度数据,表示1小时一个数据点;14400为聚合4小时粒度数据,表示4小时一个数据点;86400为聚合1天粒度数据,表示1天一个数据点;聚合解释可查看:“[聚合含义](https://support.huaweicloud.com/ces_faq/ces_faq_0009.html)”。
namespaceYes指标命名空间,如:弹性云服务器的命名空间为SYS.ECS,文档数据库的命名空间为SYS.DDS,各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
project_idYes项目编号。
metric_nameYes资源的监控指标名称,如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/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 largely drops it. It implies a read operation via '查询' but says nothing about result volume, whether empty results are normal (the aggregation-window caveat lives only in the from/to parameter text), rate limits, or what the response contains. A single generic sentence is thin for an 11-parameter, 8-required metrics query.

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

Conciseness4/5

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

One front-loaded sentence with no filler, and the key constraints (time range, metric, granularity, dimensions) are ordered sensibly. It is efficient but borders on under-specified rather than merely concise.

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

Completeness2/5

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

For a tool with 11 parameters, 8 of them required, no annotations, and no output schema, the description should explain what comes back (data points per period, ordering, empty-result conditions) and the discovery path for namespace/metric_name. None of that is present, so an agent must reverse-engineer the call from the schema alone.

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%, so the schema already explains every parameter in depth, including period semantics, the from/to aggregation-boundary caveat, and the dim.N key,value format. The description adds only the vague hint that dimensions are selectable via parameters, which is already implied. Baseline 3 applies when the schema does the heavy lifting.

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

Purpose4/5

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

The description states a specific verb and resource: query monitoring data for a given metric, over a given time range, at a given aggregation granularity, with dimensions selectable via parameters. That is more than a restatement of the name. It does not, however, differentiate itself from sibling ces__BatchListMetricData, so an agent cannot tell which of the two to pick from the description alone.

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?

There is no when-to-use guidance, no when-not-to-use, and no named alternative. The agent is not told that namespace, metric_name and dimension keys must be discovered first (e.g. via ces__ShowMetricNamesSupport or the linked service-metric docs pages) before this call can succeed, nor how this differs from batch/list metric tools.

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