Skip to main content

Module code

Module code 

Source
Expand description

MCP tool handlers for the tree-sitter code knowledge graph.

These map parsed code symbols (see crate::code) onto the existing entity/relation graph so the regular search/traversal tools work on code, and expose four code-focused tools: code_index, code_outline, code_search, code_get_symbol.

Symbols are stored as entities named relpath::symbol with type code:<kind>; metadata (file, line range, signature, doc) lives in observations. Edges: defines (file→symbol), calls/references (caller→callee, resolved only when the callee name is unambiguous).

Functions§

handle_code_get_symbol
handle_code_index
handle_code_outline
handle_code_search