fix: name finish title and summary, and the search query concept on q #857

Merged
hexajon merged 2 commits from issue-746-param-descriptions into main 2026-10-21 02:59:58 +00:00
Owner

Summary

Summary

Two schema-description gaps made an MCP caller guess parameter names.

First, the madt_finish description never named title, which is required, or summary. The summary schema text also offered @file and @- expansion, which the MCP surface does not do. The schema marked summary as required, but madt_finish accepts an empty summary.

Second, each search-style q parameter said only "search query". An agent that reaches for query did not find q. ADR 0005 says to fix this in the schema description, so I add no alias and no did-you-mean entry.

What changed

  • internal/mcp/tools_workflow.go: the madt_finish description now says title= is REQUIRED (the one-line commit subject and PR title) and summary= is optional (the PR summary section, as literal markdown). The FinishInput.Summary field is now json:"summary,omitempty", so the schema marks it optional.
  • internal/opspec/paramdocs.go: the title and summary descriptions for madt_finish are rewritten. The @file and @- text is gone. Each q description (emails, issues, teams, repos) now names the search query and shows an example.
  • internal/mcp/prompts.go: the finish-branch prompt argument summary is now optional, to match the tool schema. Its description says "the PR summary section".
  • docs/reference/cli-workflows.md and docs/reference/prompts.md: regenerated reference docs.
  • internal/mcp/help_generated.go: regenerated help text.

Tests

  • internal/mcp/param_concept_desc_test.go (new) has two tests.
    • TestParamConcept_FinishNamesTitleAndSummary checks the live schema. The tool description names title and summary. The schema marks title required and summary optional. Each has a description. The description has no @file text and no "not a file path" sentence. It says summary fills one section of the PR body, because BuildPRBody always adds the Summary heading and the Refs and Closes lines.
    • TestParamConcept_SearchQueryQ checks that every search-style q description names the search query concept and shows an example.
  • internal/mcp/prompts_test.go and internal/docs/mcp_prompts_test.go now expect finish-branch to have no required argument.

./scripts/gate.sh passes on this commit.

Refs #746
Refs #757

Closes #746
Closes #757

## Summary ## Summary Two schema-description gaps made an MCP caller guess parameter names. First, the `madt_finish` description never named `title`, which is required, or `summary`. The `summary` schema text also offered `@file` and `@-` expansion, which the MCP surface does not do. The schema marked `summary` as required, but `madt_finish` accepts an empty summary. Second, each search-style `q` parameter said only "search query". An agent that reaches for `query` did not find `q`. ADR 0005 says to fix this in the schema description, so I add no alias and no did-you-mean entry. ## What changed - `internal/mcp/tools_workflow.go`: the `madt_finish` description now says `title=` is REQUIRED (the one-line commit subject and PR title) and `summary=` is optional (the PR summary section, as literal markdown). The `FinishInput.Summary` field is now `json:"summary,omitempty"`, so the schema marks it optional. - `internal/opspec/paramdocs.go`: the `title` and `summary` descriptions for `madt_finish` are rewritten. The `@file` and `@-` text is gone. Each `q` description (emails, issues, teams, repos) now names the search query and shows an example. - `internal/mcp/prompts.go`: the `finish-branch` prompt argument `summary` is now optional, to match the tool schema. Its description says "the PR summary section". - `docs/reference/cli-workflows.md` and `docs/reference/prompts.md`: regenerated reference docs. - `internal/mcp/help_generated.go`: regenerated help text. ## Tests - `internal/mcp/param_concept_desc_test.go` (new) has two tests. - `TestParamConcept_FinishNamesTitleAndSummary` checks the live schema. The tool description names `title` and `summary`. The schema marks `title` required and `summary` optional. Each has a description. The description has no `@file` text and no "not a file path" sentence. It says `summary` fills one section of the PR body, because `BuildPRBody` always adds the Summary heading and the Refs and Closes lines. - `TestParamConcept_SearchQueryQ` checks that every search-style `q` description names the search query concept and shows an example. - `internal/mcp/prompts_test.go` and `internal/docs/mcp_prompts_test.go` now expect `finish-branch` to have no required argument. `./scripts/gate.sh` passes on this commit. Refs #746 Refs #757 Closes #746 Closes #757
The madt_finish description now names title= as required and summary= as
optional. The schema marks summary optional, and its description no longer
offers @file or @- expansion, which the MCP surface does not do. Each q
parameter description now names the search query and shows an example.
A new test pins both contracts against the live schema.

Closes #746
Closes #757
fix: say finish summary fills the PR summary section, and make it optional in the prompt
Some checks failed
ci / gate (pull_request) Failing after 20m47s
drift / govulncheck (pull_request) Has been skipped
drift / forgejo-smoke (pull_request) Has been skipped
drift / govulncheck (push) Has been skipped
drift / surface-diff (pull_request) Successful in 14s
drift / surface-diff (push) Successful in -41s
drift / forgejo-smoke (push) Has been skipped
ci / gate (push) Failing after 4m22s
9d75b87fea
The madt_finish summary description now says what the field is: the PR
summary section, as literal markdown. The PR body always carries a Summary
heading and the Refs and Closes lines, so the summary is one section, not
the whole body. The description no longer carries the "not a file path"
sentence. The finish-branch prompt now marks summary optional, the same as
the tool schema. Tests pin the wording and the prompt argument.

Refs #746
Refs #757
Sign in to join this conversation.
No reviewers
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!857
No description provided.