Skip to main content
Glama

Estimate the credit cost

estimate_cost
Read-only

Work out how many credits a submission will cost and whether the balance covers it. Nothing is submitted and no credits are spent. Send the URLs (best: invalid and duplicate URLs are counted exactly) or just url_count. Call this before submit_urls and show the result to the user.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
typeNo"normal" costs 1 credit per URL. "instant" costs 10 credits per URL and is for important pages. Instant needs at least one credit purchase.normal
urlsNoThe URLs you plan to submit. Use this or url_count.
url_countNoNumber of URLs, if you don't want to send the list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/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, and the description reinforces this with "Nothing is submitted and no credits are spent" — consistent, not contradictory. It adds the useful caveat that invalid and duplicate URLs are still counted, but says nothing about rate limits, response shape, or what happens if both urls and url_count are supplied.

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 short sentences, front-loaded with the outcome the tool produces, then the non-mutation guarantee, then the call pattern. Every sentence carries distinct information and none restates the title.

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 3-parameter read-only estimator with no output schema, the description covers what is computed (cost and balance sufficiency), the side-effect profile, and the intended call sequence. The only gap is the exact result shape, which the phrase "whether the balance covers it" only gestures at.

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%, so the baseline is 3; the description earns an extra point by clarifying the tradeoff between the two input modes ("Send the URLs ... or just url_count") and by noting that invalid and duplicate URLs are counted exactly, which affects the caller's choice of which parameter to use.

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?

"Work out how many credits a submission will cost and whether the balance covers it" names a specific verb (estimate) and resource (credit cost) plus a second output dimension (balance sufficiency). The sentence "Nothing is submitted and no credits are spent" explicitly separates it from the sibling submit_urls, so an agent can choose between them without opening either 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?

It states the ordering constraint directly: "Call this before submit_urls and show the result to the user." That is an explicit when-to-use plus the action to take with the result, and it names the sibling alternative rather than leaving routing to 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.

Resources