Skip to main content
Glama

fetch

Call a URL inside the browser with the user's cookies, automatically walking paginated API endpoints in one request. Use after discovering an API via network traffic; check paging caps.

Instructions

Call a URL from inside the page, carrying the user's cookies. Use after network reveals an API. Paged endpoint? Pass pages: it walks every page in ONE call — never loop fetch by hand, each loop turn costs a model round. ALWAYS check the paging object in the response, servers silently cap page size. 403/406 means the site signs its requests: do NOT forge them; drive the site's own pagination UI and read via network. Same-origin rules apply.

Input Schema

NameRequiredDescriptionDefault
urlYes
viaNoWhere the request originates. Binary defaults to extension (no CORS limits); text always uses the page (carries session).
initNofetch() init: method, headers, body. credentials are already included.
pagesNoAuto-paginate: {param:"page", from?, step?, max?} or {cursorParam:"cursor", cursorPath:"data.next_cursor", max?}. Stops on non-2xx, empty/identical body, empty cursor, or max (default 10, cap 50). With savePath: one JSON line per page + summary; else bodies inline up to maxBody.
tabIdNoTarget tab id. Omit to use the active controlled tab.
binaryNoFetch bytes (images, files) instead of text. Requires savePath. Runs from the extension so cross-origin image hosts work; add via:"page" if a host checks Referer.
maxBodyNo
spaceIdNoPin this command to an owned BeatBrowser TaskSpace. Also pass its tabId.
savePathNoAbsolute path to write to. Required with binary.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.1

TDQS

A4.9/5.0
Behavior5/5

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

With zero annotations, the description carries the full burden and does so: it discloses credential/cookie forwarding, same-origin constraints, that 403/406 indicates server-side request signing, an explicit prohibition against forging requests, and that servers silently cap page size. This is exactly the behavioral context an annotation-free tool needs.

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?

Front-loads the core action and credential model, then layers the usage rule, the pagination rule, the error-handling rule in descending priority. Every sentence changes agent behavior; none is filler.

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 9-parameter tool with nested objects and no output schema, the description covers the response surface (the paging object), failure modes, and cross-origin behavior. An agent has enough to invoke this correctly on the first attempt.

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 78% and the descriptions there are strong, but the tool description still adds intent-level meaning: it tells the agent to pass `pages` and to always inspect the response's paging object, which explains why pages exists rather than just how it is shaped. It does not add detail for via, init, spaceId, or tabId beyond the schema.

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 a specific verb and resource ('Call a URL from inside the page, carrying the user's cookies') and immediately positions itself relative to siblings by naming `network` as the discovery step that precedes it. An agent can tell this apart from navigate/network/eval without opening a schema.

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?

Gives explicit when-to-use ('after `network` reveals an API'), an explicit anti-pattern ('never loop fetch by hand, each loop turn costs a model round'), and a named alternative path for the blocked case ('drive the site's own pagination UI and read via `network`'). Nothing is left to inference.

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