Skip to main content
Glama
isac322

pi-codegraph

by isac322

codegraph_search

Read-onlyIdempotent

Find code declarations by symbol name across an indexed project. Returns matching file locations to help you navigate quickly; use explore for full source and relationships.

Instructions

Search indexed declarations by symbol name. Returns locations only; use codegraph_explore when you need source and relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
limitNo
queryYesSymbol name or partial name.
projectPathNoAbsolute 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.