Skip to main content
Glama

gograph_check

Read-onlyIdempotent

Run static policy checks on Go repository graphs to detect package layer violations, API drift, complex functions, and untested symbols. Returns structured results for PR review or pre-commit analysis.

Instructions

Run static policy checks against the repository graph. Checks include: boundaries (package layer violations), api_drift (breaking changes vs a baseline ref), max_arity (functions with too many args), max_complexity (cyclomatic complexity), test_coverage (symbols without tests), and no_orphans. Requires .gograph/graph.json. Read-only; no side effects. WHEN TO USE: During PR review to surface policy violations or as part of a pre-commit analysis workflow. NOT TO USE: For CI/CD enforcement with non-zero exit codes (use CLI gograph gate instead). RETURNS: Structured JSON with status (pass/warn/fail), findings array (level, check, message, location), and summary counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configNoOptional path to a checks.json config file (defaults to .gograph/checks.json if present)
sinceNoGit ref for api_drift baseline (e.g. 'main', 'HEAD~5', 'v1.4.50')
uncommittedNoIf true, include uncommitted changes in the analysis scope
Behavior5/5

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

Description states read-only, no side effects, and requires .gograph/graph.json. Returns structured JSON with details. Annotations already confirm readOnlyHint and idempotentHint, and description adds prerequisite and return format.

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?

Concise and well-structured: tool action, list of checks, prerequisites, behavioral traits, usage guidance, return format. Every sentence adds information without redundancy.

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?

Despite no output schema, description explains return structure and prerequisites. Covers all necessary aspects for correct usage, including when to use and not use.

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% with descriptions for all three parameters. Description adds value by linking 'since' to api_drift baseline and 'config' to checks.json file, providing context beyond schema.

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?

Description clearly states it runs static policy checks against the repository graph, listing specific types of checks (boundaries, api_drift, etc.). This distinguishes it from sibling tools that focus on individual checks.

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: during PR review or pre-commit, not for CI/CD enforcement (use CLI gograph gate instead). Provides clear context and alternatives.

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