Skip to content

feat(evidence): wire arc-kit-au evidence graph into MCP query tools#76

Merged
elasticdotventures merged 3 commits into
mainfrom
feat/evidence-graph-mcp-52
May 4, 2026
Merged

feat(evidence): wire arc-kit-au evidence graph into MCP query tools#76
elasticdotventures merged 3 commits into
mainfrom
feat/evidence-graph-mcp-52

Conversation

@promptexecutionerr
Copy link
Copy Markdown
Collaborator

Closes #52.

Summary

Adds 3 new query actions to the existing ledgerr_evidence MCP tool, exposing the full arc-kit-au evidence graph through the MCP surface.

New actions

  1. summary — Graph-wide statistics: node counts by type, edge count, work queue summary
  2. list_nodes — Enumerate all nodes (optional node_type filter). Returns node_id + node_type.
  3. node_detail — Full detail for a specific NodeId

Files changed: 4

  • contract.rs — 3 new EvidenceArgs variants, updated published tools spec
  • mcp_adapter.rs — 3 new handler arms with node type parsing helpers
  • docs/mcp-capability-contract.md — regenerated
  • scripts/mcp_cli_demo.sh — regenerated

Claude Sonnet (coordinator) and others added 2 commits May 4, 2026 01:42
Closes #52.

Adds 3 new actions to ledgerr_evidence tool:
- summary: node counts by type, edge count, work queue summary
- list_nodes: enumerate all nodes (optional filter by node type)
- node_detail: full detail for a specific NodeId

Updates published tool spec in contract.rs with new actions.
Regenerates MCP contract artifacts.
Signed-off-by: Brian Horakh <35611074+elasticdotventures@users.noreply.github.com>
@elasticdotventures
Copy link
Copy Markdown
Member

@copilot MECE good faith critical review

- Remove `#[cfg(feature = \"legacy\")]` gate from `unknown_tool_result`:
  `handle_external_tool` (compiled under `b00t`) called it, causing
  a compile error when `b00t` was activated without `legacy`.

- Fix `NodeId::node_type()` missing \"vi\" → `ValidationIssue` arm:
  ValidationIssue nodes' NodeId prefix was not handled, returning
  `NodeType::Unknown` instead of `NodeType::ValidationIssue`. Adds
  a full round-trip test covering all 8 node-type prefixes.

- Refactor `Summary` handler from O(8n) to O(n):
  Replace 8 separate `nodes_of_type()` linear scans with one pass
  building a `HashMap<&str, usize>` counter.

- Extract `parse_evidence_node_type` and `evidence_node_type_label`
  as named module-level helpers (not inner functions). Eliminates
  duplicate string→NodeType mapping, makes them individually testable,
  and removes the `use arc_kit_au::NodeType` / `use arc_kit_au::NodeId`
  one-off imports inside match arms.

- Simplify verbose `serde_json::Value::Number(serde_json::Number::from(...))`
  → `json!(count)` via the single-pass approach.

Agent-Logs-Url: https://github.com/PromptExecution/l3dg3rr/sessions/deedd373-3e7a-48ea-8505-5d3994d9dfcd

Co-authored-by: elasticdotventures <35611074+elasticdotventures@users.noreply.github.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.

Wire arc-kit-au evidence graph into MCP query tools

3 participants