Skip to main content
Glama

Models MCP

CI Catalog drift

Search, compare, and inspect AI models by pricing, context window, and capabilities. An MCP server over the models.dev catalog (models.dev/api.json), so your agent always has current model data without you hand-maintaining a list.

models.dev itself doesn't ship an MCP server, just a JSON API and a TypeScript SDK for reading it. This fills that gap.

Runs two ways from the same tool code:

  • stdio (src/index.ts) for local MCP clients

  • Cloudflare Worker (src/worker.ts) as a remote Streamable HTTP endpoint at /models-mcp

Tools

Tool

What it does

list_providers

Lists every provider (anthropic, openai, google, ...) with model counts

find_models

Filters models by name, provider, min context window, max input cost, or capability flags (reasoning, tool_call, attachment)

get_model

Full metadata for one model, by provider/model id

compare_models

Side-by-side diff of 2-6 models on pricing, context, and capabilities

top_models

Ranks models by cheapest input/output price, largest context, context-per-dollar, or newest release; supports the same filters as find_models

estimate_cost

Computes the USD cost of a request from a model's published per-million-token rates, including cache read/write components

get_provider

Provider metadata: display name, AI SDK package, API base URL, docs link, and a compact list of its models

refresh_catalog

Forces a re-fetch, bypassing the 1-hour cache

All search-style tools (find_models, top_models) share one filter schema, so filter semantics are identical everywhere. Ranking and estimation exclude models that lack the relevant data (e.g. unpriced local models) rather than guessing.

Related MCP server: Index9 MCP Server

Install

npm install
npm run build

Run standalone over stdio (for testing)

npm start

It speaks MCP over stdio, so you won't see much directly; use the MCP Inspector to poke at it:

npx @modelcontextprotocol/inspector node dist/index.js

Host on Cloudflare Workers

The Worker entry (src/worker.ts) serves the same tools over Streamable HTTP at /models-mcp, with:

  • Catalog caching in the Workers Cache API (caches.default) with a 1-hour TTL, shared across requests and isolates.

  • Per-IP rate limiting via a Workers rate limiting binding: 60 requests/minute per IP, enforced per Cloudflare location. Excess requests get 429 with Retry-After: 60.

# local dev at http://localhost:8787/models-mcp
npm run dev:worker

# deploy
npm run deploy

After deploy, the canonical endpoint is https://mcp.dosa.dev/models-mcp. The generated https://models-mcp.<your-subdomain>.workers.dev/models-mcp URL stays live as a fallback.

Point MCP clients at it:

Claude Code:

claude mcp add --transport http models-mcp https://mcp.dosa.dev/models-mcp

Generic client config (anything that speaks Streamable HTTP):

{
  "mcpServers": {
    "models-mcp": {
      "url": "https://mcp.dosa.dev/models-mcp"
    }
  }
}

For stdio-only clients (Claude Desktop), bridge with mcp-remote:

{
  "mcpServers": {
    "models-mcp": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.dosa.dev/models-mcp"]
    }
  }
}

No API keys required anywhere. All data comes from the public models.dev/api.json endpoint.

Try it out

With the dev server running (npm run dev:worker), the endpoint is http://localhost:8787/models-mcp.

Quick curl (MCP initialize):

curl -X POST http://localhost:8787/models-mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"manual","version":"1.0"}}}'

Expect an SSE response with serverInfo.name: "models-mcp".

MCP Inspector (best for poking at tools interactively):

npx @modelcontextprotocol/inspector

Set Transport Type to Streamable HTTP and URL to http://localhost:8787/models-mcp, then call tools from the UI.

Claude Code against the local server:

claude mcp add --transport http models-mcp-local http://localhost:8787/models-mcp

Then ask it something like "which anthropic models cost under $1 per million input tokens?" and watch it reach for find_models.

Rate limiting: fire 61 rapid requests at the endpoint and request 61 onwards returns 429 with Retry-After: 60.

