Skip to main content
Glama
spanchal001

mcp-ros2-logs

by spanchal001

query_logs_tool

Search and filter merged ROS2 log timeline by severity, node, time range, or text. Include surrounding context from all nodes for cascade analysis.

Instructions

Search and filter the merged ROS2 log timeline. Use after load_run.

Flexible query tool for finding specific log entries across all nodes. Supports filtering by severity, node, time range, and text content. The context parameter enables cross-node cascade analysis by including surrounding messages from ALL nodes around each match.

Args: run_id: Run ID from list_runs or a direct path to a log file/directory. severity: Filter by severity level(s). Comma-separated: "ERROR", "WARN,ERROR,FATAL". Case-insensitive. nodes: Filter by node name(s). Comma-separated: "sensor_driver", "planner,controller". time_start: Start time filter. ISO format ("2024-04-14T14:02:31"), epoch ("1713103351.0"), or relative ("-30s" = 30s before run end, "+10s" = 10s after run start). time_end: End time filter. Same format as time_start. text: Search message content. Plain substring by default. Interpreted as regex if it contains special characters (*, +, ?, [, etc). limit: Maximum entries to return (default 50). Total match count is always reported even if truncated. offset: Number of entries to skip (default 0). context: Include N messages before and after each match across ALL nodes. Enables cascade analysis (e.g., context=5 shows what happened on other nodes around each error). Overlapping context windows are merged. log_dir: Optional path to log directory override.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes
severityNo
nodesNo
time_startNo
time_endNo
textNo
limitNo
offsetNo
contextNo
log_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully details behavioral aspects: it explains filtering, the context parameter for cross-node analysis, pagination via limit/offset, and that total match count is always reported. It implicitly indicates a read-only operation, and no contradictions are present.

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 efficiently structured: a concise one-line purpose, a brief overview paragraph, and a well-organized Args section. Every sentence adds value, and the bullet-like format enhances readability without unnecessary verbosity.

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 the complexity of the tool (10 parameters, including time and context handling), the description covers all essential aspects: prerequisites, each parameter's meaning and format, behavior of context merging, and pagination details. An output schema exists (though not shown), so return values are not required. The description is fully adequate for an agent to use the tool correctly.

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?

The input schema has 0% description coverage, so the description carries the full burden. It provides detailed explanations for all 10 parameters, including format examples for time fields, behavior of text (substring vs regex), and context merging. This adds significant meaning beyond the schema's type definitions.

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: 'Search and filter the merged ROS2 log timeline.' It specifies a specific verb ('search and filter') and a distinct resource ('merged ROS2 log timeline'), and mentions a prerequisite ('Use after load_run'), which helps differentiate it from sibling tools like tail_logs_tool or list_runs.

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 gives a clear prerequisite ('Use after load_run') and implies usage context for filtering specific entries. However, it does not explicitly state when not to use this tool or directly compare it to alternatives like tail_logs_tool or query_bag_messages, which would further guide selection.

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/spanchal001/mcp-ros2-logs'

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