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
| Name | Required | Description | Default |
|---|---|---|---|
| price_per_million | No | Token price per million for cost calculations (default 15.0 for Opus 4.6) |
Implementation Reference
- tests/load/k6_gateway.js:207-217 (handler)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" ); }