Skip to main content
Glama

list_topics

Enumerate every ROS 2 topic on the current graph or mock fixtures, returning name, message type, publisher count, subscriber count, and mode.

Instructions

ROS 2 graph only; on a DDS-only setup use list_endpoints. List every ROS 2 topic on the current graph (or the mock graph in mock mode). Returns list[TopicInfo]: each entry carries name, message_type, publisher_count, subscriber_count, and mode_effective (live or mock) to tell a real graph from fixtures. Live mode leaves qos_reliability and qos_durability null here: call get_topic_info for a topic's QoS. Empty list when the graph has no topics or when live discovery times out. Raises an MCP error when no ros2 CLI is available (DDS-only setup). Read-only; no side effects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.6

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: read-only/no side effects, mock vs live mode disclosure via mode_effective, the empty-list outcome on timeout or empty graph, the MCP-error outcome when no ros2 CLI exists, and the null-QoS-fields caveat. This is unusually rich failure-mode and state context.

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?

Front-loaded with the routing constraint before the return description, and every clause adds information (return fields, null caveat, empty/error states). It is dense and slightly over-loaded with back-to-back bolded outcomes, but nothing is genuinely wasted.

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 no annotations and a simple zero-param read tool with an output schema, the description still covers safety (read-only), both non-success outcomes (empty list, MCP error), mock-mode nuance, and pointers to siblings for QoS and DDS-only setups. Nothing an agent needs to invoke and interpret it correctly is missing.

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 takes zero parameters, so there is nothing for the description to disambiguate and the baseline is 4. No parameter semantics are needed or missing.

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?

States a specific verb and resource ('List every ROS 2 topic on the current graph') and immediately scopes it ('ROS 2 graph only'), naming the sibling to use otherwise (list_endpoints). An agent can distinguish it from neighbors like list_participants or list_endpoints without opening a schema.

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?

Explicit when-not routing: 'on a DDS-only setup use list_endpoints', plus a follow-up alternative for QoS ('call get_topic_info for a topic's QoS'). Both the primary alternative and the sub-case escalation path are named with their selecting conditions.

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