pi-codegraph
This server provides CodeGraph-powered code intelligence tools for exploring, searching, and analyzing source code in projects and worktrees.
codegraph_search: find indexed declarations by symbol name, with optional kind filtering and result limitscodegraph_explore: discover related symbols and source locations grouped by file for architecture and flow questionscodegraph_node: inspect a known symbol's signature, location, source, callers, and calleescodegraph_files: read the indexed project file tree with path, format, pattern, depth, and metadata optionscodegraph_callers: find functions and methods that call a given symbolcodegraph_callees: find functions and methods called by a given symbolcodegraph_impact: analyze the transitive impact radius of changing a symbolcodegraph_status: report CodeGraph index health and pending synchronization stateSupports worktree-aware indexing, automatic sync/garbage collection, shared daemon lifecycle, path normalization, and bounded/truncated output
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pi-codegraphexplore the architecture of the main module"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@isac322/pi-codegraph
CodeGraph tools for Pi and OMP, with worktree-aware index lifecycle management.
Why this package
The extension exposes CodeGraph's structural tools with native Pi metadata and rendering while keeping OMP on its native MCP path. Indexes are separated per worktree, stored centrally, synchronized automatically, identity-checked, and garbage-collected after worktrees disappear.
Related MCP server: code-auditor-mcp
Install
Pi
pi install npm:@isac322/pi-codegraphOMP
omp install @isac322/pi-codegraph
omp plugin listRestart OMP or run /reload-plugins after installation. omp install uses the user scope by default.
OMP loads the package-local .mcp.json and omp.extensions entry. Pi loads pi.extensions and starts the internal MCP facade at session start, never during extension discovery.
The package installs @colbymchenry/codegraph@1.6.0 as an optional dependency and falls back to a codegraph executable on PATH.
Node.js 22.19 through Node 24 is required. OMP itself may run under Bun, but it starts this package's compiled MCP facade with the node command declared in .mcp.json; MCP child processes do not inherit or need to match the host agent's runtime.
The repository contains TypeScript source only. Release builds compile it into dist, and the npm tarball includes the compiled JavaScript, declarations, and source maps rather than the TypeScript runtime source.
Tools
codegraph_explore: broad architecture and flow exploration with line-numbered sourcecodegraph_search: symbol-name lookupcodegraph_node: indexed file reading, symbol inspection, and file/line disambiguationcodegraph_files: indexed project structurecodegraph_callers: inbound calls, optionally narrowed to a definition filecodegraph_callees: outbound calls, optionally narrowed to a definition filecodegraph_impact: transitive change impact, optionally narrowed to a definition filecodegraph_status: CodeGraph index health
codegraph_node accepts file without symbol to return current source with line numbers and dependents. Use offset and limit for a line range, symbolsOnly for a structural overview, or combine symbol with file or line to select a same-named definition.
Pi adds compact call/result rendering and /codegraph status|sync|doctor|gc.
Worktrees
Each worktree gets a distinct database. New indexes are stored under the configured central index store and exposed to CodeGraph through the worktree's .codegraph symlink. Existing real .codegraph directories remain in place and receive identity metadata.
A project path is accepted only when it is inside an allowed root or resolves to a worktree with the same Git common directory as the session root. Repository and worktree identities are checked before an index is reused. Missing or replaced worktrees fail closed.
Configuration
Global configuration is read from ~/.config/pi-codegraph/config.json, or from PI_CODEGRAPH_CONFIG.
{
"autoSync": true,
"autoGc": true,
"indexStore": "/home/me/.cache/pi-codegraph",
"workerIdleTimeoutMs": 300000,
"maxWorkers": 6,
"requestTimeoutMs": 30000,
"syncMinIntervalMs": 15000,
"maxOutputChars": 60000,
"allowedProjectRoots": ["/work/company"],
"promptInjection": true,
"codegraphExecutable": ""
}Environment overrides:
PI_CODEGRAPH_AUTO_SYNCPI_CODEGRAPH_AUTO_GCPI_CODEGRAPH_INDEX_STOREPI_CODEGRAPH_WORKER_IDLE_MSPI_CODEGRAPH_MAX_WORKERSPI_CODEGRAPH_REQUEST_TIMEOUT_MSPI_CODEGRAPH_SYNC_MIN_INTERVAL_MSPI_CODEGRAPH_MAX_OUTPUT_CHARSPI_CODEGRAPH_ALLOWED_ROOTSPI_CODEGRAPH_PROMPT_INJECTIONPI_CODEGRAPH_EXECUTABLE
PI_CODEGRAPH_ALLOWED_ROOTS uses the platform path delimiter.
Runtime behavior
Pi defers process startup until
session_startand closes all resources onsession_shutdown.OMP uses one package-local MCP facade and project-scoped CodeGraph workers.
Workers are capped, evicted by least-recently-used idle order, and terminated after the idle timeout.
Tool cancellation and timeout propagate to the worker. Diagnostics are ANSI-stripped, size-limited, and redact common token and secret forms.
On the first prepare after a CodeGraph engine upgrade, the facade checks the index extraction version and performs one quiet full rebuild when CodeGraph marks it stale. Existing users do not need to reindex manually, although the first startup after an upgrade may take longer. The rebuild is allowed to finish independently of a client request timeout; detection or rebuild failures do not create a per-tool retry loop, and the next session checks again.
codegraph_files.pathand supported toolfilearguments accept absolute in-project paths and~; the facade normalizes them to repo-relative POSIX paths.Large results are bounded and retain both their beginning and end with an explicit truncation marker.
Development
npm ci
npm run typecheck
npm run buildnpm pack and local npm publish run the build through prepack. The release workflow installs locked dependencies, typechecks, builds dist, and publishes that distribution through npm OIDC.
Security
Pi checks project trust before initialization or tool execution. The MCP facade resolves real paths and restricts access to the active workspace, sibling worktrees of the same repository, and explicitly configured roots.
Pi package gallery
The npm package declares the pi-package keyword and an explicit pi.extensions manifest. After npm publication, Pi's package gallery can index it at pi.dev/packages.
Releases are managed by Release Please. Conventional commits on main update a release PR. Merging that PR updates package.json and CHANGELOG.md, creates the version tag and GitHub Release, and publishes the package through npm trusted publishing in the same workflow. See CONTRIBUTING.md for the version rules and release process.
Use fix: for patch releases, feat: for minor releases, and a ! or BREAKING CHANGE: footer for major releases. Configure the npm trusted publisher with GitHub owner isac322, repository pi-codegraph, workflow filename publish.yml, no environment, and the npm publish action.
Shared daemon lifecycle
All Pi and OMP sessions that use the same indexStore attach to one CodeGraph daemon. Each tool request forwards its canonical projectPath, so the daemon can serve multiple repositories and Git worktrees without merging their indexes.
maxWorkers controls the shared daemon's query worker count. workerIdleTimeoutMs controls how long the daemon remains alive after the last Pi or OMP client disconnects; the default is five minutes. Set the same indexStore for every session that should share a daemon.
License
MIT
Available Tools
8 toolscodegraph_calleesARead-onlyIdempotent
Find functions and methods called by a symbol, optionally selecting its definition by file.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File path or basename. Use it alone with codegraph_node to read a file, or with a symbol to select one definition. | |
| limit | No | ||
| symbol | Yes | ||
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds a behavioral nuance about using the file parameter to select a definition, which is useful. However, it does not disclose return format, pagination, or handling of multiple definitions. With annotations present, the added value is modest but not negligible.
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 a single, front-loaded sentence that states the core action and the optional file disambiguation. There is zero waste; every word earns its place. It is appropriately concise for a tool of this complexity.
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?
The tool has 4 parameters (one required) and no output schema. The description provides only a high-level purpose and a hint about file selection, but does not explain the required symbol parameter, the limit default, or any edge cases. Given the required parameter is undocumented and the description adds no details, an agent would be under-equipped to call this tool correctly without additional research.
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 50%: file and projectPath have descriptions, while symbol (required) and limit have none. The description does not compensate for the undocumented parameters—it never explains what 'symbol' should be (e.g., a function name, a qualified name) or what 'limit' controls. This leaves the agent guessing about the required parameter, so the description adds no value beyond the schema for these fields.
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 ('Find') and a clear resource ('functions and methods called by a symbol'). It also distinguishes from sibling codegraph_callers by explicitly noting 'called by' rather than 'callers'. The purpose is unambiguous and well-scoped.
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 (you use this to find callees) but provides no explicit when-to-use guidance or alternatives. It does hint at the file parameter's role ('optionally selecting its definition by file'), which gives some context, but there is no mention of sibling tools or when to prefer this over codegraph_callers.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_callersBRead-onlyIdempotent
Find functions and methods that call a symbol, optionally selecting its definition by file.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File path or basename. Use it alone with codegraph_node to read a file, or with a symbol to select one definition. | |
| limit | No | ||
| symbol | Yes | ||
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is well covered. The description adds only the definition-selection nuance and does not disclose what results look like, whether calls are direct or transitive, how results are ordered, or what limit controls — behavior an agent would need to interpret the response correctly.
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?
A single sentence front-loads the primary action with zero filler, then appends the one conditional behavior that matters (definition selection by file). Every word 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 code-graph query tool with four parameters and no output schema, the one-sentence description is thin. It omits what the tool returns, the meaning of the undocumented limit parameter, and how to disambiguate multiple definitions in practice — gaps that the schema does not fill.
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 50%; the required 'symbol' and 'limit' parameters lack schema descriptions. The tool description partially compensates by clarifying that symbol is the callee whose callers are sought and that file selects a definition, but it does not clarify the undocumented limit parameter's meaning or bounds.
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?
Clear verb+resource: 'Find functions and methods that call a symbol.' This distinguishes it from the inverse sibling codegraph_callees implicitly (callers vs. callees), though it never names the sibling explicitly. The 'optionally selecting its definition by file' clause adds useful scope precision.
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 a key usage scenario — using file to disambiguate among multiple definitions of a symbol — and the file parameter text routes cross-tool usage ('Use it alone with codegraph_node to read a file'). However, there is no explicit when-to-use/when-not-to-use guidance or named alternatives among the seven siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_exploreARead-onlyIdempotent
Explore related symbols and line-numbered source grouped by file. Best first tool for architecture, flows, and broad code questions.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Specific symbols, files, or code terms to explore. | |
| maxFiles | No | ||
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the tool as read-only, idempotent, and non-destructive. The description adds context about the output format (line-numbered source grouped by file) but does not provide additional behavioral details such as limitations or edge cases. Given the annotation coverage, this is acceptable but not rich.
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 with no filler. The action is front-loaded, and the usage guidance is concise. Every word 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 read-only exploration tool with three parameters and no output schema, the description gives a basic sense of purpose and output format but lacks clarity on how it differs from sibling tools like search or node. The maxFiles parameter is not explained, and the relationship to other codegraph tools is only implied. This is adequate but has gaps.
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?
The description does not mention any parameters. Schema coverage is 67%, which is below the 80% threshold, so the description should compensate for the undocumented maxFiles parameter, but it does not. The projectPath description in the schema is detailed, but the tool description adds no parameter semantics.
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 clearly states the tool explores related symbols and line-numbered source grouped by file, which is a specific verb and resource. It also indicates its role as a first tool for broad code questions, but it does not explicitly differentiate from sibling tools like codegraph_search or codegraph_node.
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 says it is the best first tool for architecture, flows, and broad code questions, giving clear context for when to use it. However, it does not mention any exclusions or alternatives, so it is a 4.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_filesBRead-onlyIdempotent
Read the indexed project file tree. Paths are normalized to repo-relative POSIX prefixes.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repo-relative path prefix. | |
| format | No | tree | |
| pattern | No | ||
| maxDepth | No | ||
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. | |
| includeMetadata | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds one useful behavioral detail: paths are normalized to repo-relative POSIX prefixes. It does not disclose output shape or limits, but the annotation coverage mitigates the need for more safety-related context.
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 contains exactly two sentences with zero redundancy. The core action is front-loaded, and the second sentence adds a key normalization detail. Every word 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?
Given the tool has six parameters, no output schema, and a nontrivial sibling set, the description is too sparse. It doesn't explain what the tool returns, how format/pattern/maxDepth interact, or any constraints. While the schema describes path and projectPath, the overall context is under-specified for an agent to use the tool fully 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?
The schema documents only 2 of 6 parameters (path and projectPath), leaving format, pattern, maxDepth, and includeMetadata without descriptions (33% coverage). The tool description does not compensate for this gap, only vaguely referencing path normalization. With six parameters and no additional parameter-level explanation, the description provides minimal aid.
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 clearly states a specific verb ('Read') and resource ('indexed project file tree'), making the tool's primary purpose evident. It doesn't explicitly contrast with sibling tools like codegraph_explore or codegraph_search, but the distinctive 'file tree' resource sufficiently differentiates it.
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 provides no guidance on when to use this tool versus its siblings. There are no conditions, alternatives, or exclusions mentioned, so an agent must rely on the tool name and schema alone to infer appropriate usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_impactBRead-onlyIdempotent
Analyze the transitive impact radius of a symbol, optionally selecting its definition by file.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File path or basename. Use it alone with codegraph_node to read a file, or with a symbol to select one definition. | |
| depth | No | ||
| symbol | Yes | ||
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already communicate readOnly, idempotent, and non-destructive behavior, so the description does not need to repeat those. It adds useful context about transitive scope and optional file-based definition selection, but it does not disclose depth semantics, traversal direction, or how much of the graph is considered.
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 a single, front-loaded sentence with no filler. Every phrase earns its place, and the core purpose is stated before the optional qualifier.
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 read-only analysis tool with no output schema, the description gives the core idea but omits enough detail to confidently invoke it correctly. Missing pieces include clear differentiation from callers/callees, definition of depth behavior, and what the returned impact information looks like.
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 descriptions cover file and projectPath, while symbol and depth are undocumented. The description partially compensates by explaining that the file parameter can select a definition for the symbol, but it leaves symbol syntax and depth behavior implicit. This is adequate but not complete.
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 identifies a specific action and resource: 'Analyze the transitive impact radius of a symbol.' It also adds a distinguishing qualifier, 'optionally selecting its definition by file.' However, 'impact radius' is not formally defined, so it could still be confused with codegraph_callers/callees.
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?
No explicit guidance is given for when to use this tool versus alternatives like codegraph_callers, codegraph_callees, or codegraph_explore. There are no when-not-to-use instructions or exclusions. The file parameter's schema description gives some related context but does not recommend a tool choice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_nodeARead-onlyIdempotent
Read an indexed file with line numbers and dependents, or inspect a named symbol with its source and relationships.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File path or basename. Use it alone with codegraph_node to read a file, or with a symbol to select one definition. | |
| line | No | Line used to disambiguate a symbol definition. | |
| limit | No | Maximum lines to return in file mode. | |
| offset | No | One-based starting line in file mode. | |
| symbol | No | Symbol name to inspect. | |
| includeCode | No | Include the symbol body in symbol mode. | |
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. | |
| symbolsOnly | No | Return the file's symbol map instead of source. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint), so the description only needs to add behavioral context. It does add meaningful context: file mode returns line numbers and dependents, while symbol mode returns source and relationships. It does not describe output format or edge cases, but it goes beyond what annotations alone convey.
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?
One tightly constructed sentence with two parallel clauses, no filler, and the primary actions front-loaded. It earns its place and is easy for an agent to parse quickly.
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 8-parameter dual-mode tool with no output schema, the description is thin. It gives mode-level return expectations but omits output shape, relationship depth, and boundaries against sibling tools. The strong annotations and complete parameter schema carry much of the burden, so this is not severely incomplete, but it leaves meaningful gaps.
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 parameter descriptions already document file/symbol mode selection, pagination, includeCode, projectPath, and symbolsOnly. The description adds no new parameter-level meaning beyond grouping the two usage modes, so 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 specific actions and resources: 'Read an indexed file with line numbers and dependents' and 'inspect a named symbol with its source and relationships.' It clearly expresses the dual-mode nature of the tool, but it does not explicitly distinguish it from relationship-focused siblings like codegraph_callers or codegraph_callees.
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 gives practical mode-level guidance (use file mode to read a file, symbol mode to inspect a symbol), but it never names alternatives or states when not to use this tool. The mention of 'dependents' and 'relationships' could lead an agent to pick this tool over more specific sibling tools such as codegraph_callers or codegraph_impact.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_searchARead-onlyIdempotent
Search indexed declarations by symbol name. Returns locations only; use codegraph_explore when you need source and relationships.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| limit | No | ||
| query | Yes | Symbol name or partial name. | |
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds behavioral context by stating 'Returns locations only,' which clarifies the output scope and distinguishes this tool from explore. This is useful beyond what annotations provide, though it doesn't detail pagination or other response traits.
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 two sentences with no redundancy. It front-loads the primary purpose and immediately provides the sibling differentiation. Every word earns its place; it is appropriately sized for a search tool.
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?
Given the tool's simplicity (4 params, no output schema, strong annotations), the description is largely complete. It covers purpose, output scope, and the main alternative. The projectPath nuance is in the schema, and the kind/limit semantics are partially inferable from enums and defaults. The only minor gap is not explicitly describing the behavior of the limit and kind filters, but the description is sufficient for correct invocation in most cases.
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 50% (query and projectPath have descriptions; kind and limit do not). The description does not explicitly explain kind or limit, and only implicitly maps the 'symbol name' to the query parameter. It fails to compensate for the missing schema descriptions, leaving kind and limit semantics underspecified for the agent.
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 clearly states the tool's purpose: 'Search indexed declarations by symbol name.' It also specifies the return scope ('Returns locations only') and distinguishes it from the sibling codegraph_explore, making it unambiguous which tool to pick.
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 explicitly provides a when-not-to-use directive: 'use codegraph_explore when you need source and relationships.' This gives clear routing guidance and prevents misuse by naming the alternative and the condition that selects it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codegraph_statusARead-onlyIdempotent
Report CodeGraph index health and pending synchronization state.
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | No | Absolute path to the target project or worktree. Pi fills this with the active cwd when omitted; OMP child agents should pass their exact worktree path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds that it reports 'health and pending synchronization state', giving some context beyond annotations, but does not describe the output format or any side effects (e.g., whether it triggers a sync). This is adequate given the strong annotations.
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 a single, front-loaded sentence that states the tool's function without any filler. Every word earns its place, and it is appropriately sized for a simple status tool.
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 simple tool with one optional parameter, no output schema, and strong annotations, the description is sufficient. It tells the agent what the tool reports, and the annotations cover behavioral safety. The only minor gap is the lack of detail on what 'health' or 'pending synchronization state' means, but this is not critical for basic usage.
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%, with the single optional parameter projectPath fully documented. The description adds no parameter-specific information, but the baseline of 3 applies because the schema carries the full semantic load.
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 uses a specific verb ('Report') and resource ('CodeGraph index health and pending synchronization state'), making the tool's purpose unambiguous. It clearly distinguishes from siblings like codegraph_search and codegraph_explore, which focus on querying or navigation rather than status.
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 does not explicitly state when to use this tool versus alternatives. The purpose implies it is for checking index status before other operations, but there is no direct guidance on when to prefer it over siblings, nor any exclusions.
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.
7 tool updates
v0.3.2- Added
codegraph_callees - Added
codegraph_callers - Added
codegraph_explore - Added
codegraph_files - Added
codegraph_impact - Added
codegraph_node - Added
codegraph_search
1 tool update
v0.3.1- First observed
codegraph_status
TDQS
Scored across 8 tools
Most tools have distinct purposes: search returns locations, callers/callees handle direct relationships, impact handles transitive reach, and files/status serve different concerns. The main overlap is between codegraph_node and codegraph_explore, both of which can return source and relationships, but the descriptions clarify that node is for a single named symbol or file while explore is for broader code questions.
All tools share a consistent codegraph_ prefix and use readable lowercase names. The pattern is slightly mixed between noun-style names (node, files, status, callers, callees, impact) and verb-style names (search, explore), but the naming is still predictable and easy to navigate.
Eight tools is well-scoped for a code graph query server. Each tool covers a meaningful query mode without redundant bloat, and the count feels appropriate for both simple lookups and deeper dependency analysis.
The surface covers the core code graph workflow: locating symbols, reading source, viewing file trees, finding callers/callees, assessing transitive impact, exploring related code, and checking index health. No major lifecycle gaps are apparent for a read-only code indexing tool.
Maintenance
Related MCP Connectors
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
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.
Related MCP Servers
- FlicenseAqualityCmaintenanceIndexes a workspace and exposes code-navigation tools to Codex, enabling symbol lookup, reference finding, dependency analysis, and security audit for local codebases.10-
- AlicenseAqualityAmaintenanceEnables AI assistants to search, analyze, and understand multi-language codebases by providing indexed code intelligence via MCP.162,177 npm8MIT
- FlicenseNot gradedqualityAmaintenanceEnables developer agents to perform semantic codebase search, dependency and impact analysis, cross-file refactoring, and full-stack API tracing through a unified query DSL over a high-performance graph engine.-
- AlicenseNot gradedqualityFmaintenanceProvides worktree-aware semantic code indexing and search via MCP, enabling agents to query indexed code and monitor indexing status while keeping lifecycle operations separate.MIT