Skip to main content
Glama

Compare AI API cost across models

compare_models
Read-onlyIdempotent

Compare monthly AI API costs across OpenAI, Claude and Gemini models for your SaaS workload, ranking each by cost per request, total monthly spend and gross margin.

Instructions

Run the same SaaS workload against every known OpenAI, Claude and Gemini model (or one provider) and rank them by monthly AI API cost, with cost per request, total monthly cost and gross margin. Token cost only: it does not judge output quality or latency.

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": "compare_models"
  }
}

Input Schema

NameRequiredDescriptionDefault
usersNoMonthly active users.
providerNoOnly compare models from this provider.
use_caseNoPreset workload to start from: chat (AI chat assistant), support (support bot), summarizer, documents (document processing). Any number you pass overrides the preset. Default: chat.
input_tokensNoAverage input (prompt) tokens per request.
output_tokensNoAverage output tokens per request.
price_per_userNoSubscription price per user per month in USD, used for revenue and margin.
cached_input_pctNoShare of input tokens served from the prompt cache, 0 to 100.
requests_per_userNoAI requests per user per month.
fixed_monthly_costNoFixed monthly cost in USD, such as hosting and team tools.
extra_cost_per_requestNoOther metered cost per request in USD, such as search, tool calls or storage. Default 0.
variable_cost_per_userNoOther variable cost per user per month in USD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), so the description's job is to add context. It does so: it enumerates the computed metrics and draws a clear capability boundary (token cost only, no quality or latency judgement). It does not state currency or units of the ranking, though the schema implies USD.

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?

Two sentences, zero filler, with the core capability front-loaded and the limitation trailing as a qualifier. Every clause carries information an agent can act on.

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?

With 11 optional parameters but full schema coverage and no output schema, the description covers the essentials by describing both the ranking output and the exclusion of quality and latency. It could still say more about how presets interact with explicit overrides, but nothing needed to call the tool correctly is missing.

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 100%, so every parameter already carries a description, including the enums for provider and use_case. The description paraphrases only the provider filter ("or one provider") and adds nothing about defaults, preset override behavior, or which inputs drive margin versus cost. Baseline 3 is correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource: run the same SaaS workload across all OpenAI/Claude/Gemini models and rank by monthly API cost. It also names the outputs (cost per request, monthly cost, gross margin). It never mentions the siblings estimate_cost or list_models, so an agent must infer the boundary itself.

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?

Limits scope explicitly with "Token cost only: it does not judge output quality or latency," which tells the agent what the tool is not for. It never says when to prefer it over estimate_cost or list_models, however, and leaves the preset-vs-explicit-parameter workflow to the schema.

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

Deploy Server

Other Tools