diff --git a/docs/tool-reference.md b/docs/tool-reference.md index a7e3925d5..c95ed3d38 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 declaration to be executed by the tool in the currently selected page. Example without arguments: `() => { return document.title }` or `async () => { diff --git a/src/tools/script.ts b/src/tools/script.ts index be46de55e..be6349d16 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 declaration to be executed by the tool in the currently selected page. Example without arguments: \`() => { return document.title }\` or \`async () => {