Skip to content

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.
Cursor’s lite mode exposes six of these: brain_context, brain_search, brain_impact, brain_status, brain_guide, and detect_changes.

Run nestweaver setup to auto-configure your agent’s MCP connection. Supported agents:

  • Claude Code — writes to .mcp.json in 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 mcp to start the server manually
CategoryToolsPurpose
Contextbrain_context, code_context, brain_search, project_context, get_summary, brain_status, brain_guide, brain_diffRetrieve ranked context from the knowledge graph
Code Navigationread_symbols, regex_search, count_patterns, flow_trace, investigate, investigate_expand, investigate_hydrateNavigate symbols, trace execution flows
Impact Analysisblast_radius, brain_impact, affected_tests, dead_code, detect_changes, hub_nodes, bridge_nodes, clusters, cross_repo_contracts, contract_driftAssess change impact and architectural risk
Vault & Notesnote_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_relatedQuery vaults, manage knowledge sources
Utilitystale_check, prune_stale, compact_embeddings, set_extension, unset_extension, query_extensionsGraph maintenance and custom metadata

Many tools share these filtering and output parameters:

ParameterTypeDescription
token_budgetintegerApproximate token cap for the response (chars / 4). Controls how much context is returned.
response_formatstring"concise" for names and relationships only; "detailed" (default) adds file paths, scores, and UIDs.
reposstring[]Filter results to specific repository UIDs or names.
tagsstring[]Include only nodes tagged with any of these tags.
exclude_tagsstring[]Exclude nodes tagged with any of these tags.
path_prefixstringInclude only nodes whose file path starts with this prefix.
kindsstring[]Filter by node kind: Symbol, Note, Section, Tag, Heading. Case-insensitive prefix match.
limitintegerMaximum number of results to return. Total counts are always reported regardless of limit.

These tools handle graph maintenance and custom metadata. They are not covered on a separate sub-page due to their small number.

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.

Remove all indexed repos and vaults whose source directories no longer exist on disk.

No parameters required.

Attach custom key-value metadata to any node in a JSON sidecar alongside the database.

ParameterTypeRequiredDescription
uidstringYesNode UID to annotate.
keystringYesProperty name (e.g. "team_owner", "deprecated").
valueanyYesProperty value — any JSON value. Overwrites existing.

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).

ParameterTypeRequiredDescription
uidstringNoReturn all custom properties for this node. When provided, key and value are ignored.
keystringNoProperty name to filter by. Required when not using uid mode.
valueanyNoValue to match (exact match only). Required when key is provided.

Remove one custom property from one node.

ParameterTypeRequiredDescription
uidstringYesNode UID.
keystringYesProperty name to delete.

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.