Grafyx
Grafyx is an MCP server that provides real-time codebase understanding for AI coding assistants by parsing your project into a semantic graph and exposing 14 tools for architecture analysis, code inspection, and natural language search.
Project Structure & Navigation
get_project_skeleton– Full project skeleton with file tree and statistics.get_module_context– Symbols overview in a directory/package with pagination.get_file_context– Comprehensive context for a file: functions, classes, imports, relationships.
Function & Class Insights
get_function_context– Detailed context for a function: signature, callers, callees, dependencies.get_class_context– Class details: methods, inheritance chain, usages.get_subclasses– Find all subclasses of a base class recursively.
Dependency & Impact Analysis
get_call_graph– Recursive call chain tracing (callers/callees).get_dependency_graph– Dependency mapping for impact analysis.get_unused_symbols– Detect dead code (functions/classes with no inbound references).
Search & Discovery
find_related_code– Natural language semantic search for related functions, classes, files.find_related_files– Find files relevant to a concept/feature using ML embeddings.
Code Quality & Conventions
get_conventions– Detect coding patterns and conventions used in the codebase.
Runtime Management
set_project– Switch the analyzed project directory at runtime.refresh_graph– Force a full re-parse of the codebase graph.
The server automatically watches files and updates the graph in real time, keeping code understanding current.
Integrates with Windsurf (Codeium) to deliver codebase relationship graph analysis and live updates through MCP.
Enables GitHub Copilot in VS Code to access codebase structure, function context, and dependency graphs via MCP.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Grafyxget the call chain for the main function"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Grafyx
Real-time codebase understanding for AI coding assistants.
What is Grafyx?
AI coding tools read raw files with zero architectural understanding -- they don't know what calls what, which classes inherit from where, or how your modules connect. Grafyx fixes this by parsing your entire codebase into a full relationship graph using Graph-sitter (built on tree-sitter), then exposing that graph to any AI assistant through the Model Context Protocol (MCP). Your assistant can trace call chains, map dependencies, find related code by description, detect conventions, and understand your project's architecture -- all in real time, with a file watcher that keeps the graph current as you edit.
Related MCP server: tree-sitter-analyzer
Quick Start
Claude Code
# Zero-install (recommended)
claude mcp add --scope user grafyx -- uvx --from grafyx-mcp grafyx
# Or install with pip first
pip install grafyx-mcp
claude mcp add --scope user grafyx -- grafyxCursor / Windsurf / Cline
Add to your MCP config file:
Cursor:
.cursor/mcp.json(project) or~/.cursor/mcp.json(global)Windsurf:
~/.codeium/windsurf/mcp_config.jsonCline: Cline MCP settings in VS Code
{
"mcpServers": {
"grafyx": {
"command": "uvx",
"args": ["--from", "grafyx-mcp", "grafyx"]
}
}
}VS Code (GitHub Copilot)
Add to .vscode/mcp.json:
{
"servers": {
"grafyx": {
"command": "uvx",
"args": ["--from", "grafyx-mcp", "grafyx"]
}
}
}Using pip instead of uvx? Replace the command with:
"command": "grafyx"(no args needed).
Available Tools
Tool | Description |
| Full project structure with stats per module |
| Everything about a function: callers, callees, deps |
| File contents, imports, dependencies |
| Class methods, inheritance, usages |
| Natural language search across the codebase |
| Find files relevant to a feature by matching symbols |
| Impact analysis: what depends on what |
| Detected coding patterns and conventions |
| Call chain tracing upstream and downstream |
| Force re-parse of the codebase |
| Symbols in a directory/package (intermediate zoom) |
| Inheritance tree for a base class |
| Dead code detection |
| Switch the served project at runtime |
How It Works
Your AI Assistant
|
| MCP Protocol (stdio)
v
+-----------+
| Grafyx | FastMCP server with 14 tools
| Server |
+-----------+
|
+-----------+ +-----------+ +-------------+
| Graph |---->| Search | | Convention |
| Engine |---->| Engine | | Detector |
+-----------+ +-----------+ +-------------+
|
v
+-----------+
| Graph- | Tree-sitter based parsing
| sitter |
+-----------+
|
+-----------+
| Watchdog | File watcher for live updates
+-----------+Startup -- Grafyx detects languages in your project and parses all source files into a semantic graph via Graph-sitter.
Serving -- The FastMCP server exposes 14 tools over stdio. Your AI assistant calls them as needed.
Live updates -- Watchdog monitors file changes. When you save, the graph is automatically re-parsed after a short debounce.
ML-augmented search
Grafyx's find_related_code uses a pretrained code embedding model (default:
jinaai/jina-embeddings-v2-base-code, Apache-2.0, 161M params) running on CPU
via ONNX through fastembed. The model
is downloaded on first use and cached locally — no GPU, no daemon, no cloud
calls.
Since 0.2.1, fastembed is a hard dependency, so the default install
already includes the encoder — no extra needed.
Benchmark (0.2.0, 278 docstring→function queries across FastAPI + Django):
Encoder | nDCG@10 | MRR@10 | p50 latency |
jina-v2 (default) | 0.787 | 0.741 | ~1.5 s |
coderankembed | 0.663 | 0.623 | ~1.3 s |
tokens-only (no fastembed) | 0.335 | 0.297 | ~0.9 s |
The default encoder more than doubles retrieval quality over plain source-token search (+135% nDCG@10).
Full breakdown + per-query JSONL: docs/benchmarks/0.2.0/.
Switch encoders via the GRAFYX_ENCODER env var:
jina-v2(default) — Apache-2.0, fastembed-native, ~150 MB. Wins on accuracy; recommended unless you have a specific reason to switch.coderankembed— MIT, 137M, ONNX-int8, ~140 MB. Lower latency but ~12 nDCG@10 points behind jina-v2 in our eval. Hosted atBilal7Dev/grafyx-coderankembed-onnx.
Supporting numpy-only MLPs (~5 MB total weights, bundled in the wheel):
M1 Relevance ranker — 33-feature MLP that re-ranks the encoder's top candidates using structural signals (caller count, name overlap, exports).
M3 Source token filter — suppresses noise tokens (imports, strings, magic methods) from full-text search.
M4 Symbol importance — weights symbols by caller count, exports, and structural signals.
Gibberish detector — character-bigram MLP that blocks nonsense queries before they hit the index.
Reproducible benchmarks against FastAPI, Django, and Home Assistant ship in
benchmarks/ (python -m scripts.run_all).
Supported Languages
Language | Extensions |
Python |
|
TypeScript |
|
JavaScript |
|
Languages are auto-detected. To specify manually:
grafyx --languages python,typescriptOptions
grafyx [OPTIONS]
--project PATH Project to analyze (default: current directory)
--languages LANGS Comma-separated languages (default: auto-detect)
--ignore PATTERNS Additional directories to ignore
--no-watch Disable file watching
--verbose, -v Debug logging
--version Show versionDefault ignored: node_modules, .git, __pycache__, .venv, venv, .env, dist, build, .tox, .mypy_cache, .pytest_cache, .ruff_cache, egg-info, .eggs, .next, .nuxt, coverage, .coverage, .nyc_output
Multi-Agent Support
Grafyx works with agent teams. A single Grafyx instance serves all agents connected to the same project. When one agent modifies code, the file watcher updates the graph automatically, so other agents immediately see the changes.
Contributing
git clone https://github.com/bilal07karadeniz/Grafyx.git
cd Grafyx
pip install -e ".[dev]"
pytestTroubleshooting
Windows: Graph-sitter requires Linux. Use WSL and configure your MCP client to launch via wsl:
{
"mcpServers": {
"grafyx": {
"command": "wsl",
"args": ["-e", "bash", "-c", "source ~/your-venv/bin/activate && grafyx"]
}
}
}License
MIT -- see LICENSE for details.
Available Tools
14 toolsget_call_graphA
Get the call graph for a function: what it calls and what calls it, recursively up to the specified depth.
Supports 'ClassName.method_name' syntax (e.g., 'SkillManager.initialize'). If multiple functions share the same name, returns a disambiguation list.
Use this to trace execution flow and understand how a function fits into the larger call chain. By default, Python builtins and common stdlib methods (len, append, strip, etc.) are filtered out for clarity. Set include_builtins=True to see everything.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| function_name | Yes | ||
| include_builtins | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses key behaviors: recursion up to specified depth, builtin filtering by default, disambiguation for duplicate names. No annotations provided, so description carries full burden.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose, then concise details. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers core purpose, edge cases (disambiguation), filtering behavior, and depth meaning. Output schema exists, so return format not needed. Complete for the task.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, description adds meaning for all parameters: function_name syntax and disambiguation, depth as recursion limit, include_builtins toggling filtering.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool retrieves a recursive call graph for a function, distinguishing it from sibling tools like find_related_code or get_dependency_graph. Mentions specific syntax and disambiguation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use this to trace execution flow...' providing clear use case. Implicitly contrasts with alternatives, but doesn't explicitly state when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_class_contextA
Get comprehensive context for a class: methods, properties, inheritance chain, and usages throughout the codebase.
Use this when you need to understand a class's interface and where it is used.
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | Level of detail: "signatures", "summary" (default), or "full". | summary |
| class_name | Yes | Name of the class to look up. | |
| include_hints | No | If True, append navigation suggestions. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It describes the output scope (methods, properties, inheritance chain, usages) but does not disclose any behavioral traits such as performance implications, side effects, or authorization requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the purpose, and contains no unnecessary words or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description adequately covers what the tool returns. It mentions methods, properties, inheritance chain, and usages. However, it could hint at the detail parameter's effect, but the schema covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes all parameters (class_name, detail, include_hints). The description adds no additional meaning beyond what the schema provides, defaulting to a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the verb (get), resource (class context), and specific components (methods, properties, inheritance chain, usages). It clearly differentiates from siblings like get_function_context and get_module_context by focusing on class-level context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states when to use the tool: 'when you need to understand a class's interface and where it is used.' However, it does not explicitly mention when not to use it or provide comparisons with sibling tools like get_call_graph or get_subclasses.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_conventionsA
Detect and report coding conventions used in this codebase.
Use this to understand the project's style BEFORE writing new code, so your additions are consistent with existing patterns.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description clearly states it 'detects and reports' – a read-only operation. Simple enough, no hidden behaviors. Could mention output format but output schema covers that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences. Front-loaded with purpose, then usage guidance. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 0 parameters and output schema, the description fully covers the tool's role and when to use it. No gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters, so baseline per instructions is 4. Description adds no param info, unnecessary.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs 'Detect and report' and clarifies the resource 'coding conventions'. It distinguishes from sibling tools like file context or dependency graph by focusing on style/conventions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises using it BEFORE writing new code to ensure consistency. Does not list alternatives but the context of siblings implies this is the go-to for conventions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_dependency_graphA
Get the dependency graph for a symbol: what it depends ON and what depends on IT, up to the specified depth.
Use this to understand the impact radius of changing a symbol.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| symbol_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses bidirectional graph traversal up to depth, but lacks details on output format, performance implications, or whether it is read-only. Basic behavior is clear but deeper traits are omitted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with action, no extraneous words. Every piece adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given output schema exists and only two parameters, the description is largely complete. It covers purpose, usage, and basic parameters. Minor gap: does not explain the output structure, but output schema likely covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description compensates partially. It explains depth ('up to the specified depth') and implies symbol_name as the symbol of interest. However, it does not clarify what constitutes a symbol (e.g., function, class) or provide format examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verb 'Get' and resource 'dependency graph for a symbol', clearly indicating bidirectional dependencies (depends ON and depends ON IT) and max depth. This distinguishes it from sibling tools like get_call_graph (limited to calls) and get_subclasses (hierarchy only).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states use case: 'understand the impact radius of changing a symbol.' Implicitly differentiates from siblings by focusing on full dependency graph. However, it does not mention when not to use or alternative tools for more specific tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_contextB
Get comprehensive context for a file: functions, classes, imports, and relationships to other files.
Use this when you need to understand what a file contains and how it connects to the rest of the codebase.
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | Level of detail: "signatures", "summary" (default), or "full". | summary |
| file_path | Yes | Path to the file to inspect. | |
| include_hints | No | If True, append navigation suggestions. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions what the output includes (functions, classes, imports, relationships) but lacks details on behavioral traits like performance, caching, permissions, or whether it is read-only. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only two sentences, front-loading purpose and usage. Every word earns its place, with no unnecessary information. This is a model of conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists and schema coverage is 100%, the description adequately covers the high-level purpose and what the tool returns. However, it could be more explicit about the output format and how it complements sibling tools, making it nearly complete but with room for improvement.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description does not add additional meaning beyond the schema; it only says 'comprehensive context' without elaborating on parameters like detail or include_hints. Thus, no extra value is added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets comprehensive context for a file, listing functions, classes, imports, and relationships. While it doesn't explicitly differentiate from all sibling tools like get_module_context, the mention of 'connect to the rest of the codebase' helps distinguish it from more specific tools like get_function_context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear context for use: 'when you need to understand what a file contains and how it connects to the rest of the codebase.' However, it does not mention when not to use it or suggest alternatives among the many sibling tools, which would improve guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_function_contextA
Get comprehensive context for a function: signature, parameters, callers, callees, dependencies, and docstring.
Supports 'ClassName.method_name' syntax (e.g., 'ToolExecutor.execute').
For two top-level functions sharing the same name in different
files (where ClassName.method doesn't apply), pass file_path
to pick one. If multiple matches remain, returns a disambiguation list.
Use this when you need to understand what a function does, who calls it, and what its blast radius is for modifications.
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | Level of detail: "signatures", "summary" (default), or "full". | summary |
| file_path | No | Optional path filter to disambiguate same-named top-level functions in different files. Matched by substring against each candidate's filepath, so a partial path like ``"api/agents.py"`` is enough. | |
| function_name | Yes | Name of the function to look up. | |
| include_hints | No | If True, append navigation suggestions. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions that if multiple matches occur, a disambiguation list is returned, and that 'file_path' uses substring matching. However, it does not disclose whether the tool is read-only, any required permissions, or performance characteristics. These gaps are notable for a tool operating on a codebase.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. It front-loads the main purpose in the first sentence, then covers specialized syntax, disambiguation, and usage context in subsequent sentences. Every sentence adds value with no redundancy or unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (not shown but indicated) and 100% parameter description coverage, the description is complete for its complexity. It explains purpose, usage, and edge cases (multiple matches, file_path disambiguation) without needing to cover return values since the output schema handles that. The tool's domain (code context) is well-served.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds meaningful context beyond the schema: it explains the 'ClassName.method_name' syntax for function_name and the substring matching behavior for file_path. This enhances the agent's understanding of effective parameter usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool retrieves comprehensive context for a function, including signature, parameters, callers, callees, dependencies, and docstring. It distinguishes itself from siblings by emphasizing breadth ('comprehensive') and blast radius, which is unique among sibling tools like get_call_graph or get_class_context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this when you need to understand what a function does, who calls it, and what its blast radius is for modifications.' This is clear guidance. However, it does not explicitly state when not to use it or how it differs from specific siblings, which would strengthen the score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_module_contextA
Get an overview of all symbols in a directory/package.
This is the intermediate zoom level between get_project_skeleton (whole project) and get_file_context (single file). Use it to understand what a package contains before drilling into specifics.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of files to return (0 = no limit, default). Combine with offset to page through modules with hundreds of files where the response would otherwise be truncated. ``total_files`` in the response always reflects the full count, regardless of pagination. | |
| detail | No | Level of detail: "signatures", "summary" (default), or "full". | summary |
| offset | No | Number of files to skip (for paginating large modules). | |
| module_path | No | Directory path relative to project root (e.g. "services", "grafyx/graph"). Empty string means the whole project. | |
| include_hints | No | If True, append navigation suggestions. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose behavioral traits like side effects, auth needs, or rate limits. However, the read-only nature is implied by 'Get an overview' and no destructive actions are suggested.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose, and every sentence adds value. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description need not explain return values. It provides the zoom level context, usage guidance, and all parameters are documented in the schema. The description is complete for its purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The tool description does not add additional meaning beyond what is in the schema parameters' descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get an overview of all symbols in a directory/package.' It distinguishes itself from siblings by specifying it's the intermediate zoom level between get_project_skeleton and get_file_context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says: 'Use it to understand what a package contains before drilling into specifics.' This implies when to use (intermediate analysis) and when not (use siblings for whole project or single file).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_project_skeletonA
Get the full project structure with file tree and statistics.
Call this first when starting work on a project to understand its overall shape, module layout, and code distribution.
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | Level of detail: - ``"signatures"``: compact overview — totals, languages, and ``top_files`` (15 most code-dense files). Drops the file tree, directory stats, and per-language breakdown. Use when you just want to know "how big is this project and where's the dense code". - ``"summary"`` (default): adds full file tree, per-directory counts, and per-language breakdown. The workhorse view. - ``"full"``: identical to summary at the skeleton level (no source extraction at this scale). | summary |
| max_depth | No | Maximum depth for the file tree display. | |
| include_hints | No | If True, append navigation suggestions. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states that the tool returns file tree and statistics, but does not elaborate on the nature of the statistics or any behavioral traits like performance impact or read-onlyness. The description is functional but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loaded with the primary purpose. No extraneous information; every sentence serves a clear function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that the tool has three optional parameters and an output schema (though not shown), the description is somewhat minimal. It covers the high-level functionality but does not elaborate on what statistics are included or how the detail parameter affects the output. However, the output schema likely provides the necessary return value documentation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description does not add additional meaning beyond what the schema already provides for the three parameters (max_depth, detail, include_hints).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get the full project structure with file tree and statistics.' It also specifies to call it first when starting work, which distinguishes it from sibling tools that focus on specific files or modules.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises to 'Call this first when starting work on a project to understand its overall shape, module layout, and code distribution.' This provides clear context for when to use this tool versus alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_subclassesA
Find all classes that extend a given class, recursively.
Use this to understand the impact of changing a class's interface: which subclasses would need updating?
Supports multi-level inheritance trees up to the specified depth.
When the codebase has multiple classes sharing class_name (e.g.
Django defines Field in both contrib/gis/gdal/field.py and
db/models/fields/__init__.py), pass file_path to pick the
intended definition. Without it, the first match wins and the
response includes ambiguous: True plus a candidates list so
you can retry.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | How many inheritance levels to traverse (1 = direct only). | |
| file_path | No | When ambiguous, pick the definition in this file. Substring match is NOT done — pass the exact path Grafyx reports in the ``candidates`` list of an ambiguous response. | |
| class_name | Yes | Name of the base class to find subclasses of. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden. It explains recursive traversal up to a configurable depth, handling of ambiguous class_name definitions, and the response format (ambiguous flag, candidates). It does not explicitly state it's read-only, but the nature of the operation implies it. Overall, sufficient behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two paragraphs: first sets purpose and use case, second adds detail on depth and ambiguity resolution. Every sentence adds information; no fluff. Front-loads the primary action and context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of recursive class hierarchy and ambiguity, the description covers key aspects: depth control, disambiguation via file_path, and response behavior. An output schema exists, so return values need not be detailed. The description is well-rounded and sufficient for the agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline is 3. Description adds value beyond schema: explains depth range (1=direct only), file_path usage with substring match restriction, and the candidates retry mechanism. This enriches the agent's understanding of how to use parameters effectively.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it finds all recursive subclasses of a given class. It differentiates from sibling tools by specifying a concrete use case: understanding the impact of changing a class's interface. This makes the tool's purpose distinct and actionable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly tells when to use: to understand the impact of changing a class's interface. It also explains the ambiguity scenario and how to resolve it with file_path. However, it does not mention when not to use this tool or compare it to siblings like get_call_graph, which could be alternatives for related queries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_unused_symbolsA
Find functions and classes with zero inbound references (dead code detection).
Analyzes the caller index and import graph to identify symbols that are never called, subclassed, or referenced from other code.
Excludes common false positives: dunder methods, framework-decorated handlers, entry points, and exception classes.
| Name | Required | Description | Default |
|---|---|---|---|
| max_results | No | Maximum results per category. | |
| symbol_type | No | What to search for: "all", "functions", or "classes". | all |
| include_tests | No | If True, also scan test files for unused code. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It discloses analysis of caller index and import graph, and lists excluded false positives (dunder methods, handlers, etc.). This provides good transparency for a read-only tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: four short sentences, each adding value. First sentence states purpose, second explains method, third lists exclusions. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema (so return format need not be explained) and three simple optional parameters, the description covers purpose, method, and exclusions completely. It is adequate for an AI agent to understand and invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for all three parameters. The tool description does not add any additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it finds functions and classes with zero inbound references (dead code detection). The verb 'find' and resource 'unused symbols' are specific, and it distinguishes from sibling tools like get_call_graph by focusing on dead code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for dead code detection but lacks explicit guidance on when to use versus alternatives. No 'when not to use' or alternative tool names are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
refresh_graphA
Bring the codebase graph up to date with the code on disk.
Use this after making changes to the codebase, or if the graph seems stale. On mirrored (Windows-mount) projects the mirror is re-synced first and only the changed files are re-parsed (incremental, ~seconds); a full re-parse runs only when the change set can't be determined. Normally the file watcher handles this automatically on native projects.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it delivers. It explains the incremental vs. full re-parse behavior, mentions mirror re-syncing on Windows-mount projects, performance (~seconds), and the automatic file watcher behavior. This is rich behavioral context beyond what any annotation would provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with the core purpose, then usage, then behavior. Every sentence earns its place, and there is no redundant or generic filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no parameters and no annotations, the description fully covers the operation, usage scenarios, behavioral nuances (incremental vs. full parse), platform-specific behavior, and the fallback to the file watcher. An output schema exists, so return values do not need explanation. This is complete for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is nothing to document. The baseline for 0-parameter tools is 4, and the description adds helpful context about when the tool applies, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Bring the codebase graph up to date with the code on disk.' This is a specific verb+resource pairing that distinguishes it from the sibling tools, which are all read/query operations (e.g., get_file_context, get_dependency_graph). The purpose is unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'Use this after making changes to the codebase, or if the graph seems stale.' It also provides an important usage caveat: 'Normally the file watcher handles this automatically on native projects,' which tells the agent when this tool may be unnecessary. This is strong when-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_projectA
Set or change the project directory that Grafyx analyzes.
Call this when Grafyx reports 'No project loaded' — typically when running as a global MCP server. Pass the workspace root path.
After calling this, all other Grafyx tools will work on the specified project. Re-call with a different path to switch projects.
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | Absolute path to the project root directory. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It discloses that the tool sets a state affecting other tools, but does not mention validation, error handling, or persistence. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, front-loaded with purpose, then usage context and effect. No redundant information; every sentence serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema, the description covers the essential aspects: what, when, and effect on other tools. It is complete enough for its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description. The description adds that the path should be an 'absolute' workspace root, reinforcing the schema but not adding significant new meaning beyond it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Set or change the project directory that Grafyx analyzes,' using a specific verb and resource. It distinguishes from sibling analysis tools by being the only one that sets the project context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to call when 'No project loaded' and explains that after calling, other tools work on the specified project. Also mentions re-calling to switch projects, providing clear when-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools are clearly scoped by level (project, module, file, function, class). Two pairs have conceptual overlap — find_related_code/find_related_files and get_dependency_graph/get_call_graph — but their descriptions clarify different output types (symbols vs files; dependencies vs call chains). Slight ambiguity remains when choosing between the graph tools for a function.
All 14 tools use lowercase verb_noun snake_case, with verbs limited to get/find/set/refresh. The pattern is consistent and predictable.
14 tools is within the ideal 3–15 range and each tool addresses a distinct analysis need, from setup (set_project) to refresh, to various context scopes and relationship queries. No tool feels unnecessary.
The server covers the full code-understanding lifecycle: set project, refresh graph, view skeleton, drill into modules/files/functions/classes, find related items, explore dependencies/calls, check conventions, and detect dead code/unused symbols. The only minor gap is a direct search-by-symbol-name tool, but find_related_code covers conceptual lookup.
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Ground-truth code graph for your codebase: exact callers, callees, symbols & dependencies.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with a structured, token-efficient map of a codebase's symbols, dependencies, and relationships via MCP tools like overview, query, and impact analysis.8MIT
- AlicenseAqualityAmaintenanceAn MCP code-intelligence server for AI agents with pre-indexed AST cache, 62 MCP tools, and TOON-compressed output, enabling token-efficient code analysis and project health grading entirely locally.947MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI-powered architecture analysis and visualization of codebases, exposing 17 MCP tools for querying components, dependencies, and generating interactive diagrams.1MIT
- AlicenseNot gradedqualityAmaintenanceProvides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.3Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/bilal07karadeniz/Grafyx'
If you have feedback or need assistance with the MCP directory API, please join our Discord server