You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundles T5 (#653), T7 (#655), T8 (#656) into one PR; all three are thin
async wrappers around existing AsyncGraphQuery operations and share the
same _node_summary / _coerce_node_id / _project_arg helpers.
- search_code: prefix search backed by the FalkorDB fulltext index.
Surfaces flat {id, name, label, file, line} so agents can hand the
id straight to the navigation tools.
- get_callers / get_callees: incoming / outgoing CALLS edges. The
shared _neighbors_payload inlines the IN-direction Cypher because
AsyncGraphQuery.get_neighbors only walks OUT.
- get_dependencies: same machinery, but aggregates a configurable set
of relations (default CALLS/IMPORTS/DEFINES) and dedups by node id.
- find_path: returns up to N CALLS-only paths between two symbols as
a node sequence; strips encode_edge entries from the alternating
[node, edge, ...] list produced by AsyncGraphQuery.find_paths.
Helpers:
- _node_summary flattens the encode_node shape (which nests data under
'properties' and includes the 'Searchable' fulltext-index label)
into the {id, name, label, file, line} agents want.
- _coerce_node_id accepts int or stringified-int and rejects bool.
Tests (tests/mcp/test_query_tools.py, 13 tests):
- search_code prefix happy/limit/no-match/serialisability paths.
- get_callees(entrypoint) ⊇ {service}; get_callers(service) ⊇ {entrypoint}.
- get_dependencies includes the CALLS relation.
- Neighbor tools accept string ids; reject garbage.
- find_path(entrypoint → db) ≥ 1; reverse direction returns [];
max_paths is honored.
- All five tools are registered on the MCP app.
Also drops a stray venv/ that snuck into the fixture directory and
was polluting the prefix-search results.
Closes#653, #655, #656.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments