Skip to main content
Glama

Estimate the cost of a run

estimate_cost
Read-only

Estimate what an AI, verify, scrape or Flow run would cost, for a number of rows, for a list (for a Flow too, where Flows on lists are on), or (for a Flow) for the rows on a connected sheet. A Flow estimate also returns needed_to_start_cents, the balance a run needs to start; with spreadsheet_id it also returns output_columns and reused_columns: the columns the Flow would write (token to letter), and which of them already exist on the sheet. Uses the same calculation as the Sorzio add-on. For your workspace the estimate is what Sorzio will charge: $0.00 on an internal workspace, for AI on your own key on Pro or Scale, and for Verify on your own No2Bounce key on Scale (charge_note says why). needed_to_start_cents is the balance the run holds while it runs, which can be more than the estimate; the unused part is returned when the run ends. A scrape estimate is the most the run can cost; usual_cost_cents is what most runs are charged. Signed out, estimates are list prices. Free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>"
    },
    "name": "estimate_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNoKind flow only. Tab name. Defaults to the first tab.
kindYes
rowsNoRow count. Up to 25,000 for ai, verify and scrape, and up to 50,000 for a Flow.
modelNoModel id from list_models. Defaults to openai/gpt-4o-mini for kind ai when omitted.
promptNo
flow_idNoRequired for kind flow. The Flow's flow_id from list_flows.
list_idNoUse this list's row count instead of rows (for kind flow too, where Flows on lists are on). Rows a Flow removed are not counted.
header_rowNoKind flow only. Row number of the header. Defaults to 1.
web_searchNo
enrich_typeNo
input_columnsNoKind flow only. Maps a Flow input to a sheet header when the names differ, for example {"email": "Work email"}.
system_promptNo
spreadsheet_idNoKind flow only, instead of rows: the sheet id or full docs.google.com URL. The rows are counted on the Flow's input columns.
only_rows_whereNoWhen estimating a list run, count only the rows that match this filter.
scrape_providerNo
verify_providerNo
reasoning_effortNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds substantial behavior: workspace-specific pricing, $0.00 on internal workspaces, list prices when signed out, and the fact that needed_to_start_cents is a hold amount larger than the estimate with the remainder returned. That is real context beyond the structured fields, though it stops short of describing pagination or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is correctly front-loaded, and most clauses carry real information (charge_note, needed_to_start_cents caveat). But it is delivered as one long run-on paragraph with nested parentheticals like '(for a Flow too, where Flows on lists are on)', which makes it harder to scan than it needs to be.

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?

For a 17-parameter estimation tool with no output schema, the description does the important work: it explains the Flow return fields (needed_to_start_cents, output_columns, reused_columns), what the estimate represents per workspace, and scrape's usual_cost_cents vs maximum cost. Only the return shape for the non-Flow kinds is left thin.

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 coverage is only 53% across 17 parameters. The description clarifies the mode-selection parameters well (list_id vs rows vs spreadsheet_id, and the output_columns/reused_columns returned with spreadsheet_id), but leaves web_search, enrich_type, scrape_provider, verify_provider, prompt, and reasoning_effort with no added meaning. Some of those are self-describing enums, but the coverage gap is only partially compensated.

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 and resource ('Estimate what an AI, verify, scrape or Flow run would cost') and enumerates the three input modes (row count, list, connected sheet). The 'estimate' framing cleanly separates it from the run_ai/run_flow/run_scrape siblings that actually execute work.

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

Usage Guidelines3/5

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

Usage is implied through the input modes ('for a number of rows, for a list..., or for the rows on a connected sheet') and the closing 'Free', which hints this is a no-cost preview. However, it never says explicitly when to prefer an estimate over running, or which mode to choose when several are available.

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.