Evaluate JavaScript in the client page
lol_evalExecute a JavaScript expression inside the League client CEF renderer to debug runtime state, automate in-page UI, or read internal properties not exposed via REST.
Instructions
Execute an arbitrary JavaScript expression within the League client Chromium Embedded Framework (CEF) renderer context and return the evaluated result. CRITICAL: Do NOT use lol_eval for LCU REST API calls (e.g. fetch('/lol-...')) or client state queries. For safe LCU REST queries, ALWAYS use lol_get or lol_request. For automated game actions (lobby, matchmaking, champ-select, runes), ALWAYS use lol_workflow_* tools. For safe DOM structure inspection, prefer lol_dom_query. Use lol_eval ONLY for advanced CEF runtime debugging, custom in-page UI automation, or reading internal renderer properties not exposed via REST. Behavior: Destructive and unsandboxed; bypasses the write allowlist by construction. Security: Gated by allowEval config flag (check lol_status); calls are refused if allowEval is false. Prerequisite: Requires active CDP connection enabled via Pengu Loader (required for CDP tools; not needed for REST/workflow tools).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | A single valid JavaScript expression to evaluate (not a statement list), e.g. "window.location.href" or "document.title" | |
| awaitPromise | No | Whether to await resolution if the evaluated expression returns a Promise (default: false) |