Skip to main content
Glama

gograph_errors

Read-onlyIdempotent

Find and catalog all error and panic sites in Go code, including errors.New, fmt.Errorf, sentinel vars, and panic calls. Filter by substring to check if an error message already exists before adding new ones.

Instructions

Find all error and panic sites in the codebase: errors.New, fmt.Errorf, sentinel var declarations, and panic calls. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. Optional term filters by message substring (e.g., "ErrInvalid", "unauthorized"). WHEN TO USE: When cataloging error codes and panic paths, standardizing error messages, or checking whether a specific error string is already defined before adding a new one. NOT TO USE: For tracing how an error propagates up the call stack (use gograph_errorflow instead). RETURNS: List of error or panic sites with message text, file path, and line number; empty when no matches found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoOptional keyword to filter the returned error structures (e.g., 'ErrInvalid', 'unauthorized')
no_testsNoExclude error sites in *_test.go files
Behavior5/5

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

Annotations declare readOnly/idempotent/destructive hints, but the description adds meaningful operational behavior: freshness checking, refresh in requested analysis mode, CHA/SSA retry for precise graphs, and explicit 'Read-only; no side effects.' This goes well beyond the structured metadata and provides context an agent needs for execution.

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 dense but well-organized with labeled sections (WHEN TO USE, NOT TO USE, RETURNS) and no redundant sentences. Every sentence conveys distinct information, and the most critical purpose statement is front-loaded.

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 no output schema, the description compensates by specifying the return shape (list of sites with message, file path, line number) and empty-result behavior. It also covers freshness/read-only semantics and usage context, making it complete for an agent to select and invoke the tool 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 baseline is 3. The description adds value by explaining term filters by 'message substring' with examples ('ErrInvalid', 'unauthorized'). However, it does not mention the no_tests parameter, though the schema does document it; this is a minor gap given the schema already describes it.

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 opens with a specific verb and resource ('Find all error and panic sites') and enumerates the exact code patterns covered (errors.New, fmt.Errorf, sentinel var declarations, panic calls). It clearly distinguishes this tool from sibling gograph_errorflow by stating it catalogs error sites, not propagation paths.

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

Usage Guidelines5/5

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

Explicit 'WHEN TO USE' and 'NOT TO USE' sections provide concrete use cases (cataloging error codes, standardizing messages, checking before defining a new error) and name the alternative (gograph_errorflow for tracing propagation). This is exemplary guidance.

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/ozgurcd/gograph'

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