Skip to main content
Glama

Windows Automation MCP Server

type_text

Automate text input on Windows systems by typing specified text with optional character delay for controlled automation workflows.

Instructions

输入文本

Input Schema

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

Input Schema (JSON Schema)

{ "properties": { "delay": { "description": "每个字符之间的延迟(毫秒,可选)", "type": "number" }, "text": { "description": "要输入的文本", "type": "string" } }, "required": [ "text" ], "type": "object" }

Implementation Reference

  • Core implementation of the type_text tool handler. Types text using robotjs.typeString, with optional delay between characters implemented via busy-wait 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 }; } }
  • Input schema definition for type_text tool, specifying required 'text' parameter and optional 'delay'.
    { name: 'type_text', description: '输入文本', inputSchema: { type: 'object', properties: { text: { type: 'string', description: '要输入的文本' }, delay: { type: 'number', description: '每个字符之间的延迟(毫秒,可选)' }, }, required: ['text'], }, },
  • Registration and dispatch for type_text in the executeTool switch statement, calling the handler with parsed arguments.
    case 'type_text': return this.typeText(args.text, args.delay);
  • type_text is listed among tools that this module can handle in the canHandle method.
    const tools = ['move_mouse', 'mouse_click', 'type_text', 'press_key', 'get_mouse_position', 'get_screen_size'];

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