Skip to content

feat(serve): expose the approved read operations over MCP - #566

Merged
Teakowa merged 2 commits into
mainfrom
feat/mcp-read-ops-550
Oct 8, 2026
Merged

Teakowa merged 2 commits into
mainfrom
feat/mcp-read-ops-550

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #550. The six approved read-only operations join the MCP tool set — rules, cfg, findings, lintRules, persistentObjects, targetMetadata — taking tools/list from 15 to 21 tools. Every op was already implemented in ToolService and advertised by capabilities.operations; the change is the mcp flag per spec plus the contract/ADR documentation.

The workflow evidence in #550 was concrete: wright_references reports rule ids no exposed tool could resolve to a file, per-rule lint metadata (knownLimits, evidence, rationale) was unreachable for judging a finding's weight, and cfg had no MCP path for "which block waits" questions.

compile and capabilities stay unexposed per the issue's own scoping (capabilities duplicates tools/list; compile is a CLI convenience).

Changes

  • tooldefs.rs: mcp: true on the six specs; descriptions and schemas were already in place.
  • mcp.rs test: tool set now 21 names.
  • agent-contract.md: tool table updated to the current set.
  • ADR-0020: set documentation refreshed (it had already drifted — analyze, inspect, and the provider* edit ops were missing); MCP tool set omits read operations real agent workflows reach for #550's join is recorded with its evidence.

Verification

  • tools/list on a real 205-file OPY project returns 21 tools.
  • All six new tools called end-to-end over wright serve --transport mcp on Bastion: wright_rules (ids + spans), wright_cfg (kind-filtered blocks), wright_findings, wright_lint_rules (metadata + effective config), wright_persistent_objects, wright_target_metadata — all return real payloads, no isError.
  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace --all-targets, git diff --check: clean.

Test plan

  • tools/list advertises the six new tools; hidden ops (compile, capabilities) stay absent
  • Each new tool answers correctly on a real project
  • CI

Closes #550: rules, cfg, findings, lintRules, persistentObjects, and targetMetadata join the MCP tool set (21 tools). ADR-0020's gate is workflow evidence; the issue records references reporting rule ids no exposed tool could resolve to a file and no path to per-rule lint metadata — all six ops were already implemented in ToolService, so the change is the mcp flag plus contract/ADR documentation.
The serve integration test asserts the exact tools/list array and its snake-case-to-operation mapping; #550's six new read tools were missing from both.
@Teakowa
Teakowa merged commit 4f8a1d5 into main Oct 8, 2026
24 checks passed
@Teakowa
Teakowa deleted the feat/mcp-read-ops-550 branch October 8, 2026 11:26
@Teakowa Teakowa mentioned this pull request Oct 8, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

MCP tool set omits read operations real agent workflows reach for

2 participants