Skip to main content
Glama

attr

Read-only

Retrieves a specified HTML attribute value from a targeted element.

Instructions

Get an HTML attribute value from an element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAttribute name (href, class, etc.).
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
targetYes@eN / @text: / @label: / CSS.
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description carries a low burden. The description consistently indicates a non-destructive read operation, aligning with the annotations. It adds no additional behavioral context (e.g., what happens if the attribute is missing, or whether it returns null), but there is no contradiction.

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 a single, focused sentence with minimal word count. It is front-loaded with the core action and resource, and every word contributes to meaning. This is an exemplary level of conciseness for a simple getter tool.

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?

For a straightforward read-only attribute retrieval with a fully documented schema and safety annotations, the description covers the core need. It does not explain the return format, but given that the tool is simple and an output schema is absent, this is acceptable. The missing usage guidance is a minor gap but does not render it incomplete for basic invocation.

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 all four parameters are documented in the input schema. The description itself adds no extra meaning beyond what the schema provides; it just restates the tool's purpose. Per the baseline rule, when schema coverage is high, a score of 3 is appropriate.

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 clear verb (Get) and resource (HTML attribute value from an element), which is specific. However, it does not explicitly distinguish itself from sibling tools like text, value, or html, which also retrieve element properties. The name 'attr' adds some clarity but the description alone doesn't differentiate from similar retrieval tools.

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 like 'text' or 'value'. The description only states what it does, not when it is the right choice. There is no mention of exclusions or alternative tools, leaving the agent to infer usage from the name and context.

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