Skip to main content
Glama
JackXuyi

Current operating environment

getMemoryInfo

Retrieve current system memory usage details including available, used, and total memory to monitor resource allocation and performance.

Instructions

获取当前系统的内存信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the getMemoryInfo tool. It calculates total memory, free memory, and used memory using Node.js 'os' module functions and returns the information as a JSON-formatted text response.
    case "getMemoryInfo": { const memoryInfo = { totalMemory: os.totalmem(), freeMemory: os.freemem(), usedMemory: os.totalmem() - os.freemem() }; return { content: [{ type: "text", text: JSON.stringify(memoryInfo, null, 2) }] }; }
  • src/index.ts:37-45 (registration)
    Registration of the getMemoryInfo tool in the list of tools provided by the handleRequest function, including its name, description, and input schema (which is an empty object).
    { name: "getMemoryInfo", description: "获取当前系统的内存信息", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema definition for the getMemoryInfo tool, specifying an empty object with no properties or requirements.
    inputSchema: { type: "object", properties: {}, required: [] }

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/JackXuyi/env-mcp'

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