Skip to main content
Glama

Compare provider offers

offer_compare
Read-onlyIdempotent

Rank current provider offers for up to five canonical model slugs by the USD cost of your input/output token workload. Input tokens are uncached. Estimates use base-context rates and exclude long-context tiers, cache writes, batch discounts, and free-tier quotas. provider_slugs restricts the ranked offers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_slugsYes
input_tokensNo
output_tokensNo
provider_slugsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaYes
workloadYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / model_slugs / items / pattern
      Added value: +"^[a-zA-Z0-9._:-]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "properties": {
      +        "offers": {
      +          "items": {
      +            "properties": {
      +              "offer": {
      +                "properties": {
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "limits": {
      +                    "properties": {
      +                      "contextTokens": {
      +                        "anyOf": [
      +                          {
      +                            "minimum": 1,
      +                            "type": "integer"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "maxOutputTokens": {
      +                        "anyOf": [
      +                          {
      +                            "minimum": 1,
      +                            "type": "integer"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "contextTokens",
      +                      "maxOutputTokens"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "model": {
      +                    "properties": {
      +                      "name": {
      +                        "type": "string"
      +                      },
      +                      "slug": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "slug",
      +                      "name"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "prices": {
      +                    "properties": {
      +                      "cachedInputPerMillionTokens": {
      +                        "anyOf": [
      +                          {
      +                            "minimum": 0,
      +                            "type": "number"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "inputPerMillionTokens": {
      +                        "minimum": 0,
      +                        "type": "number"
      +                      },
      +                      "outputPerMillionTokens": {
      +                        "minimum": 0,
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "inputPerMillionTokens",
      +                      "outputPerMillionTokens",
      +                      "cachedInputPerMillionTokens"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "provenance": {
      +                    "properties": {
      +                      "checkedAt": {
      +                        "format": "date",
      +                        "type": "string"
      +                      },
      +                      "sourceUrl": {
      +                        "format": "uri",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "sourceUrl",
      +                      "checkedAt"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "provider": {
      +                    "properties": {
      +                      "name": {
      +                        "type": "string"
      +                      },
      +                      "slug": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "slug",
      +                      "name"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "routeType": {
      +                    "enum": [
      +                      "official",
      +                      "cloud",
      +                      "gateway",
      +                      "unverified"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "model",
      +                  "provider",
      +                  "routeType",
      +                  "prices",
      +                  "limits",
      +                  "provenance"
      +                ],
      +                "type": "object"
      +              },
      +              "workloadCostUsd": {
      +                "minimum": 0,
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "offer",
      +              "workloadCostUsd"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "offers"
      +      ],
      +      "type": "object"
      +    },
      +    "meta": {
      +      "properties": {
      +        "apiVersion": {
      +          "const": "v1"
      +        },
      +        "currency": {
      +          "const": "USD"
      +        },
      +        "tokenPriceUnit": {
      +          "const": "per_million_tokens"
      +        }
      +      },
      +      "required": [
      +        "apiVersion",
      +        "currency",
      +        "tokenPriceUnit"
      +      ],
      +      "type": "object"
      +    },
      +    "workload": {
      +      "properties": {
      +        "inputTokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "outputTokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "inputTokens",
      +        "outputTokens"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "meta",
      +    "workload",
      +    "data"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses the estimation model's limits: uncached input tokens, base-context rates, and exclusion of long-context tiers, cache writes, batch discounts, and free-tier quotas. This is exactly the kind of caveat an agent needs to interpret results correctly.

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?

Four sentences, front-loaded with the core action and cost basis before the caveats. Little waste, though the trailing provider_slugs sentence is thin and could be merged or dropped.

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?

An output schema exists, so return values need not be described, and the estimation caveats are well covered. The remaining gap is that default token values and their effect on estimates are never mentioned.

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 0%, so the description must compensate. It clarifies model_slugs (up to five canonical slugs) and provider_slugs (restricts the ranked offers), but says nothing about input_tokens/output_tokens beyond 'workload', leaving their large defaults (10M/2M) unexplained.

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 names a specific verb (rank) and resource (provider offers) plus the ranking dimension (USD cost of the input/output token workload). It is clearly distinguishable from siblings like model_detail or provider_list, which do not rank by cost.

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?

Usage is implied by the cost-ranking framing and the input/output token workload, but there is no explicit statement of when to prefer this over siblings such as model_detail or provider_list, and no exclusions or prerequisites are given.

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