Skip to main content
Glama
gokeshenzhen

io.github.gokeshenzhen/traceweave

by gokeshenzhen

get_error_context

Extract raw log lines around an error to diagnose simulation failures. Provide the log path and target line number to retrieve surrounding context for debugging.

Instructions

Extract raw log text around a given error line. Typically used with first_line returned by parse_sim_log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesCenter error line number
afterNoNumber of lines after the target line. Default: 100
beforeNoNumber of lines before the target line. Default: 100
log_pathYesAbsolute path to the simulation log, for example irun.log
Behavior3/5

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

No annotations are provided, so the description is the only source of behavioral info. It discloses the core read-only behavior ('Extract raw log text') and its relationship to parse_sim_log output. However, it doesn't state return format details (e.g., whether line numbers are included) or error-handling behavior, leaving some ambiguity for a no-annotation tool.

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?

One concise sentence with the action upfront, followed by a usage pointer. No filler or redundant restatement of schema fields.

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?

For a simple extraction tool, the description captures purpose, input source, and output nature ('raw log text'). It lacks explicit return formatting details but the workflow reference to parse_sim_log provides sufficient context for an agent to invoke it correctly.

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 100%, so the baseline is 3. The description adds meaning by indicating the 'line' parameter should come from parse_sim_log's first_line field, bridging tool outputs. This is helpful beyond the schema's 'Center error line number.'

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: 'Extract raw log text around a given error line.' This clearly distinguishes it from parse_sim_log (parsing) and diff/analyze tools. The phrase 'Typically used with parse_sim_log' further places it in the workflow.

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 explicit usage context: 'Typically used with first_line returned by parse_sim_log.' This situates the tool in the debug workflow but doesn't explicitly state when not to use alternatives like analyze_failures or diff_sim_failure_results.

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/gokeshenzhen/TraceWeave'

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