Skip to content

Commit 44e6140

Browse files
AnnaXWangclaude
andcommitted
Add tool annotations to remaining MCP tools
Adds title and behavior hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to the 12 tools that were missing them, matching the pattern already used by the credential and API-key tools. All tools now declare annotations, which MCP clients use to label tools and gate destructive actions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent bca50d3 commit 44e6140

12 files changed

Lines changed: 84 additions & 0 deletions

File tree

src/lib/mcp/tools/apps.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ export function registerAppCapabilities(server: McpServer) {
102102
.describe("(list_apps, list_deployments) Pagination offset. Default 0.")
103103
.optional(),
104104
},
105+
{
106+
title: "Manage Kernel apps and invocations",
107+
readOnlyHint: false,
108+
destructiveHint: false,
109+
idempotentHint: false,
110+
openWorldHint: true,
111+
},
105112
async (params, extra) => {
106113
if (!extra.authInfo) throw new Error("Authentication required");
107114
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/browser-curl.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ export function registerBrowserCurlTool(server: McpServer) {
4141
.describe("Request timeout in milliseconds.")
4242
.optional(),
4343
},
44+
{
45+
title: "Send HTTP request via browser",
46+
readOnlyHint: false,
47+
destructiveHint: true,
48+
idempotentHint: false,
49+
openWorldHint: true,
50+
},
4451
async (params, extra) => {
4552
if (!extra.authInfo) throw new Error("Authentication required");
4653
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/browser-pools.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ export function registerBrowserPoolCapabilities(server: McpServer) {
115115
.describe("(release) Reuse browser instance or recreate. Default true.")
116116
.optional(),
117117
},
118+
{
119+
title: "Manage Kernel browser pools",
120+
readOnlyHint: false,
121+
destructiveHint: true,
122+
idempotentHint: false,
123+
openWorldHint: false,
124+
},
118125
async (params, extra) => {
119126
if (!extra.authInfo) throw new Error("Authentication required");
120127
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/browsers.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,13 @@ export function registerBrowserCapabilities(server: McpServer) {
356356
)
357357
.optional(),
358358
},
359+
{
360+
title: "Manage Kernel browser sessions",
361+
readOnlyHint: false,
362+
destructiveHint: true,
363+
idempotentHint: false,
364+
openWorldHint: false,
365+
},
359366
async (params, extra) => {
360367
if (!extra.authInfo) throw new Error("Authentication required");
361368
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/computer-action.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ export function registerComputerActionTool(server: McpServer) {
254254
"Ordered list of actions. Use one action for simple operations or multiple for batched sequences.",
255255
),
256256
},
257+
{
258+
title: "Control browser (mouse, keyboard, screenshot)",
259+
readOnlyHint: false,
260+
destructiveHint: true,
261+
idempotentHint: false,
262+
openWorldHint: true,
263+
},
257264
async ({ session_id, actions }, extra) => {
258265
if (!extra.authInfo) throw new Error("Authentication required");
259266
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/docs.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ export function registerDocsTools(server: McpServer) {
1919
'Natural language search query (e.g., "how to deploy an app", "browser automation examples").',
2020
),
2121
},
22+
{
23+
title: "Search Kernel documentation",
24+
readOnlyHint: true,
25+
destructiveHint: false,
26+
idempotentHint: true,
27+
openWorldHint: false,
28+
},
2229
async ({ query }, extra) => {
2330
if (
2431
!process.env.MINTLIFY_ASSISTANT_API_TOKEN ||

src/lib/mcp/tools/extensions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ export function registerExtensionTools(server: McpServer) {
1414
.describe("(delete) Extension ID or name to delete.")
1515
.optional(),
1616
},
17+
{
18+
title: "Manage Kernel browser extensions",
19+
readOnlyHint: false,
20+
destructiveHint: true,
21+
idempotentHint: false,
22+
openWorldHint: false,
23+
},
1724
async (params, extra) => {
1825
if (!extra.authInfo) throw new Error("Authentication required");
1926
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/playwright.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ export function registerPlaywrightTool(server: McpServer) {
2020
)
2121
.optional(),
2222
},
23+
{
24+
title: "Execute Playwright code",
25+
readOnlyHint: false,
26+
destructiveHint: true,
27+
idempotentHint: false,
28+
openWorldHint: true,
29+
},
2330
async ({ code, session_id }, extra) => {
2431
if (!extra.authInfo) throw new Error("Authentication required");
2532
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/profiles.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ export function registerProfileCapabilities(server: McpServer) {
7979
.describe("(setup) If true, update existing profile. Default false.")
8080
.optional(),
8181
},
82+
{
83+
title: "Manage Kernel browser profiles",
84+
readOnlyHint: false,
85+
destructiveHint: true,
86+
idempotentHint: false,
87+
openWorldHint: true,
88+
},
8289
async (params, extra) => {
8390
if (!extra.authInfo) throw new Error("Authentication required");
8491
const client = createKernelClient(extra.authInfo.token);

src/lib/mcp/tools/projects.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ export function registerProjectCapabilities(server: McpServer) {
3636
.optional(),
3737
...paginationParams,
3838
},
39+
{
40+
title: "Manage Kernel projects",
41+
readOnlyHint: false,
42+
destructiveHint: true,
43+
idempotentHint: false,
44+
openWorldHint: false,
45+
},
3946
async (params, extra) => {
4047
if (!extra.authInfo) throw new Error("Authentication required");
4148
const client = createKernelClient(extra.authInfo.token);

0 commit comments

Comments
 (0)