feat(mcp): expose fallow impact as a read-only MCP tool#804
Merged
Conversation
Add an "impact" tool wrapping "fallow impact --format json" so AI agents can read the local value report (surfacing, trend, gate containment, and v1.5 resolved/suppressed attribution) the same way they query check_health and audit. Impact was the only first-class CLI surface with no MCP tool. The tool is read-only and root-only: it runs no analysis and reads only .fallow/impact.json, so the config / no_cache / threads knobs the analysis tools expose are omitted as inert. The mutating enable / disable lifecycle is intentionally not exposed; on an enabled:false report the agent should recommend the user run "fallow impact enable", not toggle it. Annotated read_only_hint=true, idempotent_hint=true, open_world_hint=false (a single closed-world local file read, like fallow_explain).
Bump the fallow-mcp tool count to 21 and add an impact entry in .claude/rules/mcp-server.md, add a CHANGELOG [Unreleased] note, and re-bless scripts/agent-files.sha256 for the rules-file edit (CI drift gate).
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
impactMCP tool (the 21st) wrappingfallow impact --format json, so AI agents can read the local value report (current surfacing, trend since the last recorded run, pre-commit gate containment, and v1.5 resolved/suppressed attribution) the same way they callcheck_healthoraudit. Impact was the only first-class CLI surface with no MCP tool.root-only params:impactruns no analysis and reads only.fallow/impact.json, so theconfig/no_cache/threadsknobs the analysis tools expose are deliberately omitted as inert.enable/disablelifecycle is not exposed. On a never-enabled project the report is a populated{"enabled": false, ...}object (never{}), so an agent branches onenabledthenrecord_countand recommends the user runfallow impact enablerather than toggling it.read_only_hint=true,idempotent_hint=true,open_world_hint=false(a single closed-world local file read, likefallow_explain).schema_version(they ship under unchangedschema_version"1").Test plan
cargo test -p fallow-mcp: all pass, including 8 new impact tests (arg building, empty-root drop, param deserialization with stray-field tolerance, registration + count 21, annotations, schema-property inclusion/exclusion).cargo build --workspaceclean (post-rebase onto current main).cargo clippy -p fallow-mcp --all-targets -- -D warningsclean.cargo fmt --all -- --checkclean.cargo doc -p fallow-mcp --no-deps --document-private-itemsclean.fallow impact --format jsonon a never-enabled project returns the populated{"enabled": false, "record_count": 0, ...}report (exit 0, deterministic); afterimpact enableit returnsenabled: true, record_count: 0..claude/rules/mcp-server.md(count 20 to 21 + tool entry) andCHANGELOG.mdupdated; companion repos (fallow-docs, fallow-skills) updated.