Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

read_file

Retrieve file contents from Windows systems for automation workflows. Specify the file path to access text or data within files programmatically.

Instructions

读取文件内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes文件路径

Implementation Reference

  • The core handler function for the 'read_file' tool. It asynchronously reads the file content using Node.js fs.promises.readFile and returns a structured response with success status, content or error.
    async readFile(filePath) { try { const content = await fs.readFile(filePath, 'utf-8'); return { success: true, content, path: filePath }; } catch (error) { return { success: false, error: error.message }; } }
  • The tool schema definition returned by getToolDefinitions(), including name, description, and inputSchema specifying a required 'path' string parameter.
    { name: 'read_file', description: '读取文件内容', inputSchema: { type: 'object', properties: { path: { type: 'string', description: '文件路径' }, }, required: ['path'], }, },
  • Registration of the 'read_file' tool within the executeTool switch statement, which delegates to the readFile handler method.
    case 'read_file': return await this.readFile(args.path);
  • src/server.js:44-44 (registration)
    Instantiation of FileSystemTools class in the main server, which provides the 'read_file' tool among others.
    filesystem: new FileSystemTools(),

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