Skip to main content
Glama
lllli223

codex-workspace-codegraph-mcp

by lllli223

CodeGraph: codegraph_node

codegraph_node
Read-onlyIdempotent

Read a source file with line numbers and dependents, or inspect a symbol's definition, signature, and callers/callees to identify what changes could break.

Instructions

Two modes. (1) READ A FILE — use INSTEAD of the Read tool: pass file (a path or basename) with no symbol and it returns that file's current on-disk source with line numbers, exactly the shape Read gives you (<n>\t<line>, safe to Edit from), narrowable with offset/limit just like Read — PLUS a one-line note of which files depend on it. Same bytes as Read, faster (served from the index), with the blast radius attached. Use it whenever you would Read a source file. (2) ONE SYMBOL you can name — its location, signature, verbatim source (includeCode=true) and caller/callee trail in one call, so before changing it you see what calls it and what your edit would break. For an AMBIGUOUS name it returns EVERY matching definition's body in one call (so you never Read a file to find the right overload); pass file/line to pin one. Use codegraph_explore for several related symbols or the full flow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoA file path or basename (e.g. "harness.rs", "src/auth/session.ts"). Pass it ALONE (no symbol) to READ the file like the Read tool — its full source with line numbers + which files depend on it. Or pass it WITH a symbol to disambiguate an overloaded name to the definition in this file.
lineNoSymbol mode only: disambiguate to the definition at/around this line (use with the file:line a trail showed you).
limitNoFile mode: maximum number of lines to return, exactly like Read's limit. Defaults to the whole file (capped at 2000 lines, like Read).
offsetNoFile mode: 1-based line to start reading from, exactly like Read's offset. Defaults to the start of the file.
symbolNoName of the symbol to read (symbol mode). Omit it and pass `file` alone to read a whole file like Read.
includeCodeNoSymbol mode: include the symbol's full body (default: false). Ignored in file mode, which always returns source unless `symbolsOnly` is set.
projectPathYesAbsolute path to the project to query (or any directory inside it) — codegraph uses the nearest .codegraph/ index at or above that path. Omit to use this session's default project. Pass it to query a second codebase, or when the server root has no index of its own (e.g. a monorepo where only sub-projects are indexed, so there is no default project).
symbolsOnlyNoFile mode: return just the file's symbol map + dependents (a cheap structural overview) instead of its source.
Behavior5/5

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

The description adds rich behavioral detail beyond the readOnly/idempotent annotations: same bytes as Read but faster, capped at 2000 lines, blast radius/dependents note, ambiguous names return every matching definition, and mode-specific defaults (includeCode ignored in file mode, symbolsOnly). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-organized around 'Two modes.' Every sentence provides distinct information—mode semantics, defaults, limits, alternatives. It is front-loaded and scannable despite the density. Slightly verbose but every part earns its place.

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

Completeness5/5

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

With 8 parameters and no output schema, the description covers return shapes for both modes (source with line numbers, symbol location/signature/source/caller/callee trail), ambiguous name handling, file limits, defaults, and alternative tools. Nothing critical for invoking correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Though schema coverage is 100%, the description adds cross-parameter mode logic that the schema describes only per-parameter: how 'file alone' vs 'file+symbol' selects modes, how offset/limit mirror Read, and which flags are ignored in which mode. This meaningfully supplements the schema.

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 has two distinct modes with specific verbs: 'READ A FILE' and 'ONE SYMBOL you can name'. It identifies the resource (file or symbol) and explicitly differentiates from the Read tool and codegraph_explore, so an agent understands exactly what this tool does versus siblings.

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?

It gives explicit usage directives: 'use INTEAD of the Read tool', 'Use it whenever you would Read a source file', and 'Use codegraph_explore for several related symbols or the full flow.' This provides clear when-to-use and when-not-to-use guidance with alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lllli223/codex-workspace-codegraph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server