Skip to main content
Glama

preview_cost

Read-onlyIdempotent

Return an expected cost estimate, latency estimate, and success-probability estimate for a proposed call before execution. Returns the exact price when it is fixed, and a min/max range when the cost depends on channel or outcome. It does not promise an accuracy percentage - check cost_range.

EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "How much will this SMS cost me?" -> call preview_cost({"operation": "send_message", "params": {"preferred_channel": "sms"}}) user: "Estimate the cost of booking via voice fallback" -> call preview_cost({"operation": "schedule_appointment", "params": {"preferred_channel": "voice"}})

WHEN TO USE: Use before any operation when the agent is operating under a budget constraint and needs to decide whether to proceed. WHEN NOT TO USE: Do not use in a hot loop — cache the result for at least 60 seconds if repeating the same preview. COST: free - no key required LATENCY: ~100ms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesThe same request body you would pass to the operation
operationYes

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already signal read-only, idempotent, and non-destructive behavior, so the description need not repeat those. It adds valuable behavioral details: the output includes latency and success-probability, the cost may be a range, and it explicitly refuses to promise an accuracy percentage, directing the user to check cost_range. It also discloses the tool is free and has ~100ms latency, providing operational expectations beyond the schema.

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 well-organized with clear sections (main description, examples, when to use/not use, cost/latency). Despite being longer than average, every section adds value—the examples illustrate parameter usage, the usage sections prevent misuse, and cost/latency inform operational decisions. No fluff; all content earns its place.

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?

Given the tool has no output schema, the description fully covers what the agent will receive (cost, latency, success probability, exact or range). It also provides caching advice to prevent redundant calls. For a simple preview tool with only two parameters, this is complete and leaves no critical gap for an agent to call it correctly.

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 50% (params has a description, operation does not). The description compensates with a concrete example showing both parameters ('operation': 'send_message', 'params': {'preferred_channel': 'sms'}), clarifying that operation is the operation name and params is the request body. While it does not enumerate all possible values, the example makes the parameter roles clear, which is sufficient given the schema's minimal structure.

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?

The description states a specific verb (Return), a clear resource (cost estimate, latency estimate, and success-probability estimate for a proposed call), and the scope (before execution). It also distinguishes exact pricing from range pricing, making the purpose unambiguous and clearly distinct from sibling tools like screen_sanctions or check_compliance.

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?

The description provides explicit 'WHEN TO USE' (before budget-constrained decisions) and 'WHEN NOT TO USE' (avoid hot loops, cache results for 60 seconds) instructions. This goes beyond vague context and gives actionable guidance for when the tool should be invoked and when to avoid it.

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.

TDQS

A4.4/5.0
Disambiguation3/5

Most tools target distinct actions, but screen_sanctions and map_trade_restriction both screen parties against OFAC/EU/UK sanctions lists, so the same party-screening request could plausibly route to either. check_compliance also uses a broad 'compliance' name, though its messaging-specific parameters help separate it. The detailed descriptions largely mitigate the ambiguity, but the overlap is real.

Naming Consistency4/5

Seven of eight tools follow a clear snake_case verb_noun pattern (check_compliance, get_status, screen_sanctions, verify_company_record). self_test breaks the pattern as a noun-style name rather than an imperative verb_noun, but it remains lowercase and readable. Overall naming is predictable and consistent.

Tool Count5/5

Eight tools is a well-scoped size for a compliance/screening service, and each tool has a distinct operational role. The supporting helpers (get_status, get_outcome, preview_cost, self_test) are justifiable parts of the full workflow rather than padding.

Completeness4/5

Core due-diligence workflows are covered: sanctions screening, trade-restriction mapping, company verification, and messaging-compliance pre-flight. Notable exclusions such as the UN Consolidated List, PEP/adverse media, and bulk screening are explicitly disclosed rather than hidden, so agents can work around them. The gaps are more like optional enhancements than dead ends.