Skip to main content
Glama

get_attribute

Retrieve attribute values from web elements using CSS, XPath, or other locator strategies. Specify the element and attribute name to get its value for assertions or debugging.

Instructions

Get an attribute value from an element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoLocator strategycss
timeoutNoWait timeout in seconds
selectorYesCSS selector, XPath, or other locator value
attributeYesAttribute name e.g. href, value, class

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not explain what happens when the element is not found, whether the attribute exists on the element, what happens on timeout, or whether the returned value can be null or empty.

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?

The description is a single concise sentence with no redundant wording. It could arguably add more useful context, but as a purpose statement it is appropriately sized and front-loaded.

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?

The tool has no output schema, no annotations, and a very minimal description. While the operation is simple, the description omits important behavioral context such as return behavior, error handling, and the meaning of the timeout parameter in practice, leaving an agent to infer these details.

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?

The input schema has 100% coverage of the four parameters, including descriptions for selector, attribute, by, and timeout. The description itself adds no parameter detail, but the baseline of 3 is appropriate because the schema already documents all parameters adequately.

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 states a specific verb ('Get') and resource ('attribute value from an element'), which clearly communicates the tool's core function. It is distinguishable from related siblings like get_text and get_current_url, though it does not explicitly distinguish itself from assert_attribute.

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?

No guidance is provided on when to use this tool versus alternatives such as get_text or assert_attribute. The description only states what it does, not when it should be selected or when a different tool would be more appropriate.

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

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/hakanngul/testfly-mcp'

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