Skip to main content
Glama
extentos

extentos

getGatewayUsage

Read managed-AI-gateway usage and exact cost for a project, with totals, per-model breakdown, and credit balance. Use for spend reports, identifying dominant models, and grounding model choices in real cost.

Instructions

Read account-scoped managed-AI-gateway usage + exact cost for a project over a recent window. Returns { window, totals, byModel, creditBalanceUsd }: totals carry token counts, response count, and the exact list-price USD cost from the billing ledger; byModel breaks the same down per model (biggest first). METADATA ONLY — token counts and cost, never transcripts/audio/prompt content. Only managed-gateway + dashboard-vault-BYOK sessions are metered; a code-direct setOpenaiApiKey() bypass goes straight to OpenAI and is invisible here. Account-scoped + read-only — requires a linked Extentos account (a 401 returns account_required, run extentos-mcp login). USE to report spend, spot the dominant model, or ground a model-choice recommendation in real cost (pair with getAssistantConfig). DON'T USE for live per-event traces (use getEventLog) or to change config (use setAssistantConfig).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoLook-back window in days. Default 30. Clamped to [1, 365]. Bucketing auto-scales (hour ≤2d, day ≤92d, week ≤183d, else month).
appPackageYesThe app's package / bundle id (project_install_id).
Behavior5/5

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

Discloses read-only nature, required linked account (401 error), metadata-only (no transcripts/audio), and what is/isn't metered. Since no annotations exist, description fully covers behavioral traits.

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?

Front-loaded with main purpose, returns format explained, then constraints and usage guidelines. Slightly long but every sentence adds new information; no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Explains return object shape (window, totals, byModel, creditBalanceUsd), error case (401), and pairing suggestion. No output schema needed; missing only minor details like rate limits or pagination (likely not needed).

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?

Schema coverage is 100% but description adds value: default value for 'days' (30), bucketing auto-scaling rules, clarifies 'appPackage' as project_install_id. Exceeds baseline 3.

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

Purpose5/5

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

Clearly states verb 'Read' and resource 'account-scoped managed-AI-gateway usage + exact cost'. Distinguishes from siblings by specifying managed-gateway scope and contrasting with direct OpenAI calls.

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

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides USE cases (report spend, dominant model, cost-driven recommendation) and DON'T USE cases (live traces → getEventLog, config changes → setAssistantConfig), with sibling names.

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/extentos/mcp-server'

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