Skip to main content
Glama

gograph_check

Read-onlyIdempotent

Refreshes source analysis and runs static policy checks for PR reviews and pre-commit, returning pass/warn/fail findings on boundaries, API drift, tests, coverage, orphans, and complexity.

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.

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_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of your checkout or worktree (alias cwd).
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
intentionNoRationale; required with an active session.
session_idNoSession from session_create; omit for none.
uncommittedNoIf true, include uncommitted changes in the analysis scope

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.7.21
    • changedInput schema / properties / intention / description
      Previous value: -"Technical rationale, required for analytical calls selecting an active session."New value: +"Rationale; required with an active session."
    • changedInput schema / properties / root / description
      Previous value: -"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."New value: +"Absolute path of your checkout or worktree (alias cwd)."
    • changedInput schema / properties / session_id / description
      Previous value: -"Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session."New value: +"Session from session_create; omit for none."
  2. 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"
      +}
  3. 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"
  4. Addedv1.5.3
  5. Removedv1.5.3
  6. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description goes further: it discloses the path-validation rules for the checks config, the two-mode baseline resolution (saved graph with source-policy marker vs temporary Git-ref extraction), and the return shape (pass/warn/fail plus findings and summary counts). It stops short of stating performance cost, failure modes, or whether findings are persisted.

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?

Purpose is front-loaded and the WHEN TO USE / NOT TO USE / RETURNS labels make it scannable. The middle baseline-resolution sentences are long and largely duplicate the `since`/`config` schema descriptions, which is the main wasted space.

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 six-parameter, all-optional analysis tool with no output schema, the definition covers what it does, when to use it, the tricky path/baseline semantics, and the shape of the return value. Remaining gaps are minor — no mention of runtime cost or how multiple findings are ordered.

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 coverage is 100%, so the schema already documents all six parameters, including the .json-vs-Git-ref semantics of `since` and the project-confinement rule for `config`. The description restates those same rules almost verbatim rather than adding syntax, defaults, or interaction details (e.g., how `uncommitted` combines with `since`), so it sits at the baseline-3 level.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb ('Refresh source analysis and run static policy checks') plus an enumerated scope of checks: boundaries, API drift, changed-route/export tests, coverage, orphans, globals, arity, complexity. It reads as an aggregate policy-check tool, but it never explicitly contrasts itself with the many sibling tools that perform those checks individually (gograph_arity, gograph_complexity, gograph_boundaries, etc.), so the agent must infer the aggregate-vs-single distinction.

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 (PR review or pre-commit analysis) and NOT TO USE (CI process exit enforcement — use CLI gograph gate instead), naming the concrete alternative. This is the when/when-not/alternative pattern at full strength.

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