Skip to main content
Glama

Get Gateway Statistics

gateway_get_stats

Retrieve usage statistics including invocations, cache hits, token savings, and top tools to monitor performance and calculate costs in the MCP Gateway server.

Instructions

Get usage statistics including invocations, cache hits, token savings, and top tools

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
price_per_millionNoToken price per million for cost calculations (default 15.0 for Opus 4.6)

Implementation Reference

  • This k6 test uses 'tools/call' which handles calling gateway tools, including a potential 'gateway_get_stats' if it exists. Note that the codebase seems to be a binary built in Rust or similar (based on npm/run.js) and the actual tool definitions are likely inside the binary, not directly visible in these files.
    function mcpToolsCall(toolName, toolArgs) {
      return postMcp(
        "tools/call",
        {
          name: toolName,
          arguments: toolArgs || {},
        },
        mcpToolsCallLatency,
        "mcp_tools_call"
      );
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it indicates this is a read operation ('Get'), it doesn't mention authentication requirements, rate limits, whether this is real-time or historical data, or what format the statistics are returned in. For a statistics 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.

Conciseness5/5

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

The description is a single, efficient sentence that clearly states the tool's purpose. Every word earns its place by specifying what statistics are included, making it appropriately concise and front-loaded with 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 statistics tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what format the statistics are returned in, whether they're aggregated or detailed, what time periods they cover, or how to interpret the results. The description should provide more context about the statistical output given the lack of structured documentation.

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

Parameters3/5

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

The description mentions 'token savings' which relates to the 'price_per_million' parameter in the schema, but doesn't add meaningful semantic context beyond what the schema already provides (100% coverage). The schema already documents this parameter with a clear description and default value, so the description adds minimal additional value.

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 action ('Get') and resource ('Gateway Statistics'), and specifies the types of statistics included (invocations, cache hits, token savings, top tools). However, it doesn't explicitly differentiate from sibling tools like 'gateway_cost_report' or 'gateway_get_profile' which might also provide statistical data.

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. With multiple sibling tools that might provide related statistics (gateway_cost_report, gateway_get_profile), there's no indication of when this specific statistics tool is appropriate versus those other options.

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/MikkoParkkola/mcp-gateway'

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