Skip to main content
Glama
saksham0712

MCP Complete Implementation Guide

by saksham0712

get_system_info

Retrieve system information to monitor performance, check resources, and diagnose issues in MCP server implementations.

Instructions

Get system information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements get_system_info tool logic, collecting system details using platform and psutil libraries and returning as JSON.
    async def get_system_info(self) -> list[types.TextContent]:
        """Get system information"""
        info = {
            "platform": platform.system(),
            "arch": platform.machine(),
            "hostname": platform.node(),
            "cpus": psutil.cpu_count(),
            "totalMemory": f"{round(psutil.virtual_memory().total / (1024**3))} GB",
            "freeMemory": f"{round(psutil.virtual_memory().available / (1024**3))} GB",
            "uptime": f"{round(psutil.boot_time())} seconds",
            "pythonVersion": sys.version,
            "currentDirectory": str(Path.cwd()),
        }
        return [types.TextContent(type="text", text=json.dumps(info, indent=2))]
  • The handler function implementing get_system_info tool, gathering Node.js os module system information and returning formatted JSON response.
    async getSystemInfo() {
      const info = {
        platform: os.platform(),
        arch: os.arch(),
        hostname: os.hostname(),
        cpus: os.cpus().length,
        totalMemory: Math.round(os.totalmem() / 1024 / 1024 / 1024) + ' GB',
        freeMemory: Math.round(os.freemem() / 1024 / 1024 / 1024) + ' GB',
        uptime: Math.round(os.uptime() / 3600) + ' hours',
        nodeVersion: process.version,
        currentDirectory: process.cwd(),
      };
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(info, null, 2),
          },
        ],
      };
    }
  • Schema definition for the get_system_info tool in the list_tools handler, specifying no input parameters.
    types.Tool(
        name="get_system_info",
        description="Get system information",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Schema for get_system_info tool returned by listToolsRequestHandler, with empty properties indicating no args needed.
    {
      name: 'get_system_info',
      description: 'Get system information',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • server.py:181-182 (registration)
    Registration/dispatch in the call_tool handler for invoking get_system_info.
    elif name == "get_system_info":
        return await self.get_system_info()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('get'), but does not specify whether it requires permissions, what data it returns, if there are rate limits, or any side effects. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single three-word phrase, 'Get system information', which is front-loaded and wastes no words. It efficiently communicates the core purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what information is returned, the format, or any behavioral traits, making it insufficient for an agent to understand the tool's full context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter details, which is appropriate, and it correctly implies no inputs are required, earning a baseline score of 4 for tools with zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get system information' restates the tool name 'get_system_info' with minimal elaboration, making it tautological. It specifies the verb 'get' and resource 'system information', but lacks detail on what type of system information (e.g., hardware specs, OS details, performance metrics) or scope, failing to distinguish it from potential alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus sibling tools like 'execute_command' or 'fetch_url'. It does not mention any context, prerequisites, or exclusions, leaving the agent with no information to make an informed choice among available tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/saksham0712/MCP'

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