Skip to main content
Glama

Estimate the cost of a call

estimate_cost
Read-onlyIdempotent

FREE pre-call estimate. Pass the paid tool you are about to call and exactly its arguments; returns max_tokens — the most that call can debit at the account's current balance under the current pricing (filters × monthly step), with the factors used. Call it BEFORE every paid call and tell the user the number. For searches it is an upper bound: only delivered rows are charged, undelivered ones are refunded. For the Startups tools (search_startups, get_startup, enrich_startups, get_startup_ads and the rest) it returns max_objects (Startups objects: 1 per row, 5 per company card) and the subscription's objects_remaining this month instead of MCP credits. Does not run the tool and does not consume quota.

Input Schema

NameRequiredDescriptionDefault
toolYesthe paid tool you are about to call, e.g. search_ads
argumentsNoexactly the arguments you will pass to that tool

Output Schema

NameRequiredDescriptionDefault
freeNo
noteNo
toolNo
unitNo
usedNo
errorNoPresent only when isError is true: machine-readable failure. The human explanation stays in content.
paramsNoRequest parameter echo: applied = parameters that shaped this result; normalized = parameters rewritten before applying (alias, type coercion, resolved id); ignored = parameters that were accepted but NOT applied, with the reason.
filtersNo
max_unitsNo
remainingNo
max_tokensNo
multiplierNo
unit_priceNo
addon_hintsNoAdd-on modules that have additional data for objects of this result (no prices, no paid values). subscription_status=active: the account has the module — use its normal path. Do not push a purchase the user did not ask about.
max_objectsNo
upper_boundNo
filter_factorNo
consent_statusNo
threshold_factorNo
objects_remainingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / addon_hints
      Added value: +{
      +  "description": "Add-on modules that have additional data for objects of this result (no prices, no paid values). subscription_status=active: the account has the module — use its normal path. Do not push a purchase the user did not ask about.",
      +  "items": {
      +    "properties": {
      +      "available_data_types": {
      +        "description": "kinds of data the module confirmedly has for the object",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "info_url": {
      +        "description": "the object (or its limited breakdown) inside the module on spytrend.com",
      +        "type": "string"
      +      },
      +      "module": {
      +        "description": "nutra | crypto | web2app | search_arb | startups",
      +        "type": "string"
      +      },
      +      "object_id": {
      +        "description": "the ad id, or the site domain for site rows",
      +        "type": "string"
      +      },
      +      "preland_downloadable": {
      +        "description": "Nutra / Crypto: the saved pre-lander can be downloaded in the module",
      +        "type": "boolean"
      +      },
      +      "subscription_status": {
      +        "description": "active | not_connected",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint/destructiveHint=false, it discloses that the tool does not execute the target and consumes no quota, that the estimate is a maximum bounded by current balance, that the pricing is 'filters × monthly step', and that undelivered search rows are refunded. These are the exact behavioral facts needed to trust and quote the number.

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 FREE and the return value; every sentence carries content (refunds, pricing formula, Startups exception, non-execution). Slightly dense, with one heavily parenthesized sentence, but 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?

Covers the tricky parts an agent would otherwise get wrong: what the number means (a max/upper bound, not a charge), the refund rule for undelivered rows, and the alternate accounting model for Startups tools. Output schema exists, so return-shape detail is appropriately left out.

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% and already documents both parameters with an example, so the description only needs to reinforce. It does add useful framing — the arguments must be *exactly* those of the upcoming call, and it enumerates which tool families expect max_objects rather than max_tokens — which goes slightly beyond the schema text.

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 ('pre-call estimate' of a tool call's cost) and immediately names the return value (max_tokens) plus its Startups variant (max_objects). An agent can distinguish it from get_usage or any paid search sibling without opening a schema.

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?

'Call it BEFORE every paid call and tell the user the number' gives an explicit trigger and a required follow-up action. It also scopes the behavior per tool family (searches = upper bound, Startups tools = objects model), so the agent knows what changes when the target tool differs.

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.