Skip to main content
Glama

get_usage_stats

Retrieve session-specific usage statistics to monitor data interactions and insights generated on the Healthcare MCP Server for AI-driven healthcare tools.

Instructions

Get usage statistics for the current session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the logic for get_usage_stats, returning session-specific usage statistics including total calls and tool usage breakdown.
    getSessionUsage(sessionId) {
      return {
        status: 'success',
        session_id: sessionId,
        session_start: this.usageStats.session_start,
        total_calls: this.usageStats.total_calls,
        tool_usage: { ...this.usageStats.tool_usage }
      };
    }
  • Tool metadata and input schema definition (empty input schema as it takes no parameters) in the ListTools response.
    {
      name: "get_usage_stats",
      description: "Get usage statistics for the current session",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Dispatch/registration of the tool handler in the MCP CallToolRequestHandler switch statement.
    case "get_usage_stats":
      result = usageService.getSessionUsage(sessionId);
      break;
  • Dispatch/registration of the tool handler in the HTTP server's handleCallTool switch statement for the /mcp/call-tool endpoint.
    case 'get_usage_stats':
      return usageService.getSessionUsage(sessionId);
  • Supporting helper method recordUsage that updates the usage stats, called before tool execution.
    recordUsage(sessionId, toolName) {
      this.usageStats.total_calls++;
      
      if (!this.usageStats.tool_usage[toolName]) {
        this.usageStats.tool_usage[toolName] = 0;
      }
      this.usageStats.tool_usage[toolName]++;
      
      console.error(`Usage recorded: ${toolName} (session: ${sessionId})`);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose whether this is a read-only operation, what permissions are needed, rate limits, error conditions, or return format. Significant behavioral context is missing.

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 a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a zero-parameter tool and front-loads the essential information.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'usage statistics' includes, the format of returned data, or behavioral aspects like whether this requires authentication or has side effects.

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 no parameter documentation is needed. The description appropriately doesn't discuss parameters, maintaining focus on the tool's purpose without unnecessary detail.

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 verb ('Get') and resource ('usage statistics') with scope ('for the current session'), making the purpose understandable. It doesn't explicitly differentiate from sibling 'get_all_usage_stats', but the 'current session' scope provides implicit distinction.

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?

No explicit guidance on when to use this tool versus alternatives like 'get_all_usage_stats' is provided. The description implies usage for current session statistics but doesn't mention prerequisites, exclusions, or comparison with sibling 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

Related 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/Cicatriiz/healthcare-mcp-public'

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