Skip to main content
Glama

glass_type

Types synthetic keystrokes into the focused UI element or a specified target, resolving and confirming focus before typing to avoid missed input. Use when you need to enter text reliably in a desktop app.

Instructions

Type text once. Without target, focused-window typing sends keystrokes to current focus. A target resolves one fresh unique element; focus_mode auto, native or pointer confirms focus then types once. Unconfirmed focus never types or tries another path. Newlines do not press Return: use a key action. No value confirmation; verify the resulting field. Never replay after uncertain dispatch. For 2+ known steps, use glass_do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesSynthetic keystrokes, not paste. When `target` is omitted: current keyboard focus. When `target` is supplied: resolves and focuses the target, confirms focus, then types. Newlines do not press Return.
returnNonone (default): no observation; settle: text-only visual stability; snapshot: settle and read the current accessibility tree, including app-visible text, with secure values redacted.
targetNo
max_nodesNo
focus_modeNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.8.0
    • addedInput schema / $defs
      Added value: +{
      +  "ActionModeArg": {
      +    "enum": [
      +      "auto",
      +      "native",
      +      "pointer"
      +    ],
      +    "type": "string"
      +  },
      +  "ActionScopeArgs": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "query": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "role": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "states": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "ActionTargetArgs": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "query": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "role": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "states": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      },
      +      "within": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/ActionScopeArgs"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / focus_mode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ActionModeArg"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / max_nodes
      Added value: +{
      +  "format": "uint32",
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / return / description
      Previous value: -"Terminal observation: \"snapshot\" settles and refreshes/folds a11y, \"settle\" waits for\nvisual stability and returns text-only metadata, and \"none\" skips observation (default)."New value: +"none (default): no observation; settle: text-only visual stability; snapshot: settle and read the current accessibility tree, including app-visible text, with secure values redacted."
    • addedInput schema / properties / target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ActionTargetArgs"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedInput schema / properties / text / description
      Previous value: -"Text to type into whatever currently has keyboard focus — this tool does not\nfocus a field, so click or `glass_click_element` one first. Sent as synthetic\nkey events, not pasted, so an app's per-keystroke handlers run."New value: +"Synthetic keystrokes, not paste. When `target` is omitted: current keyboard focus. When `target` is supplied: resolves and focuses the target, confirms focus, then types. Newlines do not press Return."
    • addedInput schema / properties / timeout_ms
      Added value: +{
      +  "format": "uint64",
      +  "maximum": 120000,
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  2. Changed1 schema field changedv1.5.1
    • changedInput schema / properties / return / description
      Previous value: -"Optional observe folded into the result: \"snapshot\" (wait for the UI to settle, then\nfold a fresh a11y tree, also refreshing the snapshot cache), \"settle\" (wait for the UI\nto stop changing, text-only), or \"none\" (default). Not accepted inside a `glass_do`\n`type` action — use a `settle` action or the terminal `then` observe there."New value: +"Terminal observation: \"snapshot\" settles and refreshes/folds a11y, \"settle\" waits for\nvisual stability and returns text-only metadata, and \"none\" skips observation (default)."
  3. Changed3 schema fields changedv1.2.0
    • addedInput schema / properties / return
      Added value: +{
      +  "description": "Optional observe folded into the result: \"snapshot\" (wait for the UI to settle, then\nfold a fresh a11y tree, also refreshing the snapshot cache), \"settle\" (wait for the UI\nto stop changing, text-only), or \"none\" (default). Not accepted inside a `glass_do`\n`type` action — use a `settle` action or the terminal `then` observe there.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / text / description
      Added value: +"Text to type into whatever currently has keyboard focus — this tool does not\nfocus a field, so click or `glass_click_element` one first. Sent as synthetic\nkey events, not pasted, so an app's per-keystroke handlers run."
    • removedInput schema / title
      Removed value: -"TypeArgs"
  4. Addedv1.0.3
  5. Removedv1.0.2
  6. First observedv1.0.1

TDQS

A4.8/5.0
Behavior5/5

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

Despite annotations providing only readOnly/destructive hints, the description discloses key behavioral traits: single dispatch only, unconfirmed focus never types, fresh-element target resolution, no value confirmation, and no replay after uncertain dispatch. This gives the agent a clear safety model for a write-like operation.

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?

The description is front-loaded with the core action ('Type text once') and then delivers a dense set of caveats in compact, purposeful sentences. Every sentence either clarifies behavior, prevents a misuse, or routes to an alternative.

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 write-like tool with no output schema, the description covers the most important behavioral constraints and alternatives. It does not explain the return/snapshot semantics or the undocumented timeout/max_nodes parameters, though the schema partially covers return and the parameter names are suggestive.

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 33%, so the description must compensate. It adds meaningful semantics for text, target, and focus_mode, including the 'one fresh unique element' behavior and the three focus modes. However, max_nodes and timeout_ms receive no added explanation in either schema or description, leaving a partial gap.

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?

'Type text once' is a specific verb+resource statement that immediately establishes the tool's core behavior. It also distinguishes itself from siblings by explicitly routing multi-step work to glass_do and newline handling to a key action.

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?

The description gives explicit when-to-use context: type once into current focus or a resolved target, and never replay after uncertain dispatch. It also names an alternative ('use glass_do' for 2+ steps) and a fallback for newlines ('use a key action'), which is strong usage guidance.

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