Skip to main content
Glama

ros2_call_service

Invoke a ROS2 service on a remote system and receive its response by providing service name, type, and request data.

Instructions

Call a ROS2 service and receive the response.

    Args:
        service: Service name (e.g. '/add_two_ints' or '/robot/reset_odometry')
        service_type: Service type (e.g. 'example_interfaces/srv/AddTwoInts')
        request_data: Request parameters as JSON object/dict
        timeout_sec: Maximum wait time for service response
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYes
timeout_secNo
request_dataYes
service_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states that the tool makes a service call and returns a response, and it discloses the timeout behavior via the 'timeout_sec' parameter. This covers the core behavioral traits. It does not mention side effects or error handling, but for a service call that is typical.

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 compact docstring with a one-line purpose followed by a parameter list. It is front-loaded with the action and uses standard Args formatting. Every sentence is informative, with no redundant or filler content.

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 description covers all input parameters needed to call the tool correctly. Since an output schema exists, return value details are not required. The description could optionally mention that service types are discoverable via ros2_get_services, but this is not essential. The tool is sufficiently described for an agent to invoke it.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It does so by explaining each parameter: service name with examples, service_type with an example, request_data as a JSON object/dict, and timeout_sec as maximum wait time. This adds significant meaning beyond the raw schema fields.

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 clear verb-resource pair: 'Call a ROS2 service and receive the response.' It is specific about the action and distinguishes this tool from topic/action tools (siblings include ros2_topic_publish, ros2_action_send_goal). The intent is unambiguous and matches the tool name.

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?

The description implies usage whenever a service needs to be invoked, and it provides clear context (service name, type, request data, timeout). It does not explicitly mention alternatives or when NOT to use it, but the context is sufficient for an agent to decide. No exclusions are stated, so it scores a 4.

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