Skip to main content
Glama
ZenRows
by ZenRows

browser_get_attribute

Read-only

Retrieve the value of a specific attribute (e.g., href, src, data-id) from a webpage element using a CSS selector and session ID.

Instructions

Get the value of a specific attribute on an element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector of the element
attributeYesAttribute name to retrieve (e.g. 'href', 'src', 'data-id')
session_idYesSession ID returned by browser_navigate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.7.0

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered by structured data. The description adds no behavioral context at all: nothing about behavior when the selector matches multiple elements, when the attribute is absent (null? empty string?), or whether the page must already be loaded.

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?

One short sentence, front-loaded with the verb and the scope, with no filler or redundancy.

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

Completeness3/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 should ideally state the return shape (string value, null/error when missing) and whether the element must exist. For a minimal getter with fully documented parameters and read-only annotations this is adequate but leaves real gaps.

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 selector, attribute, and session_id are each documented in the schema, including attribute examples ('href', 'src', 'data-id'). The description adds no meaning beyond that, so the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb+resource: retrieving the value of one named attribute on one element. This is distinguishable in principle from browser_get_text and browser_get_html, though the description never names those siblings or contrasts the scope. Clear but not sibling-differentiating.

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 statement of when to use this versus browser_get_html, browser_get_text, browser_evaluate, or browser_query_selector_all. The agent must infer that this is the single-attribute read path from the name alone.

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