Skip to main content
Glama

gograph_plan

Read-onlyIdempotent

Generate a structured pre-edit plan for a Go symbol: symbols to read first, covering tests, routes, env vars, and risk flags like public API or SQL impact before refactoring.

Instructions

Generate a structured pre-edit plan for a target symbol: which symbols to read first, which tests cover them, which routes and env vars they touch, and whether the change is public-API or SQL-touching. Set with_context=true to inline full source+callers+callees for each symbol to inspect — eliminates follow-up gograph_context calls. WHEN TO USE: Before multi-file refactoring or architectural changes to understand scope upfront. NOT TO USE: For trivial single-line fixes; for post-edit verification (use gograph_review instead). RETURNS: JSON with inspect_first[], tests[], routes[], env[], and a risk object (public_api, touches_sql, etc.); with with_context=true, also includes inspect_contexts[] with full per-symbol bundles.

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

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of your checkout or worktree (alias cwd).
symbolNoThe name of the symbol you intend to modify (supports short name 'ValidateToken', dot-notation 'graph.Graph', or fully-qualified ID)
intentionNoRationale; required with an active session.
session_idNoSession from session_create; omit for none.
uncommittedNoSet to true to generate a global plan for all currently uncommitted changes across the repository
with_contextNoIf set to true, bundles full context, source code, callers, callees, and architectural roles for each symbol to be inspected

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. Addedv1.5.3
  4. Removedv1.5.3
  5. Changed1 schema field changed
    • changedInput schema / properties / symbol / description
      Previous value: -"The name of the symbol you intend to modify (e.g., 'ValidateToken')"New value: +"The name of the symbol you intend to modify (supports short name 'ValidateToken', dot-notation 'graph.Graph', or fully-qualified ID)"
  6. Changed3 schema fields changedv1.4.66
    • changedInput schema / properties / symbol / description
      Previous value: -"The symbol to plan changes for"New value: +"The name of the symbol you intend to modify (e.g., 'ValidateToken')"
    • changedInput schema / properties / uncommitted / description
      Previous value: -"Set to true to plan all uncommitted changes"New value: +"Set to true to generate a global plan for all currently uncommitted changes across the repository"
    • changedInput schema / properties / with_context / description
      Previous value: -"If true, include full context (source, callers, callees, role) for each inspect_first symbol"New value: +"If set to true, bundles full context, source code, callers, callees, and architectural roles for each symbol to be inspected"
  7. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world, non-destructive behavior, so the bar is lower. The description adds real behavioral context beyond them: the exact return shape (inspect_first[], tests[], routes[], env[], risk object) and the tradeoff that with_context=true inlines full per-symbol bundles to eliminate follow-up calls. It stops short of noting cost/latency implications of that larger payload.

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 with purpose, then WHEN TO USE / NOT TO USE / RETURNS in labeled blocks, so an agent can scan quickly. Slight redundancy: the with_context behavior is explained once in the opening paragraph and again in RETURNS.

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?

No output schema exists, so the description carries the return-value burden, and it does: it names each top-level array and the risk object's fields, plus the conditional inspect_contexts[] addition. All six parameters are optional and fully schema-documented, so nothing an agent needs to call it correctly is missing.

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%, so baseline is 3, but the description adds meaning the schema does not: with_context=true is framed as a way to avoid separate gograph_context round-trips. It also documents the return fields keyed to each parameter (inspect_contexts[] appearing only when with_context is set). The uncommitted parameter is left unaddressed in the description.

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 and resource ('Generate a structured pre-edit plan for a target symbol') and enumerates what the plan contains: read-first symbols, covering tests, routes/env vars, and public-API/SQL risk. It also distinguishes itself from siblings by naming gograph_context (superseded by with_context=true) and gograph_review (post-edit).

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 multi-file refactoring or architectural changes') and NOT TO USE ('trivial single-line fixes'; post-edit verification → gograph_review) sections. Both the positive condition and the routing alternative are stated rather than inferred.

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