Grafyx
v0.2.4Real-time codebase graph for AI assistants: call graphs, dependencies, symbol lookup.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_project_skeleton
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.
| Parameter | Type | Description |
|---|---|---|
detail | string | 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 w… |
include_hints | boolean | If True, append navigation suggestions. |
max_depth | integer | Maximum depth for the file tree display. |
get_function_context
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.
| Parameter | Type | Description |
|---|---|---|
function_name * | string | Name of the function to look up. |
detail | string | Level of detail: "signatures", "summary" (default), or "full". |
file_path | string | 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. |
include_hints | boolean | If True, append navigation suggestions. |
get_file_context
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.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the file to inspect. |
detail | string | Level of detail: "signatures", "summary" (default), or "full". |
include_hints | boolean | If True, append navigation suggestions. |
get_class_context
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.
| Parameter | Type | Description |
|---|---|---|
class_name * | string | Name of the class to look up. |
detail | string | Level of detail: "signatures", "summary" (default), or "full". |
include_hints | boolean | If True, append navigation suggestions. |
get_module_context
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.
| Parameter | Type | Description |
|---|---|---|
detail | string | Level of detail: "signatures", "summary" (default), or "full". |
include_hints | boolean | If True, append navigation suggestions. |
limit | integer | 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 re… |
module_path | string | Directory path relative to project root (e.g. "services", "grafyx/graph"). Empty string means the whole project. |
offset | integer | Number of files to skip (for paginating large modules). |
get_dependency_graph
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.
| Parameter | Type | Description |
|---|---|---|
symbol_name * | string | |
depth | integer |
get_call_graph
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.
| Parameter | Type | Description |
|---|---|---|
function_name * | string | |
depth | integer | |
include_builtins | boolean |
set_project
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.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Absolute path to the project root directory. |
get_conventions
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.
refresh_graph
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.
get_unused_symbols
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.
| Parameter | Type | Description |
|---|---|---|
include_tests | boolean | If True, also scan test files for unused code. |
max_results | integer | Maximum results per category. |
symbol_type | string | What to search for: "all", "functions", or "classes". |
get_subclasses
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.
| Parameter | Type | Description |
|---|---|---|
class_name * | string | Name of the base class to find subclasses of. |
depth | integer | How many inheritance levels to traverse (1 = direct only). |
file_path | string | 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. |