Skip to main content
Glama

Inspect element

browser_inspect_element
Read-only

Diagnose layout and visibility issues by inspecting an element's tag, attributes, box model, form state, and computed styles.

Instructions

DevTools-style inspection of one element: tag, attributes, box model, form state, and computed styles. Use it to diagnose layout and visibility problems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoCSS selector, as an alternative to ref.
refNoElement ref from the most recent snapshot, e.g. "e12". Preferred — refs are exact. Only valid for the page state that produced them.
nameNoAccessible name to match alongside role.
roleNoARIA role, e.g. "button". Combine with name for an accessible-name match.
indexNoWhich match to use when the selector is ambiguous (0-based, default 0).
propsNoExtra computed CSS properties to include, e.g. ["flex-direction","margin"].
sessionIdYesSession id returned by browser_start.
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the description is not required to disclose read-only behavior. It adds value by specifying the actual data returned (computed styles, box model, etc.) and the intent (diagnose layout/visibility). No contradiction with annotations; the description enriches beyond the hints.

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

Conciseness5/5

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

Two sentences with zero fluff. The first sentence front-loads the purpose and output; the second gives a clear use case. Every word earns its place, and the structure is ideal for agent consumption.

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?

There is no output schema, so the description must convey what the tool returns — and it does, listing tag, attributes, box model, form state, and computed styles. The description covers purpose, usage, and output sufficiently for an agent to call the tool correctly, despite not detailing the exact JSON format or how computed styles are structured. This is adequate for a read-only inspection tool.

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% — every parameter has a definition. The description itself does not add parameter-level detail beyond the schema, which is acceptable when the schema is thorough. It stays at the baseline of 3 because the schema already explains ref, css, role, name, index, props, and sessionId without needing the description to compensate.

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 description states a specific verb ('inspect') and a specific resource ('one element') and enumerates exactly what it returns (tag, attributes, box model, form state, computed styles). It immediately distinguishes the tool from siblings like browser_snapshot or browser_query by framing it as DevTools-style inspection for diagnosing layout/visibility issues.

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

Usage Guidelines4/5

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

The description includes an explicit use case: 'Use it to diagnose layout and visibility problems.' This tells the agent when to reach for this tool. It does not explicitly mention when not to use it or list alternatives, but it does not mislead either. The context is clear enough for an agent to choose correctly among sibling tools.

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

Install Server

Other Tools

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/hofmeister/web-ui-tester'

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