Skip to main content
Glama

search_for_errors

Finds debugging context by searching error handlers, exception code, tests, similar patterns, and recent commits using an error message and optional stacktrace.

Instructions

Specialized search for debugging errors. Automatically searches in:
- Error handlers and exception code
- Test files
- Similar error patterns
- Related git commits (if error recently introduced)

Args:
    error_text: The error message or exception type
    stacktrace: Optional stacktrace for better context
    n_results: Number of results per category (default 5)

Returns:
    Organized results focusing on debugging context

Input Schema

NameRequiredDescriptionDefault
n_resultsNo
error_textYes
stacktraceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose meaningful behavior: the source fans out automatically across four categories, one of which (git commit lookup) is conditional on the error being recent. However, it does not state index prerequisites, whether results come from a pre-built index, or the read-only/no-side-effect profile.

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?

Front-loaded with a one-line purpose, then a scannable bullet list of search scopes, then compact Args. The "Returns" line ("Organized results focusing on debugging context") is vague filler that adds little, but nothing else is wasted.

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?

An output schema exists, so the weak Returns section is not a real loss, and all three parameters are explained. For a 3-param read search that is nearly complete; the missing piece is the prerequisite that the codebase must be indexed and which sibling search tool to fall back on.

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 description coverage is 0%, so the description must compensate, and it does document all three parameters: error_text as message or exception type, stacktrace as optional context, and n_results defaulting to 5. Critically, "per category" clarifies that n_results is multiplied across the four search scopes — a detail present nowhere in the schema. Only gap: no format guidance for error_text (verbatim vs. fragments).

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?

States a specific verb and resource ("Specialized search for debugging errors") and immediately enumerates what is searched: error handlers, test files, similar patterns, related commits. That scope is clearly distinct from siblings like search_codebase or search_for_feature, though those siblings are never named to make the contrast explicit.

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?

Usage is only implied by the domain framing ("debugging errors") and the parenthetical "if error recently introduced" for git commits. There is no explicit when-to-use / when-not-to-use statement and no pointer to search_codebase or search_codebase_advanced for non-error queries.

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