Skip to main content
Glama

Current operating environment

getMemoryInfo

Retrieve detailed memory usage and allocation data from the current operating environment for system monitoring and performance analysis.

Instructions

获取当前系统的内存信息

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • Handler for getMemoryInfo tool: retrieves total memory, free memory, and calculates used memory using Node's os module, then returns JSON stringified 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) }] }; }
  • Schema definition for getMemoryInfo tool in the ListTools response, including name, description, and empty input schema (no parameters required).
    { name: "getMemoryInfo", description: "获取当前系统的内存信息", inputSchema: { type: "object", properties: {}, required: [] } },
  • src/index.ts:790-790 (registration)
    General registration of the CallToolRequest handler which includes the switch case for getMemoryInfo.
    server.setRequestHandler(CallToolRequestSchema, handleCallToolRequest);

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