Skip to main content
Glama

retrieve_auto

Read-onlyIdempotent

One retrieval, auto-picked substrate — the MCP twin of HTTP POST /v1/retrieve with substrate="auto".

Requires $0.01–$0.05 USDC (x402) or an Authorization Bearer trial/paid key.
On payment_required, call fillin_probe then fillin_signup (POST /v1/signup)
for a free 20-query trial, or fillin_payment_challenge then retry with
X-Payer-Address, X-Payer-Nonce, X-Payer-Signature (or Bearer).
POST /v1/probe for 1 free taste/IP/day.

Runs a single post-cutoff retrieval, then returns whichever delivery substrate is
cheapest AND legible for your `reader` model's token billing:

  - text   — raw result pieces (Claude/GPT pixel billing, or any unknown reader).
  - glyph  — a dense photo-glyph image (Gemini/Qwen flat-tile billing) you read with
             vision; the raw pieces ride along as a citation index.
  - answer — a pre-cited synthesized paragraph (weak tool-callers; needs a server LLM key).

The trailing JSON block always carries a `selection` object
{substrate, reader, reader_class, tier, rationale, estimates} so the choice is
auditable from the honest token math — the same object the HTTP route returns. When the
pick is glyph, the page image(s) precede that JSON block.

Pricing matches /v1/retrieve: text/glyph bill the flat /query rate, answer bills the
answer rate. The answer rate is charged up front and the delta is refunded when the
pick resolves to text/glyph, so you always pay exactly the right rate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoNumber of documents to retrieve (1-12).
queryYesNatural-language search query, max 512 chars.
cutoffYesTraining cutoff as ISO-8601 date (e.g. 2026-01-01). Documents on or before this date are excluded.
readerNoYour reader model — used to auto-pick the cheapest legible substrate. Flat-tile billers ('gemini', 'qwen') can get a dense glyph; pixel billers ('claude', 'gpt-4o') get text; weak tool-callers ('llama', 'mistral', 'gemini-flash') get a synthesized answer. Unknown/None is treated as pixel-billed — the safe default (text), never an overclaimed saving.
verbatimNoSet true if you need exact/verbatim text or code (auto then never picks glyph, which paraphrases). None (default) auto-detects from result sources/content.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already mark the tool read-only, idempotent, and open-world. The description adds substantial behavioral detail well beyond the annotations: the substrate selection logic driven by the reader's billing model, the payment/refund behavior, the structure of the selection object, and the layout of glyph output. There is no contradiction with annotations.

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 long but well-organized into distinct sections: purpose, payment requirements, substrate modes, output structure, and pricing. It is front-loaded with a clear one-line purpose and each paragraph carries operational weight. The length is justified by the tool's complexity, though it could be tightened.

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?

Given the tool's complexity and the presence of an output schema and annotations, the description covers all necessary operational aspects: authentication/payment prerequisites, error-handling flows, substrate selection behavior, output shape, and pricing/refunds. An agent has enough information to invoke the tool correctly.

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 baseline is 3. The description adds meaningful semantics for the reader and verbatim parameters by explaining how they map to substrate choices (pixel vs. flat-tile vs. weak tool-caller, and verbatim disallowing glyph). It does not restate k/query/cutoff, but the schema already covers those clearly.

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 clearly states the tool does one retrieval with an auto-picked substrate, and identifies the corresponding HTTP endpoint. It does not explicitly name or contrast with sibling tools like fillin_query, so while the purpose is specific, sibling differentiation is only implicit via the word 'auto.'

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?

The description provides concrete guidance for payment-required errors, telling the caller to use fillin_probe/fillin_signup or fillin_payment_challenge. It also mentions a free probe alternative. However, it does not state when to use retrieve_auto versus other retrieval siblings (e.g., fillin_query, glyph_search), so overall usage guidance is implied rather than explicit.

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