Skip to main content
Glama

fill

Set an input, textarea, or select value by CSS selector in one step, clearing the field and dispatching an input event so React, Vue, and other frameworks detect the change.

Instructions

Set the value of an input/textarea/select matching the CSS selector in one shot (no key events). Clears the field first. Faster than type for setting a known value. Sets the value via the DOM and dispatches an input event so frameworks (React, Vue, etc.) pick up the change.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>",
      "text": "<text>"
    },
    "name": "fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesValue to set
selectorYesCSS selector of the element, e.g. #search-button, input[name=q]

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the field is cleared first, that no key events are emitted, and that an input event is dispatched via the DOM for React/Vue compatibility. It omits what happens when the selector matches nothing or matches a non-fillable element, and says nothing about return values.

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?

Four short sentences, front-loaded with the core action and mechanism, then the clearing behavior, then the comparative speed claim, then the framework-compatibility rationale. No sentence is redundant.

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 two-parameter interaction tool with no output schema and no annotations, the description covers mechanism, side effects, and framework compatibility. Only edge-case behavior (no match, disabled element, failure signal) is left unaddressed.

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 baseline is 3; the description adds value by narrowing selector semantics to input/textarea/select elements and framing text as the value placed into the cleared field, which tells an agent the call is a replace rather than an append.

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?

States a specific verb (set the value) and resource (input/textarea/select matched by CSS selector) plus the mechanism (one shot, no key events). It also implicitly separates itself from the sibling `type` by contrasting the two approaches.

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?

"Faster than type for setting a known value" gives an explicit condition for choosing this tool over the sibling `type`. It does not state the inverse case (use `type` when keystroke-level events or autocomplete behavior matter), so the routing guidance is clear but not fully complete.

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