Skip to main content
Glama

analyze_code_graph

Idempotent

Analyze a selected local code graph to surface stats, communities, fan-in/out, hub impact, cross-community links, and confidence provenance for coding agents.

Instructions

Analyze selected local graph: stats composition; communities/community subsystems; groups fan-in/out; hubs blast radius; surprises cross-community links; confidence provenance; full report. Untrusted evidence. Default agent text; dual adds structured content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoConfigured graph project name/root (not a memory project tag); omit to infer from callerCwd; max 256 UTF-8 bytes; preserve the project selected by context_brief
callerCwdNoRequired absolute repository or worktree path
freshnessNoDefault current. ready accepts stale snapshots or refreshes if cold; allow-stale never indexes.
operationYesWhole-graph operation
communityIdNoRequired cgc_ ID for community
memberLimitNoCommunity member limit; default 24
responseFormatNoDefault agent; dual adds structured content.
includeHeuristicNoInclude heuristic relationships; default false
includeModelAssociationsNoInclude model associations; default false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations declare openWorldHint=true, idempotentHint=true, destructiveHint=false and readOnlyHint=false, so the safety profile is largely covered. The description does add one genuinely useful behavioral note — outputs are 'untrusted evidence' — but it never explains the non-read-only profile or the snapshot refresh/indexing behavior implied by the freshness parameter.

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?

The verb+resource lead is front-loaded and there is no filler. It is telegraphic semicolon fragments rather than prose, which is dense but occasionally hard to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 9-parameter tool with no output schema, the description does sketch the report composition, which covers returns. It omits the untrusted-evidence handling implications, the refresh/staleness model, and the heuristic/model-association toggles, so an agent still has gaps for correct invocation.

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 description coverage is 100%, so baseline is 3, but the description actually expands the operation enum semantics (hubs = blast radius, surprises = cross-community links, confidence = provenance, community = subsystems), adding meaning beyond the bare enum values.

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?

States a specific verb and resource (analyze the selected local graph) and enumerates the report sections it produces, so the agent knows exactly what it gets back. It fails to distinguish itself from the sibling inspect_code_graph, which an agent will have to disambiguate on its own.

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

Usage Guidelines2/5

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

There is no when-to-use, when-not-to-use, or alternative routing anywhere in the text. The operation list implies what can be requested but never says when this analyzer is preferred over inspect_code_graph or context_brief, leaving selection to inference.

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