Repository navigation
feat(serve): expose the approved read operations over MCP - #566
Merged
Merged
Conversation
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.
6 of 10 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #550. The six approved read-only operations join the MCP tool set —
rules,cfg,findings,lintRules,persistentObjects,targetMetadata— takingtools/listfrom 15 to 21 tools. Every op was already implemented inToolServiceand advertised bycapabilities.operations; the change is themcpflag per spec plus the contract/ADR documentation.The workflow evidence in #550 was concrete:
wright_referencesreports 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, andcfghad no MCP path for "which block waits" questions.compileandcapabilitiesstay unexposed per the issue's own scoping (capabilitiesduplicatestools/list;compileis a CLI convenience).Changes
tooldefs.rs:mcp: trueon the six specs; descriptions and schemas were already in place.mcp.rstest: tool set now 21 names.agent-contract.md: tool table updated to the current set.analyze,inspect, and theprovider*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/liston a real 205-file OPY project returns 21 tools.wright serve --transport mcpon 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, noisError.cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace --all-targets,git diff --check: clean.Test plan
tools/listadvertises the six new tools; hidden ops (compile,capabilities) stay absent