Skip to main content
Glama
yesheng-oss

Context-MCP

by yesheng-oss

codegraph_build

Scan a project directory to build a queryable knowledge graph from code files using tree-sitter AST. Run once per project; rebuild when code changes. Provides structural answers to reduce token usage.

Instructions

Scan a project directory and build the knowledge graph from code files. Uses tree-sitter AST (with regex fallback) for all code files. Fast, local, no API key needed. Run once per project; rebuild whenever code changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to project root
clusterNoRun community detection after build (default true)

Schema Changelog

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

  1. First observedv1.3.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description takes on the disclosure burden and does add useful context: local-only execution, no API key, tree-sitter AST with regex fallback. However, it does not disclose whether a rebuild overwrites the existing graph or how/where the graph is stored.

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?

Three short sentences, purpose first, with each sentence contributing a distinct fact: what it does, how it parses code, and when to run it. There is no filler or redundant restatement.

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 absent output schema and annotations, the description still covers the tool's purpose, input type, constraints, and usage lifecycle well. A note on overwrite semantics or the fact that sibling query tools should be used afterward would make it fully complete, but it is largely sufficient for selecting and invoking the tool.

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?

Schema coverage is 100%, so path and cluster are already documented in the schema. The description only reinforces the meaning of the project directory and adds no extra detail about the cluster parameter or path formatting.

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 names a specific action ('scan a project directory') and resource ('build the knowledge graph from code files'), making the tool's role immediately clear. Its build/update role is distinct from the query, report, and rendering siblings.

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?

It gives concrete usage direction: run once per project and rebuild whenever code changes. It does not explicitly enumerate when to avoid this tool in favor of a sibling, but the lifecycle guidance is clear.

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