Skip to main content
Glama

Discover a key's models

discover_models

Discover a key's models

Reads the models the key can serve and checks that it is a paid or funded key, as a job: poll the get_supply_job tool every second until it is done (a few seconds: the model list only); its models are every model the key serves, each with its reference price and where it comes from (none anywhere: set your own price), and paid false means add funds and discover again. A Z.ai open-platform key (zaiKind open) lists its models as not listable for now: Z.ai open platform keys are coming soon. Each model's self-name check runs in its health test. A discovery running or done in the last ten minutes is reused unless fresh. Sellers only: an account that has not accepted the selling terms gets 403 not_seller.

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": {
      "id": "<id>"
    },
    "name": "discover_models"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe key id.
freshNoRead the model list again even if it was read in the last ten minutes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

It discloses the job-based execution model, the caching window, the 403 not_seller error, and the Z.ai open-key limitation — none of which are inferable from the annotations. There is a mild tension between the word 'Reads' and readOnlyHint=false, but the description makes clear that a job is created and polled, which explains the non-read-only annotation rather than contradicting it.

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?

The purpose is front-loaded and every sentence carries real information, but the body is a single run-on chain of semicolons and parentheticals that mixes return-value description, error handling, and freshness rules. It would be far more usable split into short lines, though little actual content is wasted.

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 no output schema, the description correctly takes on the burden of explaining what comes back (the `models` list, each with reference price and provenance, plus `paid`) and what happens when no price source exists. The only gap is the absence of any contrast with `list_models`, which leaves the agent's tool-selection decision underinformed.

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 both parameters are already documented in the schema. The description's statement about the ten-minute reuse window restates what the `fresh` schema description says and adds no new semantics for `id`; baseline 3 applies.

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 specific verb and resource: it reads the models a key can serve and checks that the key is paid or funded, structured as an async job. That is more than a restatement of the name, but it never distinguishes itself from the sibling `list_models`, so an agent does not learn here why it would pick discovery over a plain list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It prescribes the exact operating procedure (poll `get_supply_job` every second until done), states the ten-minute reuse rule and how `fresh` overrides it, and gives a concrete remediation path when `paid` is false. It also names the failure condition for non-sellers (403 not_seller), so the agent knows both when to call it and what to do when it is refused.

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