Skip to content

Commit 7e2388e

Browse files
alondahariCopilot
andcommitted
Add confidence parameter to issue mutation MCP tools
Add an optional confidence integer parameter (0–100) to update_issue_type, update_issue_labels, and set_issue_fields MCP tools. The confidence score is passed through to the REST/GraphQL API on mutation calls. - Rename structs to WithIntent (labelWithIntent, issueTypeWithIntent) - Add confidence schema property (integer, min 0, max 100) with prompt guidance describing what different confidence levels represent - Update tool descriptions to encourage including confidence scores - Pass confidence in the API request body alongside rationale/suggest Closes github/plan-track-agentic-toolkit#219 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 33849e9 commit 7e2388e

8 files changed

Lines changed: 425 additions & 32 deletions

docs/feature-flags.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ runtime behavior (such as output formatting) won't appear here.
198198

199199
- **update_issue_type** - Update Issue Type
200200
- **Required OAuth Scopes**: `repo`
201+
- `confidence`: 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. (string, optional)
201202
- `is_suggestion`: If true, this issue type change is sent to the API as a suggestion (suggest:true) rather than an applied value. Whether the type is applied or recorded as a proposal is determined by the API. (boolean, optional)
202203
- `issue_number`: The issue number to update (number, required)
203204
- `issue_type`: The issue type to set (string, required)
@@ -240,7 +241,7 @@ runtime behavior (such as output formatting) won't appear here.
240241
- `owner`: Repository owner (username or organization) (string, required)
241242
- `pullNumber`: The pull request number (number, required)
242243
- `repo`: Repository name (string, required)
243-
- `reviewers`: GitHub usernames to request reviews from (string[], required)
244+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], required)
244245

245246
- **resolve_review_thread** - Resolve Review Thread
246247
- **Required OAuth Scopes**: `repo`

pkg/github/__toolsnaps__/request_pull_request_reviewers.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
"type": "object"
3838
},
3939
"name": "request_pull_request_reviewers"
40-
}
40+
}

pkg/github/__toolsnaps__/set_issue_fields.snap

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44
"openWorldHint": true,
55
"title": "Set Issue Fields"
66
},
7-
"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.",
7+
"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. When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice.",
88
"inputSchema": {
99
"properties": {
1010
"fields": {
1111
"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, or 'single_select_option_id' (the GraphQL node ID of the option) for single select fields. Set 'delete' to true to remove a field value.",
1212
"items": {
1313
"properties": {
14+
"confidence": {
15+
"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.",
16+
"enum": [
17+
"low",
18+
"medium",
19+
"high"
20+
],
21+
"type": "string"
22+
},
1423
"date_value": {
1524
"description": "The value to set for a date field (ISO 8601 date string)",
1625
"type": "string"

pkg/github/__toolsnaps__/update_issue_labels.snap

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"openWorldHint": true,
55
"title": "Update Issue Labels"
66
},
7-
"description": "Update the labels of an existing issue. This replaces the current labels with the provided list.",
7+
"description": "Update the labels of an existing issue. This replaces the current labels with the provided list. When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice.",
88
"inputSchema": {
99
"properties": {
1010
"issue_number": {
@@ -22,6 +22,15 @@
2222
},
2323
{
2424
"properties": {
25+
"confidence": {
26+
"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.",
27+
"enum": [
28+
"low",
29+
"medium",
30+
"high"
31+
],
32+
"type": "string"
33+
},
2534
"is_suggestion": {
2635
"description": "If true, this label is sent to the API as a suggestion (suggest:true) rather than an applied label. Whether the label is applied or recorded as a proposal is determined by the API.",
2736
"type": "boolean"

pkg/github/__toolsnaps__/update_issue_type.snap

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@
44
"openWorldHint": true,
55
"title": "Update Issue Type"
66
},
7-
"description": "Update the type of an existing issue (e.g. 'bug', 'feature').",
7+
"description": "Update the type of an existing issue (e.g. 'bug', 'feature'). When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice.",
88
"inputSchema": {
99
"properties": {
10+
"confidence": {
11+
"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.",
12+
"enum": [
13+
"low",
14+
"medium",
15+
"high"
16+
],
17+
"type": "string"
18+
},
1019
"is_suggestion": {
1120
"description": "If true, this issue type change is sent to the API as a suggestion (suggest:true) rather than an applied value. Whether the type is applied or recorded as a proposal is determined by the API.",
1221
"type": "boolean"

pkg/github/__toolsnaps__/update_pull_request.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@
6161
"type": "object"
6262
},
6363
"name": "update_pull_request"
64-
}
64+
}

0 commit comments

Comments
 (0)