Skip to main content
Glama

gograph_risk

Read-onlyIdempotent

Evaluate change risk for a symbol or uncommitted edits, combining blast radius, complexity, test coverage, and dependencies into a normalized 0–100 score and verdict before you commit.

Instructions

Evaluate the change risk profile of target symbol(s) or uncommitted changes. Combines blast radius, cyclomatic complexity, test coverage, and downstream environment/SQL dependencies into a normalized 0–100 risk score and verdict. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. Requires either symbol or uncommitted=true. WHEN TO USE: Before committing edits or when planning changes to understand the technical risk. NOT TO USE: For post-edit review checklist generation (use gograph_review); for pre-edit plan generation (use gograph_plan). RETURNS: JSON with title, results[] containing risk scores, verdicts, and breakdown metrics, and optional message. 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.
symbolNoThe name of the target symbol to run the risk evaluation for (e.g. 'AuthService')
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.
uncommittedNoSet to true to evaluate risk for all uncommitted/modified changes in the repository

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. Addedv1.4.80

TDQS

A4.2/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, so repeating 'Read-only; no side effects' adds nothing; the value is in disclosing freshness checks, mode-dependent graph refresh, CHA/SSA retry after source changes, and that traversal refuses deleted declarations. The closing sentences about review evidence and historical callers are muddled relative to this tool, which blurs rather than sharpens the behavioral picture.

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 opening purpose, WHEN/NOT TO USE, and RETURNS blocks are well front-loaded and scannable. However, the middle and trailing sentences about graph freshness, traversal consumers, and review evidence are dense and partly off-topic, diluting an otherwise tight definition.

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?

With no output schema, the description correctly supplies a RETURNS block describing title, results[] with scores/verdicts/breakdown metrics, and optional message, plus the error posture for incomplete comparisons and missing identities. What is missing is clarity on the uncommitted-mode behaviors, which are stated in a compressed and confusing way rather than omitted.

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 the baseline is 3. The only real added meaning is the mutual requirement 'either symbol or uncommitted=true', which the schema does not express (required is empty); root, intention, and session_id are fully documented in the schema and get no elaboration here.

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?

The first sentence states a specific verb and resource (evaluate change risk profile of symbols or uncommitted changes) and the second enumerates the exact inputs fused into a normalized 0-100 score and verdict. It also names the two nearest siblings (gograph_review, gograph_plan) and what they do instead, so an agent can separate this from them without reading schemas.

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' (before committing edits / when planning changes) and 'NOT TO USE' clauses with named alternatives ('use gograph_review', 'use gograph_plan'). The precondition 'Requires either symbol or uncommitted=true' further pins down when the call is valid.

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