Things worth trying in the Inspector:

  • find_models with combined filters, e.g. maxInputCost: 0.5 together with minContext: 200000

  • get_model with a bare id like gpt-5.2 (resolves) and with a nonsense id (clean tool error)

  • compare_models with one invalid id mixed in (it lands under notFound)

  • The first call fetches the live catalog (~200ms); repeat calls are cache hits

Tests

npm test

Covers the catalog client (flattening, TTL caching, force refresh, stale-on-failure fallback, id resolution) and all eight tools end-to-end through a real MCP client session over an in-memory transport.

Notes on the data

  • The catalog is cached for 1 hour: in the Workers Cache API when hosted, in process memory over stdio. Call refresh_catalog to force an update. If a refetch fails, the last good catalog keeps being served and refresh_catalog reports servedStale: true so you can tell.

  • A daily GitHub Actions workflow (Catalog drift) fetches the live api.json and sanity-checks it against the flattening logic, since models.dev publishes no versioned schema. It opens a catalog-drift issue if upstream changes shape. Run it locally with npm run build && npm run test:live.

  • models.dev doesn't publish a versioned schema for consumers, so the types in src/types.ts are intentionally loose (index signatures preserve any fields not explicitly typed).

  • Model ids follow the provider/model convention used by the AI SDK and OpenCode, e.g. anthropic/claude-sonnet-4-5. get_model and compare_models also accept a bare model id when it names exactly one model across all providers; if the bare id is ambiguous (common with aggregator providers mirroring first-party models), the tool errors with the list of candidate provider/model ids instead of silently picking one. get_provider emits full provider/model ids so its output round-trips through get_model unchanged.

Possible extensions

  • A list_facets tool (modalities, tokenizers) similar to what other model-catalog MCPs expose.

  • A test_model tool that makes a live call through whichever provider key you have configured, for latency/cost sanity checks.

  • OAuth or Cloudflare Access in front of the Worker, if you want it private.

Available Tools

8 tools
compare_modelsCompare modelsA

Diff 2-6 models side by side on pricing, context window, and capabilities. Accepts 'provider/model' ids, or bare model ids when unambiguous across providers. Ids resolving to the same model are compared once.

ParametersJSON Schema
NameRequiredDescriptionDefault
idsYes2-6 model ids in 'provider/model' form, e.g. ['anthropic/claude-sonnet-4-5', 'openai/gpt-5.2'].

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden, and it adds meaningful details: id resolution rules ('bare model ids when unambiguous') and deduplication behavior ('Ids resolving to the same model are compared once'). It does not describe the output format or explicitly state that this is a read-only operation, but the comparison semantics are clear enough for a tool of this simplicity.

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 tight sentences with no filler. The core purpose is front-loaded, and the second sentence efficiently handles edge cases around id formatting and deduplication. Every clause earns its place.

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 one-parameter tool with no output schema, the description covers the essential usage details: accepted inputs, count limits, and duplicate handling. The main gap is the lack of a brief mention of what the returned comparison looks like, but 'diff side by side' already strongly implies a comparative output.

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 schema already documents the array shape and requirement. The description adds value beyond the schema by explaining two resolution behaviors: bare ids are accepted when unambiguous, and duplicate model ids are compared only once. This makes the semantics of the ids parameter materially clearer.

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 opens with a specific verb, 'Diff', and a precise resource scope: '2-6 models side by side' on defined dimensions like pricing, context window, and capabilities. This clearly differentiates compare_models from single-model tools like get_model and broad catalog tools like top_models.

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 gives clear context for when to use the tool: whenever an agent needs to compare multiple models side by side. It also provides important input-usage guidance about provider-prefixed ids and bare ids. However, it does not explicitly name alternatives or state when not to use it versus find_models or get_model.

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

estimate_costEstimate costA

