Skip to main content
Glama

Resolve a model

resolve
Read-only

Which model to call for a need, on the providers the user has accounts with: the provider's own model id, its price, capabilities and the reason. Give providers and a task or a purpose; add needs, budget, origin and other constraints to narrow it. shape asks for a team or an escalation ladder instead of one model. Counts as one call. An answer of no_candidate names what ruled every model out and the nearest miss. The answer depends on these goals; have the ones that matter in hand from the plan, the repository or the user before calling: cost (optimize, max_price, budget, calls_per_user_month); depth (optimize, quality_margin, min_quality, budget, shape, needs); maker_origin (origin, origin_strict); data_region (regions); languages (languages); data_kind (needs); accounts (providers). Send them as query parameters.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "providers": "<providers>"
    },
    "name": "resolve"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskNoA task, e.g. text.chat. Required unless purpose is given.
hoursNoUTC hours you make your calls in, every day, as HH-HH ranges: 09-17, or 22-06 past midnight, or 00-24. A price with cheaper hours then ranks on its average over these hours instead of over a flat week. Comma-separated.
needsNoRequired capabilities, optionally with a level: "input.pdf:native". Comma-separated.
pagesNoPDF pages per call.
rolesNoTeam roles: "name:count" pairs, comma-separated (lead:1,workers:4), or a JSON object of role name to { count, task, needs, min_quality, optimize, distinct_vendor_from, distinct_family, judges }. Overrides and extends the strategy's roles.
shapeNosingle (default, or the purpose's), team (with strategy or roles) or escalation (a ladder of length steps, or one model then a team with strategy or roles).
budgetNoThirds of the market's prices for the task.
imagesNoInput images per call.
lengthNoEscalation steps, 1–5 (default 3).
originNoModel maker countries or groups: "us", "eu", "not:cn". Comma-separated.
excludeNoModel ids, vendors, or provider:model pairs to leave out. Comma-separated.
licenseNoAccepted open-weight licenses. Comma-separated.
purposeNoA purpose preset id or alias, e.g. read-receipts.
regionsNoWhere data may be served, as region codes or their prefixes: "eu", "us", "us-east". It filters only when at least half the offerings on your providers state a region; below that, nothing is removed and the answer warns region_not_filtered. An offering that states no region is kept, with region_unstated. Comma-separated.
currencyNoAdds the typical call converted to this currency, e.g. EUR.
optimizeNocost (default), quality or value.
strategyNoA team strategy preset: its roles and their rules.
languagesNoLanguages your users write in, as language tags: "en", "de", "pt-BR". With one other than English, the non-English quality signal leads for a purpose that lists it; when the answer could not be compared on it, it warns language_signal_unavailable. Comma-separated.
max_priceNoHard cap on the typical call, in USD, e.g. 0.002, at the day's highest rate.
providersYesRequired. Provider names you have accounts with, in order of preference for ties. Never keys. Comma-separated.
synthesisNoAdd a synthesizer role to the team.
origin_mixNoTeam origin rules: "eu:>=1", "cn:<=0", "us:=2". Comma-separated.
resolutionNoImage resolution key, e.g. "1k".
allow_trialNoAllow trial offerings, which aren't for production (default false).
max_disk_gbNoLocal runtimes: free disk in GB for the weights.
max_vram_gbNoLocal runtimes: GPU memory in GB, for a full offload. On Apple silicon send the GPU's share of unified memory (macOS allows about 2/3 by default, 3/4 above 36 GB) and the total as max_memory_gb.
min_contextNoMinimum context window in tokens.
min_qualityNoMinimum quality score, 0–1.
allow_closedNoAllow models the provider has closed to new accounts. Send true only if your account used them before (default false).
input_tokensNoExpected input tokens per call.
service_tierNo
allow_previewNoAllow preview models (default false).
audio_secondsNoAudio seconds per call.
max_memory_gbNoLocal runtimes: the device's memory in GB (10^9 bytes). A local offering fits when its weights, KV cache at the request's min_context (8,192 tokens when smaller) and runtime overhead fit. Cloud offerings are not limited.
origin_strictNoAlso require a fine-tune's base model maker to match.
output_imagesNoGenerated images per call.
output_tokensNoExpected output tokens per call.
prompt_tokensNoPrompt size, for long-prompt price tiers.
video_secondsNoVideo seconds per call.
provider_termsNoYour terms per provider: "openrouter:byok", "gemini:free_tier", "openai:discount:0.2". Comma-separated.
quality_marginNoFor optimize=cost: how far below the best score still counts (default 0.05).
released_afterNoYYYY-MM-DD.
providers_distinctNoEvery team member, or escalation step, on a different provider.
cached_input_tokensNoInput tokens served from the provider's cache.
calls_per_user_monthNoHow many calls one user makes in a month. With it, the chosen model's price carries per_user_month and the sum behind it; without it, nothing monthly is returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / calls_per_user_month
      Added value: +{
      +  "description": "How many calls one user makes in a month. With it, the chosen model's price carries per_user_month and the sum behind it; without it, nothing monthly is returned.",
      +  "pattern": "^\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / languages
      Added value: +{
      +  "description": "Languages your users write in, as language tags: \"en\", \"de\", \"pt-BR\". With one other than English, the non-English quality signal leads for a purpose that lists it; when the answer could not be compared on it, it warns language_signal_unavailable. Comma-separated.",
      +  "type": "string"
      +}
    • addedInput schema / properties / regions
      Added value: +{
      +  "description": "Where data may be served, as region codes or their prefixes: \"eu\", \"us\", \"us-east\". It filters only when at least half the offerings on your providers state a region; below that, nothing is removed and the answer warns region_not_filtered. An offering that states no region is kept, with region_unstated. Comma-separated.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description must add the operational context, and it does: it discloses the 'one call' cost, the no_candidate outcome including 'what ruled every model out and the nearest miss', and fallback warnings like region_not_filtered and language_signal_unavailable. It does not describe result ordering or breadth of the returned candidate set, which keeps this below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It front-loads the purpose and return value, then required inputs, then behavior, which is the right order. The closing sentence is a long semicolon-separated list of parameter names already documented in the schema, and the whole description is one unstructured paragraph, so it is dense rather than wasteful but not tight.

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 45-parameter tool with no output schema, the description covers what is returned (model id, price, capabilities, reason), the failure case (no_candidate with the nearest miss), warning behaviors, and the preconditions for a meaningful answer. An agent has enough to call it correctly without reading further prose.

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 98%, so the baseline is 3, and the description earns above that by grouping 45 parameters into goal dimensions (cost, depth, maker_origin, data_region, languages, data_kind, accounts) with the specific knobs that serve each. That cross-parameter synthesis is not in the schema and helps an agent decide which subset to collect before calling.

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?

The description states a concrete verb and object: pick the model to call for a need from the user's providers, returning 'the provider's own model id, its price, capabilities and the reason'. That is specific enough to separate it from list_models/get_model by scope. It stops short of naming a sibling tool to route away from, so it is clear but not fully differentiated.

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 states the required calling inputs ('Give `providers` and a `task` or a `purpose`') and what optional constraints narrow the result, plus the advice to have cost/depth/origin/region/language goals 'in hand from the plan, the repository or the user before calling'. What is missing is explicit when-not guidance or a named alternative among the sibling tools.

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