Skip to main content
Glama

SMS and WhatsApp Messaging

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive; the description adds behavior beyond that by explaining exact vs min/max pricing and explicitly disclaiming an accuracy guarantee ('does not promise an accuracy percentage - check cost_range'). It also states cost and latency characteristics, which the agent would otherwise have to discover by calling it.

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?

Information is front-loaded and segmented into examples and usage rules, with each section earning its place. Despite covering behavior, examples, when/not-to-use, and cost/latency, it avoids redundancy.

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?

Even without an output schema, the description tells the agent what the response contains (cost estimate, latency, success probability, exact vs range, cost_range caveat) and how to invoke it with both required parameters. The inclusion of examples, caching guidance, and operational characteristics makes it a complete quick-reference for correct invocation.

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?

The schema describes params as 'the same request body you would pass to the operation' but leaves operation undefined. The description compensates with concrete examples mapping user intent to operation and params values. It still doesn't enumerate valid operation names, so the agent must rely on context or other operation knowledge.

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 opens with a specific verb ('Return') and names the three outputs (cost estimate, latency estimate, success-probability estimate) for a proposed call before execution. It also clarifies exact vs range pricing, so the agent knows what kind of answer to expect. This clearly differentiates it from execution-oriented sibling tools like send_message.

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?

WHEN TO USE explicitly ties the tool to budget-constrained decisions before any operation. WHEN NOT TO USE warns against hot-loop calls and gives a concrete cache duration of 60 seconds. This is direct guidance with no reliance on inference.

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.1/5.0
Disambiguation4/5

Most tools have clearly distinct roles: compliance preflight, messaging, transactional sends, directory lookup, conversation/status/outcome retrieval, cost preview, and health check. The main ambiguity is between send_message and send_transactional_confirmation, both of which can handle booking confirmations and transactional message types, though the descriptions do provide guardrails.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: check_compliance, find_business, get_conversation, get_outcome, get_status, preview_cost, send_message, verify_business. Even longer names like send_transactional_confirmation stay within the same convention. No mixed casing or inconsistent verb styles.

Tool Count5/5

10 tools is well-scoped for a business messaging platform. Each tool covers a distinct aspect: search/verify businesses, check compliance, send messages, preview costs, and inspect async results. The count is neither bloated nor thin for the stated purpose.

Completeness4/5

The core workflows are covered: find/verify a business, check compliance, send messages, retrieve conversations, and get operation outcomes. Minor gaps exist, such as no explicit tool for managing consent records and no webhook configuration tool, but agents can still complete primary messaging tasks without dead ends.