Estimate the USD cost of a request to one model from its published per-million-token rates. Use get_model first if you need to pick an id.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesModel id, e.g. 'anthropic/claude-sonnet-4-5' or 'gpt-5.2'.
inputTokensNoNumber of prompt/input tokens.
outputTokensNoNumber of completion/output tokens.
cacheReadTokensNoNumber of cached-input tokens read at the cache-read rate.
cacheWriteTokensNoNumber of tokens written to cache at the cache-write rate.

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the calculation is an estimate based on published rates, implying a deterministic read-only computation. However, it doesn't mention caveats like rate staleness, unsupported model IDs, or whether the operation requires network access. This is a baseline level of transparency, not a rich one.

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 with zero waste. The main action is front-loaded, and the sibling pointer is a short, necessary clause. Every sentence earns its place.

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 low-complexity estimator with a fully documented schema, the description covers the core purpose and the one key prerequisite (use get_model). It lacks an explicit return-value description, but 'estimate the USD cost' implies the result is a monetary value. The 'get_model first' note is a valuable cross-reference that completes the context.

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% with clear descriptions for all five parameters, so the description doesn't need to repeat them. It does add the useful context that rates are per-million-token, which clarifies why the default inputTokens is 1,000,000. This is a small addition beyond the schema, keeping the score at the baseline.

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 ('Estimate'), a precise object ('USD cost of a request to one model'), and the calculation basis ('published per-million-token rates'). It clearly distinguishes this from the sibling catalog tools like get_model and compare_models by focusing on cost estimation for a single model.

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 explicitly tells the agent to 'Use get_model first if you need to pick an id', which is a clear prerequisite and routes the agent to the correct sibling. It doesn't discuss when to avoid compare_models, but the single-model scope makes the intended usage context clear enough.

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

find_modelsFind modelsA

Search and filter models across all providers by name, provider, capability, context window, or price. Returns a compact summary per model; use get_model for full details on one.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax number of results to return.
queryNoCase-insensitive substring match against model name or id, e.g. 'sonnet' or 'gpt-5'.
providerNoRestrict to one provider id, e.g. 'anthropic'.
minContextNoMinimum context window size in tokens.
maxInputCostNoMaximum input cost per million tokens (USD).
requireToolCallNoOnly models with tool/function calling support.
requireReasoningNoOnly models with extended reasoning support.
requireAttachmentNoOnly models that accept file/image attachments.

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden for behavioral disclosure. It accurately discloses that the result is a compact summary per model and points to get_model for more detail, but it does not mention ordering, defaults, pagination, or rate limits. These are not misleading gaps, so a 3 is appropriate.

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 compact sentences with no filler. The main action and scope are front-loaded, and the pointer to get_model is placed efficiently at the end.

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 read-only search tool with 8 optional and well-documented parameters, the description gives enough orientation to call it correctly. It could describe the shape of the compact summary or default ordering, but those are optional refinements rather than invocation blockers.

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?

The input schema covers 100% of parameters with meaningful descriptions, so the baseline is 3. The description's list of filter dimensions loosely maps to the schema parameters but adds no new semantic detail beyond what the schema already provides.

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 uses a specific verb ('Search and filter') and names the resource ('models across all providers'), then lists the key filtering dimensions. It also distinguishes itself from get_model by stating it returns a compact summary rather than full details.

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 clearly communicates this is the tool for broad searching/filtering and directly points to get_model for full individual details. It does not explicitly contrast with compare_models or list_providers, but the core use case is well established.

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

get_modelGet modelA

Fetch full metadata for one model. Accepts 'provider/model' (preferred, e.g. 'anthropic/claude-sonnet-4-5') or a bare model id if unambiguous across providers.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesModel id, e.g. 'anthropic/claude-sonnet-4-5' or 'gpt-5.2'.

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description must carry behavioral context. It usefully discloses accepted id formats and the ambiguity caveat for bare model ids, but it does not describe error behavior, return structure, or any prerequisites such as authentication.

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 with no wasted words. The core action is front-loaded, and the parameter guidance is compact and directly useful.

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 simple one-parameter fetch tool, the description is largely complete: it states the operation, the parameter format, and the ambiguity rule. Since there is no output schema, a slightly richer statement about what 'full metadata' contains or what happens on ambiguous ids would make it fully complete.

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?

