Skip to main content
Glama

getSystemInfo

Retrieve system information such as OS details, CPU architecture, memory usage, and network interfaces for monitoring and diagnostics.

Instructions

Get system information using Node.js os module

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that gathers system information (platform, architecture, CPU count, memory, uptime, Node version) using Node.js 'os' module and returns it as formatted JSON.
    handler: async () => { const info: SystemInfo = { platform: os.platform(), arch: os.arch(), cpus: os.cpus().length, totalMemory: os.totalmem(), freeMemory: os.freemem(), uptime: os.uptime(), nodeVersion: process.version }; return { content: [{ type: 'text', text: JSON.stringify(info, null, 2) }] }; }
  • TypeScript interface defining the structure of the system information returned by the getSystemInfo tool.
    export interface SystemInfo { platform: string; arch: string; cpus: number; totalMemory: number; freeMemory: number; uptime: number; nodeVersion: string; }
  • src/index.ts:28-35 (registration)
    Registration of all tools including systemTools (which contains getSystemInfo) into the allTools object used by the MCP server handlers for listing and execution.
    const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };
  • Definition and export of the getSystemInfo tool within the systemTools object, including name, description, input schema, and handler.
    getSystemInfo: { name: 'getSystemInfo', description: 'Get system information using Node.js os module', inputSchema: { type: 'object', properties: {} }, handler: async () => { const info: SystemInfo = { platform: os.platform(), arch: os.arch(), cpus: os.cpus().length, totalMemory: os.totalmem(), freeMemory: os.freemem(), uptime: os.uptime(), nodeVersion: process.version }; return { content: [{ type: 'text', text: JSON.stringify(info, null, 2) }] }; } },

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/cyanheads/toolkit-mcp-server'

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