MCP Tools
Coraline MCP Tools Reference
Coraline exposes 38 MCP tools when running as an MCP server (coraline serve --mcp).
All tool names are prefixed with coraline_ to avoid collisions with other MCP servers.
Protocol notes:
- Negotiates MCP protocol version
2025-11-25(with compatibility fallback to2024-11-05) - Expects
notifications/initializedafterinitializebefore normal requests tools/listsupports pagination viacursorandnextCursor
coraline_semantic_search is available by default (the embeddings feature ships enabled) but only registered when an ONNX model is present in the shared model directory (~/.config/coraline/models/<model>/, where <model> is vectors.model from config, default nomic-embed-text-v1.5). Run coraline model download then coraline embed to activate it — see coraline model list for every supported model. The remaining 37 tools are typically available; memory-backed tools may be skipped if their initialization fails (e.g. due to filesystem or permission issues).
Quick Reference
| Category | Tool | Description |
|---|---|---|
| Graph | coraline_search | Find symbols by name or pattern |
coraline_callers | Find what calls a symbol | |
coraline_callees | Find what a symbol calls | |
coraline_impact | Analyze change impact radius | |
coraline_dependencies | Outgoing dependency graph from a node | |
coraline_dependents | Incoming dependency graph (what depends on a node) | |
coraline_path | Find a path between two nodes | |
coraline_stats | Detailed graph statistics by language/kind/edge | |
coraline_find_symbol | Find symbols with rich metadata + optional body | |
coraline_get_symbols_overview | List all symbols in a file | |
coraline_find_references | Find all references to a symbol | |
coraline_node | Get full node details and source code | |
coraline_cluster_overview | List Louvain clusters with one representative node per cluster | |
coraline_cluster_members | List nodes that share a given cluster_id | |
coraline_process_for | Return the call-graph trace (entry point + nodes + edges) for the given node | |
| Batch | coraline_batch_get_nodes | Fetch multiple nodes by ID in one call |
coraline_batch_callers | Get callers for multiple symbols in one call | |
coraline_batch_callees | Get callees for multiple symbols in one call | |
| Advanced Search | coraline_search_by_signature | Find symbols by type signature pattern |
coraline_search_by_docstring | Find symbols by documentation/comment content | |
coraline_search_exported_symbols | Search only public/exported symbols | |
coraline_find_by_kind_in_file | Get all symbols of a kind in one file | |
| Context | coraline_context | Build structured context for an AI task |
| Audit | coraline_audit_docs | Audit Markdown docs for stale references and undocumented exports |
| File | coraline_read_file | Read file contents |
coraline_list_dir | List directory contents | |
coraline_find_file | Find files by glob pattern | |
coraline_get_file_nodes | Get all indexed nodes in a file | |
coraline_status | Show project index statistics | |
coraline_sync | Trigger incremental index sync | |
coraline_get_config | Read project configuration | |
coraline_update_config | Update a config value | |
coraline_semantic_search | Vector similarity search (requires model download — see below) | |
| Memory | coraline_write_memory | Write or update a project memory |
coraline_read_memory | Read a project memory | |
coraline_list_memories | List all memories | |
coraline_delete_memory | Delete a memory | |
coraline_edit_memory | Edit memory via literal or regex replace |
Graph Tools
coraline_search
Search for code symbols by name or pattern across the indexed codebase.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Symbol name or FTS pattern |
kind | string | — | Filter: function, method, class, struct, interface, trait, module | |
file | string | — | Filter results to this file path (relative or absolute) | |
limit | number | 10 | Maximum results |
Output:
{
"results": [
{
"node": {
"id": "abc123",
"kind": "function",
"name": "resolve_unresolved",
"qualified_name": "coraline::resolution::resolve_unresolved",
"file_path": "/path/to/resolution/mod.rs",
"start_line": 42,
"end_line": 95,
"language": "rust",
"signature": "fn resolve_unresolved(conn: &mut Connection, ...)"
},
"score": 0.92
}
],
"count": 1
}
coraline_callers
Find all functions/methods that call a given symbol (incoming calls edges).
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the target node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
limit | number | 20 | Maximum callers to return | |
min_confidence | number | 0.0 | Minimum edge resolution confidence in [0.0, 1.0]. Edges below this threshold are filtered out. Direct AST-extracted edges have confidence 1.0; strongly-typed Rust crate:: / super:: / self:: resolutions have confidence 0.95; generic name matches / framework fallbacks have confidence 0.5. Default 0.0 includes every edge. |
Either node_id or name must be provided. When name matches multiple symbols, supply file to disambiguate or the tool returns a listing of candidates.
Output:
{
"callers": [
{
"id": "def456",
"kind": "function",
"name": "index_all",
"qualified_name": "coraline::extraction::index_all",
"file_path": "/path/to/extraction.rs",
"start_line": 120,
"line": 158
}
],
"count": 1
}
coraline_callees
Find all functions/methods that a given symbol calls (outgoing calls edges).
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the source node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
limit | number | 20 | Maximum callees to return | |
min_confidence | number | 0.0 | Minimum edge resolution confidence in [0.0, 1.0]. Same scale as coraline_callers: 1.0 = direct AST-extracted, 0.95 = strong Rust path, 0.5 = generic / framework fallback. Default 0.0 includes every edge. |
Either node_id or name must be provided.
Output: Same shape as coraline_callers but field is callees.
Precision Notes:
- Call-edge resolution prefers extractor-provided candidate IDs (better locality signal) to avoid false-positive cross-project links in mixed active/legacy workspaces.
- When a call target is ambiguous and no scoped match exists, it is left unresolved (empty) rather than linked to a low-confidence global match.
- Results are ordered deterministically by (line, column, target) to ensure consistency across repeated queries.
coraline_impact
Analyze the impact radius of changing a symbol — finds everything that directly or transitively depends on it, via BFS over incoming calls and references edges.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the node to analyze | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
max_depth | number | 2 | BFS traversal depth | |
max_nodes | number | 50 | Cap on returned nodes |
Either node_id or name must be provided.
Output:
{
"nodes": [ ... ],
"edges": [ ... ],
"stats": {
"node_count": 12,
"edge_count": 15,
"file_count": 4,
"max_depth": 2
}
}
coraline_dependencies
Get the outgoing dependency graph from a node — what does this symbol import, call, or reference, recursively up to a configurable depth?
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the source node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
max_depth | number | 2 | BFS traversal depth | |
max_nodes | number | 50 | Cap on returned nodes | |
edge_kinds | string[] | all | Edge kinds to follow (e.g. ["calls", "imports"]) |
Either node_id or name must be provided.
Output:
{
"root_id": "abc123",
"nodes": [ ... ],
"edges": [ ... ],
"stats": { "node_count": 8, "edge_count": 10, "file_count": 3, "max_depth": 2 }
}
coraline_dependents
Get the incoming dependency graph — what symbols depend on (call, import, or reference) this node, recursively?
Input: Same as coraline_dependencies (supports node_id or name + file).
Output: Same shape as coraline_dependencies but traversal follows edges in reverse.
coraline_path
Find a path between two nodes in the graph, using BFS over all edge kinds.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
from_id | string | Starting node ID | |
from_name | string | Starting node name (alternative to from_id) | |
from_file | string | Disambiguate from_name by file path | |
to_id | string | Target node ID | |
to_name | string | Target node name (alternative to to_id) | |
to_file | string | Disambiguate to_name by file path |
For each endpoint, either the _id or _name parameter must be provided.
Output:
{
"from_id": "abc123",
"to_id": "def456",
"path_found": true,
"path": ["abc123", "mid789", "def456"],
"length": 3
}
Returns { "path_found": false } if no path exists.
coraline_stats
Return detailed graph statistics: total counts, per-language file breakdown, node kind breakdown, and edge kind breakdown.
Input: None.
Output:
{
"totals": {
"nodes": 1842,
"edges": 4201,
"files": 47,
"unresolved_references": 123,
"vectors": 0
},
"files_by_language": { "rust": 28, "typescript": 14, "toml": 5 },
"nodes_by_kind": {
"function": 412,
"method": 287,
"import": 201,
"struct": 88
},
"edges_by_kind": {
"contains": 1842,
"calls": 987,
"imports": 201,
"exports": 178
}
}
coraline_find_symbol
Find symbols by name pattern with richer metadata than coraline_search, including optional source code body. Good for Foo/__init__-style path patterns.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name_pattern | string | ✅ | — | Symbol name or substring |
kind | string | — | Same kind filter as coraline_search | |
file | string | — | Filter results to this file path | |
include_body | boolean | false | Attach source code body | |
limit | number | 10 | Maximum results |
Output: { "symbols": [...], "count": N } — each symbol includes docstring, is_exported, is_async, is_static, score, and optionally body.
coraline_get_symbols_overview
Get an overview of all symbols in a file, grouped by kind and ordered by line number.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | ✅ | Path to file (relative to project root or absolute) |
Output:
{
"file_path": "src/lib.rs",
"symbol_count": 14,
"by_kind": {
"function": [ ... ],
"struct": [ ... ]
},
"symbols": [ ... ]
}
coraline_find_references
Find all nodes that reference (call, import, extend, implement, etc.) a given symbol.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the target node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
edge_kind | string | all | Filter: calls, imports, extends, implements, references | |
limit | number | 50 | Maximum references | |
min_confidence | number | 0.0 | Minimum edge resolution confidence in [0.0, 1.0]. Same scale as coraline_callers / coraline_callees: 1.0 = direct AST-extracted, 0.95 = strong Rust path, 0.5 = generic / framework fallback. Default 0.0 includes every edge. |
Either node_id or name must be provided.
Output: { "node_id": "...", "references": [...], "count": N } — each reference includes its edge_kind and the line number of the edge.
coraline_node
Get complete details for a specific node by ID, including its source code body read from disk.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | The node ID | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
include_edges | boolean | false | Also return incoming/outgoing edge counts |
Either node_id or name must be provided.
Output: Full node record including body (source lines), visibility, decorators, type_parameters, is_async, is_static, is_abstract, and optionally incoming_edge_count / outgoing_edge_count.
Batch Tools
Fetch results for multiple symbols in one call instead of N round trips — roughly 60% fewer tokens than the equivalent sequence of single-symbol calls.
coraline_batch_get_nodes
Fetch multiple nodes by ID in a single call.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_ids | array of string | ✅ | — | Node IDs to fetch |
include_body | boolean | false | Include source code body for each node | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
Output: { "nodes": [...], "count": N, "not_found": [...] }
coraline_batch_callers
Get callers for multiple symbols in a single call.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_ids | array of string | ✅ | — | Node IDs to find callers for |
limit_per_node | number | 20 | Maximum callers to return per node |
Output: { "callers": { "<node_id>": [...] }, "node_count": N }
coraline_batch_callees
Get callees for multiple symbols in a single call.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_ids | array of string | ✅ | — | Node IDs to find callees for |
limit_per_node | number | 20 | Maximum callees to return per node |
Output: { "callees": { "<node_id>": [...] }, "node_count": N }
Advanced Search Tools
Specialized lookups over indexed nodes, faster than full-text coraline_search for these specific shapes — also roughly 60% fewer tokens for the matched use case.
coraline_search_by_signature
Find symbols by type signature pattern (case-insensitive substring match) — e.g. functions by return type or parameters.
The signature of a node is its header without its body, whitespace-normalised: pub fn divide(a: i32, b: i32) -> Result<i32, String>. It is recovered from the source at extraction time, per language — see Language Contract in the architecture guide.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pattern | string | ✅ | — | Signature substring to search for (e.g. "Result<", "async fn", "<T>") |
kind | string | — | Filter: function, method, class, struct, interface, trait | |
limit | number | 20 | Maximum results | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
coraline_search_by_docstring
Search symbols by documentation/comment content — find code by what it does, not just its name.
The docstring of a node is the documentation attached to its declaration: a /// or //! comment in Rust, a /** … */ or // comment in TypeScript, a docstring in Python, and the equivalent in the other supported languages. It is recovered from the source at extraction time, per language — see Language Contract in the architecture guide.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Text to search for in docstrings/comments |
kind | string | — | Filter: function, method, class, struct, interface, trait | |
limit | number | 20 | Maximum results | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
coraline_search_exported_symbols
Search only public/exported symbols — filters out internal implementation details to browse the public API surface.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Symbol name pattern; use "*" to list all |
kind | string | — | Filter: function, method, class, struct, interface, trait, module | |
limit | number | 20 | Maximum results | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
coraline_find_by_kind_in_file
Get all symbols of a specific kind in one file — fast file-scoped exploration.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path | string | ✅ | — | Path to the file (relative to project root) |
kind | string | ✅ | — | function, method, class, struct, interface, trait, module, constant, or variable |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
Context Tool
coraline_context
Build structured context for an AI task description. Searches the graph, traverses relationships, and returns relevant code snippets in Markdown or JSON format.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
task | string | ✅ | — | Natural language task description |
max_nodes | number | 20 | Max graph nodes to include | |
max_code_blocks | number | 5 | Max code block attachments | |
max_code_block_size | number | 1500 | Max chars per code block | |
include_code | boolean | true | Attach source code snippets | |
traversal_depth | number | 1 | Graph traversal depth | |
format | string | "markdown" | "markdown" or "json" |
Output: A Markdown or JSON document containing relevant symbols and code, ready to paste as context for an LLM.
Audit Tool
coraline_audit_docs
Audit Markdown documentation coverage against the indexed code graph.
Detects two classes of issues:
stale_refs: inline code-span symbol references in Markdown that do not resolve to indexed symbolsundocumented_exports: exported code symbols with no inboundreferencesedge from Markdown docs
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
show_undocumented | boolean | true | Include undocumented export results | |
show_stale | boolean | true | Include stale reference results | |
limit | number | 50 | Max items returned per result set |
Output:
{
"summary": {
"doc_files_indexed": 12,
"doc_sections_indexed": 89,
"stale_refs_count": 3,
"undocumented_exports_count": 7
},
"stale_refs": [
{
"reference": "resolve_unresolved",
"doc_file": "docs/ARCHITECTURE.md",
"section": "Resolution",
"line": 42,
"column": 18
}
],
"undocumented_exports": [
{
"name": "audit_docs",
"qualified_name": "coraline::audit::audit_docs",
"kind": "function",
"file": "crates/coraline/src/audit.rs",
"line": 48
}
]
}
File Tools
coraline_read_file
Read the contents of a file within the project.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | ✅ | — | File path (relative to project root or absolute) |
start_line | number | 1 | First line to read (1-indexed, inclusive) | |
limit | number | 200 | Maximum number of lines to return |
coraline_list_dir
List the contents of a directory within the project.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | . | Directory path (relative to project root or absolute). Defaults to project root. |
coraline_get_file_nodes
Get all indexed symbols (nodes) for a specific file.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | ✅ | File path (relative or absolute) |
Output: { "file_path": "...", "nodes": [...], "count": N }
coraline_find_file
Find files by name or glob pattern. Recursively walks the project tree, skipping .git, node_modules, target, and .coraline directories.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pattern | string | ✅ | — | File name, substring, or glob pattern (*.rs, test_*, [Cc]argo.toml) |
limit | number | 20 | Maximum results |
Output:
{
"pattern": "*.rs",
"files": ["src/lib.rs", "src/db.rs", "src/graph.rs"],
"count": 3
}
coraline_status
Show project index statistics: total files, nodes, edges, and unresolved reference counts. Optionally include the full coraline doctor --json report for self-healing UIs.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
include_doctor | bool | false | When true, also runs coraline doctor probes and returns the full report under doctor_report, plus a top-level doctor_needs_attention bool. | |
deep | bool | false | Only meaningful when include_doctor is true. When true, runs the slower model-load / inference / coverage probes. |
Output (without include_doctor):
{
"project_root": "/abs/path/to/project",
"database": "/abs/path/to/project/.coraline/coraline.db",
"database_size_bytes": 2097152,
"stats": {
"nodes": 4201,
"edges": 9872,
"files": 128,
"unresolved_references": 153
}
}
Output (with include_doctor: true): the same fields above, plus:
{
"doctor_report": {
"probes": [
{ "name": "config", "ok": true, "detail": "...", "fix": null },
{ "name": "database", "ok": true, "detail": "...", "fix": null },
{ "name": "git hooks", "ok": false, "detail": "...", "fix": "..." },
{ "name": "vec_ext", "ok": true, "detail": "...", "fix": null },
{
"name": "model file",
"ok": false,
"detail": "...",
"fix": "Run `coraline model download`..."
}
],
"exit_code": 1
},
"doctor_needs_attention": true
}
doctor_needs_attention is derived from exit_code == 0 (inverted) so a UI can render a single bool to decide whether to surface a "fix this" prompt. The probes array carries the per-check name / ok / detail / fix fields — fix is the human-readable remediation hint (e.g. "Run coraline model download to enable semantic search."). Self-healing UIs should walk probes[].fix to present the user with one actionable suggestion per failing check.
Back-compat: when include_doctor is omitted (or false), the response shape is identical to the prior version — only the four legacy top-level keys appear.
Connection hygiene: the tool opens the SQLite database for the index stats query and drops that handle before invoking coraline doctor, so the WAL writer lock isn't held by both queries simultaneously.
coraline_get_config
Read the current project configuration from .coraline/config.toml.
Input: None.
Output: Full CoralineConfig as JSON with all four sections (indexing, context, sync, vectors).
coraline_update_config
Update a single configuration value using dot-notation path.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Dot-notation path, e.g. context.max_nodes |
value | any | ✅ | New value (type must match the field) |
coraline_sync
Trigger an incremental sync of the index. Detects files added, modified, or removed since the last index run and updates only what changed. Run after editing source files to keep the graph current.
Input: None.
Output:
{
"files_checked": 42,
"files_added": 1,
"files_modified": 3,
"files_removed": 0,
"nodes_updated": 47,
"duration_ms": 380
}
coraline_semantic_search
Search indexed nodes using natural-language vector similarity. Included in the default build; only registered as an MCP tool once an ONNX model is present in the shared model directory (~/.config/coraline/models/<model>/, <model> from vectors.model). To activate:
coraline model download # download the configured model (default nomic-embed-text-v1.5, ~137 MB)
coraline embed # generate embeddings for all indexed nodes
Run coraline model list to see every supported model, including the code-specialised jina-embeddings-v2-base-code.
When this tool is used, Coraline periodically performs a throttled freshness check. If indexed state is stale it runs incremental sync automatically, then refreshes stale/missing embeddings before search. Results and coverage are scoped to whichever model is currently configured — embeddings from a previously-configured model are ignored, not mixed in.
Structured error when the model is missing:
If the ONNX model can't be loaded (not downloaded yet, or tokenizer.json/weights missing), the tool call fails with isError: true and a structured EMBEDDING_MODEL_MISSING envelope in structuredContent, so an agent can branch on code instead of parsing free-form text:
{
"code": "EMBEDDING_MODEL_MISSING",
"message": "Embedding model is not present. Run `coraline model download` to download it.",
"recover": {
"command": "coraline model download",
"docs": "https://github.com/greysquirr3l/coraline#embeddings (debug: load failed: ...)"
}
}
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Natural-language description of what you're looking for |
limit | number | 10 | Max results | |
min_similarity | number | 0.3 | Minimum cosine similarity threshold (0–1) |
Output:
{
"query": "how is sync staleness detected",
"freshness": {
"checked": true,
"stale_files_added": 0,
"stale_files_modified": 2,
"stale_files_removed": 0,
"synced": true,
"files_added": 0,
"files_modified": 2,
"files_removed": 0,
"embeddings_refreshed": true,
"embeddings_refreshed_count": 18,
"check_interval_seconds": 30
},
"results": [
{
"id": "abc123",
"name": "resolve_unresolved",
"qualified_name": "coraline::resolution::ReferenceResolver::resolve_unresolved",
"kind": "function",
"file_path": "src/resolution/mod.rs",
"start_line": 42,
"docstring": null,
"signature": "fn resolve_unresolved(...)",
"score": 0.87
}
]
}
Memory Tools
Project memories are Markdown files stored in .coraline/memories/. They persist across sessions and help AI assistants maintain project context.
coraline_write_memory
Write or update a project memory.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Memory name (without .md). E.g. project_overview |
content | string | ✅ | Memory content in Markdown format |
coraline_read_memory
Read a project memory by name.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Memory name (without .md) |
Output: { "name": "...", "content": "..." }
coraline_list_memories
List all available memories for the project.
Input: None.
Output: { "memories": ["project_overview", "architecture_notes", ...], "count": N }
coraline_delete_memory
Delete a project memory.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Memory name to delete |
coraline_edit_memory
Edit a memory file by replacing text — either as a literal string match or a regex pattern.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | ✅ | — | Memory name (without .md) |
pattern | string | ✅ | — | Text to find |
replacement | string | ✅ | — | Replacement text |
mode | string | "literal" | "literal" or "regex" |
Cluster & Process Trace Tools
Louvain community detection (coraline_cluster_overview, coraline_cluster_members) and per-node execution-flow traces (coraline_process_for) are computed at index time during the post-extraction passes (run automatically by coraline index and coraline sync). Both column types are nullable — nodes.cluster_id IS NULL and edges.process_id IS NULL mean "not clustered" / "not part of any traced process" respectively. The tools return data only when the post-extraction passes have completed at least once.
coraline_cluster_overview
List Louvain clusters discovered during indexing, ordered by size, with one representative node per cluster.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | number | 50 | Maximum clusters to return |
Output:
{
"clusters": [
{
"cluster_id": 0,
"size": 42,
"sample_node_id": "abc123",
"sample_qualified_name": "coraline::extraction::index_all",
"sample_kind": "function",
"sample_language": "rust"
},
{
"cluster_id": 1,
"size": 17,
"sample_node_id": "def456",
"sample_qualified_name": "coraline::db::query",
"sample_kind": "function",
"sample_language": "rust"
}
],
"count": 2
}
coraline_cluster_members
List all nodes that share the given cluster_id, ordered by qualified_name. Use the output of coraline_cluster_overview to pick a cluster_id.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cluster_id | number | ✅ | — | Cluster id from coraline_cluster_overview |
limit | number | 200 | Maximum members to return |
Output:
{
"cluster_id": 0,
"nodes": [ ... full node records ... ],
"count": 42
}
coraline_process_for
Return the call-graph trace (entry point + nodes + edges) for the given node. Walks backward through incoming calls edges to find the owning entry point, then DFS forward through the call graph (with cycle protection + depth cap, default 50) to surface every node and edge in the process trace. Returns null when the node isn't reachable from any entry point.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | ✅ | — | ID of the node to trace |
max_depth | number | 50 | Maximum DFS depth from the entry point |
Output (node reachable):
{
"entry_point": { /* full node record */ },
"depth_reached": 3,
"nodes": [ ... full node records ... ],
"edges": [
{
"source": "abc123",
"target": "def456",
"kind": "calls",
"line": 158,
"column": 4,
"confidence": 1.0,
"process_id": 1
}
]
}
Output (node unreachable): JSON null.
Each edge includes its process_id (matches the entry point's trace ordinal) and confidence (same scale as coraline_callers / coraline_callees).
MCP Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"coraline": {
"command": "/path/to/coraline",
"args": ["serve", "--mcp", "--path", "/path/to/your/project"]
}
}
}
Claude Code
Add to .claude/mcp.json in your project workspace:
{
"mcpServers": {
"coraline": {
"command": "coraline",
"args": ["serve", "--mcp"]
}
}
}
When --path is omitted, the working directory is used as the project root.