Skip to content

Commit 2aa3e2a

Browse files
author
bcode
committed
browser_execute: standardize parameter descriptions and tool prose
Aligns annotation style with the shell tool: code mentions the snippet model and points at the guide; timeout uses the canonical 'Optional X (default Y, max Z)' format; description swaps 'summary' for 'description' to match the field name. Tool top-line tightened and a Returns bullet added in browser-execute.txt.
1 parent 6119a41 commit 2aa3e2a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/bcode-browser/src/browser-execute.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ const MAX_TIMEOUT_MS = 10 * 60 * 1000
5656
export const parameters = Schema.Struct({
5757
code: Schema.String.annotate({
5858
description:
59-
"JavaScript source. Wrapped in an async function with `session` (CDP Session) and `console` (per-call capture; same `log/error/warn/info` API) bound.",
59+
"The JavaScript snippet to execute. `session` (CDP Session) and `console` are in scope; see browser-execute-guide.md for the snippet model.",
6060
}),
6161
timeout: Schema.optional(Schema.Number).annotate({
62-
description: `Timeout in milliseconds. Default ${DEFAULT_TIMEOUT_MS}, max ${MAX_TIMEOUT_MS}.`,
62+
description: `Optional timeout in milliseconds (default ${DEFAULT_TIMEOUT_MS}, max ${MAX_TIMEOUT_MS})`,
6363
}),
6464
description: Schema.String.annotate({
6565
description:
66-
"Clear, concise summary of what this snippet does in 3-7 words. Examples:\nInput: code that connects to local Chrome\nOutput: Connect to local Chrome\n\nInput: scrape product titles from current page\nOutput: Scrape product titles\n\nInput: capture a screenshot of the homepage\nOutput: Screenshot homepage",
66+
"Clear, concise description of what this snippet does in 3-7 words. Examples:\nInput: code that connects to local Chrome\nOutput: Connect to local Chrome\n\nInput: scrape product titles from current page\nOutput: Scrape product titles\n\nInput: capture a screenshot of the homepage\nOutput: Screenshot homepage",
6767
}),
6868
})
6969

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Executes JavaScript in a connected browser.
1+
Executes JavaScript in a browser via CDP.
22

33
Usage:
44
- Use this tool whenever the task requires driving a real browser.
55
- Use this tool to read webpages that block the webfetch tool.
66
- IMPORTANT: you MUST use the Read tool first to read `{{SKILLS_DIR}}/browser-execute-guide.md`. This tool will fail if you did not read these directions first.
7-
- Always pass a clear, precise, and low verbosity `description` of what the JS snippet does.
7+
- Returns console output from the snippet; screenshots taken attach automatically as images.

0 commit comments

Comments
 (0)