Skip to main content
Glama

get_error_context

Extracts source code context and git diff from an error log, helping you identify the exact lines and changes that caused the failure.

Instructions

Extracts detailed source code context and git diff from an error log

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logYes
context_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It hints at a read-only, git-adjacent operation (extract context and git diff) but does not disclose side effects (or their absence), permissions, failure modes when the log references unknown code, or the shape of what is returned.

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?

A single concise sentence, front-loaded with the core extraction behavior and no filler. The trade-off is that the minimalism leaves required details out, but as far as it goes the content is all signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, this 2-parameter tool had the burden of explaining the full behavior, but it provides no return-format info, no failure semantics, and no explanation of how context_lines influences output. The description is adequate for discovering the purpose but not sufficient to invoke it correctly.

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

Parameters2/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 for parameters, but it only loosely maps 'log' to an error log and never addresses 'context_lines' at all. The description adds minimal meaning beyond the raw property names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb-resource pair ('Extracts detailed source code context and git diff from an error log') that makes the core function clear. An agent can differentiate it from siblings search_stack_overflow and apply_code_patch based on this statement, though the description does not name them explicitly to reinforce the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this tool over its siblings or when not to use it. The only implied usage is 'when an error log needs code context,' but no prerequisites (e.g., a local git repo), exclusions, or alternative selection rules are given.

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