From eed38a5d14af08db08d6d14eb6e3cae5016bb5bc Mon Sep 17 00:00:00 2001 From: archergu <649601376@qq.com> Date: Wed, 15 Oct 2025 21:48:03 +0800 Subject: [PATCH 1/2] perf: improve evaluate_script tool prompt --- src/tools/script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/script.ts b/src/tools/script.ts index be46de55e..0e70526be 100644 --- a/src/tools/script.ts +++ b/src/tools/script.ts @@ -19,7 +19,7 @@ so returned values have to JSON-serializable.`, }, schema: { function: z.string().describe( - `A JavaScript function to run in the currently selected page. + `A JavaScript function to run in the currently selected page. Just define the function and let the tool do the execution. Example without arguments: \`() => { return document.title }\` or \`async () => { From 312a7a42cb85c89944de2589acca4ce7c331a9af Mon Sep 17 00:00:00 2001 From: archergu <649601376@qq.com> Date: Wed, 15 Oct 2025 22:08:52 +0800 Subject: [PATCH 2/2] docs: update tool-reference.md --- docs/tool-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tool-reference.md b/docs/tool-reference.md index 1836c924c..0a6b08b68 100644 --- a/docs/tool-reference.md +++ b/docs/tool-reference.md @@ -284,7 +284,7 @@ so returned values have to JSON-serializable. **Parameters:** - **args** (array) _(optional)_: An optional list of arguments to pass to the function. -- **function** (string) **(required)**: A JavaScript function to run in the currently selected page. +- **function** (string) **(required)**: A JavaScript function to run in the currently selected page. Just define the function and let the tool do the execution. Example without arguments: `() => { return document.title }` or `async () => {