Skip to main content
Glama

Estimate the cost of a Synap call

synap_estimate_cost
Read-onlyIdempotent

Work out what a chat completion would cost on Synap from token counts, using the live price list. Use this before synap_chat_completion when budget matters, or to compare models for a job. Free, read-only, needs no API key and runs no model. Returns {model, prompt_tokens, completion_tokens, prompt_usd, completion_usd, total_usd, pricing}. It is an estimate: the real charge uses the token counts the model reports afterwards. Auto-routing ids such as "synap-v1" have no fixed price and return an error saying so.

Input Schema

NameRequiredDescriptionDefault
modelYesModel id exactly as returned by synap_list_models.
prompt_tokensYesTokens you will send (system + conversation). Roughly 4 characters of English per token.
completion_tokensNoTokens you expect back. Use your max_tokens for a worst case. Defaults to 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds real behavioral context beyond them: it is free, needs no API key, runs no model, is an estimate that may differ from the post-hoc real charge, and errors on auto-routing ids. It also enumerates the returned fields, which matters because there is no output schema.

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?

Four tight sentences, front-loaded with what the tool does, then when to use it, then the return shape and the estimate caveat. The return-field list earns its place precisely because no output schema exists.

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?

For a pure read-only estimation tool with no output schema, the description supplies everything an agent needs: purpose, timing, cost/free status, auth-free nature, return shape, precision caveat, and error condition.

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 all three parameters (model, prompt_tokens, completion_tokens) are already documented with units, minimums, and guidance on using max_tokens for a worst case. The description adds no parameter-level detail beyond the schema, so the 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?

States a precise verb+resource (estimate the cost of a chat completion on Synap) and the input basis (token counts, live price list). It is clearly distinguishable from synap_chat_completion, synap_list_models, and synap_get_model without opening any 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?

Gives explicit usage conditions: use before synap_chat_completion when budget matters, or to compare models for a job. It also names the failure case (auto-routing ids like synap-v1 have no fixed price and error out), which routes the agent correctly for the edge scenario.

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.