Graphenium
OfficialGraphenium MCP server lets you query a compiled relational code graph, analyze architecture and dependencies, and validate/audit AI coding plans before and after edits.
Explore symbols, neighbors, references, files, modules, communities, hubs, and graph metadata/statistics.
Trace shortest/safest paths, transitive closure, blast radius, and dependency relationships with confidence levels.
Run Datalog queries for transitive calls/imports/depends, cycles, layer bypasses, hubs, orphans, and custom rules.
Inspect trust quality via unresolved references, ambiguous edges, resolution reports, and extracted-only filtering.
Create virtual planning workspaces, add planned symbols, and inspect full virtual plan subgraphs.
Validate plans with policy checks and zero-config Louvain delta/modularity gating before writing code.
Audit changes with change gates, verification plans, must-read files, what-changed reports, and graph diffs.
Modify the graph by adding/removing nodes and edges, reclustering communities, and reloading or diffing graph files.
The Relational Codebase Compiler & Spec-Driven Containment Engine for AI Coding Agents
Graphenium (gm) compiles a polyglot codebase into a provenance-tagged relational index and mechanically contains AI agents inside an approved architectural contract.
Graphenium is not a passive search index or a folder-regex linter. It is a local compiler that turns source code into queryable structural facts, then uses those facts to govern what an agent is allowed to write. It replaces blind grep/file-read loops with sub-50ms topological queries, and it blocks agents from bypassing service layers, decaying modularity, leaving unproved sorry stubs, or editing files outside their declared plan.
Capability bar: Tree-sitter + Stack Graphs · Indexed Semi-Naive Datalog · Zero-Config Louvain ΔQ Gating · Virtual AST Workspaces · Lean 4 Proof-Gap Auditing · 12 MCP Tools
Standard developer tools help agents find files. Graphenium compiles the system's structure, compresses it for the agent's context budget, and then enforces it as a mechanical write-time contract.
Uncontained Agent Graphenium-Contained Agent
-------------------------- ---------------------------------------- ----------------------------------------------
Context & search Blind grep + raw file sweeps ~85% fewer tokens via compressed AST/Stack-Graphs index
Dependency truth Fuzzy vector guesses, hallucinated calls Provenance-tagged EXTRACTED / INFERRED / AMBIGUOUS edges
Design validation Edits files, hopes tests catch drift Virtual AST + Datalog + ΔQ pre-flight before disk writes
Modularity Silent community decay Zero-config Louvain ΔQ gate rejects new topological entropy
Scope Quiet edits to unrelated files Post-edit node/edge/git-diff audit blocks scope creep
Formal verification Unnoticed sorry/admit stubs Transitive proof-gap taint gating
CI Checks only that tests pass Fails on architectural drift and unrealized specsBinary: gm
Schema: 0.2.0
Status: AST + Stack Graphs resolver stable, indexed semi-naive Datalog stable, Virtual AST pre-flight stable, zero-config ΔQ gating stable, post-edit realization auditing stable, Lean 4 proof-gap auditing stable, telemetry overlay experimental
Why Graphenium Exists: The Structural Compilation & Containment Gap
AI coding agents are highly efficient at local edits, but they suffer from structural blindness and context decay. Over a long chat session, an agent will lose track of your system instructions and optimize for the path of least resistance (e.g., writing a raw database call inside an HTTP controller to make a local test pass).
Relying on "soft" guardrails like CLAUDE.md or system prompts to maintain design patterns does not work. When context windows get full, these constraints are dropped.
Graphenium establishes external engineering governance. It operates outside the LLM context, treating architectural boundaries as a strict, compiled contract. It also attacks the same context decay from the other side: instead of forcing the agent to rediscover structure through tens of thousands of tokens of file reads, Graphenium compiles that structure once and serves it back as compact, provenance-tagged facts.
The Missing Layer in the Compiler Stack
Autonomous software engineering needs more than syntax, types, and tests. It needs a layer that proves the shape of the system still holds after an agent writes code. Graphenium is that layer.
Layer | Tooling | What It Proves |
1 - Lexical & Syntactic |
| Code is syntactically valid. |
2 - Type & Memory Safety | Type checkers, borrow checkers | Local types, signatures, and lifetimes align. |
3 - Behavioral Correctness |
| Specific inputs produce expected runtime outputs. |
4 - Topological, Architectural & Epistemic Integrity | Graphenium ( | Transitive architectural invariants hold, Louvain modularity (ΔQ) does not decay, formal proof gaps do not taint verified theorems, and physical diffs match an approved Virtual AST spec. |
graph TD
A[Agent Declares Design Spec] --> B[Graphenium Pre-Flight Check]
B -->|Violation: Block| C[Reject with structural hints]
B -->|Pass: Authorize| D[Agent Implements Code]
D --> E[Graphenium Post-Edit Audit]
E -->|Scope Creep| F[Fail Build / Block PR]
E -->|Compliant| G[Approve for human review]Related MCP server: codememory
The Core Technical Lifecycle: Design-then-Verify
Graphenium enforces an explicit four-phase compiler loop on the agent:
Declare Intent (Pre-Flight Spec): Before editing any code, the agent registers its planned changes (classes, methods, and dependencies) in a virtual planning workspace.
Transitive Policy Solving: Graphenium's engine runs a local Datalog solver to analyze the proposed virtual AST. If the design bypasses an intermediary architectural layer or uses banned symbols, Graphenium blocks the plan and provides structural feedback.
Zero-Drift Delta Gating: Even without a
.graphenium/policy.jsonfile, Graphenium applies in-memory modularity analysis (ΔQ) and surprise edge profiling to reject plans that mathematically degrade community structure.Post-Facto Compliance Audit: After the agent writes the code, Graphenium parses the physical modifications, checking planned and missing symbols, planned dependency edges, and files modified according to git status or an explicit snapshot diff. It ensures that the agent did not touch files outside the declared scope, introduce unplanned dependencies, or fail to implement its declared spec.
Quick Start
# 1. Initialize workspace
# Generates .grapheniumignore with standard project defaults
gm init
# 2. Build local AST and Stack Graphs index (No LLM keys required)
gm run . --no-semantic --no-viz
# 3. Diagnose codebase health and import resolution
gm doctor --graph graphenium-out/graph.json --resolution
# 4. Analyze structural neighborhoods
gm query "authentication flow" --budget 2000
# 5. Start the MCP server for AI coding agents
gm serve --graph graphenium-out/graph.json --watchInstallation
# From a local checkout
cargo install --locked --path .
# Or use the platform installer
curl -fsSL https://raw.githubusercontent.com/lambda-alpha-labs/Graphenium/main/install.sh | shRequires Rust 1.87 or later. Tree-sitter language grammars are compiled and bundled.
Five Technical Pillars
Pillar 1: Deterministic Polyglot Compilation & Epistemic Provenance
Graphenium compiles 10 languages - Rust, Python, Go, TypeScript, JavaScript, Java, C, C++, C# (including recursive .sln/.csproj assembly and project-reference discovery), and Lean 4 - into a unified relational index (schema 0.2.0) using Tree-sitter and import-scoped Stack Graphs resolution.
For agents, this replaces 30,000-token brute-force grep/file-read loops with ~1,500-token topological queries (PageRank hotspots, Brandes betweenness bottlenecks, blast radius, and safest paths). Every relationship carries explicit provenance:
EXTRACTED(AST-Proven): Compiler-backed facts (imports, type inheritance, explicit call signatures). Safe planning backbone.INFERRED(Heuristics): Semantic leads that the agent is forced to verify against source.AMBIGUOUS(Collisions / Proof Gaps): Identifier collisions that force the agent to halt and inspect source files directly, plus Lean 4sorry/admitproof gaps that must be resolved before a theorem is treated as verified.
Pillar 2: Intent–Implementation Decoupling via Virtual AST Workspaces
Before touching disk, the agent declares its proposed classes, functions, and dependency edges in an in-memory planning workspace (create_planning_workspace, add_planned_symbol). Graphenium models the future topology of the repository in milliseconds. If the design violates an invariant, the agent receives an exact topological counterexample in memory before wasting thousands of tokens rewriting physical files - eliminating the "agent linter deadlock" loop.
Pillar 3: Embedded Semi-Naive Datalog Verification Engine
Graphenium compiles the codebase and Virtual AST into strongly typed EDB relations (node, calls, imports, inherits, implements, contains, degree, hub) and evaluates first-order rules (stdlib.dl) with goal-directed pruning, first-column hash indexing, and semi-naive delta iteration (up to 10M EDB facts within a bounded step budget).
Beyond simple folder rules, stdlib.dl proves:
Multi-hop transitive layer bypasses (
bypasses_layer(X, Y, Z)).Mutual recursion and cycles (
circular_dependency(X, Y)).Call-site container/member aliasing hazards (
aliased_container_call(Caller, Target, Container, Member)).Entry-point dead-code and unreachability (
unreachable_from(Entry, Node)).Transitive formal proof-gap taint propagation (
has_proof_gap(X)andtainted_by_proof_gap(X)).
Pillar 4: Zero-Config Topological Entropy Guardrails (Louvain ΔQ + Surprise Profiling)
Even with zero configuration files (no .graphenium/policy.json), Graphenium partitions the physical baseline subgraph (G_baseline) and the proposed Virtual AST overlay (G_virtual) in memory, runs deterministic Louvain community detection on both, computes the modularity delta (ΔQ = Q(G_virtual) − Q(G_baseline)), and scores planned edges for structural surprise (cross-community, peripheral→hub).
This solves the "legacy codebase paradox": Graphenium accepts existing architectural complexity as baseline reality while mechanically blocking agents from introducing new topological entropy. Available via validate_plan (MCP, always runs the delta gate) and gm check --delta --plan <id> (CLI).
Pillar 5: Closed-Loop Post-Edit Realization & Scope-Creep Auditing
After physical edits are made and the index is refreshed, gm check --plan <id> and the MCP verify_changes tool audit physical reality against the approved Virtual AST spec across three dimensions:
Realized vs. missing nodes: Did the agent implement every declared symbol?
Realized vs. missing edges: Did the physical code realize the declared dependency relationships?
Unplanned file modifications (scope creep): Did the agent touch any non-test files outside the declared plan scope, according to git status or an explicit snapshot diff?
For PR-level containment, gm gate --diff <before> <after> blocks merges that introduce critical architectural drift between snapshots.
Declarative Structural Governance
Explicit rules remain available for teams that need them. Declare contracts in .graphenium/policy.json at the root of your repository:
{
"rules": [
{
"type": "forbidden_dependency",
"from_pattern": "src/controllers/**",
"to_pattern": "src/db/**",
"reason": "Controllers must use services, not access DB directly"
},
{
"type": "strict_layering",
"layers": [
"src/serve/**",
"src/analyze/**",
"src/extract/**",
"src/model/**"
],
"reason": "Respect tiered architecture: serve -> analyze -> extract -> model"
}
]
}Use gm check --plan <id> --strict to run pre-flight policy checks and post-facto compliance audits in CI.
# Topological delta gate (zero-config modularity protection)
gm check --delta --plan <id>For PR-level containment, compare two compiled indexes with gm gate:
gm gate --diff graphenium-snapshots/before.json graphenium-out/graph.jsonWithout --diff, gm gate runs the standard trust check against graphenium-out/graph.json.
Technical Safeguards: Friction & Loop Mitigations
Traditional static analysis tools and natural-language guardrails (like CLAUDE.md or system prompts) fail when context windows fill up, leading to agent "vibe-coding" and rapid token consumption. Graphenium implements three structural safeguards to prevent developer friction and agent deadlock:
1. Mitigating the "Agent Deadlock" Loop (Pre-Flight Virtual ASTs)
The Friction: If an agent is blocked by a strict linter, it can fall into a token-wasting trial-and-error cycle (Propose → Blocked → Tweak → Blocked).
Graphenium's Mechanism: Graphenium prevents this loop by isolating change evaluations to a virtual planning workspace (
create_planning_workspace). The agent registers its intent - classes, methods, and imports - before editing any physical files. Graphenium's pre-flight solver evaluates this virtual AST in milliseconds.If a violation is found, the agent does not receive a vague natural-language rejection. It receives structured, compiler-proven topological path violations (e.g., demonstrating the exact transitively bypassed service layers). This allows the agent to correctly refactor its design plan in memory before wasting LLM tokens on physical file rewrites.
2. Solving "Policy Rot" (Zero-Config Topological Delta Gating)
The Friction: Declaring and maintaining strict architectural rules in a static JSON file (
policy.json) introduces manual configuration overhead that fast-moving teams often neglect.Graphenium's Mechanism: If no
.graphenium/policy.jsonfile is present in the repository, Graphenium dynamically falls back to Zero-Drift Delta Gating (gm check --delta). Instead of relying on static directory regexes, Graphenium uses its native Louvain community-detection engine to evaluate your codebase's current structural cohesion.When an agent proposes a virtual plan, Graphenium calculates the modularity delta (ΔQ) and surprise coupling score of the new edges. It gracefully accepts your existing legacy complexity as the baseline, but mechanically blocks the agent from introducing new topological decay. No configuration files are required to protect your system's modularity.
3. Resolving Agent Integration Friction (Direct Skill-Folder Injection)
The Friction: Standard stateless MCP setups mean agents can easily bypass sequential four-phase design loops (Declare → Solve → Gate → Audit), requiring manual developer mediation.
Graphenium's Mechanism: Graphenium circumvents this integration barrier by programmatically injecting its behavioral rules directly into the agentic runtime. During installation (
install.shorinstall.ps1), Graphenium copies its standard system skill instruction set (skills/graphenium/SKILL.md) directly into Claude Code's native skill directory (~/.claude/skills/graphenium/SKILL.md).This ensures that the moment the assistant handshakes with Graphenium, it ingests explicit, structured operating parameters on how to manage virtual workspaces and resolve topological violations, without requiring the developer to configure system prompts manually.
Language Support
Graphenium supports mixed repositories with Rust, Python, Go, JavaScript, TypeScript, Java, C, C++, C#, and Lean 4.
C# projects receive build-boundary awareness through recursive .sln and .csproj discovery, enabling Graphenium to model assemblies, namespaces, and project references as structural boundaries even in deeply nested enterprise layouts.
Lean 4 support is built in and requires no tree-sitter grammar feature flag. It extracts namespaces, declarations, imports, and proof dependencies, and emits AMBIGUOUS unverified_sorry edges for sorry / admit proof gaps so CI can gate incomplete formal verification work.
MCP Setup
Integrate Graphenium directly into your agent's execution loop. For tools that spawn MCP from the project directory, use the scripts/graphenium-mcp launcher (rebuilds only when the index is missing, keeping startup instantaneous).
install -m 755 scripts/graphenium-mcp ~/.local/bin/graphenium-mcpClaude Code
claude mcp add graphenium --scope user -- gm serve --graph /path/to/graphenium-out/graph.json --watchGrok
Configure in ~/.grok/config.toml:
[mcp_servers.graphenium]
command = "/Users/<you>/.local/bin/graphenium-mcp"
args = []
enabled = trueCursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"graphenium": {
"command": "gm",
"args": ["serve", "--graph", "/path/to/graphenium-out/graph.json", "--watch"]
}
}
}Detailed Documentation Map
Root
Document | Purpose |
Step-by-step assistant setup playbook. | |
Contributor guidelines and module reference. | |
Release history and milestone summary. | |
Local-first security guarantees and vulnerability reporting. | |
Complete package manifest indexing all documentation. |
Core Documentation (docs/)
Document | Purpose |
Installation, initial codebase indexing, and MCP setup. | |
Containment workflows: pre-flight, in-edit planning, and verification. | |
Enforcing architecture policies in CI pipelines. | |
Complete CLI syntax and configuration arguments. | |
Behavior specifications for MCP clients. | |
Indexing pipelines, C# project references, and Datalog evaluation. | |
Under-the-hood details of AST-proven vs heuristic confidence. | |
Performance metrics: latency, token budgets, and scaling limits. | |
Why Graphenium supersedes grep, AST tools, GraphRAG, and static architecture linters. | |
Embedding Graphenium's relational compiler and containment engine as a library. | |
Case studies proving containment on real repositories. | |
Interpreting the generated codebase audit report. | |
Full documentation ecosystem overview. |
Agent Integration
Document | Purpose |
Agentic skill instructions and containment behavior rules. | |
Embedding Graphenium's engine inside AI coding harnesses. |
Case Studies (worked/)
Document | Purpose |
Overview of structural containment case studies. | |
Template for documenting new codebase case studies. | |
Graphenium self-analysis: applying the containment engine to itself. | |
Sample query output on Graphenium's own codebase. | |
Lean 4 proof-gap taint mapping and a verified |
Contact & Enterprise
Issues and Feature Requests: GitHub Issues
Security Reports: security@graphenium.dev
Design partners, enterprise pilots, and partnerships: hello@graphenium.dev
License
MIT. See docs/LICENSE.md.
Available Tools
12 toolsadd_planned_symbolA
Register an intended new or modified symbol and its dependency edges in a virtual planning workspace. Use this tool to declare your architectural design before writing code. Do NOT use mutate_graph (which modifies the physical index) for planned changes. Prerequisites: You must first call create_planning_workspace to obtain a valid plan_id. Side effects: This is an in-memory mutation that adds a virtual node to the specified workspace. It automatically runs pre-flight policy checks; if the proposed symbol or its dependencies violate .graphenium/policy.json rules (for example, forbidden dependencies), the tool returns a PRE_FLIGHT_VIOLATION error and blocks the registration. If the target_symbol does not exist, the tool returns an error and records nothing. Duplicate calls for the same symbol are idempotent. Returns a success confirmation or a structural violation error.
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Label for the new planned symbol | |
| plan_id | Yes | Planning workspace ID | |
| relation | Yes | Relation type (calls, depends_on, implements, etc.) | |
| file_path | Yes | File path where the symbol will be added | |
| target_symbol | Yes | ID or label of the existing node to link to |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full disclosure burden and does so thoroughly: it identifies the operation as an in-memory virtual mutation, states that pre-flight policy checks run against .graphenium/policy.json, names the PRE_FLIGHT_VIOLATION failure mode, notes the target_symbol-missing failure records nothing, and declares duplicate calls idempotent. This is behavioral context an agent could not get from structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The routing constraint and prerequisite are front-loaded before the behavioral detail, which is the right order. The closing sentence 'Returns a success confirmation or a structural violation error' largely restates the earlier pre-flight violation paragraph, so one sentence does not fully earn its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description compensates by summarizing return outcomes (success confirmation vs. structural violation error). Combined with prerequisites, side effects, and idempotency, an agent has everything needed to invoke this correctly on the first attempt.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 meaning beyond the schema: plan_id must come from a prior create_planning_workspace call, and target_symbol must reference an existing node or nothing is recorded. It does not elaborate on relation values (no enums present) or file_path format, which keeps it short of a 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource plus scope: 'Register an intended new or modified symbol and its dependency edges in a virtual planning workspace.' It explicitly distinguishes itself from mutate_graph by name, so an agent can separate the virtual/planned path from the physical-index path 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states both when to use it ('declare your architectural design before writing code') and when not to ('Do NOT use mutate_graph ... for planned changes'), and names the required predecessor tool create_planning_workspace. The routing decision is fully specified with no inference left to the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_planning_workspaceA
Create a new virtual planning workspace. Use this tool first when starting any multi-file feature or refactoring task, before calling add_planned_symbol or validate_plan. Do not use this tool if a plan already exists for your current task. This is a mutating operation that initializes an empty Virtual AST associated with the provided plan_id. The workspace is stored in the server's graph state and persisted to disk immediately, so it remains available for the duration of the server session. If the plan_id already exists, this operation is idempotent and returns the existing workspace. Returns the initialized workspace ID on success.
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | Unique identifier for the planning workspace | |
| description | Yes | Human-readable description of the plan's purpose |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so well: it declares this is a mutating operation, explains it initializes an empty Virtual AST in server graph state, notes immediate disk persistence and session lifetime, and discloses idempotency behavior when plan_id already exists. That is exactly the safety and side-effect context an agent needs before invoking a write tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose, ordering, exclusion, side effects, idempotency, and return value are front-loaded in five tight sentences with no filler. Each sentence adds distinct decision-relevant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter mutation tool with no output schema and no annotations, the description covers invocation conditions, side effects, idempotency, and the return value ('workspace ID on success'). 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.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3; the description adds real semantic value by explaining that plan_id collision yields idempotent reuse of the existing workspace, and that the workspace is associated with the provided plan_id. The description parameter's purpose is left to the schema, hence not a 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Create a new virtual planning workspace'), and explicitly distinguishes itself from the sibling tools add_planned_symbol and validate_plan by naming them as follow-on steps. An agent can identify this as the initialization step 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit when-to-use ('first when starting any multi-file feature or refactoring task, before calling add_planned_symbol or validate_plan') and when-not-to-use ('Do not use this tool if a plan already exists for your current task'). The ordering relative to siblings is fully spelled out.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_architecture_summaryA
Return a repository-level architecture summary with communities, cross-community connectors, and architectural hotspots. Set community_id to focus on one community instead of the overview, include_community_members to append its full member list, and include_god_nodes to append the most highly connected hub nodes.
| Name | Required | Description | Default |
|---|---|---|---|
| node_types | No | Optional file types to include, for example ['code', 'document', 'rationale']. | |
| path_prefix | No | Optional path prefix or path fragment to include (case-insensitive). | |
| community_id | No | Optional integer community ID. When set, the response focuses on that community instead of the repository-wide overview. | |
| exclude_path | No | Optional path prefix or path fragment to exclude (case-insensitive). | |
| god_node_limit | No | Number of hub nodes to return when include_god_nodes is true (default 10, max 50). | |
| ast_only_tuning | No | AST-only tuning: true enables AST-only noise suppression, false disables it, omitted = auto. | |
| max_communities | No | Maximum number of communities to summarize in the overview (default 5, max 10). | |
| include_god_nodes | No | Append the top architectural hub nodes (god nodes) after the architecture summary. Default false. | |
| generated_code_mode | No | Generated-like code filter: 'include' (default), 'exclude', or 'only'. | |
| include_community_members | No | When community_id is set, append the full member list for that community. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations at all, the description carries the full disclosure burden. It does credibly describe the shape of the response (overview vs per-community focus, appended member lists and hub nodes), but says nothing about prerequisites (e.g. the graph must already be loaded/reloaded), cost/latency of an aggregation over the whole repo, or default limits behavior beyond what the schema states.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler, with the core output contract front-loaded and the mode-switching flags grouped in the second sentence. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 10-parameter, no-output-schema tool it does the important work of describing what comes back, and the schema fully covers the knobs. What is missing is operational framing: no note that the repository graph must be loaded, and no hint about the relative cost of the repo-wide overview versus a focused community query.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so every one of the 10 parameters is already documented. The description echoes the semantics of community_id, include_community_members and include_god_nodes, but adds no detail the schema lacks (defaults, ranges, and filtering modes on node_types/path_prefix/generated_code_mode are all schema-side). Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
A concrete verb (return) plus resource (repository-level architecture summary) and an explicit enumeration of what the payload contains: communities, cross-community connectors, architectural hotspots. It does not distinguish itself from nearby read tools such as query_graph or get_graph_info, which is the only thing keeping it off a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The second sentence gives conditional guidance for three flags ('Set community_id to focus on one community instead of the overview', include_community_members/god_nodes append to the result), so invocation modes are implied. There is no statement of when to choose this tool over an alternative query path, nor any when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_graph_infoA
Return graph metadata, health, and diagnostics in one call. Always returns project root, schema version, build time, extraction modes, languages, node/edge/hyperedge/community counts, active policy gates, and the graph trust mode. Set include_stats to append scoped statistics, include_unresolved to list unresolved imports, include_resolution to append the resolution-quality report, and include_ambiguous to list ambiguous edges and label collisions.
| Name | Required | Description | Default |
|---|---|---|---|
| node_types | No | Optional file types to include in statistics, for example ['code', 'document', 'rationale']. | |
| path_prefix | No | Optional path prefix or path fragment to include in statistics (case-insensitive). | |
| exclude_path | No | Optional path prefix or path fragment to exclude from statistics (case-insensitive). | |
| include_stats | No | Append scoped statistics: node and edge counts, node-type breakdown, edge confidence distribution, and extractor provenance. Default false. | |
| ast_only_tuning | No | AST-only tuning for statistics: true enables AST-only noise suppression, false disables it, omitted = auto. | |
| include_ambiguous | No | Append the ambiguous symbol report listing low-confidence edges and cross-file label collisions. Default false. | |
| include_resolution | No | Append the resolution-quality report covering import, call, and method resolution rates plus ambiguous edge counts. Default false. | |
| include_unresolved | No | Append the list of unresolved import references (import edges whose target symbol is missing from the graph). Default false. | |
| generated_code_mode | No | Generated-like code filter for statistics: 'include' (default), 'exclude', or 'only'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does well: it declares the always-returned payload and which optional reports are appended by each flag. It stops short of stating that the tool is read-only or noting any cost/latency of the heavier reports.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two dense sentences, front-loaded with the guaranteed return set before the opt-in behavior. The second sentence is a long enumeration but each clause maps to a distinct flag, so little is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates by listing the always-present fields; it also explains all four opt-in reports. Adequate for a 9-param, zero-required diagnostic tool, with only the scoping/filter parameters left entirely to the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and each parameter already has a description, so the description's flag summary largely restates it. It adds grouping value by pairing each include_* flag with the report it appends, but the scoping params (node_types, path_prefix, exclude_path, generated_code_mode) go unmentioned at the tool level.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Return graph metadata, health, and diagnostics in one call') and enumerates exactly what comes back, so an agent knows what it gets. It does not explicitly distinguish itself from the nearby get_architecture_summary or query_graph siblings, which would have made it a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through 'in one call' and the opt-in flags, but never says when to reach for this versus get_architecture_summary, query_graph, or reload_graph, and gives no exclusions. Useful but inference-required.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_symbolA
Inspect a symbol and retrieve its structural neighborhood and metrics. Use this read-only tool as your primary orientation step before modifying a specific class, function, or module. Use this instead of query_graph when you already know the exact target ID and need its direct callers, neighbors, or a verification plan. The baseline response returns canonical node details. Use the boolean flags to append optional data blocks (for example, include_callers=true appends all incoming dependencies). Setting multiple flags to true (such as include_analysis and include_file_summary) can produce large responses; use only the flags needed for your immediate task to conserve context budget.
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Node ID or label to inspect. When include_file_summary is set, a file path or filename suffix is also accepted. | |
| group_by | No | When include_file_summary is true, group symbols by 'kind' (default) or 'community'. | |
| relation | No | Optional substring used to filter neighbors by relation type, for example 'calls' or 'imports'. | |
| show_leaves | No | When include_file_summary is true, include low-degree leaf symbols of degree 5 or less. Default false. | |
| max_neighbors | No | Maximum number of neighbors to return (default 50, minimum 1). | |
| extracted_only | No | When include_neighbors is true, show only edges with EXTRACTED confidence. Default false. | |
| include_callers | No | Append structural references to the target: containers, imports, inheritance, and implementations. Default false. | |
| include_analysis | No | Append the composite symbol analysis with behavioral and structural connections plus a confidence summary. Default false. | |
| include_neighbors | No | Append direct neighbors of the target with relation types, confidence, and scores. Default false. | |
| include_explanation | No | Append a pre-change explanation with hierarchy, community context, entry points, must-read files, and test scaffolding. Default false. | |
| include_file_summary | No | Append a summary of every symbol extracted from the target's source file. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does state the read-only nature and the key behavioral trait: flag combinations can produce large responses and consume context budget. It does not mention error behavior, truncation, or what happens when target is ambiguous, which keeps it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose and routing rule, then cost advice; every sentence has a job. It runs slightly long, and the flag-advice sentence partially repeats guidance implied by the schema's default-false flags.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 11-parameter tool with no output schema, the description explains the response shape (baseline node details plus appended blocks) and when to add each. Adequate for correct invocation, though the include_callers mismatch and lack of note on how group_by/show_leaves interact with include_file_summary slightly reduce confidence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3; the description adds real meaning by explaining the baseline-vs-optional-block model and the cost tradeoff of setting multiple flags. One caveat: it says include_callers 'appends all incoming dependencies' while the schema says containers/imports/inheritance/implementations, a slight semantic mismatch that could mislead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Inspect a symbol and retrieve its structural neighborhood and metrics') and immediately clarifies the baseline return ('canonical node details') versus optional blocks. An agent can distinguish it from query_graph, trace_path, and get_architecture_summary without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly names the situation to use it ('primary orientation step before modifying a specific class, function, or module') and the alternative plus the exact selection condition ('use this instead of query_graph when you already know the exact target ID'). This is a genuine routing rule, not implied guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mutate_graphA
Apply a manual mutation to the relational index in one call. Use action='add_node' to register a concept or rationale node, action='add_edge' to record a verified relationship, action='remove_edge' to delete a stale or false-positive edge, or action='recluster' to re-run community detection. Successful mutations persist to disk immediately.
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Node identifier for add_node. Normalized automatically into a stable ID. | |
| label | No | Human-readable display name for add_node. | |
| action | Yes | Mutation action: 'add_node', 'add_edge', 'remove_edge', or 'recluster'. | |
| source | No | Source node ID or label for add_edge and remove_edge. | |
| target | No | Target node ID or label for add_edge and remove_edge. | |
| weight | No | Optional traversal weight override for add_edge, clamped to the 0.0 to 1.0 range. | |
| relation | No | Relation type for add_edge, for example 'calls', 'uses', 'delegates_to', or 'rationale_for'. For remove_edge, an optional relation filter. | |
| file_type | No | Node type for add_node: 'code', 'document', 'paper', 'image', or 'rationale'. | |
| confidence | No | Edge confidence for add_edge: 'EXTRACTED' (verified by inspection), 'INFERRED' (strong hint), or 'AMBIGUOUS' (uncertain). | |
| source_file | No | Relative source file path for add_node, or the file where an add_edge relationship was observed. | |
| qualified_label | No | Optional qualified scope-prefixed label used by add_node for disambiguation. | |
| source_location | No | Optional source location hint, for example 'L42', used by add_node or add_edge. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It does disclose a key behavioral trait — that successful mutations persist to disk immediately — but says nothing about reversibility, what happens on a failed or partial mutation, idempotency of duplicate add_node/add_edge calls, or whether the in-memory graph must be refreshed via reload_graph afterward.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: the first commits to what the tool is, the second is a tightly parallel action-by-action breakdown. Every clause earns its place and the general purpose is front-loaded before the detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 12-parameter tool with conditional per-action fields and no annotations or output schema, the description covers the action taxonomy and persistence but leaves real gaps: no per-action parameter requirements, no indication of what is returned on success, and no mention of interaction with the sibling reload_graph.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 12 parameters, which sets the baseline at 3. The description adds action-level semantics that the flat schema enum does not (what each action accomplishes), but it never states which parameters are conditionally required per action — e.g. that add_edge needs source/target or that remove_edge accepts an optional relation filter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('apply a manual mutation to the relational index') and then enumerates all four actions with concrete semantics (add_node registers a concept/rationale, add_edge records a verified relationship, remove_edge deletes a stale edge, recluster re-runs community detection). This clearly separates it from read-oriented siblings like query_graph, get_graph_info, and inspect_symbol.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Each action value is paired with the situation that selects it (e.g. remove_edge for 'a stale or false-positive edge', recluster to 're-run community detection'), which is strong intra-tool routing. However, there is no guidance on when to prefer this over the write-ish sibling add_planned_symbol, nor any exclusion such as 'do not use for bulk imports — use reload_graph instead'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_graphA
Query the relational index with keywords to find relevant nodes and explore their topology. Use this read-only tool for initial discovery when you do not yet know the exact node IDs. If you already know the target ID, use inspect_symbol instead. To trace deep multi-hop paths, use trace_path instead. The query mechanism scores nodes by keyword match and traverses their neighborhood (BFS by default, or DFS if dfs=true). Results are rendered as a structured Markdown report. To prevent context bloat, the output is strictly truncated to fit within the provided budget (default 2000).
| Name | Required | Description | Default |
|---|---|---|---|
| dfs | No | Use depth-first search instead of BFS (default false) | |
| depth | No | Traversal depth (1–6, default 3) | |
| budget | No | Approximate output token budget (default 2000) | |
| keywords | Yes | Keywords or phrase to search for (space-separated) | |
| min_degree | No | Minimum node degree to include (filters low-degree noise) | |
| node_types | No | Optional file types to include, e.g. ['code', 'document', 'rationale'] | |
| path_prefix | No | Optional path prefix or path fragment to include (case-insensitive) | |
| exclude_path | No | Optional path prefix or path fragment to exclude (case-insensitive) | |
| include_tests | No | Include test/spec nodes in results. Default false (test/spec excluded). | |
| ast_only_tuning | No | AST-only tuning: true enables AST-only noise suppression, false disables it, omitted = auto | |
| exclude_relations | No | Optional relation filters to exclude during traversal/rendering, e.g. ['imports'] | |
| include_relations | No | Optional relation filters to include during traversal/rendering, e.g. ['calls', 'uses'] | |
| generated_code_mode | No | Generated-like code filter: 'include' (default), 'exclude', or 'only' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it declares the tool read-only, explains that scoring is keyword-based and traverses neighborhoods via BFS/DFS, and states that output is a structured Markdown report truncated to the token budget. It stops short of covering edge behaviors such as empty results, error handling, or determinism, so it is strong but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with purpose and usage, then adds mechanism, output format, and truncation behavior. Every sentence contributes useful information, and there is no redundant filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although there is no output schema, the description explains the return format as a structured Markdown report and notes budget-based truncation. Combined with the fully documented input schema and explicit alternatives, it gives an agent enough context to call the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 13 parameters. The description repeats a few defaults such as BFS/DFS and budget=2000, but adds little parameter meaning beyond what the schema provides; the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: query the relational index with keywords to find nodes and explore topology. It also distinguishes the tool from siblings by naming inspect_symbol for known IDs and trace_path for deep multi-hop traversal.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly gives the use case for this tool (initial discovery when exact node IDs are unknown) and names two alternatives with the conditions that select them. That is enough routing guidance for an agent to choose among the primary query options.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reload_graphA
Reload the relational index from a graph.json file without restarting the MCP server. If no path is given, reloads from the path the server was launched with. Use this to point a running server at a different repository's graph, or to pick up changes after re-running gm run.
| Name | Required | Description | Default |
|---|---|---|---|
| graph_path | No | Optional filesystem path to a graph.json file. If omitted, reloads from the path the server was originally launched with. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does well: it discloses the live-state-mutation effect (index is replaced in a running server) and that the default source is the launch-time path. It stops short of stating failure behavior (invalid path, parse errors) or whether the previous index is restored/discarded on failure, which matters for a state-replacing operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences: what it does first, the default behavior second, the use cases last. Every sentence earns its place and nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-optional-parameter operational tool with no output schema, the description covers purpose, default source, and motivation. The remaining gap is operational edge cases (what happens if the path is invalid or the file is malformed, and whether the server's current index survives a failed reload).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the schema already documents graph_path including the omitted-path default, so the description's sentence about the default merely restates it. The phrase 'a different repository's graph' adds slight semantic color (what a path typically points to) but no format or validation detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Reload the relational index from a graph.json file') plus the key property that it happens 'without restarting the MCP server'. No sibling tool does anything comparable, so it is trivially distinguishable from the query/analysis tools listed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly gives two named scenarios for use: pointing a running server at a different repository's graph, and picking up changes after re-running `gm run`. That is exactly the when-to-use guidance an agent needs for an operational tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_datalogA
Run a logic query over the codebase graph. Standard library predicates are pre-loaded (do not redefine them):
calls_transitive(X, Y) : X transitively calls Y
imports_transitive(X, Y) : X transitively imports Y
depends_transitive(X, Y) : X transitively depends on Y
same_community(X, Y) : X and Y are in the same Louvain cluster
is_hub(X) : X has > 15 connections
is_orphan(X) : X has no incoming/outgoing edges
circular_dependency(X, Y) : X and Y call each other
bypasses_layer(X, Y, Z) : X depends on Z, bypassing intermediary Y Base EDB relations: node, calls, imports, contains, inherits, implements, degree, edge. Supports user rules (:-), goals (?-), facts, and negation (not). Budget-bounded (max 10,000 steps).
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Datalog program text. Supports goals (?-), user rules (:-), facts, and negation (not). Standard library predicates are pre-loaded. | |
| step_budget | No | Maximum solver steps before the query is bounded (default 1000, clamped to 100 through 10000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well by disclosing the step budget (max 10,000 steps), pre-loaded standard predicates, and support for rules, goals, facts, and negation. It stops short of explicitly stating read-only behavior or describing the result shape, which are minor but real gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, then uses a compact bulleted list for predicates and a short sentence for base relations and constraints. Every sentence contributes useful information without repetition or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex Datalog query tool with no annotations and no output schema, the description provides strong input-side context: syntax features, standard predicates, base relations, and budget bounds. It is complete enough to invoke correctly, though it does not explain the return format or how to choose this tool over siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters. The description adds substantial meaning for the query parameter by enumerating standard-library predicates and base EDB relations, which materially helps an agent construct valid queries. The step-budget behavior is also mentioned consistently with the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Run a logic query over the codebase graph.' It further clarifies the query language and available predicates, making the tool's purpose concrete. It does not explicitly differentiate itself from siblings such as query_graph or trace_path, so it falls short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by listing standard predicates and supported Datalog constructs, which suggests the tool is for recursive or logic-based graph queries. However, it gives no explicit when-to-use/when-not-to-use guidance and does not name alternatives like query_graph or trace_path.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
trace_pathA
Trace connectivity and multi-hop paths across the codebase architecture. Use this read-only tool to map blast radius, find shortest paths, or verify transitive layering. Use this instead of query_graph or inspect_symbol when you need to prove deep, multi-hop relationships between specific components. The tool operates in five distinct modes: shortest (finds semantic or strict AST paths between source and target), safest (finds the path with highest aggregate confidence), transitive_forward (downstream reachability), transitive_reverse (upstream callers), and module_dependencies (cross-module edges). Returns a structured Markdown report detailing the traced paths, confidence scores, and edge relations. Traversal halts when depth is reached, and output is truncated to fit the budget.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Routing mode: 'shortest' (default), 'safest', 'transitive_forward', 'transitive_reverse', or 'module_dependencies'. | |
| depth | No | Maximum traversal depth for transitive modes (default 3, max 6). | |
| budget | No | Approximate output character budget for transitive modes (default 2000). | |
| source | Yes | Starting node ID or label. For module_dependencies, this is the source module or directory path fragment. | |
| target | No | Destination node ID or label. Required for shortest, safest, and module_dependencies modes. For module_dependencies, this is the target module or directory path fragment. | |
| direction | No | Optional direction override for transitive modes: 'forward', 'reverse', or 'both'. | |
| path_mode | No | Shortest path strategy: 'semantic' (default) prefers calls, uses, and contains style relations; 'strict' uses the exact fewest hops. | |
| node_types | No | Optional file types to include for shortest paths, for example ['code', 'document', 'rationale']. | |
| path_prefix | No | Optional path prefix or path fragment to include for shortest paths (case-insensitive). | |
| exclude_path | No | Optional path prefix or path fragment to exclude for shortest paths (case-insensitive). | |
| ast_only_tuning | No | AST-only tuning for shortest paths: true enables AST-only noise suppression, false disables it, omitted = auto. | |
| exclude_relations | No | Optional relation filters to exclude for shortest paths, for example ['imports']. | |
| include_relations | No | Optional relation filters to include for shortest paths, for example ['calls', 'uses']. | |
| generated_code_mode | No | Generated-like code filter for shortest paths: 'include' (default), 'exclude', or 'only'. | |
| exclude_framework_noise | No | Exclude framework and import-noise bridge nodes from shortest path search. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden and does well: it declares the tool read-only, explains that traversal halts at depth, and that output is truncated to a character budget. It stops short of describing error conditions or how confidence scores are computed, leaving a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The text is front-loaded with purpose, then routing guidance, then mode enumeration, then return format and limits. It is dense and information-rich, though the mode list makes it longer than strictly necessary for a first read.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 15-parameter tool with no annotations and no output schema, the description supplies what an agent needs: mode semantics, depth/budget behavior, and the shape of the returned Markdown report. Gaps remain around failure behavior and the many shortest-path tuning filters, which are left entirely to the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3; the description earns above that by adding semantic meaning the schema does not, such as what 'safest' optimizes for (highest aggregate confidence) and what transitive_forward vs transitive_reverse traverse. It does not explain source/target interaction beyond mode requirements, so it is not a 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource ('Trace connectivity and multi-hop paths across the codebase architecture') and immediately distinguishes its role from siblings by naming query_graph and inspect_symbol. An agent can tell what it does without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives both positive triggers ('map blast radius, find shortest paths, or verify transitive layering') and an explicit routing rule ('use this instead of query_graph or inspect_symbol when you need to prove deep, multi-hop relationships'), then enumerates the five modes so the agent knows which variant answers which question.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_planA
Validate a planning workspace before writing code. Always runs the Louvain modularity delta gate and surprise analysis. Unless skip_policy_rules is true, it also applies explicit .graphenium/policy.json rules when present.
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | The workspace plan identifier to validate. | |
| skip_policy_rules | No | When true, skip explicit architecture policy rules and run only the Louvain modularity delta gate. Default false. | |
| surprise_threshold | No | Surprise threshold used to flag structurally surprising planned edges (default 5.0). | |
| modularity_tolerance | No | Maximum allowed modularity drop for the delta gate (default -0.02). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose substantive internals: the Louvain modularity delta gate and surprise analysis always run, and policy rules are applied conditionally. However, it never says whether validation mutates workspace state or is a pure read, nor what happens on failure — the most important behavioral facts for a gate tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, zero filler, with the core action front-loaded and the conditional policy behavior placed last. Every sentence carries information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a validation gate with no output schema and no annotations, the description explains what checks run but not what the agent receives back (pass/fail, violation list, modularity numbers) or whether the workspace is modified. That leaves a meaningful gap for an agent deciding how to act on the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so every parameter including defaults is already documented. The description adds only marginal meaning by naming the gates that modularity_tolerance and surprise_threshold feed into; it adds no syntax, ranges, or interaction details beyond the schema. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Validate a planning workspace') plus the lifecycle position ('before writing code'), which makes it distinguishable from graph-inspection siblings like get_architecture_summary or query_graph. It does not explicitly contrast itself with the closest sibling, verify_changes, so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'before writing code' gives clear timing context for invocation, and the skip_policy_rules clause implies a lighter-weight mode. There is no explicit statement of when not to use it or which sibling to prefer for post-change verification.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_changesA
Verify a change in one unified report. Returns the scope creep audit, blast radius, verification checklist, and must-read files for the supplied target symbols. When plan_id is set it also returns the plan details and post-edit compliance audit. Optional snapshot or graph path inputs add what-changed and graph-diff sections.
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | No | Optional planning workspace ID. When set, includes pre-flight policy checks, post-edit compliance, and the full planned subgraph. | |
| max_ambiguous | No | Optional override for the maximum allowed ambiguous edges used by the change gate (default 10). | |
| snapshot_name | No | Optional snapshot name. When set, appends a risk-sorted what-changed report comparing the snapshot to the loaded graph. | |
| min_resolution | No | Optional override for the minimum import resolution percentage used by the change gate (default 80.0). | |
| target_symbols | No | Optional list of changed node IDs or labels to audit. Each entry may be an exact ID or a case-insensitive label. | |
| after_graph_path | No | Optional filesystem path to an after graph.json file. Used with before_graph_path for a graph diff and review plan. | |
| before_graph_path | No | Optional filesystem path to a before graph.json file. Used with after_graph_path for a graph diff and review plan. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It usefully discloses the report sections and how optional inputs change the output, but it does not state whether the operation is read-only, what permissions or prerequisites are required, or how failures are reported.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three tight sentences with no wasted language. The core purpose is front-loaded, followed by return contents and conditional input effects.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a seven-parameter tool with no output schema and no annotations, the description does a good job naming the returned report sections and explaining how optional inputs add sections. It is not fully complete because it omits safety/read-only behavior and does not explain the change-gate thresholds beyond what the schema provides.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all seven parameters. The description adds some conditional meaning for plan_id, snapshot_name, and graph paths, but it does not mention max_ambiguous or min_resolution and largely repeats what the schema already says.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: verify a change and return a unified report with named sections. It is clear what the tool does, but it does not explicitly distinguish itself from sibling tools such as validate_plan or inspect_symbol.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the phrase 'Verify a change' and by conditional notes about plan_id, snapshot_name, and graph paths. However, there is no explicit when-to-use guidance, no exclusions, and no named alternative for cases where another sibling tool would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
39 tool updates
v0.23.0- Removed
add_edge - Removed
add_node - Removed
agent_change_gate - Removed
ambiguous_symbols - Removed
analyse_symbol - Removed
architecture_summary - Removed
blast_radius - Removed
diff_graph - Removed
evaluate_delta_gate - Removed
explain_change - Added
get_architecture_summary - Removed
get_community - Added
get_graph_info - Removed
get_neighbors - Removed
get_node - Removed
get_plan_details - Removed
god_nodes - Removed
graph_info - Removed
graph_stats - Added
inspect_symbol - Removed
module_dependencies - Added
mutate_graph - Removed
next_files_to_read - Removed
query_transitive - Removed
recluster - Removed
references_to - Removed
remove_edge - Removed
resolution_report - Removed
review_plan - Changed
run_datalog2 fields changed- added
Input schema / properties / query / descriptionAdded value: +"Datalog program text. Supports goals (?-), user rules (:-), facts, and negation (not). Standard library predicates are pre-loaded." - added
Input schema / properties / step_budget / descriptionAdded value: +"Maximum solver steps before the query is bounded (default 1000, clamped to 100 through 10000)."
- Removed
safest_path - Removed
shortest_path - Removed
summarize_file - Added
trace_path - Removed
unresolved_references - Changed
validate_plan4 fields changed- added
Input schema / properties / modularity_toleranceAdded value: +{ + "description": "Maximum allowed modularity drop for the delta gate (default -0.02).", + "format": "double", + "type": "number" +} - changed
Input schema / properties / plan_id / descriptionPrevious value: -"The workspace plan identifier to validate"New value: +"The workspace plan identifier to validate." - added
Input schema / properties / skip_policy_rulesAdded value: +{ + "description": "When true, skip explicit architecture policy rules and run only the Louvain modularity delta gate. Default false.", + "type": "boolean" +} - added
Input schema / properties / surprise_thresholdAdded value: +{ + "description": "Surprise threshold used to flag structurally surprising planned edges (default 5.0).", + "format": "double", + "type": "number" +}
- Removed
verification_plan - Added
verify_changes - Removed
what_changed
37 tool updates
v0.1.0- First observed
add_edge - First observed
add_node - First observed
add_planned_symbol - First observed
agent_change_gate - First observed
ambiguous_symbols - First observed
analyse_symbol - First observed
architecture_summary - First observed
blast_radius - First observed
create_planning_workspace - First observed
diff_graph - First observed
evaluate_delta_gate - First observed
explain_change - First observed
get_community - First observed
get_neighbors - First observed
get_node - First observed
get_plan_details - First observed
god_nodes - First observed
graph_info - First observed
graph_stats - First observed
module_dependencies - First observed
next_files_to_read - First observed
query_graph - First observed
query_transitive - First observed
recluster - First observed
references_to - First observed
reload_graph - First observed
remove_edge - First observed
resolution_report - First observed
review_plan - First observed
run_datalog - First observed
safest_path - First observed
shortest_path - First observed
summarize_file - First observed
unresolved_references - First observed
validate_plan - First observed
verification_plan - First observed
what_changed
TDQS
Scored across 12 tools
The three read paths (query_graph for discovery, inspect_symbol for known IDs, trace_path for multi-hop) are explicitly cross-differentiated in their descriptions, and mutate_graph vs add_planned_symbol are clearly separated (physical index vs virtual workspace). The remaining overlap is mostly between run_datalog and trace_path for transitive queries, but descriptions give enough guidance to avoid misselection.
All twelve tools follow a verb_noun pattern (trace_path, inspect_symbol, query_graph, reload_graph, validate_plan, create_planning_workspace), with no camelCase mixing. Minor inconsistency in the 'get_' prefix being used only for two summary/info tools while other reads use more specific verbs, but the convention remains readable and predictable.
Twelve tools sit squarely in the well-scoped range, and each covers a distinct phase: discovery, inspection, tracing, custom logic, architecture overview, diagnostics, mutation, planning, and verification. No tool feels redundant or padded.
The surface covers the full read/analyze/mutate/plan/verify lifecycle for a codebase graph, including diagnostics and planning workspaces. Gaps are minor: mutate_graph supports add_node/add_edge/remove_edge but no remove_node, and there is no tool to list, inspect, or discard existing planning workspaces, which could strand agents mid-plan.
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceTurn any codebase into an AI-readable neural map — with proof. Every claim linked to code anchors (line + SHA-256 hash), every context window optimized with greedy token budgeting, every session protected by drift detection. Tree-sitter indexing across 11 languages, cross-session learning, AI enrichment, and 28 MCP tools. Zero config — just connect and your AI agent remembers everything.9 npm14GPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to locally search, query, and understand codebases with token-efficient context, dependency graphs, history, architecture diagrams, and metrics through MCP.15 npm3MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to retrieve hyper-targeted, token-efficient context from a codebase by querying a locally built AST knowledge graph, and to persist cross-session agent memory through 17 MCP tools. All indexing and retrieval run entirely offline, so proprietary code never leaves the machine.65 PyPI1MIT

Seshatofficial
AlicenseAqualityCmaintenanceEnables AI coding agents to query a compiled typed symbol graph over MCP, revealing real callers, callees, blast radius, data flow, constraints, dead code, and commit-history signals before editing. Supports repo syncing and ranked context retrieval so agents can avoid structural regressions.2767 npmMIT