Skip to main content
Glama

gograph_check

Read-onlyIdempotent

Run static policy checks on Go code during PR review or pre-commit: boundaries, API drift, changed tests, coverage, orphans, globals, arity, and complexity, returning pass/warn/fail findings.

Instructions

Refresh source analysis and run static policy checks: boundaries, API drift, changed-route/export tests, test coverage, orphans, globals, arity, and complexity. The default or a relative checks config is confined to a regular non-linked file beneath the project; an absolute config is an explicit operator-selected regular file. Baselines use the same validated builder as CLI: a value ending in .json loads a regular saved graph inside the project root with no linked component and the exact current source-policy marker, ignoring its serialized root; otherwise it is treated as a Git ref and extracted temporarily. WHEN TO USE: During PR review or pre-commit analysis. NOT TO USE: For CI process exit enforcement (use CLI gograph gate). RETURNS: Structured pass/warn/fail status, findings, and summary counts. Uncommitted modes compare declarations against HEAD, including selected untracked Go files. Current-graph consumers refuse incomplete comparisons, deleted declarations requiring historical caller evidence, and missing/ambiguous graph identities. Inspect changes --git REF for the declaration census; rebuild before traversing newly added symbols.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoGit ref or regular in-project saved graph path ending in .json, with no linked component and the exact current source-policy marker, for api_drift
configNoOptional checks.json path; relative/default paths are project-confined, while an absolute path explicitly selects a regular local file
uncommittedNoIf true, include uncommitted changes in the analysis scope

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.6
    • changedInput schema / properties / config / description
      Previous value: -"Optional path to a checks.json config file (defaults to .gograph/checks.json if present)"New value: +"Optional checks.json path; relative/default paths are project-confined, while an absolute path explicitly selects a regular local file"
    • changedInput schema / properties / since / description
      Previous value: -"Git ref for api_drift baseline (e.g. 'main', 'HEAD~5', 'v1.4.50')"New value: +"Git ref or regular in-project saved graph path ending in .json, with no linked component and the exact current source-policy marker, for api_drift"
  2. Addedv1.5.3
  3. Removedv1.5.3
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly/idempotent/no-destructive/no-open-world), the description discloses substantial behavior: config path confinement rules, how a `.json` baseline is validated vs. treated as a Git ref, what uncommitted mode compares against, and specific refusal conditions (incomplete comparisons, deleted declarations, missing/ambiguous graph identities). This is rich operational context the annotations cannot convey.

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 purpose with clearly labeled WHEN/NOT/RETURNS sections that aid scanning. It is dense (config path semantics and baseline validation are stated at near-schema level of detail and partially restated), but every section is purposeful and no sentence is pure filler.

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?

With no output schema, the description supplies a RETURNS summary (pass/warn/fail status, findings, summary counts) and covers the tricky edge cases (incomplete comparisons, historical caller evidence, identity ambiguity) an agent must anticipate. Complete for a tool of this complexity.

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 already 100%, so the baseline is 3, but the description adds real meaning: it clarifies the marker/linked-component validation for `.json` baselines, that the serialized root is ignored, and that otherwise the value is extracted as a Git ref. That goes beyond the schema's terse parameter text.

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?

States a specific verb+resource ('run static policy checks') and enumerates the exact check families covered (boundaries, API drift, route/export tests, coverage, orphans, globals, arity, complexity). An agent can tell this is a composite policy-check tool that bundles what the sibling single-topic tools (gograph_boundaries, gograph_coverage, etc.) expose individually.

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: During PR review or pre-commit analysis' and 'NOT TO USE: For CI process exit enforcement (use CLI gograph gate)', giving both the trigger context and the named alternative. Nothing about when to select this over siblings is left to inference.

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