Skip to main content
Glama
zstackio

ZStack MCP Server

Official
by zstackio

get_metric_data

Retrieve monitoring metrics and data points for ZStack resources. Filter by namespace, metric, time range, labels, and optionally get summary statistics only.

Instructions

获取 ZStack 监控数据

Args: namespace: 命名空间,如 "ZStack/VM", "ZStack/Host" metric_name: 指标名称,如 "CPUUsedUtilization" start_time: 开始时间(ISO 或秒级时间戳) end_time: 结束时间(ISO 或秒级时间戳) period: 采样周期(秒),默认 60 labels: 标签过滤,如 ["VMUuid=xxx"] 或 {"VMUuid":"xxx"} summary_only: 仅返回统计信息(点数/最大/最小/平均/方差/标准差)

注意: 返回数据量与时间跨度和 period 成正比。可用估算公式: 点数 ≈ ceil((end_time - start_time) / period) * series_count series_count 为不同 label 组合数量;若不传 labels,可能返回多组系列 (例如指标包含 CPUNum/VMUuid 等 label 时每个组合都会产出一组序列)。 为避免输出过大:缩短时间范围、增大 period 或增加 labels 过滤。

Returns: 监控数据点列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceYes
metric_nameYes
start_timeNo
end_timeNo
periodNo
labelsNo
summary_onlyNo

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 behavioral disclosure burden. It explains data volume behavior, includes an estimation formula, and warns about large outputs. However, it omits error handling (e.g., invalid namespace) and authentication requirements. While informative, it is not fully transparent.

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?

The description is front-loaded with purpose and parameter list, then a helpful note. While the note is valuable, it is somewhat lengthy. The structure is clear, but could be slightly more concise.

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

Completeness4/5

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

Given 7 parameters, no annotations, and an output schema (not shown), the description covers key aspects: return type, data volume estimation, and summary_only details. It explains the note thoroughly but does not mention error scenarios or output schema specifics, which are assumed from the output schema. Overall fairly complete.

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?

Schema description coverage is 0%, so the description must compensate. It explains every parameter with examples and clarifications (e.g., namespace examples, labels format, time format). It adds value beyond the schema, making all parameters understandable despite the schema's vagueness.

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 clearly states '获取 ZStack 监控数据' (get ZStack monitoring data) and explains it returns a list of data points. However, it doesn't differentiate from sibling tools like get_metric_summary or search_metric, which could also retrieve monitoring data. The purpose is clear but lacks explicit distinction.

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

Usage Guidelines4/5

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

The description provides extensive guidance on usage, including a detailed note on data volume estimation and how to avoid large outputs by adjusting time range, period, or labels. It implies when to use parameters but does not explicitly compare with sibling tools for when to use this tool over alternatives.

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/zstackio/zstack-mcp-server'

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