Skip to main content
Glama

Query the League client DOM

lol_dom_query
Read-onlyIdempotent

Query live League client UI DOM elements with CSS selectors to inspect interface state, verify modals, and find element identifiers safely.

Instructions

Query HTML elements in the active League client Chromium Embedded Framework (CEF) UI DOM using CSS selectors. Use this tool as the primary safe method to inspect live UI elements, verify modal state, or find element identifiers. Do not use lol_eval when a CSS selector query suffices. For arbitrary JavaScript execution or state mutation in the UI page, use lol_eval instead. For capturing visual UI state as an image, use lol_cdp_screenshot instead. Prerequisite: Requires Chrome DevTools Protocol (CDP) enabled via Pengu Loader; check lol_status if connection fails. Note: Pengu Loader is required for CDP tools, but standard LCU REST, WAMP, and game tools work without it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoIf true, returns an array of all matching elements; if false (default), returns only the first matching element
propsNoArray of additional DOM element properties or attributes to extract, e.g. ["disabled", "href", "textContent"]
selectorYesCSS selector matching target elements, e.g. ".lol-uikit-flat-button" or "#rcp-fe-viewport"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.0
    • changedInput schema / properties / all / description
      Previous value: -"true returns every match, false (default) the first"New value: +"If true, returns an array of all matching elements; if false (default), returns only the first matching element"
    • changedInput schema / properties / props / description
      Previous value: -"extra element properties or attributes to include, e.g. [\"disabled\", \"href\"]"New value: +"Array of additional DOM element properties or attributes to extract, e.g. [\"disabled\", \"href\", \"textContent\"]"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector, e.g. \".lol-uikit-flat-button\""New value: +"CSS selector matching target elements, e.g. \".lol-uikit-flat-button\" or \"#rcp-fe-viewport\""
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint. The description adds meaningful behavioral context beyond annotations: the CDP/Pengu Loader dependency, the troubleshooting step (check lol_status if connection fails), and the note that other tool categories work without Pengu Loader. It does not detail return format or rate limits, but the setup and safety context are valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and usage guidance, then alternatives and prerequisites. It is slightly long due to the final note about Pengu Loader and non-CDP tools, which is ecosystem context that is helpful but not strictly about invoking this tool. Overall, most sentences earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a CDP-based query tool with rich annotations and full schema coverage, the description is complete: it covers purpose, routing to alternatives, prerequisites, failure recovery, and the broader Pengu Loader requirement. No output schema exists, and return details are not essential for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters (selector, all, props) are fully documented in the schema. The description adds no parameter-specific meaning beyond what the schema provides; its only mention of selectors is a restatement of the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb (Query) and resource (HTML elements in the active League client CEF UI DOM) with the mechanism (CSS selectors). It distinguishes itself from siblings by explicitly naming lol_eval and lol_cdp_screenshot as alternatives for different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use (primary safe method to inspect live UI elements, verify modal state, find element identifiers), when-not-to-use (Do not use lol_eval when a CSS selector query suffices), and alternatives for adjacent tasks (lol_eval for arbitrary JS/state mutation, lol_cdp_screenshot for visual state). It also includes a prerequisite check via lol_status.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.