Skip to main content
Glama

estimate_usage

Predict whether a future meter spend would be rejected with 402 (no active plan) or 429 (hard cap) before calling a write or search tool. Returns {estimate} with allowed, would402, amount, and budget. For kind=rag_index, pass textLength or byteLength to estimate chunk count instead of amount. Read only: no writes, no quota spend, no email. Use get_usage view=budget to see what is already remaining. Use before manage_kv, index_document, search_documents, or read_inbox_message action=raw or action=attachment. Same behavior as the former budget_estimate tool. ACL is not consulted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesMeter to preflight. kvp_ops: key-value ops. storage_bytes: stored bytes. rag_index: document indexing chunks. rag_query: semantic search. inbound_email: received messages. outbound_http: scheduled HTTPS attempts.
amountNoUnits to preflight. Default 1. For kind=rag_index, ignored when textLength or byteLength is set.
byteLengthNoByte length used to estimate rag_index chunks when textLength is omitted. Only for kind=rag_index.
textLengthNoCharacter length used to estimate rag_index chunks. Only for kind=rag_index. Omit to use amount.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses that the tool is read-only, performs no writes or quota spend, sends no email, does not consult ACL, and returns allowed/would402/amount/budget. The 402/429 outcomes and legacy budget_estimate equivalence are also explained.

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 dense, front-loaded with the purpose and return shape, and every sentence adds actionable context: return fields, rag_index special case, safety profile, alternative tool, target tools, and migration note. There is no filler.

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

Completeness5/5

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

For a preflight estimator with no output schema and no annotations, the description supplies the return keys, usage context, behavioral constraints, and sibling routing. An agent has everything needed to select and invoke it correctly.

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?

Schema description coverage is 100%, so the schema already documents all four parameters thoroughly, including kind enum values and the rag_index handling of textLength/byteLength. The description's rag_index note is largely redundant with the schema, so the baseline of 3 is appropriate.

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?

States a specific verb and resource: predict whether a future meter spend would be rejected with 402 or 429 before calling a write or search tool. It distinguishes itself from get_usage by naming that sibling and from write/search siblings by naming them as targets to preflight.

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 says when to use it (before manage_kv, index_document, search_documents, or read_inbox_message raw/attachment) and names get_usage view=budget as the alternative for seeing remaining budget. It also clarifies it is read-only and does not spend quota.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.