Skip to main content
Glama

estimate_credits

Calculate the maximum credits a request can reserve before starting extractions, batches, or schedules with large limits or many targets, using live pricing; free and read-only.

Instructions

Work out the most credits a request can hold before you start it, using the live price list. Free and read-only; nothing runs. Use it before create_extraction, create_batch or create_schedule with large limits or many targets. Returns normalized_limit, maximum_reserved_credits_per_target and maximum_reserved_credits_total; actual billing counts only delivered results and releases the rest.

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": {
      "platform": "<platform>",
      "operation": "<operation>"
    },
    "name": "estimate_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results to collect per target, from 1 up to the operation's max_results in discover_platforms. Default 12. Single-item operations (profile, post, video, transcript, playlist, adlibrary_ad, adlibrary_ad_transcript, profile_analytics) always count as 1; Instagram highlights, highlight_items and stories ignore limit. Example: 50
platformYesPlatform name from discover_platforms: instagram, tiktok, youtube, x or facebook. Example: instagram
operationYesOperation name from discover_platforms for the chosen platform, such as profile, posts, comments, followers, hashtag, search or adlibrary_search. Example: posts
target_countNoHow many targets the same request will cover, 1-100, as in create_batch or create_schedule. Default 1. Example: 20
include_postsNoOnly for operation profile: also return this many recent posts, 0 up to the posts operation's max_results (200 at most; 50 at most in extract_now), billed at the posts rate. Default 0. Example: 12

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • addedInput schema / properties / include_posts / description
      Added value: +"Only for operation profile: also return this many recent posts, 0 up to the posts operation's max_results (200 at most; 50 at most in extract_now), billed at the posts rate. Default 0. Example: 12"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum results to collect per target, from 1 up to the operation's max_results in discover_platforms. Default 12. Single-item operations (profile, post, video, transcript, playlist, adlibrary_ad, adlibrary_ad_transcript, profile_analytics) always count as 1; Instagram highlights, highlight_items and stories ignore limit. Example: 50"
    • changedInput schema / properties / operation / description
      Previous value: -"Operation returned by discover_platforms"New value: +"Operation name from discover_platforms for the chosen platform, such as profile, posts, comments, followers, hashtag, search or adlibrary_search. Example: posts"
    • changedInput schema / properties / platform / description
      Previous value: -"Platform returned by discover_platforms"New value: +"Platform name from discover_platforms: instagram, tiktok, youtube, x or facebook. Example: instagram"
    • addedInput schema / properties / target_count / description
      Added value: +"How many targets the same request will cover, 1-100, as in create_batch or create_schedule. Default 1. Example: 20"
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it declares the tool free and read-only, states that nothing is executed, enumerates the three returned fields, and explains the crucial billing caveat that only delivered results are charged and the remainder released. This is behavior an agent could not infer from schema alone.

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?

Three sentences, each earning its place: purpose and cost model first, invocation guidance second, return shape and billing semantics last. No redundancy and the most decision-relevant facts are front-loaded.

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?

There is no output schema, yet the description lists the three returned fields and explains the reservation-versus-billing distinction, so an agent knows what to do with the response. Combined with the explicit prerequisites and sibling references, nothing essential is missing for a read-only estimator.

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 schema already documents every parameter in depth, including defaults, bounds and per-operation caveats. The description only adds a loose framing of limit and target_count as 'large limits or many targets' and does not clarify the interaction between limit, target_count and include_posts beyond what the schema states. Baseline 3 applies.

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: 'Work out the most credits a request can hold', scoped by 'using the live price list'. It is clearly a pre-flight estimation tool, distinguishable from siblings like get_credit_usage (actual spend) and create_extraction (execution).

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?

It explicitly states when to invoke it: 'Use it before create_extraction, create_batch or create_schedule with large limits or many targets', naming the concrete sibling tools it precedes. It also sets the precondition that nothing runs and no cost is incurred, removing hesitation about calling it speculatively.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.