Skip to main content
Glama

ym_fetch_all

Read-only

Auto-paginate a read endpoint to retrieve all rows in one response. Handles offset, last_id, cursor, page, and lastChangeDate styles, returning items, total_fetched, pages_fetched, and truncated.

Instructions

Auto-paginate a read endpoint and return every row in one response.

Handles offset, last_id, cursor (Ozon v4/v5), page and WB lastChangeDate styles. The array path is taken from the catalog automatically.

Args: operation_id: a read endpoint from the catalog. query / body / path_values: base parameters (cursor fields are managed). items_path: override the array path (default: the endpoint's own). limit: page size to request. max_items: hard cap to protect context (default 10000). Returns JSON: {"ok", "items", "total_fetched", "pages_fetched", "truncated"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNo
limitNo
queryNo
max_itemsNo
items_pathNo
path_valuesNo
operation_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.3

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true; the description adds that it auto-paginates, manages cursor fields, has a hard cap (max_items) to protect context, and returns a 'truncated' flag. This discloses the multi-call behavior and context-protection tradeoff beyond the annotations. It does not address rate limits or error propagation, but the safety profile is already covered.

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?

The description is structurally sound: a one-sentence summary, a line on supported pagination styles, a clean bulleted Args list, and a return shape. Every sentence earns its place, and key facts (read-only, defaults, hard cap) are front-loaded or clearly labeled. No redundant schema repetition.

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 generic fetch-all tool with an output schema, the description covers the necessary call parameters, the output envelope, and the context-protection cap. It lacks an explicit note on selecting operation_id (e.g., via ym_map or ym_describe_method) and on error handling, but the presence of an output schema and sibling discovery tools mitigates that gap. Overall sufficient for an agent to invoke 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?

With 0% schema description coverage, the Args section compensates by explaining operation_id, query/body/path_values, items_path, limit, and max_items. It clarifies that cursor fields are managed and that the array path defaults to the catalog value. The grouping of query/body/path_values is slightly terse but usable, and default values are noted.

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?

States 'Auto-paginate a read endpoint and return every row in one response' – a specific verb, resource, and outcome. The mention of multiple pagination styles distinguishes it from a single call_method, and the read-only scope differentiates it from write tools. Clear enough even among many fetch_all siblings.

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 says it is for read endpoints and that cursor fields are managed, implying it is for retrieving full datasets rather than single-page calls. It does not explicitly name when *not* to use it (e.g., for writing or single records), but the read/auto-paginate context provides reasonable guidance. No alternatives are named, so it stops short of a 5.

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