Skip to main content
Glama

executeModelAction

Execute any model-specific action on a webpage element, such as typing text, selecting options, setting dates, or checking boxes. Supply an element ID or CSS selector to run the action.

Instructions

Universal tool to execute any model-specific action on element.

This tool works with element models (Strategy Pattern) and can execute any action defined by the model. Use analyzePage() first to see element's model and available actions in the 'models' map.

Models: TxtInp (text input), Sel (select), Btn (button), Chk (checkbox), Radio (radio), TxtArea (textarea), Link (link), Range (range), DatePicker (custom date picker), DateInp (HTML5 date), FileInp (file), ColorInp (color).

Examples:

  • executeModelAction({id: "input_20", action: "type", params: {text: "hello"}})

  • executeModelAction({id: "select_5", action: "selectOption", params: {value: "US"}})

  • executeModelAction({id: "datepicker_3", action: "SetDate", params: {date: "2024-03-15"}})

  • executeModelAction({id: "checkbox_7", action: "check"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoElement APOM ID (e.g., 'input_20') from analyzePage. Either id or selector required.
actionYesAction name to execute (e.g., 'type', 'click', 'SetDate'). See element's model in analyzePage 'models' map for available actions.
paramsNoAction parameters (depends on action). Examples: {text: 'hello'} for type, {date: '2024-03-15'} for SetDate, {value: 'US'} for selectOption
selectorNoCSS selector (alternative to id). Either id or selector required.
Behavior3/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. It explains the Strategy Pattern mechanism and the prerequisite of calling analyzePage(), which is useful context. However, it does not disclose return format, error behavior, or potential side effects, despite examples showing mutating actions like type and check.

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 well-organized with a clear intro, prerequisite callout, model list, and examples. Each section adds useful information without wasting words. It is slightly longer than necessary but remains focused and readable.

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 model-driven complexity and the absence of an output schema, the description should explain return values and error behavior. It adequately covers the discovery workflow (analyzePage) and usage patterns, but leaves out critical execution outcomes (e.g., success/failure, return data), making it incomplete for an agent to use confidently.

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 schema already covers all four parameters, but the description adds valuable concrete examples mapping actions to params (e.g., type→text, SetDate→date, selectOption→value, check→no params). This goes beyond the schema's descriptions and clarifies usage.

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 clearly states the tool's purpose: 'Universal tool to execute any model-specific action on element.' It distinguishes itself from specific sibling tools like click/type by being a generic action executor tied to element models. Examples further clarify the resource and action scope.

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?

Provides explicit guidance to use analyzePage() first to discover available actions in the 'models' map. It also illustrates usage with multiple examples across different model types. However, it doesn't explicitly state when not to use this tool versus the specialized sibling tools, though that is implied by its universal nature.

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/docentovich/chrometools-mcp'

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