Skip to main content
Glama
yesheng-oss

Context-MCP

by yesheng-oss

codegraph_query

Query a codebase knowledge graph to answer structural questions, resolve dependencies, or look up node details such as type, file, and callers. Use it to get concise context before reading files.

Instructions

Ask a structural question about the codebase OR look up a specific node by name — or both in one call. Pass question for natural-language traversal: what calls X, what does module Y depend on. Pass node for fast single-node lookup: returns type, file, depends_on, used_by. Pass both to get node detail + surrounding graph context together. Returns structured text within token_budget. Use before reading any files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeNoNode name or partial name to look up (type, file, deps, callers)
pathYesProject root
questionNoNatural language question about the codebase
token_budgetNoMax tokens in response (default 2000)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.3.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose output fields, combined-mode behavior, and token_budget constraints. However, it does not state whether a prior codegraph_build is required, whether the operation is strictly read-only, or what happens when neither question nor node is supplied.

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 front-loaded and information-dense, but 'or both in one call' is repeated in the later 'Pass both' sentence, creating slight redundancy. Overall, most sentences earn their place.

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

Completeness3/5

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

The description covers the main modes and node-lookup return shape, but without an output schema it leaves question-mode response structure vague. It also omits behavior for a path-only call and the relationship to codegraph_build, both of which matter for correct invocation.

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

Parameters5/5

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

The schema already documents all four parameters, and the description adds real meaning beyond it: concrete question examples, the node lookup return fields, and the composition of question+node modes. This exceeds the baseline expected for high schema coverage.

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 identifies the tool's actions and resource: asking a structural question about the codebase or looking up a specific node by name, with support for combining both. However, it does not explicitly differentiate from sibling tools like codegraph_context or codegraph_nodes, although 'single-node lookup' hints at a distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete conditional guidance: use question for natural-language traversal, node for single-node lookup, both for combined context, and use the tool before reading files. It does not name alternative sibling tools or state explicit when-not-to-use conditions.

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

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/yesheng-oss/context-mcp-subgraph'

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