Skip to main content
Glama
Yutarop
by Yutarop

publish_ros2_topic

Publish a message to a ROS 2 topic for a specified duration by defining topic, message type, content, and time in seconds.

Instructions

Publishes a message to a specific ROS 2 topic for a given duration (in seconds).

Args:
    topic: Topic name to publish to (e.g., "/cmd_vel")
    msg_type: ROS 2 message type (e.g., "geometry_msgs/msg/Twist")
    msg_content: Message to send (e.g., '{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.5}}')
    duration: Duration in seconds to continue publishing

Example:
    topic: "/cmd_vel"
    msg_type: "geometry_msgs/msg/Twist"
    msg_content: '{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.5}}'
    duration: 5

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
durationYes
msg_typeYes
msg_contentYes
Behavior2/5

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

No annotations provided, so description carries full burden. Mentions duration but does not disclose if tool blocks, creates a node, or stops after duration. Example is helpful but misses key behavioral traits.

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?

Well-structured with Args and Example. Clear and efficient, though the example could be slightly shorter. No unnecessary sentences.

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 no output schema and moderate complexity (4 required params), description covers parameters well with examples. Lacks details on execution model but sufficient for basic use.

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 coverage is 0%, but description adds meaning for all 4 required parameters with examples. Explains topic, msg_type, msg_content (with JSON example), and duration beyond schema titles.

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?

Description clearly states the action: 'Publishes a message to a specific ROS 2 topic for a given duration' with example. Distinguishes from siblings like echo_ros2_topic (listening) or call_ros2_service (calling service).

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?

Implies usage via example but lacks explicit when-to-use or when-not-to-use. Does not differentiate from alternatives like echo or service calls, though the action is distinct.

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/Yutarop/ros-mcp'

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