gograph_errors
Locate error and panic sites in a Go codebase—errors.New, fmt.Errorf, sentinel vars, and panic calls—filtered by message substring. Catalog error codes or check whether a string is already defined.
Instructions
Find all error and panic sites in the codebase: errors.New, fmt.Errorf, sentinel var declarations, and panic calls. 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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gograph_errors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| term | No | Optional keyword to filter the returned error structures (e.g., 'ErrInvalid', 'unauthorized') | |
| limit | No | Rows per page. | |
| cursor | No | next_cursor from the previous page. | |
| no_tests | No | Exclude error sites in *_test.go files | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. |