Skip to main content
Glama

ces__BatchListMetricData

Batch-queries Cloud Eye monitoring data for up to 500 specified metrics over a time range, applying aggregation period and filter to return metric values for a project.

Instructions

[CES] 批量查询指定时间范围内指定指标的指定粒度的监控数据,目前最多支持500指标的批量查询。 对于不同的period取值和查询的指标数量,默认的最大查询区间(to-from)不同。 规则为"指标数量*(to-from)/监控周期<=3000",若超出阈值,会自动调整from以满足规则。

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": {
      "filter": "<filter>",
      "from": "<from>",
      "metrics": "<metrics>",
      "period": "<period>",
      "project_id": "<project_id>",
      "to": "<to>"
    },
    "name": "ces__BatchListMetricData"
  }
}

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
filterYes数据聚合方式。 支持的值为max, min, average, sum, variance;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)”。
metricsYes指标数据。数组长度最大500
project_idYes项目编号。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description bears the full behavioral burden. It does disclose a genuinely important trait beyond the schema: if the threshold metric_count*(to-from)/period > 3000 is exceeded, the service silently adjusts 'from', which changes results in a way the caller could not otherwise predict. It does not describe the response shape, data-point volume, or result ordering.

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?

Short and front-loaded: capability, then batch cap, then the interval constraint. Some redundancy in restating 'default maximum query interval differs' right before giving the formula, but every sentence still carries operational information.

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

Completeness3/5

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

For a six-parameter, fully required query tool with no output schema and no annotations, the description covers capability, cap, and the window-rule behavior. What is missing is the return-value expectation (gaps in the series, empty results on non-aligned windows) and any permission or rate-limit context.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema cannot express: the rule linking metrics count, period and the from/to span, and the resulting automatic truncation of the window. That relational constraint materially changes how an agent should set these six parameters.

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 opens with a specific verb+resource: batch query metric monitoring data over a given time range and granularity, with the batch cap of 500 metrics stated up front. It is clearly separable from single-metric siblings such as ShowMetricData, though it never names those alternatives explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'batch query up to 500 metrics' suggests when this tool is preferred over a single-metric call, and the interval rule tells the agent the operating envelope. However, there is no explicit when-to-use/when-not guidance and no reference to a sibling tool that would be the better choice for a single metric or a single resource.

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