Skip to main content
Glama
Yocoolab
by Yocoolab

get_element_context

Retrieve comprehensive UI element context including DOM, computed styles, and source code candidates to enable targeted modifications from live or stored selections.

Instructions

Returns a comprehensive summary of a UI element, including its DOM context, computed styles, and ranked source code candidates. Works with live Chrome selections or stored thread element_context. This is the primary tool to use when the user wants to modify a UI element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
correlationIdNoThe correlationId of a specific selection. If omitted, uses the latest selection.
thread_idNoA Yocoolab thread ID to use stored element_context instead of a live selection.
includePromptNoWhether to include a pre-built edit prompt with constraints (default: true).
Behavior3/5

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

No annotations are provided, so the description must disclose all behavioral traits. It describes the tool as returning a summary without side effects, which is appropriate for a read-like operation. However, it lacks details on authorization needs, rate limits, or result size, leaving some behavioral aspects unclear.

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?

Two sentences: the first defines purpose and content, the second provides usage guidance. Every sentence earns its place, with no wasted words. The description is front-loaded with key information.

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?

Given the tool's moderate complexity (3 optional parameters, no output schema, no nested objects), the description adequately covers main use cases and return content. It does not explain the return format in detail, but the context of a summary tool makes this acceptable.

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 coverage is 100%, so baseline is 3. The description adds context for includePrompt ('pre-built edit prompt with constraints') and explains fallback behavior for correlationId. This adds some value beyond the schema field descriptions, but not significantly.

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

Purpose5/5

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

The description explicitly states the tool returns a 'comprehensive summary of a UI element' with specific contents (DOM context, computed styles, ranked source code candidates). It distinguishes from siblings by specifying it works with live Chrome selections or stored element_context, contrasting with tools like find_source_for_selection or get_latest_selection.

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

Usage Guidelines4/5

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

The description says 'This is the primary tool to use when the user wants to modify a UI element,' providing clear context for when to use it. It does not explicitly mention when not to use or name alternatives, but the primary designation offers good guidance.

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/Yocoolab/mcp-server'

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