You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Screenshot was a terminal action inside computer_action, which meant the one
capability every multimodal model can use was gated behind a tool flagged
destructive, and clients with approval prompts confirmed on a read-only capture.
Extract it as a standalone screenshot tool and point tool descriptions at
execute_playwright_code as the default way to drive a browser, leaving
computer_action for surfaces no selector can reach.
Region screenshots also reported the full viewport as the coordinate space while
returning a cropped image, so the offset a caller needed to add was never stated.
The new tool reports the crop offset instead.
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,9 +278,10 @@ Self-hosted deployments can hide sensitive tool families by setting `KERNEL_MCP_
278
278
279
279
### Standalone tools
280
280
281
-
-`computer_action` - Mouse, keyboard, clipboard, and screenshot controls for browser sessions (click, type, press_key, scroll, move, get_position, read_clipboard, write_clipboard, screenshot).
281
+
-`execute_playwright_code` - Execute Playwright/TypeScript code against an existing browser session. The primary way to drive a browser. Does not create or delete browsers - use `manage_browsers` for session lifecycle.
282
+
-`screenshot` - Capture a PNG of what a browser session currently displays, optionally cropped to a region. Read-only.
283
+
-`computer_action` - Mouse, keyboard, and clipboard input at screen coordinates (click, type, press_key, scroll, move, drag, get_position, read_clipboard, write_clipboard). Fallback for surfaces Playwright selectors can't reach, such as canvas apps and embedded PDFs; it depends on the model being able to locate targets in a screenshot, so prefer `execute_playwright_code`.
282
284
-`browser_curl` - Send HTTP requests through an existing browser session's Chrome network stack.
283
-
-`execute_playwright_code` - Execute Playwright/TypeScript code against an existing browser session. Does not create or delete browsers - use `manage_browsers` for session lifecycle.
284
285
-`exec_command` - Run shell commands inside a browser VM. Returns decoded stdout/stderr.
285
286
-`search_docs` - Search Kernel platform documentation and guides.
Copy file name to clipboardExpand all lines: src/lib/mcp/prompts.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ kernel browsers process --help
129
129
kernel browsers playwright --help
130
130
\`\`\`
131
131
132
-
**MCP Exceptions:** The \`computer_action\` MCP tool with action "screenshot" is useful since it returns images directly to the agent, and \`manage_browsers\` with action "get_telemetry" reads structured telemetry events (see below).
132
+
**MCP Exceptions:** The \`screenshot\` MCP tool is useful since it returns images directly to the agent, and \`manage_browsers\` with action "get_telemetry" reads structured telemetry events (see below).
133
133
134
134
---
135
135
@@ -152,7 +152,7 @@ ${TELEMETRY_EVENT_CATALOG}
152
152
kernel browsers get ${session_id}
153
153
\`\`\`
154
154
155
-
### Take a screenshot (or use MCP computer_action with action "screenshot")
155
+
### Take a screenshot (or use the MCP screenshot tool)
@@ -250,7 +232,7 @@ export function registerComputerActionTool(server: McpServer) {
250
232
// computer_action -- Execute one or more computer actions on a browser session
251
233
server.tool(
252
234
"computer_action",
253
-
"Execute computer actions on a browser session. Pass a single action for simple operations (e.g. one click or one screenshot), or pass multiple actions to batch them into a single request for lower latency (e.g. click, type, press_key in one call). Use sleep actions between steps when the page needs time to react (e.g. after a click that triggers navigation or animation). IMPORTANT: Always include a screenshot as the last action so you can see the result of your actions. Action types: click_mouse, move_mouse, type_text, press_key, scroll, drag_mouse, set_cursor, sleep, write_clipboard, read_clipboard, screenshot, get_mouse_position. screenshot, read_clipboard, and get_mouse_position return data, so they must be the last action if included.",
235
+
"Drive a browser session with raw mouse and keyboard input at screen coordinates. Prefer execute_playwright_code for anything a selector can reach -- it is faster, deterministic, and does not depend on the model's ability to locate targets in an image. Reach for this tool only when there is no selector to target: canvas apps, embedded PDFs, native dialogs, drag interactions. Coordinates come from a screenshot tool call, and screen coordinates are only as accurate as the model's pixel grounding, so verify with screenshot after acting. Pass a single action, or several to batch them into one request for lower latency (e.g. click, type, press_key). Use sleep actions between steps when the page needs time to react. Action types: click_mouse, move_mouse, type_text, press_key, scroll, drag_mouse, set_cursor, sleep, write_clipboard, read_clipboard, get_mouse_position. read_clipboard and get_mouse_position return data, so they must be the last action if included.",
Copy file name to clipboardExpand all lines: src/lib/mcp/tools/playwright.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ export function registerPlaywrightTool(server: McpServer) {
6
6
// execute_playwright_code -- Run Playwright/TypeScript code against a browser
7
7
server.tool(
8
8
"execute_playwright_code",
9
-
"Execute Playwright/TypeScript automation code against an existing Kernel browser session. Does not create or delete browsers -- use manage_browsers to manage session lifecycle.",
9
+
"Execute Playwright/TypeScript automation code against an existing Kernel browser session. This is the primary way to drive a browser: navigation, clicks, form fills, and extraction should all go through here rather than raw coordinate input, and `await page.locator('main').ariaSnapshot()` gives you the accessibility tree to locate elements without needing a screenshot. Does not create or delete browsers -- use manage_browsers to manage session lifecycle.",
// The image is cropped, so its top-left is the region origin, not the screen
22
+
// origin. Computer actions take screen coordinates, so spell out the offset
23
+
// rather than leaving the model to guess which space it's looking at.
24
+
return`Cropped region ${region.width}x${region.height} at screen offset (${region.x}, ${region.y}). Image coordinates start at the crop, so add the offset to get screen coordinates: screen_x = ${region.x} + image_x, screen_y = ${region.y} + image_y.`;
// screenshot -- Capture what a browser session currently shows
37
+
server.tool(
38
+
"screenshot",
39
+
"Capture a PNG screenshot of what a browser session currently displays. Read-only: it observes the session without changing it. Use it to see page state, confirm what an automation did, or diagnose a stuck flow. To act on the page, prefer execute_playwright_code.",
0 commit comments