Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

type_text

Automates text entry on Windows systems by simulating keyboard input with configurable typing speed for automation workflows.

Instructions

输入文本

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes要输入的文本
delayNo每个字符之间的延迟(毫秒,可选)

Implementation Reference

  • The handler function for the 'type_text' tool. It types the input text using robotjs.typeString, with optional delay between characters simulated by a busy loop.
    typeText(text, delay = 0) {
      try {
        if (delay > 0) {
          for (const char of text) {
            this.robot.typeString(char);
            this.robot.keyTap('');
            // 简单延迟
            const start = Date.now();
            while (Date.now() - start < delay) {}
          }
        } else {
          this.robot.typeString(text);
        }
        return { success: true, text, message: '文本已输入' };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • The input schema and metadata definition for the 'type_text' tool, including name, description, and validation schema.
    {
      name: 'type_text',
      description: '输入文本',
      inputSchema: {
        type: 'object',
        properties: {
          text: { type: 'string', description: '要输入的文本' },
          delay: { type: 'number', description: '每个字符之间的延迟(毫秒,可选)' },
        },
        required: ['text'],
      },
    },
  • Registration in the executeTool switch statement, dispatching 'type_text' calls to the typeText handler.
    case 'type_text':
      return this.typeText(args.text, args.delay);
  • Registers 'type_text' as a supported tool in the canHandle method for capability checking.
    canHandle(toolName) {
      const tools = ['move_mouse', 'mouse_click', 'type_text', 'press_key', 
                     'get_mouse_position', 'get_screen_size'];
      return tools.includes(toolName);
    }
Behavior1/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 of behavioral disclosure. '输入文本' only states the action without explaining how it works—e.g., whether it types into the active window, requires focus, simulates keystrokes, or has side effects like triggering events. It fails to describe key behavioral traits like error handling or performance implications.

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 extremely concise at just two characters, with no wasted words. It is front-loaded and to the point, though this brevity contributes to its inadequacy in other dimensions. Every character serves the minimal purpose of stating the action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a system interaction with two parameters) and the absence of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns, how it behaves, or its context among siblings. For a tool that likely involves UI automation, more detail is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear parameter descriptions in the schema itself. The description adds no additional meaning beyond what the schema provides—it doesn't clarify parameter interactions, constraints, or examples. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '输入文本' (input text) is a tautology that merely restates the tool name 'type_text' in Chinese. It doesn't specify what resource the text is being typed into (e.g., active window, browser field) or distinguish this tool from similar siblings like 'browser_type' or 'press_key'. The purpose is vague and lacks specificity.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools for text input (e.g., 'browser_type', 'press_key'), but the description doesn't indicate whether this tool is for general system-wide typing, browser-specific input, or another context. No prerequisites or exclusions are mentioned.

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/eva-wanxin-git/windows-automation-mcp'

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