Skip to main content
Glama

apig__ListLatelyApiStatisticsV2

Retrieves per-minute invocation counts for a specified API over a recent time window, helping monitor usage and diagnose traffic patterns.

Instructions

[APIG] 根据API的id和最近的一段时间查询API被调用的次数,统计周期为1分钟。查询范围一小时以内,一分钟一个样本,其样本值为一分钟内的累计值。

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": {
      "api_id": "<api_id>",
      "duration": "<duration>",
      "instance_id": "<instance_id>",
      "project_id": "<project_id>"
    },
    "name": "apig__ListLatelyApiStatisticsV2"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_idYesAPI的编号
durationYes最近统计时长,单位必须为h和m,比如1h和1m,分别代表最近1小时和最近1分钟
project_idYes项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。
instance_idYes实例ID,在API网关控制台的“实例信息”中获取。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose non-obvious traits: 1-minute aggregation granularity, a hard cap of one hour of lookback, and the fact that each sample is a cumulative count within that minute. It does not state permissions, whether the call is read-only, or pagination/ordering of returned samples, so it stops short of full disclosure.

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

Conciseness5/5

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

A single dense sentence that front-loads the purpose (query API call counts by id and time range) and then states the aggregation traits. No filler or repeated schema content.

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 statistics query with no output schema, the description should convey the shape of the return (a per-minute series of counts within the requested window). It implies this via '一分钟一个样本,其样本值为一分钟内的累计值' but never states the response structure, ordering, or what happens when duration exceeds the cap.

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 already 100%, so the baseline would be 3; the description earns extra credit by constraining duration to at most one hour and tying it to the 1-minute sampling period, which the schema alone does not say. It adds nothing about api_id, project_id, or instance_id beyond what the schema already documents.

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 gives a specific verb and resource in '根据API的id和最近的一段时间查询API被调用的次数' (query API invocation counts by API id and recent time range), which an agent can distinguish from group-level siblings such as ListLatelyGroupStatisticsV2. It does not name any sibling explicitly, so differentiation is inferred from the phrase '根据API的id' rather than stated.

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 only implied: the '查询范围一小时以内' constraint tells the agent that long lookbacks are not supported, which indirectly signals when this tool applies. There is no explicit when-to-use or when-not-to-use statement and no named alternative for coarser or longer-window statistics.

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