Skip to main content
Glama

get_attribute

Read attributes like href or aria-label from web elements using selectors or element references in Electron applications.

Instructions

Read an attribute from the first matching element. Pass selector or ref.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNo
refNoRef from snapshot.
nameYesAttribute name, e.g. "href", "aria-label".
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 burden of behavioral disclosure. It mentions that it reads from the 'first matching element,' which implies a selection behavior, but doesn't disclose critical traits such as error handling (e.g., what happens if no element matches), performance considerations, or any side effects. This leaves significant gaps in understanding how the tool behaves in practice, especially for a read operation with potential failures.

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?

The description is extremely concise and front-loaded, consisting of just two sentences that directly state the purpose and key parameter usage. Every word earns its place, with no redundant information or fluff, making it easy to parse quickly while conveying essential information efficiently.

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?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is partially complete. It covers the basic purpose and parameter hints but lacks details on behavioral aspects like error handling, return values, or integration with sibling tools. Without annotations or output schema, more context on what the tool returns or how it interacts with the system would improve completeness, leaving it as adequate but with clear gaps.

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

Parameters4/5

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

The description adds meaningful context beyond the input schema. While the schema covers 67% of parameters (with descriptions for 'ref' and 'name'), the description clarifies that 'selector' or 'ref' are alternative ways to identify the element, which isn't explicitly stated in the schema. It also implies that 'name' is required (as per schema), but doesn't detail parameter interactions. This compensates well for the schema's partial coverage, though it could elaborate more on parameter usage.

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?

The description clearly states the tool's purpose: 'Read an attribute from the first matching element.' It specifies the verb ('Read'), resource ('attribute'), and scope ('first matching element'), which is specific and actionable. However, it doesn't explicitly distinguish this tool from potential siblings like 'get_computed_style' or 'get_text', which might also retrieve element properties, leaving room for improvement in sibling differentiation.

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?

The description provides minimal guidance: 'Pass `selector` or `ref`.' This implies that either parameter can be used to identify the element, but it doesn't explain when to choose one over the other, nor does it mention alternatives or exclusions. For example, it doesn't clarify if this tool should be used instead of 'get_computed_style' for attribute retrieval, or what happens if no matching element is found, resulting in a lack of contextual usage instructions.

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/mesomya/electron-driver'

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