Skip to main content
Glama

gograph_check

Read-onlyIdempotent

Run static policy checks and refresh source analysis to flag boundary, API drift, coverage, orphan, global, arity, and complexity issues during PR review or pre-commit.

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. Traversal consumers refuse deleted declarations requiring historical caller evidence. Review instead includes changes --git HEAD declaration evidence and names unavailable historical callers, tests and risk. Incomplete comparisons and missing/ambiguous current identities remain errors. Rebuild before traversing newly added symbols.

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.
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
intentionNoTechnical rationale, required for analytical calls selecting an active session.
session_idNoCaller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.
uncommittedNoIf true, include uncommitted changes in the analysis scope

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.7.18
    • addedInput schema / properties / intention
      Added value: +{
      +  "description": "Technical rationale, required for analytical calls selecting an active session.",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.",
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.",
      +  "type": "string"
      +}
  2. 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"
  3. Addedv1.5.3
  4. Removedv1.5.3
  5. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), yet the description still adds real behavior: config path confinement rules, how baselines are validated (in-project .json with policy marker, otherwise treated as a Git ref), that serialized root is ignored, that incomplete comparisons and ambiguous identities are errors, and that a rebuild is needed before traversing new symbols. Some of the mid-text sentences ('Traversal consumers refuse deleted declarations... Review instead includes changes --git HEAD...') are cryptic and hard for an agent to act on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The WHEN TO USE / NOT TO USE / RETURNS markers give useful skeleton, but ordering is poor: path-validation and baseline-builder rules precede the usage section and belong with the parameters. Several sentences are jargon-dense and some, like the traversal/historical-caller passage, consume space without helping an agent decide or invoke.

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?

For a complex aggregate with no output schema, it covers scope, return shape (pass/warn/fail status, findings, summary counts), error conditions, and uncommitted-mode semantics. What is missing is a clear statement of what the checks config controls and how results are grouped, but overall an agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented in the schema, making 3 the baseline. The description partially restates config and since semantics and adds one genuine detail (the saved graph's serialized root is ignored), but it adds no new meaning for root, intention, session_id, or uncommitted.

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?

Opens with a specific compound action ('Refresh source analysis and run static policy checks') and enumerates the concrete check families it aggregates (boundaries, API drift, coverage, orphans, globals, arity, complexity). An agent can immediately tell this is the aggregate policy-run tool rather than any single sibling like gograph_boundaries or gograph_arity.

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

Usage Guidelines4/5

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

It gives an explicit WHEN TO USE (PR review, pre-commit) and NOT TO USE with a named alternative ('use CLI gograph gate' for CI exit enforcement), which is unusually strong routing guidance. It does not say when to prefer this aggregate over the individual sibling tools (gograph_coverage, gograph_orphans, etc.), which is the one ambiguity left.

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