Skip to main content
Glama

inspect_element

Reads the full content of a single UI element by path, such as a document, table, long list, or edit field, so agents can extract large text without numbering every row.

Instructions

Read the full content of one element, identified by a path.

Call get_ui_tree first, then pass the path of the element you care about
(for example "0.4.0.1"). Use this for elements that hold a lot of content -
a document, a table, a long list, an edit field - where numbering every row
would waste the whole mark budget.

Returns the element's type, name, screen rect, its value or text (up to
max_chars), and a summary of its immediate children. That child summary is
usually enough to understand a table without capturing or marking it.

Paths are positional: if the UI changed between calls, call get_ui_tree
again. Read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "window": "<window>",
      "path": "<path>"
    },
    "name": "inspect_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
windowYes
max_charsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares read-only, describes exactly what is returned (type, name, rect, value/text truncated to max_chars, child summary), and warns that paths are positional and go stale if the UI changes. It stops short of describing failure behavior for an invalid path or any permission/access constraints.

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?

Front-loaded with the core action, then prerequisites, then return shape and caveats in a logical order. Slightly long in the middle paragraph, but each sentence adds usable information rather than restating the name.

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

Completeness4/5

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

An output schema exists, yet the description still usefully previews the return payload and the child-summary trick, and it covers the path-staleness risk. The only real hole is the unexplained window parameter, which matters for a tool that cannot be called without it.

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 coverage is 0%, so the description must compensate. It explains path well (positional, example "0.4.0.1", sourced from get_ui_tree) and implies max_chars truncation, but the required "window" parameter is never mentioned, leaving one of three parameters undocumented in both schema and description.

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?

States a specific verb and resource ("Read the full content of one element") and scopes it by path, which cleanly separates it from get_ui_tree (which enumerates) and the capture_* siblings (which render). An agent can pick this tool without opening any schema.

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?

Gives an explicit prerequisite ("Call get_ui_tree first"), a concrete selection rule (elements holding a lot of content: documents, tables, long lists, edit fields), and the reason to prefer it over marking/capturing (budget waste). It also names the fallback behavior when the UI changes between calls.

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