Skip to main content
Glama

getLoadAverage

Retrieve system load averages for 1, 5, and 15-minute intervals to monitor server performance and resource utilization. Provides critical metrics for effective system management and troubleshooting.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'getLoadAverage' tool that retrieves the system load averages for 1, 5, and 15 minutes using Node.js os.loadavg() and returns them formatted as JSON.
    handler: async () => { const [oneMin, fiveMin, fifteenMin] = os.loadavg(); return { content: [{ type: 'text', text: JSON.stringify({ oneMinute: oneMin, fiveMinutes: fiveMin, fifteenMinutes: fifteenMin }, null, 2) }] }; }
  • Tool schema definition including name, description, and empty inputSchema (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)
    Registration of systemTools (containing getLoadAverage) into the allTools object, which is used for listing and executing MCP tools.
    const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };
  • src/index.ts:5-5 (registration)
    Import of systemTools, which includes 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