Skip to main content

ME_TOOLS_SQL

Constant ME_TOOLS_SQL 

Source
pub const ME_TOOLS_SQL: &str = "
SELECT server_id,
       coalesce(tool, method)     AS tool,
       count(*)                   AS calls,
       sum(result_tokens)::BIGINT AS result_tokens,
       sum(context_cost_usd)      AS context_cost_usd
FROM mcp_events
WHERE ts >= $1 AND ts <= $2 AND person = $3
GROUP BY server_id, coalesce(tool, method)
ORDER BY context_cost_usd DESC, tool
LIMIT 50";
Expand description

Per-person MCP totals for /me (“your tools”).