Skip to content

Commit a26079a

Browse files
committed
Add open world hints for tools.
Tools that return user generated content should have open world hints, to allow clients to inform users that the content may be untrusted and prompt them to approve the request before executing it.
1 parent af5a6df commit a26079a

File tree

112 files changed

+774
-653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+774
-653
lines changed

pkg/github/__toolsnaps__/actions_get.snap

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
{
22
"annotations": {
3+
"openWorldHint": true,
34
"readOnlyHint": true,
45
"title": "Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)"
56
},
67
"description": "Get details about specific GitHub Actions resources.\nUse this tool to get details about individual workflows, workflow runs, jobs, and artifacts by their unique IDs.\n",
78
"inputSchema": {
89
"type": "object",
9-
"required": [
10-
"method",
11-
"owner",
12-
"repo",
13-
"resource_id"
14-
],
1510
"properties": {
1611
"method": {
1712
"type": "string",
@@ -37,7 +32,13 @@
3732
"type": "string",
3833
"description": "The unique identifier of the resource. This will vary based on the \"method\" provided, so ensure you provide the correct ID:\n- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' method.\n- Provide a workflow run ID for 'get_workflow_run', 'get_workflow_run_usage', and 'get_workflow_run_logs_url' methods.\n- Provide an artifact ID for 'download_workflow_run_artifact' method.\n- Provide a job ID for 'get_workflow_job' method.\n"
3934
}
40-
}
35+
},
36+
"required": [
37+
"method",
38+
"owner",
39+
"repo",
40+
"resource_id"
41+
]
4142
},
4243
"name": "actions_get"
4344
}

pkg/github/__toolsnaps__/actions_list.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"annotations": {
3+
"openWorldHint": true,
34
"readOnlyHint": true,
45
"title": "List GitHub Actions workflows in a repository"
56
},

pkg/github/__toolsnaps__/actions_run_trigger.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
"description": "Trigger GitHub Actions workflow operations, including running, re-running, cancelling workflow runs, and deleting workflow run logs.",
77
"inputSchema": {
88
"type": "object",
9-
"required": [
10-
"method",
11-
"owner",
12-
"repo"
13-
],
149
"properties": {
1510
"inputs": {
1611
"type": "object",
@@ -47,7 +42,12 @@
4742
"type": "string",
4843
"description": "The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml). Required for 'run_workflow' method."
4944
}
50-
}
45+
},
46+
"required": [
47+
"method",
48+
"owner",
49+
"repo"
50+
]
5151
},
5252
"name": "actions_run_trigger"
5353
}

pkg/github/__toolsnaps__/add_comment_to_pending_review.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55
"description": "Add review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).",
66
"inputSchema": {
77
"type": "object",
8-
"required": [
9-
"owner",
10-
"repo",
11-
"pullNumber",
12-
"path",
13-
"body",
14-
"subjectType"
15-
],
168
"properties": {
179
"body": {
1810
"type": "string",
@@ -66,7 +58,15 @@
6658
"LINE"
6759
]
6860
}
69-
}
61+
},
62+
"required": [
63+
"owner",
64+
"repo",
65+
"pullNumber",
66+
"path",
67+
"body",
68+
"subjectType"
69+
]
7070
},
7171
"name": "add_comment_to_pending_review"
7272
}

pkg/github/__toolsnaps__/add_issue_comment.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
"description": "Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.",
66
"inputSchema": {
77
"type": "object",
8-
"required": [
9-
"owner",
10-
"repo",
11-
"issue_number",
12-
"body"
13-
],
148
"properties": {
159
"body": {
1610
"type": "string",
@@ -28,7 +22,13 @@
2822
"type": "string",
2923
"description": "Repository name"
3024
}
31-
}
25+
},
26+
"required": [
27+
"owner",
28+
"repo",
29+
"issue_number",
30+
"body"
31+
]
3232
},
3333
"name": "add_issue_comment"
3434
}

pkg/github/__toolsnaps__/add_project_item.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
"description": "Add a specific Project item for a user or org",
66
"inputSchema": {
77
"type": "object",
8-
"required": [
9-
"owner_type",
10-
"owner",
11-
"project_number",
12-
"item_type",
13-
"item_id"
14-
],
158
"properties": {
169
"item_id": {
1710
"type": "number",
@@ -41,7 +34,14 @@
4134
"type": "number",
4235
"description": "The project's number."
4336
}
44-
}
37+
},
38+
"required": [
39+
"owner_type",
40+
"owner",
41+
"project_number",
42+
"item_type",
43+
"item_id"
44+
]
4545
},
4646
"name": "add_project_item"
4747
}

pkg/github/__toolsnaps__/assign_copilot_to_issue.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
"description": "Assign Copilot to a specific issue in a GitHub repository.\n\nThis tool can help with the following outcomes:\n- a Pull Request created with source code changes to resolve the issue\n\n\nMore information can be found at:\n- https://docs.github.com/en/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot\n",
77
"inputSchema": {
88
"type": "object",
9-
"required": [
10-
"owner",
11-
"repo",
12-
"issueNumber"
13-
],
149
"properties": {
1510
"issueNumber": {
1611
"type": "number",
@@ -24,7 +19,12 @@
2419
"type": "string",
2520
"description": "Repository name"
2621
}
27-
}
22+
},
23+
"required": [
24+
"owner",
25+
"repo",
26+
"issueNumber"
27+
]
2828
},
2929
"name": "assign_copilot_to_issue",
3030
"icons": [

pkg/github/__toolsnaps__/cancel_workflow_run.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
"description": "Cancel a workflow run",
66
"inputSchema": {
77
"type": "object",
8-
"required": [
9-
"owner",
10-
"repo",
11-
"run_id"
12-
],
138
"properties": {
149
"owner": {
1510
"type": "string",
@@ -23,7 +18,12 @@
2318
"type": "number",
2419
"description": "The unique identifier of the workflow run"
2520
}
26-
}
21+
},
22+
"required": [
23+
"owner",
24+
"repo",
25+
"run_id"
26+
]
2727
},
2828
"name": "cancel_workflow_run"
2929
}

pkg/github/__toolsnaps__/create_branch.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
"description": "Create a new branch in a GitHub repository",
66
"inputSchema": {
77
"type": "object",
8-
"required": [
9-
"owner",
10-
"repo",
11-
"branch"
12-
],
138
"properties": {
149
"branch": {
1510
"type": "string",
@@ -27,7 +22,12 @@
2722
"type": "string",
2823
"description": "Repository name"
2924
}
30-
}
25+
},
26+
"required": [
27+
"owner",
28+
"repo",
29+
"branch"
30+
]
3131
},
3232
"name": "create_branch"
3333
}

pkg/github/__toolsnaps__/create_gist.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
"description": "Create a new gist",
66
"inputSchema": {
77
"type": "object",
8-
"required": [
9-
"filename",
10-
"content"
11-
],
128
"properties": {
139
"content": {
1410
"type": "string",
@@ -27,7 +23,11 @@
2723
"description": "Whether the gist is public",
2824
"default": false
2925
}
30-
}
26+
},
27+
"required": [
28+
"filename",
29+
"content"
30+
]
3131
},
3232
"name": "create_gist"
3333
}

0 commit comments

Comments
 (0)