Skip to main content
Glama

type_text

Types text into a target field via native SetValue, with key injection or clipboard paste fallbacks for foreground-independent desktop GUI automation.

Instructions

Type text into a field. Uses native SetValue, which is foreground-independent. Falls back to key injection if the element doesn't support SetValue.

SetValue REPLACES the field's content. A window matched by title can be the user's own (single-instance apps such as Windows 11 Notepad reuse their open window), so type only into windows of a process you started.

paste=true also allows typing through the clipboard (Windows, macOS) when the other ways fail. The text is lent to the clipboard, marked out of clipboard history, and cleared afterwards if nothing replaced it; what the user had copied is lost, never restored. Password fields never paste.

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": {
      "handle_id": "<handle_id>",
      "text": "<text>"
    },
    "name": "type_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
pasteNo
handle_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations supplied, the description carries the entire burden and does so thoroughly: SetValue REPLACES existing field content (a destructive side effect), the fallback chain is disclosed, and the clipboard path is spelled out in detail — history marking, clearing behavior, and the fact that the user's prior clipboard contents are permanently lost. The 'Password fields never paste' caveat is exactly the kind of non-obvious constraint an agent could not infer.

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?

Front-loaded with the purpose and primary mechanism, then layered fallback and risk details in order of relevance. Nearly every sentence adds substantive information, though the clipboard paragraph is dense enough that a reader must parse it carefully rather than skim it.

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 3-parameter mutation tool with no annotations and no output schema, the definition covers the risky behaviors, fallback strategy, and clipboard hazards an agent needs before calling it. It does not say what happens on failure (error vs. silent no-op) or where handle_id comes from, which are the remaining gaps.

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 description coverage is 0%, so the description must compensate, and it does for the non-obvious parameter: paste is explained in depth including platform scope and side effects. handle_id is only obliquely addressed through the window-ownership warning, and text is left implicit, which keeps this from a 5.

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 opening sentence gives a specific verb and resource ('Type text into a field') and the following sentences explain the mechanism (native SetValue with key-injection fallback), which implicitly separates it from lower-level siblings like press_key. It stops short of naming an alternative tool explicitly, so an agent must infer when to prefer key-level input instead.

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?

Offers concrete conditional guidance: use paste=true only 'when the other ways fail', and type only into windows belonging to a process you started, with the single-instance Notepad example explaining why. No explicit exclusions naming a sibling tool, but the escalation ladder (SetValue → key injection → clipboard) gives clear decision context.

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