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".

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

TDQS

A4.6/5.0
Behavior5/5

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

Annotations provide readOnlyHint, openWorldHint, and idempotentHint, so the safety profile is covered. The description adds substantial behavioral context beyond this: the trailing selection object for auditability, the flat/answer billing rates with the refund delta, unknown readers being treated as pixel-billed safe defaults, glyph paraphrasing, and images preceding the JSON block when glyph is picked. 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 longer than average but front-loaded with the core purpose and every paragraph earns its place: substrate definitions, output structure, and pricing behavior are all relevant. The bullet list and tight phrasing keep it scannable, though the pricing paragraph could arguably be trimmed without losing critical information.

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 (5 params, 3 substrate modes, billing nuances, output schema present), the description is complete. It covers the selection algorithm, output format quirks (images preceding JSON, trailing selection object), pricing/refund behavior, and edge-case defaults for unknown readers, so the agent can reliably invoke and parse results.

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 meaning beyond the schema by mapping reader billing models to substrate choices and explaining the rationale (cheapest AND legible for token billing), plus the verbatim-glyph paraphrase interaction. This enriches understanding of reader and verbatim beyond their individual schema descriptions.

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+resource: 'One retrieval, auto-picked substrate — the MCP twin of HTTP POST /v1/retrieve with substrate="auto".' This clearly states what the tool does and differentiates it from siblings like glyph_search and fillin_query via the auto-picked substrate (text | glyph | answer) behavior.

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 explicit context for when each substrate is chosen (pixel billers get text, flat-tile billers get glyph, weak tool-callers get answer) and notes prerequisites like needing a server LLM key for answer. The verbatim param further clarifies when glyph should be avoided. It lacks explicit exclusions naming sibling alternatives, but the substrate-selection logic provides strong usage guidance.

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.

TDQS

A3.9/5.0
Disambiguation2/5

Several tools overlap significantly: fillin_query, glyph_search, and retrieve_auto all perform post-cutoff retrieval and differ only in output substrate, and fillin_health and fillin_stats both report corpus stats. This creates ambiguity for agents choosing between them.

Naming Consistency3/5

Tool names mix three conventions: fillin_* (fillin_query, fillin_mint), query_* (query_cves, query_papers), and bare names (encode, glyph_search, retrieve_auto). While readable and mostly snake_case, the lack of a uniform prefix or verb pattern makes naming inconsistent.

Tool Count4/5

14 tools is within the acceptable range for a multi-feature server, but there is some redundancy (two health/stats tools, three retrieval variants), making the count feel slightly inflated.

Completeness5/5

The server covers retrieval (text/glyph/auto), encoding, marketplace operations (mint, search, buy), and domain-specific queries (CVEs, frontier AI, markets, papers), with no obvious missing capabilities.

Resources