Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,6 @@ The following sets of tools are available:
- `assignees`: Usernames to assign to this issue (string[], optional)
- `body`: Issue body content (string, optional)
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
- `issue_fields`: Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'. (object[], optional)
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Expand Down
22 changes: 21 additions & 1 deletion docs/feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ runtime behavior (such as output formatting) won't appear here.
- `assignees`: Usernames to assign to this issue (string[], optional)
- `body`: Issue body content (string, optional)
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
- `issue_fields`: Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'. (object[], optional)
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Expand All @@ -74,6 +73,27 @@ runtime behavior (such as output formatting) won't appear here.

### `remote_mcp_issue_fields`

- **issue_write** - Create or update issue
- **Required OAuth Scopes**: `repo`
- `assignees`: Usernames to assign to this issue (string[], optional)
- `body`: Issue body content (string, optional)
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
- `issue_fields`: Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'. (object[], optional)
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Options are:
- 'create' - creates a new issue.
- 'update' - updates an existing issue.
(string, required)
- `milestone`: Milestone number (number, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `state`: New state (string, optional)
- `state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
- `title`: Issue title (string, optional)
- `type`: Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter. (string, optional)

- **list_issue_fields** - List issue fields
- **Required OAuth Scopes**: `repo`, `read:org`
- **Accepted OAuth Scopes**: `admin:org`, `read:org`, `repo`, `write:org`
Expand Down
22 changes: 21 additions & 1 deletion docs/insiders-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ The list below is generated from the Go source. It covers tool **inventory and s
- `assignees`: Usernames to assign to this issue (string[], optional)
- `body`: Issue body content (string, optional)
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
- `issue_fields`: Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'. (object[], optional)
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Expand All @@ -68,6 +67,27 @@ The list below is generated from the Go source. It covers tool **inventory and s

### `remote_mcp_issue_fields`

- **issue_write** - Create or update issue
- **Required OAuth Scopes**: `repo`
- `assignees`: Usernames to assign to this issue (string[], optional)
- `body`: Issue body content (string, optional)
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
- `issue_fields`: Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'. (object[], optional)
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Options are:
- 'create' - creates a new issue.
- 'update' - updates an existing issue.
(string, required)
- `milestone`: Milestone number (number, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `state`: New state (string, optional)
- `state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
- `title`: Issue title (string, optional)
- `type`: Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter. (string, optional)

- **list_issue_fields** - List issue fields
- **Required OAuth Scopes**: `repo`, `read:org`
- **Accepted OAuth Scopes**: `admin:org`, `read:org`, `repo`, `write:org`
Expand Down
51 changes: 0 additions & 51 deletions pkg/github/__toolsnaps__/issue_write.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,57 +29,6 @@
"description": "Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'.",
"type": "number"
},
"issue_fields": {
"description": "Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'.",
"items": {
"additionalProperties": false,
"oneOf": [
{
"not": {
"required": [
"field_option_name"
]
},
"required": [
"value"
]
},
{
"not": {
"required": [
"value"
]
},
"required": [
"field_option_name"
]
}
],
"properties": {
"field_name": {
"description": "Issue field name",
"type": "string"
},
"field_option_name": {
"description": "Option name for single-select fields — validates the option exists in the field definition before setting it.",
"type": "string"
},
"value": {
"description": "Value to set. For single-select fields, prefer 'field_option_name' to validate the option exists first.",
"type": [
"string",
"number",
"boolean"
]
}
},
"required": [
"field_name"
],
"type": "object"
},
"type": "array"
},
"issue_number": {
"description": "Issue number to update",
"type": "number"
Expand Down
148 changes: 148 additions & 0 deletions pkg/github/__toolsnaps__/issue_write_ff_remote_mcp_issue_fields.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"_meta": {
"ui": {
"resourceUri": "ui://github-mcp-server/issue-write",
"visibility": [
"model",
"app"
]
}
},
"annotations": {
"title": "Create or update issue"
},
"description": "Create a new or update an existing issue in a GitHub repository.",
"inputSchema": {
"properties": {
"assignees": {
"description": "Usernames to assign to this issue",
"items": {
"type": "string"
},
"type": "array"
},
"body": {
"description": "Issue body content",
"type": "string"
},
"duplicate_of": {
"description": "Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'.",
"type": "number"
},
"issue_fields": {
"description": "Issue field values to set. Each item requires 'field_name' and exactly one of 'value' or 'field_option_name'.",
"items": {
"additionalProperties": false,
"oneOf": [
{
"not": {
"required": [
"field_option_name"
]
},
"required": [
"value"
]
},
{
"not": {
"required": [
"value"
]
},
"required": [
"field_option_name"
]
}
],
"properties": {
"field_name": {
"description": "Issue field name",
"type": "string"
},
"field_option_name": {
"description": "Option name for single-select fields — validates the option exists in the field definition before setting it.",
"type": "string"
},
"value": {
"description": "Value to set. For single-select fields, prefer 'field_option_name' to validate the option exists first.",
"type": [
"string",
"number",
"boolean"
]
}
},
"required": [
"field_name"
],
"type": "object"
},
"type": "array"
},
"issue_number": {
"description": "Issue number to update",
"type": "number"
},
"labels": {
"description": "Labels to apply to this issue",
"items": {
"type": "string"
},
"type": "array"
},
"method": {
"description": "Write operation to perform on a single issue.\nOptions are:\n- 'create' - creates a new issue.\n- 'update' - updates an existing issue.\n",
"enum": [
"create",
"update"
],
"type": "string"
},
"milestone": {
"description": "Milestone number",
"type": "number"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"state": {
"description": "New state",
"enum": [
"open",
"closed"
],
"type": "string"
},
"state_reason": {
"description": "Reason for the state change. Ignored unless state is changed.",
"enum": [
"completed",
"not_planned",
"duplicate"
],
"type": "string"
},
"title": {
"description": "Issue title",
"type": "string"
},
"type": {
"description": "Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter.",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo"
],
"type": "object"
},
"name": "issue_write"
}
4 changes: 2 additions & 2 deletions pkg/github/csv_output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ func TestCSVOutputAppliedToDefaultListTools(t *testing.T) {

func TestCSVOutputAppliesToFlagGatedListTools(t *testing.T) {
enabledOnly := testCSVOutputTool("list_things", `[{"number":1}]`)
enabledOnly.FeatureFlagEnable = FeatureFlagIssueFields
enabledOnly.FeatureFlagEnable = []string{FeatureFlagIssueFields}
disabledOnly := testCSVOutputTool("list_legacy_things", `[{"number":2}]`)
disabledOnly.FeatureFlagDisable = FeatureFlagIssueFields
disabledOnly.FeatureFlagDisable = []string{FeatureFlagIssueFields}

tools := withCSVOutput([]inventory.ServerTool{enabledOnly, disabledOnly})
require.Len(t, tools, 2)
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/granular_tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
func granularToolsForToolset(toolsetID inventory.ToolsetID, featureFlag string) []inventory.ServerTool {
var result []inventory.ServerTool
for _, tool := range AllTools(translations.NullTranslationHelper) {
if tool.Toolset.ID == toolsetID && tool.FeatureFlagEnable == featureFlag {
if tool.Toolset.ID == toolsetID && len(tool.FeatureFlagEnable) > 0 && tool.FeatureFlagEnable[0] == featureFlag {
result = append(result, tool)
}
}
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestIssuesGranularToolset(t *testing.T) {

t.Run("all granular tools have correct feature flag", func(t *testing.T) {
for _, tool := range granularToolsForToolset(ToolsetMetadataIssues.ID, FeatureFlagIssuesGranular) {
assert.Equal(t, FeatureFlagIssuesGranular, tool.FeatureFlagEnable, "tool %s", tool.Tool.Name)
assert.Contains(t, tool.FeatureFlagEnable, FeatureFlagIssuesGranular, "tool %s should require the granular flag", tool.Tool.Name)
}
})
}
Expand Down Expand Up @@ -129,7 +129,7 @@ func TestPullRequestsGranularToolset(t *testing.T) {

t.Run("all granular tools have correct feature flag", func(t *testing.T) {
for _, tool := range granularToolsForToolset(ToolsetMetadataPullRequests.ID, FeatureFlagPullRequestsGranular) {
assert.Equal(t, FeatureFlagPullRequestsGranular, tool.FeatureFlagEnable, "tool %s", tool.Tool.Name)
assert.Contains(t, tool.FeatureFlagEnable, FeatureFlagPullRequestsGranular, "tool %s should require the granular flag", tool.Tool.Name)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/issue_fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func ListIssueFields(t translations.TranslationHelperFunc) inventory.ServerTool

return utils.NewToolResultText(string(r)), nil, nil
})
st.FeatureFlagEnable = FeatureFlagIssueFields
st.FeatureFlagEnable = []string{FeatureFlagIssueFields}
return st
}

Expand Down
Loading
Loading