Skip to main content
Glama
dh1789

My First MCP

by dh1789

server_status

Check server uptime and monitor resource usage like memory consumption to maintain system health and performance.

Instructions

MCP 서버 상태를 확인합니다 (uptime, 메모리 사용량 등).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'server_status' that calls getServerStatus(), formats memory bytes, constructs a status text report, logs the call, and returns formatted text content.
      async () => {
        const status = getServerStatus();
    
        const formatBytes = (bytes: number) => {
          const mb = bytes / 1024 / 1024;
          return `${mb.toFixed(2)} MB`;
        };
    
        const text = `
    === MCP 서버 상태 ===
    
    ⏱️ Uptime: ${status.uptime.toFixed(2)}초
    📦 Node.js: ${status.nodeVersion}
    
    💾 메모리 사용량:
      - Heap Used: ${formatBytes(status.memory.heapUsed)}
      - Heap Total: ${formatBytes(status.memory.heapTotal)}
      - RSS: ${formatBytes(status.memory.rss)}
    `.trim();
    
        log(LogLevel.INFO, "server_status Tool 호출됨");
    
        return {
          content: [{ type: "text", text }],
        };
      }
  • TypeScript interface defining the ServerStatus object structure returned by getServerStatus().
    export interface ServerStatus {
      uptime: number;
      memory: {
        heapUsed: number;
        heapTotal: number;
        rss: number;
      };
      nodeVersion: string;
    }
  • src/index.ts:578-608 (registration)
    MCP server.tool() registration for 'server_status' tool, with Korean description, empty input schema, and inline handler function.
    server.tool(
      "server_status",
      "MCP 서버 상태를 확인합니다 (uptime, 메모리 사용량 등).",
      {},
      async () => {
        const status = getServerStatus();
    
        const formatBytes = (bytes: number) => {
          const mb = bytes / 1024 / 1024;
          return `${mb.toFixed(2)} MB`;
        };
    
        const text = `
    === MCP 서버 상태 ===
    
    ⏱️ Uptime: ${status.uptime.toFixed(2)}초
    📦 Node.js: ${status.nodeVersion}
    
    💾 메모리 사용량:
      - Heap Used: ${formatBytes(status.memory.heapUsed)}
      - Heap Total: ${formatBytes(status.memory.heapTotal)}
      - RSS: ${formatBytes(status.memory.rss)}
    `.trim();
    
        log(LogLevel.INFO, "server_status Tool 호출됨");
    
        return {
          content: [{ type: "text", text }],
        };
      }
    );
  • Helper function that retrieves Node.js process uptime, memory usage, and version, returning a ServerStatus object.
    export function getServerStatus(): ServerStatus {
      const memoryUsage = process.memoryUsage();
    
      return {
        uptime: process.uptime(),
        memory: {
          heapUsed: memoryUsage.heapUsed,
          heapTotal: memoryUsage.heapTotal,
          rss: memoryUsage.rss,
        },
        nodeVersion: process.version,
      };
    }
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 states the tool checks server status and mentions specific metrics (uptime, memory usage), but doesn't describe what the response looks like, whether authentication is required, if there are rate limits, or what format the data returns. For a monitoring tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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

Conciseness4/5

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

The description is a single, efficient sentence that gets straight to the point. It states the action ('확인합니다' - checks) and the target ('MCP 서버 상태' - MCP server status) with specific examples of what's included. There's no wasted verbiage or unnecessary elaboration. However, it could be slightly more structured by explicitly mentioning it's a monitoring/health check tool.

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 tool has no annotations, no output schema, and the description doesn't explain what the return values look like, this leaves significant gaps. For a server status monitoring tool, the agent needs to know what format the status information returns (structured data? plain text? specific metrics?) and whether there are any behavioral constraints. The description mentions specific metrics but doesn't provide enough context for the agent to understand the complete interaction.

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 tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters since none exist. It focuses instead on what the tool returns (server status metrics), which is correct for a parameterless tool. Baseline would be 4 for 0 parameters.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'MCP 서버 상태를 확인합니다' (checks MCP server status) with specific metrics mentioned (uptime, memory usage). It distinguishes from most siblings by focusing on server status rather than code analysis, calculations, or string manipulation. However, it doesn't explicitly differentiate from 'get_server_info' which might be a similar sibling tool.

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

Usage Guidelines2/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 alternatives. It doesn't mention when this tool is appropriate, when other tools should be used instead, or what distinguishes it from 'get_server_info' which appears to be a potential sibling with similar functionality. There's only a basic statement of what the tool does without usage context.

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/dh1789/my-first-mcp'

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