The schema already fully documents the 'id' parameter, so the baseline is 3. The description adds meaningful value by marking 'provider/model' as preferred and explaining when a bare id may be accepted, which helps the agent construct valid inputs.

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 uses a specific verb and resource: 'Fetch full metadata for one model.' It clearly distinguishes from siblings like list_providers, find_models, and compare_models by emphasizing a single model lookup.

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 for when to use this tool: when detailed metadata for one specific model is needed. It does not explicitly name alternatives or state when not to use it, but the 'one model' scope and id-format guidance imply the correct selection.

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

get_providerGet providerA

Fetch metadata for one provider: display name, AI SDK package name, API base URL, docs link, and a compact list of its models. Accepts the provider id ('anthropic') or display name ('Anthropic'). Use get_model for full per-model detail.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesProvider id or display name, e.g. 'anthropic' or 'OpenAI'.

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It communicates a read-only operation through 'Fetch' and describes the return contents, but it does not disclose behavior for invalid ids, ambiguous display names, or whether the call can fail. For a simple metadata lookup this is acceptable but not richly transparent.

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 deliver the purpose, return contents, accepted input, and the key sibling alternative with no filler. The primary behavior is front-loaded, and the alternative routing is placed at the end without wasting words.

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 single-parameter lookup tool with no output schema, the description adequately covers what the tool returns and how to route to get_model for deeper detail. It could mention what happens when the provider is not found, but overall it is complete enough for correct invocation.

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?

The schema already documents the parameter with examples, and description coverage is 100%, so the baseline is 3. The description adds an additional example ('Anthropic') and clarifies the accepted forms, but this mostly echoes the schema rather than adding substantial new meaning.

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 opens with a specific verb and resource: 'Fetch metadata for one provider', then enumerates exactly what is returned (display name, package name, base URL, docs link, model list). It also distinguishes itself from get_model by noting that get_model provides full per-model detail, so an agent can tell them apart.

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 clearly says to use get_model when full per-model detail is needed, providing an explicit alternative and condition. It does not explicitly mention list_providers for enumerating all providers, but the singular framing and sibling name make the distinction inferable.

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

list_providersList providersA

List every provider in the models.dev catalog (e.g. anthropic, openai, google) with its model count. Use this to see what's available before narrowing with find_models.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It accurately conveys a read-only, comprehensive listing operation and states that each provider is returned with its model count. However, it does not disclose output format details, ordering, or any potential pagination, though the simple no-param nature keeps this a mild gap.

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, no filler. The core behavior and examples come first, and the usage guidance follows immediately. Every sentence adds value.

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 no-parameter listing tool, the description explains what is listed, what data is included, and when to use it. It could explain the exact return shape or ordering, but the tools's simplicity means this is nearly complete.

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?

The tool has zero parameters, so the schema already fully documents everything and there is no ambiguity. The description adds no parameter-level detail, but none is needed; baseline 4 is appropriate.

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 uses a specific verb and resource: it lists every provider in the models.dev catalog and mentions the included model count. The examples (anthropic, openai, google) and the contrast with narrowing via find_models make it clearly distinct from siblings like get_provider and find_models.

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?

It clearly states when to use the tool: to see what's available before narrowing with find_models. It does not explicitly say when not to use it or name alternative tools, but the context is clear enough for an agent to route correctly.

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

refresh_catalogRefresh catalogA

Force a fresh fetch of the models.dev catalog, bypassing the in-memory cache. Use if you suspect the data is stale. If the refetch fails, the last good catalog keeps being served and servedStale is reported as true.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description must carry the behavioral burden. It does so by explaining cache bypass behavior, failure fallback ('the last good catalog keeps being served'), and the reported state ('servedStale is reported as true'). This is strong but not exhaustive; it omits any potential side effects beyond cache behavior.

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 concise sentences, each earning its place: what it does, when to use it, and what happens on failure. The most important action is front-loaded, and there is no redundancy.

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 no-parameter cache refresh helper, the description covers the essential context: purpose, trigger condition, and failure behavior. It does not specify the full success return shape, but the servedStale reference gives the agent a useful signal about the report format.

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?

