Skip to main content
Glama

execute_js

Execute JavaScript code directly in browser pages to interact with elements, fill forms, or call functions for debugging and automation tasks.

Instructions

Execute JavaScript code in the page context. Returns the result of the expression. Useful for clicking buttons, filling forms, or calling page functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to execute in page context
targetIndexNoTarget index from list_targets
portNoChrome CDP port

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tznthou/simple-console-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server