Skip to main content
Glama

attr

Retrieve an element's attribute value by CSS selector or snapshot ref, enabling browser automation agents to inspect page state and target specific UI properties.

Instructions

Attribute value of an element.

Input Schema

NameRequiredDescriptionDefault
refNoref from snapshot, e.g. e3
tabNotab id, defaults to current
nameYes
selectorNoCSS selector
request_timeoutNoOuter page request deadline in milliseconds; defaults to at least 30000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, but it only states the purpose. It does not disclose that this is a read-only operation, what happens if the attribute or element is missing, whether it waits for the element, or what the return value looks like.

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

Conciseness3/5

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

The description is a single short sentence fragment with no wasted words, but it is under-specified rather than appropriately concise. It is front-loaded with the core concept, though it lacks the structure needed for an agent to act confidently.

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

Completeness2/5

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

For a 5-parameter browser-automation tool with no annotations and no output schema, the description is incomplete. It omits return value behavior, element resolution rules, and error conditions, all of which an agent needs to call it correctly.

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 high at 80%, so the schema already documents ref, tab, selector, and request_timeout. The description adds no parameter meaning, and the required 'name' parameter has no schema description, but the baseline is 3 when the schema does most of the work.

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

Purpose3/5

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

The description identifies the resource ('attribute value of an element') but is phrased as a noun fragment rather than a specific operation like 'Get the value of a named attribute.' It does not distinguish the tool from siblings such as text, html, or eval, so an agent must infer that this retrieves a single attribute rather than page content.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives like text, html, eval, or snapshot. The description gives no conditions, prerequisites, or exclusions, leaving the agent to guess based on the tool name and schema.

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