Files
github--github-mcp-server/pkg/github/__toolsnaps__/set_issue_fields.snap
Owen Niblock 352a2bc07d Add multi-select issue field support, gated behind FF
Multi-select issue fields ride on the existing custom-fields surface:

- issue_write (consolidated) and set_issue_fields (granular) gain
  multi-select inputs (field_option_names / multi_select_option_ids)
- list_issues field_filters gain a 'values' slot for multi-select
  filtering with AND semantics
- list_issue_fields advertises multi_select in its description and
  surfaces multi-select definitions
- Read paths (IssueFieldValueFragment, list_issues enrichment, etc.)
  decode multi-select values when an org has them

The write surface is gated behind a new FF
remote_mcp_issue_fields_multiselect. When the flag is off, the legacy
variants of issue_write, list_issues, and list_issue_fields are served
— same handler bodies, but their schemas and descriptions omit
multi_select. Read paths stay unchanged: orgs that have dotcom-side
multi-select enabled continue to see multi-select VALUES surfaced,
matching what the dotcom UI shows.

The granular tools (set_issue_fields) are not separately gated — they
are already behind FeatureFlagIssuesGranular, which is itself a
user-opt-in rollout flag. Double-gating adds complexity without
proportionate benefit for users who have already accepted experimental
territory.

Per the user's preference for code duplication over interleaved
branching:

- IssueWrite and IssueWriteLegacy are full siblings (issues.go +
  issues_legacy_multiselect.go). The shared parser and resolver
  (optionalIssueWriteFields, resolveIssueRequestFieldValues) take a
  single multiSelectEnabled bool and reject multi-select inputs/fields
  when false.

- ListIssues / ListIssuesLegacy share a buildListIssues helper that
  swaps in the right descriptions and adds/removes the field_filters[]
  values slot.

- ListIssueFields / ListIssueFieldsLegacy share a buildListIssueFields
  helper that swaps the description (handler is identical).

Snapshot naming follows the established convention: legacy variants own
the canonical <name>.snap; MS-aware variants own
<name>_ff_remote_mcp_issue_fields_multiselect.snap.

Stacked on #2755 (the universal delete-fix half of the original PR).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-06 11:32:12 +01:00

97 lines
3.8 KiB
Plaintext

{
"annotations": {
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Set Issue Fields"
},
"description": "Set issue field values for an issue. Fields are organization-level custom fields (text, number, date, or single select). Use this to create or update field values on an issue.",
"inputSchema": {
"properties": {
"fields": {
"description": "Array of issue field values to set. Each element must have a 'field_id' (string, the GraphQL node ID of the field) and exactly one value field: 'text_value' for text fields, 'number_value' for number fields, 'date_value' (ISO 8601 date string) for date fields, 'single_select_option_id' (the GraphQL node ID of the option) for single select fields, or 'multi_select_option_ids' (an array of GraphQL node IDs) for multi select fields. Set 'delete' to true to remove a field value.",
"items": {
"properties": {
"confidence": {
"description": "How confident you are in this choice. Use 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal.",
"enum": [
"LOW",
"MEDIUM",
"HIGH"
],
"type": "string"
},
"date_value": {
"description": "The value to set for a date field (ISO 8601 date string)",
"type": "string"
},
"delete": {
"description": "Set to true to delete this field value",
"type": "boolean"
},
"field_id": {
"description": "The GraphQL node ID of the issue field",
"type": "string"
},
"is_suggestion": {
"description": "If true, this field value is sent to the API as a suggestion (suggest:true) rather than an applied value. Whether the value is applied or recorded as a proposal is determined by the API.",
"type": "boolean"
},
"multi_select_option_ids": {
"description": "The GraphQL node IDs of the options to set for a multi select field",
"items": {
"type": "string"
},
"type": "array"
},
"number_value": {
"description": "The value to set for a number field",
"type": "number"
},
"rationale": {
"description": "One concise sentence explaining what specifically about the issue led you to choose this field value. State the concrete signal (e.g. 'Reports a crash when saving' → high priority).",
"maxLength": 280,
"type": "string"
},
"single_select_option_id": {
"description": "The GraphQL node ID of the option to set for a single select field",
"type": "string"
},
"text_value": {
"description": "The value to set for a text field",
"type": "string"
}
},
"required": [
"field_id"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"issue_number": {
"description": "The issue number to update",
"minimum": 1,
"type": "number"
},
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"issue_number",
"fields"
],
"type": "object"
},
"name": "set_issue_fields"
}