Skip to main content
Glama

ros2_measure_topic_hz

Measure the publishing frequency and period statistics of a ROS2 topic to verify its update rate and diagnose throttling or irregular message delivery.

Instructions

Measure publishing frequency (Hz) and period statistics of a topic.

    Args:
        topic: ROS2 topic to measure
        topic_type: Type of message
        sample_count: Target number of samples to record
        timeout_sec: Maximum collection time
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
topic_typeYes
timeout_secNo
sample_countNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
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. The description only says it measures frequency and period statistics, but does not disclose that it subscribes to the topic, that it may block until the timeout or sample count is reached, or that it is a read-only operation. There is no mention of potential side effects, prerequisites (like the topic must exist and have active publishers), or behavior when no messages are received. This lack of behavioral detail is a significant gap given the absence of annotations.

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 two sentences: a front-loaded purpose statement followed by a compact Args list. There is no fluff or redundant information. The purpose is stated immediately, and the parameter descriptions are concise and directly tied to the schema. 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?

The tool has an output schema (not shown) which likely defines return values, so the description does not need to explain that. However, it lacks critical usage context: no mention of blocking behavior, that it subscribes to the topic, or that it may take time up to timeout_sec. Since annotations are absent, the description should have disclosed these behaviors. It is adequate for a straightforward measurement but incomplete for a tool that can potentially wait for samples.

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 description coverage is 0%, so the description is the only source of parameter meaning. The Args section adds value by explaining each parameter: 'ROS2 topic to measure', 'Type of message', 'Target number of samples to record', and 'Maximum collection time'. These descriptions clarify that sample_count is a target (not guaranteed) and timeout_sec is a limit. This goes beyond the schema's bare names and types, providing useful context for an agent.

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 states a specific verb 'Measure' and a precise resource: 'publishing frequency (Hz) and period statistics of a topic'. This clearly distinguishes it from sibling tools like ros2_topic_echo (which echoes message content) and ros2_topic_publish (which publishes messages). An agent can immediately understand what this tool does and why it is different from the other topic-related tools.

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?

The description provides no explicit guidance on when to use this tool versus alternatives. It implies usage through its purpose—if you want to measure publishing frequency, this is the tool—but does not mention alternatives or exclusions. For example, it doesn't say 'use this to check if a topic is publishing at a healthy rate' or 'not for inspecting message content'. The usage context is implied but not stated explicitly.

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