Skip to main content
Glama

getLoadAverage

Monitor system performance by retrieving load averages for 1, 5, and 15-minute intervals to assess CPU utilization and resource demands.

Instructions

Get system load average for 1, 5, and 15 minutes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the getLoadAverage tool. It calls os.loadavg() to retrieve the 1, 5, and 15-minute load averages and formats them as JSON in the MCP response content.
    handler: async () => { const [oneMin, fiveMin, fifteenMin] = os.loadavg(); return { content: [{ type: 'text', text: JSON.stringify({ oneMinute: oneMin, fiveMinutes: fiveMin, fifteenMinutes: fifteenMin }, null, 2) }] }; }
  • Tool metadata including name, description, and input schema (no parameters required).
    getLoadAverage: { name: 'getLoadAverage', description: 'Get system load average for 1, 5, and 15 minutes', inputSchema: { type: 'object', properties: {} },
  • src/index.ts:28-35 (registration)
    Registers the getLoadAverage tool by spreading systemTools into the allTools object, which is used by the MCP server's listTools and callTool request handlers.
    const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };
  • src/index.ts:5-5 (registration)
    Imports the systemTools object containing the getLoadAverage tool definition.
    import { systemTools } from './tools/system.js';

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