MCP Tools
NestWeaver exposes 43 tools via the Model Context Protocol (MCP), giving AI coding agents structured access to the knowledge graph. Every tool accepts JSON parameters and returns structured JSON responses.
- Context A ranked neighborhood for a name, file, or project.
- Navigation Read a symbol, trace calls, or follow a question.
- Impact What a change reaches, including tests and dead code.
- Vault Notes, backlinks, tags, and the sources you indexed.
- Utility Staleness, sidecars, and custom metadata.
Run nestweaver setup to auto-configure your agent’s MCP connection. Supported agents:
- Claude Code — writes to
.mcp.jsonin the project root - Cursor — configures the MCP server in Cursor settings
- Aider — adds the MCP server to
.aider.conf.yml - Copilot CLI — registers the MCP endpoint
- Gemini CLI — configures via
.gemini/settings.json - Codex — registers the MCP server for OpenAI Codex
- Other MCP-compatible agents — use
nestweaver mcpto start the server manually
Tool categories
Section titled “Tool categories”| Category | Tools | Purpose |
|---|---|---|
| Context | brain_context, code_context, brain_search, project_context, get_summary, brain_status, brain_guide, brain_diff | Retrieve ranked context from the knowledge graph |
| Code Navigation | read_symbols, regex_search, count_patterns, flow_trace, investigate, investigate_expand, investigate_hydrate | Navigate symbols, trace execution flows |
| Impact Analysis | blast_radius, brain_impact, affected_tests, dead_code, detect_changes, hub_nodes, bridge_nodes, clusters, cross_repo_contracts, contract_drift | Assess change impact and architectural risk |
| Vault & Notes | note_get, backlinks, brain_add_source, brain_remove_source, brain_broken_links, brain_orphan_documents, brain_topic_clusters, brain_tag_graph, brain_doc_stats, brain_memory_lint, brain_memory_consolidate, brain_memory_related | Query vaults, manage knowledge sources |
| Utility | stale_check, prune_stale, compact_embeddings, set_extension, unset_extension, query_extensions | Graph maintenance and custom metadata |
Common parameters
Section titled “Common parameters”Many tools share these filtering and output parameters:
| Parameter | Type | Description |
|---|---|---|
token_budget | integer | Approximate token cap for the response (chars / 4). Controls how much context is returned. |
response_format | string | "concise" for names and relationships only; "detailed" (default) adds file paths, scores, and UIDs. |
repos | string[] | Filter results to specific repository UIDs or names. |
tags | string[] | Include only nodes tagged with any of these tags. |
exclude_tags | string[] | Exclude nodes tagged with any of these tags. |
path_prefix | string | Include only nodes whose file path starts with this prefix. |
kinds | string[] | Filter by node kind: Symbol, Note, Section, Tag, Heading. Case-insensitive prefix match. |
limit | integer | Maximum number of results to return. Total counts are always reported regardless of limit. |
Utility tools
Section titled “Utility tools”These tools handle graph maintenance and custom metadata. They are not covered on a separate sub-page due to their small number.
stale_check
Section titled “stale_check”Check whether the graph index is current. Compares each repo’s indexed git SHA with HEAD and checks that edges were built by the current resolver generation. A generation mismatch reports outdated_resolver.
No parameters required.
prune_stale
Section titled “prune_stale”Remove all indexed repos and vaults whose source directories no longer exist on disk.
No parameters required.
set_extension
Section titled “set_extension”Attach custom key-value metadata to any node in a JSON sidecar alongside the database.
| Parameter | Type | Required | Description |
|---|---|---|---|
uid | string | Yes | Node UID to annotate. |
key | string | Yes | Property name (e.g. "team_owner", "deprecated"). |
value | any | Yes | Property value — any JSON value. Overwrites existing. |
query_extensions
Section titled “query_extensions”Query custom metadata set via set_extension. Two modes: by uid (all properties for a node) or by key + value (find all nodes matching a property).
| Parameter | Type | Required | Description |
|---|---|---|---|
uid | string | No | Return all custom properties for this node. When provided, key and value are ignored. |
key | string | No | Property name to filter by. Required when not using uid mode. |
value | any | No | Value to match (exact match only). Required when key is provided. |
unset_extension
Section titled “unset_extension”Remove one custom property from one node.
| Parameter | Type | Required | Description |
|---|---|---|---|
uid | string | Yes | Node UID. |
key | string | Yes | Property name to delete. |
compact_embeddings
Section titled “compact_embeddings”Reclaim embedding vectors left behind by deleted graph nodes. This does not re-embed the graph.
code_context is the code-only PageRank walk. File paths are seeds there. brain_context takes note titles, tags, symbol names, and UIDs.