Skip to main content
Glama

publish_topic

Publish a ROS2 message to a specified topic using its name, message type, and payload fields. This enables direct robot control and diagnostics via natural language.

Instructions

Publish a message to a ROS2 topic. Sandboxed: blocked in READ_ONLY mode; allowlisted in SAFE_WRITE mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic name, e.g. '/cmd_vel'
payloadYesMessage fields as key-value pairs
msg_typeYesMessage type, e.g. 'geometry_msgs/Twist'
Behavior3/5

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

Without annotations, the description carries the burden of behavioral disclosure. It mentions sandbox behavior, which is useful context. However, it does not elaborate on potential errors, side effects, or output behavior, leaving some gaps for a publish operation.

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 concise sentences, front-loaded with the purpose and immediately providing sandbox context. No wasted words.

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?

The tool is simple, and the description covers its main function and sandbox constraints. No output schema is needed. Given the low complexity and rich schema/annotations, the description is sufficiently complete.

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

Parameters3/5

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

Schema coverage is 100%, with all three parameters described. The description adds no extra meaning beyond the schema, so the baseline score of 3 is appropriate.

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: 'Publish a message to a ROS2 topic.' It uses a specific verb and resource, and distinguishes itself from sibling tools like read_topic and list_topics.

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?

Provides clear context by explaining sandbox mode restrictions (blocked in READ_ONLY, allowlisted in SAFE_WRITE), which implicitly tells the agent when it can be used. However, it does not explicitly name alternatives or mention when to prefer other tools.

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/EngineerAbdullahBinZafar/ros2-mcp-server'

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