Skip to main content
Glama

cls_list_metrics

Lists available metric names within a specified topic and time range to identify what metrics can be queried before executing metric queries.

Instructions

列出指标主题下的所有指标名称。用于在查询指标前了解有哪些可用指标。

参数说明

  • topic_id: 指标主题 ID(必填),注意是时序指标主题 ID,非普通日志主题 ID

  • start_time: 起始时间,Unix 时间戳(秒)

  • end_time: 结束时间,Unix 时间戳(秒)

  • region: 地域(可选),如 ap-guangzhou、na-ashburn,不传则使用默认地域,可通过 cls_describe_regions 查询所有可用地域

使用场景

  • 在使用 cls_query_metric / cls_query_range_metric 查询指标前,先列出可用指标

  • 了解某个指标主题下上报了哪些指标

注意事项

  • start_time/end_time 为秒级时间戳,请先调用 cls_convert_time 工具转换,不要手动计算

  • 返回的是指定时间范围内有数据的指标名称,建议查询最近 15 分钟即可

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topic_idYes
start_timeYes
end_timeYes
regionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the tool returns metric names that have data within the specified time range, recommends querying the last 15 minutes for practical use, and warns about time format requirements (seconds, not milliseconds). However, it doesn't mention pagination, rate limits, or authentication requirements.

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?

The description is well-structured with clear sections (purpose, parameters, usage scenarios, notes), front-loaded with the core purpose, and every sentence adds value. The bullet points make it scannable, and there's no redundant information. The warning about time conversion is appropriately emphasized with emoji and bold formatting.

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

Completeness5/5

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

Given the tool has an output schema (which handles return values), no annotations, and 4 parameters with 0% schema coverage, the description provides excellent contextual completeness. It covers purpose, parameters, usage guidelines, behavioral constraints, and references to related tools. The time format warning and practical recommendation (query last 15 minutes) add important operational context.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing detailed parameter semantics in the '参数说明' section. It explains each parameter's purpose, requirements (必填 for required), format constraints (Unix timestamp in seconds), default behavior (region defaults if not provided), and provides examples (ap-guangzhou, na-ashburn). The warning about time conversion is particularly valuable.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('列出' meaning 'list') and resources ('指标名称' meaning 'metric names'), and distinguishes it from siblings by explaining it's used before querying metrics with cls_query_metric/cls_query_range_metric. It explicitly differentiates from logging topics by specifying '时序指标主题 ID, 非普通日志主题 ID'.

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

Usage Guidelines5/5

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

The description provides explicit usage guidelines in the '使用场景' section, stating when to use this tool (before querying metrics with cls_query_metric/cls_query_range_metric, to understand available metrics) and when not to use it (not for logging topics). It also mentions an alternative tool (cls_convert_time for time conversion) and references cls_describe_regions for region information.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tinker-LGD2026/cls-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server