Skip to main content
Glama

gograph_wiki

DestructiveIdempotent

Generate a markdown llm-wiki from a Go codebase graph so AI agents can orient at session start without dozens of individual tool calls.

Instructions

Generate the llm-wiki/ directory of machine-first markdown pages from the static graph. Pages produced: overview.md, architecture.md, hotspots.md, routes.md, env.md, errors.md, concurrency.md, api-surface.md, and one packages/.md per internal package. A relative output is anchored beneath the graph root and rejects linked components; an absolute output explicitly selects a local destination whose final directory must be real. Generated page paths and regular-file writes remain confined beneath the selected output root. Writes may overwrite existing regular files; MCP annotations mark it mutating and destructive. WHEN TO USE: At the start of an agent session on an unfamiliar codebase — run once to get a token-efficient orientation without issuing dozens of individual tool calls. NOT TO USE: For targeted symbol lookups (use gograph_context or gograph_source). RETURNS: JSON manifest of written page filenames and a count; error when the graph cannot be loaded or the output directory is unsafe or cannot be created.

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

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of your checkout or worktree (alias cwd).
outputNoWiki directory: relative paths are graph-rooted; an absolute path explicitly selects a real local output root (default 'llm-wiki')
intentionNoRationale; required with an active session.
session_idNoSession from session_create; omit for none.

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. Changed1 schema field changedv1.5.6
    • changedInput schema / properties / output / description
      Previous value: -"Output directory for wiki pages (default: 'llm-wiki')"New value: +"Wiki directory: relative paths are graph-rooted; an absolute path explicitly selects a real local output root (default 'llm-wiki')"
  4. Addedv1.4.78

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare mutating/destructive/idempotent, and the description goes well beyond them: it discloses that existing regular files may be overwritten, that page paths and file writes stay confined beneath the selected output root, that relative outputs are graph-rooted and reject linked components, and that absolute outputs must resolve to a real local directory. It also states the failure conditions (graph cannot be loaded, unsafe or uncreatable directory) — meaningful behavioral context not present in the annotations.

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 the purpose, then cleanly sectioned into WHEN TO USE / NOT TO USE / RETURNS. The enumeration of nine page filenames is slightly long but is concrete information an agent can act on; little else is padding.

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?

Despite having no output schema, the RETURNS section specifies a JSON manifest of written filenames plus a count and the error conditions. Combined with path-safety rules, overwrite behavior, and a default of 'llm-wiki', an agent has everything needed to invoke it correctly.

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 the baseline is 3, but the description adds safety semantics the schema only hints at: relative vs absolute `output` anchoring, rejection of linked components, and the requirement that the final directory be real. `root`, `intention`, and `session_id` are left to the schema, which documents them adequately.

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 verb and artifact ('Generate the llm-wiki/ directory of machine-first markdown pages from the static graph') and enumerates exactly which pages are produced, so the agent knows the scope precisely. It also names the sibling tools it is not (gograph_context, gograph_source), making it distinguishable without opening any schema.

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?

Provides explicit WHEN TO USE ('At the start of an agent session on an unfamiliar codebase — run once to get a token-efficient orientation instead of dozens of individual calls') and NOT TO USE clauses that route targeted symbol lookups to gograph_context or gograph_source. Both the positive trigger and the exclusion 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.