Skip to main content
Glama
lllli223

codex-workspace-codegraph-mcp

by lllli223

CodeGraph: codegraph_explore

codegraph_explore
Read-onlyIdempotent

Explore any codebase by asking a natural-language question or naming symbols. Get the relevant source grouped by file and its call path in one round-trip, reducing search and Read calls before editing or debugging.

Instructions

PRIMARY TOOL — call FIRST for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or the symbols you are about to change. Returns the verbatim source of the relevant symbols grouped by file in ONE capped call (Read-equivalent — treat the shown source as already Read; do NOT re-open those files), plus the call path among them. Query can be a natural-language question OR a bag of symbol/file names. Usually the ONLY call you need — more accurate context, in far fewer tokens and round-trips than a search/Read/Grep loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSymbol names, file names, or short code terms to explore (e.g., "AuthService loginUser session-manager", "GraphTraverser BFS impact traversal.ts"). For a flow question, name the symbols spanning the flow (e.g. "mutateElement renderScene"). A natural-language question works too — no prior codegraph_search needed.
maxFilesNoMaximum number of files to include source code from (default: 12)
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).
Behavior5/5

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

Beyond the annotations (read-only, idempotent, non-destructive), the description discloses that the call is capped, returns verbatim source grouped by file, includes a call path, and is semantically equivalent to Read so files should not be re-read. This significantly shapes how an agent should consume the result.

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 front-loaded with the most important usage directive, followed by concrete output details and query flexibility. Every sentence earns its place, and there is minimal redundancy despite the amount of guidance packed in.

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?

Despite having no output schema, the description clearly explains what will be returned, how to query it, and what follow-up action is unnecessary. The schema fills in parameter defaults and project-path nuances, so the combined definition gives an agent everything needed to invoke the tool correctly.

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

Parameters3/5

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

The input schema already covers all parameters with rich descriptions and examples, so the baseline of 3 applies. The tool-level description mostly restates the query flexibility and capped-call behavior rather than adding new parameter-specific semantics beyond 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 immediately states that this is the primary codegraph exploration tool and specifies exactly what it returns: verbatim source of relevant symbols grouped by file, plus the call path among them. It is clearly distinguishable from siblings like codegraph_search or read_file because it brands itself as a Read-equivalent source-returning entry point.

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 a strong, actionable rule: 'call FIRST for almost any question OR before an edit', and explains that it is usually the only call needed compared to a search/Read/Grep loop. It also tells the agent not to re-open files whose source has already been returned, which is a clear behavioral instruction for follow-up actions.

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