Skip to main content
Glama

Last Price

compute_prices_batch

Price up to 100 requests in one call. Each item in requests is the same request compute_price takes: a context with a three-letter currency and optionally a product, current price, segment, geo and metadata, plus an optional function_id, routing preference, constraints and options. Every item is one metered call, drawn together from your prepaid balance, all or nothing: a balance short of the whole batch charges nothing. An item that does not price comes back as an error in its place and is given back. Send the same idempotency_key to retry safely: a repeat answers from the first answer and re-runs only the items that did not price. Needs a Last Price credential with batch price compute scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
requestsYesThe price requests, at most 100, answered in the same order.
idempotency_keyNoA new value for each batch you mean to run; send the same value to retry it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes far past the annotations: metered per-item billing, prepaid balance draw that is all-or-nothing ('a balance short of the whole batch charges nothing'), per-item failures returned in place and refunded, keyed retry semantics, required scope, and a 403 for unclaimed sandbox workspaces. This is exactly the cost/failure/auth context annotations cannot carry.

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?

Scope and batch limit are front-loaded, then billing, then error/retry, then auth — a sensible order with no filler. Some sentences are long and chain many clauses, which slows scanning slightly.

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?

With no output schema, the description still covers the result shape an agent needs: answers in the same order as requests, per-item errors returned in their slot, and replays answering from the first response. Cost, failure and auth preconditions are all stated.

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 baseline is 3; the schema already documents context, options, constraints, function_id, routing_preference and idempotency_key. The description adds some meaning by restating the item shape and by explaining idempotency_key usage intent, but does not add format or range detail beyond the schema (e.g. the 100-item cap is repeated from maxItems).

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, resource and hard scope ('Price up to 100 requests in one call') and explicitly anchors each item to the sibling 'compute_price takes', so an agent knows exactly what this batches. Distinguishable from compute_price, run_pricing_chain and contribute_price_data_batch 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 Guidelines4/5

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

Implies the selection rule well: use this for many requests, since each item is the same object compute_price accepts, and it explains the retry path via idempotency_key. No explicit 'do not use when' case (e.g. single request, or items spanning workspaces), which keeps it short of a 5.

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.

Resources