Skip to content

refactor(mcp)!: consolidate tool surface 52 → 27 (v0.5.0) - #468

Open
Disentinel wants to merge 3 commits into
mainfrom
feat/mcp-tool-consolidation
Open

refactor(mcp)!: consolidate tool surface 52 → 27 (v0.5.0)#468
Disentinel wants to merge 3 commits into
mainfrom
feat/mcp-tool-consolidation

Conversation

@Disentinel

Copy link
Copy Markdown
Owner

What & why

Consolidates the grafema MCP tool surface from 52 → 27 tools to improve coherence (Glama scored the old surface C: too many near-duplicate tools an agent must disambiguate). Every merge is a genuine usability win — fewer near-synonym tools, one naming scheme, one mental model.

The consolidation

  • Node inspection 8→1: get_node{detail: record|neighbors|context|full, format: json|dsl} absorbs get_neighbors/get_context/describe/get_file_overview/get_function_details/get_shape.
  • Trace 4→1: trace{along: data|calls|effects|alias|edges} absorbs trace_dataflow/trace_calls/trace_effects/trace_alias/traverse_graph.
  • Datalog provenance 3→1: explain_datalog{mode: fact|gap|sim}.
  • query_graphql/check_invariantquery_graph (language/rule); get_schemaget_stats; explain dropped (returned a prompt, not data).
  • Knowledge: assert is batch-native ({assertions:[…]}; covers remember/add_assertion/supersede via relation type); retract for deletes; recall covers semantic_search. enox_ prefix dropped — Enox is a protocol grafema supports, not a tool namespace.
  • Code & knowledge graphs unified via an optional graph: "code"|"knowledge" param (one RFDB engine, two DB namespaces).
  • snake_case param canon (graph, max_depth, edge_types, context_lines).

Compatibility

All old names are kept as hidden deprecated dispatch aliases (arg-translated, with a deprecation log) for one minor — they still work but are not advertised in tools/list. New integrations should use the 27.

Verification

  • Real stdio tools/list returns exactly 27 tools, 0 enox_, 0 dupes.
  • tsc clean, eslint clean, 116/117 tests pass (1 pre-existing skip).
  • Old-name aliases dispatch correctly; genuinely-unknown names rejected.

Release & docs

  • v0.5.0 (minor; breaking MCP tool-contract, pre-1.0 semver) — all 6 publishable packages synced; CHANGELOG [0.5.0] with old→new mapping; README banner.
  • Docs, _ai/intents/mcp-tool/*, .claude skills, CLI parity updated; docs/mcp-reference.md regenerated (27 tools); site updated separately (grafema-cloud).

⚠️ Separate known issue surfaced (NOT fixed here)

While regenerating the autogenerated reference, grafema analyze of this monorepo fails: the derive engine overflows max_intermediate_results=100000 on @stdlib/js_local_refs (~120k–140k results) → orchestrator never exits 0 → the JS enrichers (incl. enrichMcpToolDefinitions) are skipped. The reference was regenerated by invoking the real enrichers directly. grafema cannot currently analyze its own codebase — worth a follow-up (raise the cap / chunk the rule pack).

🤖 Generated with Claude Code

Grafema Launch Ops and others added 3 commits June 18, 2026 13:49
BREAKING CHANGE: MCP tool surface consolidated from 52 to 27 tools for coherence.

- get_node{detail,format} absorbs get_neighbors/get_context/describe/get_file_overview/
  get_function_details/get_shape
- trace{along} absorbs trace_dataflow/trace_calls/trace_effects/trace_alias/traverse_graph
- explain_datalog{mode} absorbs explain_fact/explain_gap/sim_datalog
- query_graphql/check_invariant -> query_graph; get_schema -> get_stats; drop explain
- assert is batch-native (covers remember/add_assertion/supersede via relation);
  retract for deletes; recall covers semantic_search; enox_ prefix dropped
- code & knowledge graphs unified via graph:code|knowledge param (one RFDB engine)
- snake_case param canon; old names kept as hidden deprecated dispatch aliases (1 minor)

Docs, _ai/intents, .claude skills, CLI parity and CHANGELOG updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump all packages 0.4.1 -> 0.5.0 (minor; breaking MCP tool-contract change,
pre-1.0 semver). CHANGELOG [0.5.0] section + README version banner.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerated via the grafema mcp:tool enrichers + export --as docs-md.
27 tools, old/renamed names removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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