Skip to content
Merged
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: 1 addition & 0 deletions pkg/github/__toolsnaps__/label_write.snap
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
{
"annotations": {
"destructiveHint": true,
"idempotentHint": false,
"readOnlyHint": false,
"title": "Write operations on repository labels"
Expand Down
5 changes: 3 additions & 2 deletions pkg/github/labels.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -226,8 +226,9 @@ func LabelWrite(t translations.TranslationHelperFunc) inventory.ServerTool {
Name: "label_write",
Description: t("TOOL_LABEL_WRITE_DESCRIPTION", "Perform write operations on repository labels. To set labels on issues, use the 'update_issue' tool."),
Annotations: &mcp.ToolAnnotations{
Title: t("TOOL_LABEL_WRITE_TITLE", "Write operations on repository labels"),
ReadOnlyHint: false,
Title: t("TOOL_LABEL_WRITE_TITLE", "Write operations on repository labels"),
ReadOnlyHint: false,
DestructiveHint: jsonschema.Ptr(true),
},
InputSchema: &jsonschema.Schema{
Type: "object",
Expand Down
2 changes: 2 additions & 0 deletions pkg/github/labels_test.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -247,6 +247,8 @@ func TestWriteLabel(t *testing.T) {
assert.Equal(t, "label_write", tool.Name)
assert.NotEmpty(t, tool.Description)
assert.False(t, tool.Annotations.ReadOnlyHint, "label_write tool should not be read-only")
assert.NotNil(t, tool.Annotations.DestructiveHint)
assert.True(t, *tool.Annotations.DestructiveHint, "label_write delete removes labels repository-wide")

tests := []struct {
name string
Expand Down