fix(mcp): declare generate_github_actions phase params + correct scaffold ref-doc#856
Conversation
…f-doc) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR improves MCP tool metadata accuracy by (1) aligning the generate_github_actions tool schema with parameters its handler already supports and (2) correcting drift in the MCP tools reference documentation for scaffold tools. This keeps MCP client discovery (tools/list) and human-facing docs closer to the real contract without changing runtime behavior.
Changes:
- Declares
phase_config_yamlandwfctl_versionas optional inputs on thegenerate_github_actionsMCP tool definition. - Adds a schema “lock” test to ensure the tool input schema continues to declare all handler-read parameters.
- Updates
docs/mcp-tools-reference.mdparameter tables forscaffold_environmentandscaffold_infrato match their real tool definitions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| mcp/wfctl_tools.go | Adds missing optional schema parameters to generate_github_actions tool definition. |
| mcp/cigen_info_test.go | Adds a test asserting generate_github_actions declares all handler-read inputs. |
| docs/mcp-tools-reference.md | Corrects scaffold tool parameter documentation to match real MCP tool defs. |
| docs/plans/2026-06-04-mcp-tool-metadata-accuracy.md | Adds implementation plan document for the change set. |
| docs/plans/2026-06-04-mcp-tool-metadata-accuracy-design.md | Adds design document describing rationale/scope/testing. |
| docs/plans/2026-06-04-mcp-tool-metadata-accuracy.md.scope-lock | Adds scope-lock hash for the plan. |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
…al region - generate_github_actions ref entry: add phase_config_yaml + wfctl_version rows to match the schema declared in this PR (Copilot: ref-doc was stale vs the changed contract). - scaffold_environment purpose: drop 'region' (handleScaffoldEnvironment emits provider/envVars/secretsProvider/exposure - no region field). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What
Two MCP-tool-metadata accuracy fixes logged as #854 follow-ups. No handler/behavior change, no release.
handleGenerateGithubActionsreadsphase_config_yaml+wfctl_versionviamcp.ParseString, but thegenerate_github_actionstool def declared onlyyaml_content/registry/platforms. MCP clients couldn't discover/pass the two-phase + version-pin capabilities even though the handler honors them. Added the two optionalmcp.WithStringdeclarations (mirroring the siblingci_plantool). Backward-compatible — omitting them yields the unchanged""default.docs/mcp-tools-reference.mddocumented fictional params for two scaffold tools. Corrected to match the real defs:scaffold_environment:provider(req) /environments/secrets_provider/exposure— wastarget/config.scaffold_infra:yaml_content(req) /provider(req: aws/gcp/azure/digitalocean) /environment— wasprovider:opentofu/terraform/pulumi+config.Verification
GOWORK=off go test ./mcp/...— green (incl newTestGenerateGithubActionsDeclaresAllHandlerParams, a schema-properties lock)GOWORK=off go build ./cmd/wfctl— exit 0GOWORK=off golangci-lint run --new-from-rev=origin/main ./mcp/...— 0 issueswfctl mcpserver; thetools/listresponse forgenerate_github_actionsnow advertisesphase_config_yaml+wfctl_versionininputSchema.properties(bothTrue).Out of scope
The same
config-vs-yaml_contentref-doc drift exists for other tools (api_extract,detect_project_features, …) — left as a separate concern; only the two #854-flagged scaffold entries fixed here.Pipeline
Full autodev: design adversarial PASS → plan adversarial PASS (reviewer executed every step live) → alignment PASS → scope-lock → implement → code review.
Rollback
Revert the PR; the tool schema reverts to 3 declared params, the ref doc to its prior entries. No release, no state.
🤖 Generated with Claude Code