The tool has zero parameters, so the input schema leaves nothing to document. Per baseline guidance, a 4 is appropriate since there is no parameter semantics gap for the description to fill.

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 uses a specific verb ('refresh') and resource ('models.dev catalog'), and states the exact mechanism ('bypassing the in-memory cache'). This clearly distinguishes it from the sibling query-oriented tools like list_providers and find_models.

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?

'Use if you suspect the data is stale' provides an explicit condition for invoking the tool. It does not discuss when not to use it or name alternatives, but given the tool's unique refresh role among siblings, the guidance is sufficient.

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

top_modelsTop modelsA

Rank models by one criterion: cheapest input/output price per million tokens, largest context window, most context per input dollar, or newest release. Supports the same filters as find_models.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows to return.
queryNoCase-insensitive substring match against model name or id, e.g. 'sonnet' or 'gpt-5'.
sortByYesRanking criterion: 'cheapest_input'/'cheapest_output' (USD per million tokens), 'largest_context' (tokens), 'context_per_dollar' (tokens per USD of input), or 'newest' (release date). Models missing that data are excluded.
providerNoRestrict to one provider id, e.g. 'anthropic'.
minContextNoMinimum context window size in tokens.
maxInputCostNoMaximum input cost per million tokens (USD).
requireToolCallNoOnly models with tool/function calling support.
requireReasoningNoOnly models with extended reasoning support.
requireAttachmentNoOnly models that accept file/image attachments.

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It states the ranking criteria and filter compatibility, but does not disclose result ordering direction, tie-breaking, pagination, or return-value shape. The schema documents limit and data-exclusion, but the description itself adds only the ranking concept and cross-reference to find_models.

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?

One tightly constructed sentence states the core operation, enumerates criteria, and references filter compatibility. Every phrase earns its place and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter tool with no output schema or annotations, the description is minimal. It covers the ranking concept and filter compatibility but omits details about the returned model fields, sort direction/deduplication behavior, and any interaction with limit/ranking, leaving the agent to infer these from the schema and sibling tools.

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 the baseline is 3. The description adds no parameter-level detail beyond naming the ranking criteria, which the sortBy enum already documents in more detail. The 'same filters as find_models' reference is useful but not a substitute for the schema's complete parameter documentation.

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 uses a specific verb ('Rank') with a clear resource ('models') and enumerates the ranking criteria, making the tool's function unambiguous. It also distinguishes itself from find_models by stating it ranks by a single criterion rather than merely listing or filtering.

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?

It clearly signals the use case: obtain top models ranked by a selected criterion. The phrase 'Supports the same filters as find_models' gives context about filter behavior and indirectly points to find_models as the filter/search sibling, but it does not explicitly state when not to use this tool or name the alternative for mere listing.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv0.2.0
    • First observedcompare_models
    • First observedestimate_cost
    • First observedfind_models
    • First observedget_model
    • First observedget_provider
    • First observedlist_providers
    • First observedrefresh_catalog
    • First observedtop_models

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct operation: listing providers, searching models, fetching details, comparing, refreshing, estimating cost, ranking, and provider metadata. Even where two tools support similar filters, their purposes are clearly differentiated by descriptions.

Naming Consistency4/5

Tool names mostly follow a clear verb_noun pattern such as list_providers, find_models, get_model, and estimate_cost. The exception is top_models, which reads more like a noun phrase than an imperative verb action, a minor deviation from the otherwise consistent convention.

Tool Count5/5

Eight tools is a well-scoped size for a model catalog server. Each tool covers a meaningful workflow without redundancy or bloat, from discovery and search to comparison and cost estimation.

Completeness5/5

The surface covers the full read-only lifecycle of interacting with the models.dev catalog: list, search, detail, compare, rank, and cost estimation, plus provider-level metadata and cache refresh. No obvious dead ends or missing core operations are present.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

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/QAInsights/models-mcp'

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