Skip to main content
Glama
zhaoyue722

LLM Usage & Cost Tracker

compare_providers

Compare LLM providers and models by projected cost for a given workload. Ranked by absolute cost, with relative cost percentages against the cheapest option.

Instructions

Project the cost of a hypothetical workload across providers/models.

Returns models ranked by absolute cost ascending, with relative_cost_pct measured against the cheapest entry (cheapest = 100%). models, if given, restricts the comparison to those model names. Cost is computed from input/output tokens only; RankedEntry.notes is always None in v1 (the field is retained for future per-row caveats like "tiered pricing approximated").

include_snapshots=False (the default) family-dedups the ranked list: rows sharing both a model-family root (gpt-5-minigpt-5-mini-2025-08-07) AND an identical projected cost collapse to one representative, with RankedEntry.variant_count recording how many catalog rows the entry stands for. Set include_snapshots=True to see every catalog row (each with variant_count=1) — useful when comparing snapshot-by-snapshot pricing for production pinning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelsNo
include_snapshotsNo
expected_input_tokensYes
expected_output_tokensYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rankedYes
Behavior5/5

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

With no annotations provided, the description carries full burden and does so thoroughly. It explains the output format (ranked by absolute cost, relative_cost_pct, variant_count), dedup behavior, snapshot inclusion, and that 'notes' is always None in v1. No behavioral traits are hidden.

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?

The description is slightly verbose but front-loads the main purpose. Each sentence adds value, though some details (like 'notes is always None') could be omitted or moved to an output schema. Overall structured well.

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?

Given the tool's complexity, the description covers essential aspects: input parameters, dedup logic, and output ranking. An output schema exists (though not fully shown), and the description complements it. Minor gaps: no mention of error cases or rate limits.

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 description coverage is 0%, but the description adds meaning: 'models' restricts comparison, 'include_snapshots' controls dedup, and token parameters are implied. However, it does not explicitly restate the required token parameters' roles, though they are self-explanatory from their names.

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 clearly states the tool's purpose: 'Project the cost of a hypothetical workload across providers/models.' It uses a specific verb ('Project') and resource ('cost'), and distinguishes from siblings like 'list_providers' by focusing on cost projection and ranking.

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?

The description provides clear context on when to use the tool (for cost projection) and explains options like 'include_snapshots' and 'models'. However, it does not explicitly differentiate from sibling tools such as 'get_pricing' or 'recommend_provider', leaving some ambiguity about when to choose this tool over alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhaoyue722/llm-usage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server