Skip to content

add MCP v2 hints and find/search pagination echo#144

Merged
HumanBean17 merged 4 commits into
masterfrom
feat/mcp-v2-hints
May 16, 2026
Merged

add MCP v2 hints and find/search pagination echo#144
HumanBean17 merged 4 commits into
masterfrom
feat/mcp-v2-hints

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Summary

  • Add mcp_hints.py with the locked v1 road-sign catalog (Appendix A in propose/HINTS-ROAD-SIGNS-PROPOSE.md), dedupe-by-rendered-string, priority cap (≤5), and no graph/I/O.
  • Extend MCP v2 outputs: hints on search / find / describe / neighbors; limit / offset echo on search and find (cleared on success=false); requested_edge_types echo on neighbors for empty-result hints.
  • Wire handlers in mcp_v2.py, document in README, minimal tool description= updates in server.py, register mcp_hints in pyproject.toml.

Depends on PR-HINTS-A (stored OVERRIDES, ontology 13) already on master (#143).

Plan: plans/PLAN-HINTS.md § PR-B.

Test plan

  • .venv/bin/ruff check .
  • .venv/bin/pip install -e . then PATH=$PWD/.venv/bin:$PATH .venv/bin/python -m pytest tests -v (496 passed, 10 skipped)
  • tests/test_mcp_hints.py — all 24 PR-B named scenarios
  • Sentinel: mcp_hints.py has no KuzuGraph / _rows / run_search imports

Manual evidence

After indexing, a successful describe / find response includes hints and (for find/search) echoed limit / offset, e.g.:

PATH="$PWD/.venv/bin:$PATH" .venv/bin/python -c "
from kuzu_queries import KuzuGraph
from mcp_v2 import describe_v2, find_v2
g = KuzuGraph('tests/bank-chat-system/.kuzu')
# replace with a real sym: id from your graph
out = describe_v2(id='sym:...', graph=g)
print(out.model_dump(include={'hints', 'success'}))
"

Made with Cursor

HumanBean17 and others added 4 commits May 16, 2026 10:46
Implement PR-HINTS-B: pure mcp_hints catalog with dedupe/cap, wire hints
into search/find/describe/neighbors outputs, echo limit/offset on find/search,
and cover the v1 contract with tests/test_mcp_hints.py.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align README and neighbors tool description with requested_edge_types
and hints on success; remove unused override fixture helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Over-fetch one row in find_v2 so page-full hints skip the last page;
cap same-priority hints by emission order; add symbol fqn_prefix resolve test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pick a method with empty describe hints via describe_v2; assert find returns
all CONTROLLER rows under the page cap so page-full hints cannot fire in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HumanBean17 HumanBean17 merged commit 1fa1b28 into master May 16, 2026
1 check passed
@HumanBean17 HumanBean17 deleted the feat/mcp-v2-hints branch May 23, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant