Skip to main content
Glama
isac322

pi-codegraph

by isac322

codegraph_files

Read-onlyIdempotent

Explore a project's file structure by reading its indexed tree, with paths normalized to repo-relative POSIX prefixes.

Instructions

Read the indexed project file tree. Paths are normalized to repo-relative POSIX prefixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRepo-relative path prefix.
formatNotree
patternNo
maxDepthNo
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.
includeMetadataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

B3/5.0
Behavior3/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 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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.