bug(mcp): madt_finish advertises summary=@file, but the MCP server does not expand it #686

Open
opened 2026-09-30 00:22:45 +00:00 by hexajon · 0 comments
Owner

What happens

The madt_finish MCP schema describes summary as "PR body summary describing the changes (use @file to read from file, @- for stdin)". Only the CLI expands that form: readSummary in internal/cmd/workflow/finish.go:207-210. The MCP handler passes summary to the service layer unchanged (internal/mcp/tools_workflow.go:102-104), and internal/service/workflow/finish.go has no @ handling. So an MCP call with summary=@notes.md publishes the literal text @notes.md as the PR body.

Fix

Remove the @file and @- text from the MCP description of summary. An MCP caller passes the text itself. I do not want the MCP server to read a local file into a published PR body. Add a test that pins the MCP description and the literal pass-through.

## What happens The `madt_finish` MCP schema describes `summary` as "PR body summary describing the changes (use @file to read from file, @- for stdin)". Only the CLI expands that form: `readSummary` in `internal/cmd/workflow/finish.go:207-210`. The MCP handler passes `summary` to the service layer unchanged (`internal/mcp/tools_workflow.go:102-104`), and `internal/service/workflow/finish.go` has no `@` handling. So an MCP call with `summary=@notes.md` publishes the literal text `@notes.md` as the PR body. ## Fix Remove the `@file` and `@-` text from the MCP description of `summary`. An MCP caller passes the text itself. I do not want the MCP server to read a local file into a published PR body. Add a test that pins the MCP description and the literal pass-through.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#686
No description provided.