Skip to main content
Glama

get_system_info

Retrieve system information with built-in security features, enabling safe and controlled access to directory operations within the Simple MCP Server.

Instructions

システム情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_system_info' tool. It gathers system information using Node.js 'os' module (platform, architecture, release, hostname, uptime, memory, CPUs, home dir, tmp dir) and returns it formatted as a JSON string in a CallToolResult.
    private async getSystemInfo(): Promise<CallToolResult> { console.error("Getting system info"); const info = { platform: os.platform(), arch: os.arch(), release: os.release(), hostname: os.hostname(), uptime: `${Math.floor(os.uptime() / 3600)}時間`, memory: { total: `${Math.round(os.totalmem() / 1024 / 1024 / 1024)}GB`, free: `${Math.round(os.freemem() / 1024 / 1024 / 1024)}GB`, }, cpus: os.cpus().length, homeDir: os.homedir(), tmpDir: os.tmpdir(), }; return { content: [ { type: "text", text: `システム情報:\n\n${JSON.stringify(info, null, 2)}`, }, ], isError: false, }; }
  • src/index.ts:287-288 (registration)
    Registers the tool handler by dispatching 'get_system_info' calls to the getSystemInfo() method in the CallToolRequestSchema handler switch statement.
    case "get_system_info": return await this.getSystemInfo();
  • Tool schema definition in the TOOLS array, including name, description, and empty inputSchema (no parameters required). Used in ListToolsRequest response.
    { name: "get_system_info", description: "システム情報を取得します", inputSchema: { type: "object", properties: {}, }, }, {

Other Tools

Related 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/p-united/mcpSample'

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