Skip to main content
Glama

hz_get_metrics

Retrieve memory metrics from Horizon services to monitor performance and resource utilization for data processing pipelines.

Instructions

读取服务内存指标。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the 'hz_get_metrics' tool, which gathers a metrics snapshot and handles error reporting/logging.
    @mcp.tool()
    def hz_get_metrics() -> dict[str, Any]:
        """读取服务内存指标。"""
    
        started = perf_counter()
        try:
            data = _metrics_snapshot()
            elapsed_ms = (perf_counter() - started) * 1000
            _record_metrics("hz_get_metrics", ok=True, duration_ms=elapsed_ms)
            return _ok("hz_get_metrics", data, duration_ms=elapsed_ms)
        except Exception as exc:
            elapsed_ms = (perf_counter() - started) * 1000
            payload = _err("hz_get_metrics", exc, duration_ms=elapsed_ms)
            _record_metrics(
                "hz_get_metrics",
                ok=False,
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool reads memory metrics but doesn't add context such as what service it targets, whether it requires authentication, rate limits, or what the output format entails. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence: '读取服务内存指标.' (Read service memory metrics). It is front-loaded with the core purpose, has zero waste, and is appropriately sized for a simple tool. Every word earns its place.

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?

Given the tool's complexity (0 parameters, no annotations, but with an output schema), the description is minimally complete. It states what the tool does but lacks context like service scope or behavioral traits. The output schema exists, so return values needn't be explained, but overall it's adequate with clear gaps in usage and transparency.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to compensate for any gaps, and it appropriately doesn't mention parameters. A baseline of 4 is applied since no parameter info is required, but it's not a 5 as it could hint at implicit inputs (e.g., service context).

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 the tool's purpose as '读取服务内存指标' (read service memory metrics), which specifies both the verb (read) and resource (service memory metrics). It distinguishes from siblings like hz_list_runs or hz_get_run_summary by focusing on metrics rather than runs or items. However, it doesn't explicitly differentiate from all siblings (e.g., hz_get_run_meta might also involve metrics), keeping it from a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., when memory metrics are needed), or exclusions (e.g., not for CPU metrics). With siblings like hz_get_run_summary that might include metrics, the lack of explicit comparison leaves usage unclear.

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/henry-insomniac/Horizon-mcp'

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