Skip to main content
Glama
getcustomaise

customaise

Official

get_selected_elements

Idempotent

Retrieve the DOM elements visually selected in the browser, including bulletproof selectors, context, and comments. Use this to access raw selection data or regenerate missing .dom.md context files.

Instructions

Get DOM elements that the user has visually selected in the browser for a specific script. Returns each selection's bulletproof selectors, element context, and user comments. Returns the selections in this response, so it needs no filesystem access. WRITES FILES only when you pass writeFiles: true, which saves .dom.md context files under the directory you name. Use CM_findElement with the domId for precise targeting in scripts. When MCP is connected, .dom.md context files and screenshots are automatically pushed to the workspace (.customaise/dom-context//) in real-time as the user selects elements. Use this tool to retrieve selections if the auto-pushed files are missing or to get the raw JSON data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptIdNoScript ID to get selections for. Omit to get all scripts' selections.
directoryNoWorkspace directory for .dom.md files. Required if writeFiles is true.
writeFilesNoIf true, writes .dom.md context files to the workspace directory. Default: false.
Behavior5/5

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

Discloses the key side effect beyond annotations: file writes only happen when writeFiles: true, and otherwise no filesystem access is needed. It also explains real-time auto-push behavior when MCP is connected, adding useful behavioral context not captured by the annotations.

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 front-loaded with the core purpose and then expands into optional file-writing and MCP integration. It is a bit longer than strictly necessary, but each sentence contributes functional guidance, so the length is justified.

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?

With no output schema, the description compensates by summarizing what is returned: selectors, element context, and user comments. It covers the main side effects and usage conditions. It could be more precise about the response shape or error cases, but the core information an agent needs to call it correctly is present.

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?

Schema coverage is 100%, so the baseline is 3. The description adds meaning by explaining that the response itself contains the selections, that writeFiles triggers .dom.md file creation, and that directory is tied to that behavior. This goes beyond the raw schema wording.

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 opens with a specific verb and resource: 'Get DOM elements that the user has visually selected in the browser for a specific script.' It clearly specifies what is returned (selectors, element context, user comments) and distinguishes itself from file-based retrieval by noting it returns data directly in the response.

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

Usage Guidelines5/5

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

Explicitly states when to use the tool: 'Use this tool to retrieve selections if the auto-pushed files are missing or to get the raw JSON data.' It also explains the alternative auto-push mechanism and points to CM_findElement for downstream targeting, providing clear decision context.

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/getcustomaise/customaise-mcp'

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