Skip to main content
Glama

apig__ListMetricData

Query API Gateway monitoring metrics by instance, time range, granularity, dimension, and aggregation type to analyze bandwidth, traffic, and usage trends.

Instructions

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

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": "<dim>",
      "filter": "<filter>",
      "from": "<from>",
      "instance_id": "<instance_id>",
      "metric_name": "<metric_name>",
      "period": "<period>",
      "project_id": "<project_id>",
      "to": "<to>"
    },
    "name": "apig__ListMetricData"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes查询数据截止时间UNIX时间戳,单位毫秒。from必须小于to。
dimYes指标维度
fromYes查询数据起始时间,UNIX时间戳,单位毫秒。
filterYes数据聚合方式。
periodYes监控数据粒度。
project_idYes项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。
instance_idYes实例ID,在API网关控制台的“实例信息”中获取。
metric_nameYes指标名称

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 burden. It implies a read-only query but says nothing about return format, pagination, rate limits, maximum allowed time span, or the constraint that period should align with from/to — all of which matter for an 8-parameter metric 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?

A single front-loaded sentence with no filler, and the key scoping elements (time range, metric, granularity, dimension) appear immediately. It is efficient but so terse that conciseness shades into under-specification.

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?

With 8 required parameters, four enums, no annotations and no output schema, the description should explain how from/to/period interact and what the response contains. It does none of this, leaving the agent to rely entirely on the schema for a non-trivial metric query.

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 every parameter is already documented, including enums for dim, filter, period and metric_name. The description only restates that dim selects the data dimension and period the granularity, adding no format or interaction detail beyond the schema; baseline 3 applies.

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 names a specific verb (查询/query) and resource (监控数据/monitoring data) and scopes it to a time range, metric and granularity, plus the [APIG] tag that ties it to API Gateway metrics. It does not explicitly distinguish itself from similarly named siblings like ces__ShowMetricData or ces__BatchListMetricData, so an agent must infer the difference from the APIG prefix 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 statement of when to use this tool versus the many sibling metric tools, nor any prerequisite or exclusion. Usage is only implied by the mention of time range and dimension, leaving the agent to guess at selection criteria.

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