All tools

web_eval

Web automation · macOS · Windows

Effect: execute (strongest supported action). Status: gated.

Gated means the tool requires an installed app, a connected account, permission, or runtime availability. Check those requirements on the listed platform before using it.

macOS

Purpose

Runs arbitrary JavaScript in a web session and returns the last expression's value. Always active. Disabled when LMCP is in read-only mode. POWER-USER tool — a page could feed malicious code, so prefer web_find / web_read / web_extract for normal use.

Required inputs

Permissions and confirmation

No explicit confirmation parameter is exposed in this snapshot. This does not grant permission to act: obtain user authorization before any real action.

Full input schema — macOS
{
  "properties": {
    "js": {
      "description": "JavaScript to evaluate on the page; the last expression's value is returned.",
      "type": "string"
    },
    "session": {
      "description": "Session name (default 'default').",
      "type": "string"
    }
  },
  "required": [
    "js"
  ],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "js": "document.title",
  "session": "demo-browser"
}

Windows

Purpose

Runs arbitrary JavaScript in a web session and returns the last expression's value. POWER-USER tool — a page could feed malicious code, so prefer web_find / web_read / web_extract for normal use.

Required inputs

Permissions and confirmation

No explicit confirmation parameter is exposed in this snapshot. This does not grant permission to act: obtain user authorization before any real action.

Full input schema — Windows
{
  "properties": {
    "js": {
      "description": "JavaScript to evaluate on the page; the last expression's value is returned.",
      "type": "string"
    },
    "session": {
      "description": "Session name (default 'default').",
      "type": "string"
    }
  },
  "required": [
    "js"
  ],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "js": "document.title",
  "session": "demo-browser"
}