Skip to content

Chrome DevTools for coding agents

fix: better wording for evaluate_script (#392)

Nikolay Vitkov2313fdacad72
diff --git a/docs/tool-reference.md b/docs/tool-reference.md
index a7e3925d..c95ed3d3 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 be46de55..be6349d1 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 () => {