| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| "issue. Cannot be combined with 'value' or 'field_option_name'.", | ||
| "issue. Cannot be combined with 'value' or 'field_option_name'. " + | ||
| "Omit this property, or set it to false, to leave the field's " + | ||
| "current value unchanged.", |
There was a problem hiding this comment.
delete: false does not necessarily leave the field unchanged: when the same item includes value or field_option_name, the handler updates the field (and the new test covers this). Could this say that false means "do not clear the field" or that it is ignored, rather than implying the entire field remains unchanged?
Sorry, something went wrong.
The `delete` property of issue_write's issue_fields items was declared with
Enum: []any{true}, making true its only legal value. The property is optional,
but a client that fills every property of a schema -- common, since
OpenAI-style strict function calling requires every property to appear in
`required` -- had no way to express "not deleting this field": there is no
false in the enum and no null in the type. `value` offers no alternative
either, being typed ["string","number","boolean"] with no null.
The MCP Go SDK validates arguments against the resolved input schema before
the handler runs, so delete: false was rejected at schema validation and never
reached optionalIssueWriteFields. Such clients sent delete: true alongside a
value instead and hit the handler's mutual-exclusion check, so issue_write
could never set an issue field for them.
Remove the enum so false is a legal no-op, and document that omitting the
property or setting it to false leaves the field unchanged. No handler change
is needed: the code already branches on `if deleteField`, so false falls
through to the normal value path, and the mutual-exclusion check for
delete: true still applies. Add tests for optionalIssueWriteFields, which had
none.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Clarify that delete:false is ignored, retain mutual exclusion for delete:true, and reject invalid delete types. Add focused schema and handler regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Summary
Removes Enum: []any{true} from the delete property of issue_write's issue_fields item schema, so delete: false is a legal no-op instead of a schema-validation error.
Why
delete was declared {"type": "boolean", "enum": [true]}. The property is optional, but a client that fills every property of a schema — common, since OpenAI-style strict function calling requires every property to appear in required — had no way to say "not deleting this field": there is no false in the enum and no null in the type. The sibling value property offers no alternative either, being typed ["string","number","boolean"] with no null, and issues.go explicitly rejects value: null.
This is not only cosmetic. The MCP Go SDK validates arguments against the resolved input schema before the handler runs (go-sdk@v1.7.0/mcp/server.go, applySchema), so delete: false was rejected at validation and never reached optionalIssueWriteFields. Clients that fill every property instead sent delete: true alongside a value and hit the handler's mutual-exclusion check, so issue_write could never set an issue field for them.
What changed
No handler logic changed. optionalIssueWriteFields already reads OptionalParam[bool](itemMap, "delete") and branches on if deleteField, so false falls through to the normal value path, and the delete: true mutual-exclusion check still applies.
MCP impact
issue_write.issue_fields[].delete widens from enum: [true] to any boolean, and its description gains the no-op case. Strictly a relaxation: every payload valid before is still valid and behaves identically.
Prompts tested (tool changes only)
Security / limits
Input validation is relaxed for one boolean that routes to an existing code path. No auth, permission, data-exposure, or size-limit surface is touched, and the mutual-exclusion check that prevents delete: true from being combined with value is unchanged.
Tool renaming
Lint & tests
Docs
Ran ./script/generate-docs; it produced no diff. The generated tables do not include nested item-property descriptions, and a repo-wide grep found the old description only in issue_write.snap.
Fixes #2904.