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); }

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