Skip to main content
Glama

paginated_rest_source

Generate a query for a REST API that loops through all pages using offset or cursor pagination and combines results into one table.

Instructions

Generate a paginated REST source as a new query: a List.Generate page loop that accumulates pages then Table.Combine. mode = offset (uses pageParam+sizeParam, stops on an empty page) or cursor (reads the next token from nextField, stops when null). The base URL stays STATIC and the page key folds through Web.Contents [Query=...]; each page is List.Buffer-ed. dataPath is the JSON field holding the records array (e.g. "value" or "data"; empty = the body IS the array). Refresh afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNooffset | cursoroffset
nameYes
baseUrlYesthe static base URL
dataPathNoJSON field holding the records array, e.g. value or data (empty = body is the array)value
pageSizeNopage size (offset mode, default 100)
nextFieldNoJSON field holding the next cursor/token (REQUIRED for cursor mode)
pageParamNooffset/page/cursor query parameter name (default offset for offset mode, cursor for cursor mode)
sessionIdYes
sizeParamNopage-size query parameter name (offset mode, default limit)
recordFieldsExprNooptional raw M for Table.FromRecords' second argument (column list/type), e.g. type table [Id=Int64.Type]
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the List.Generate loop, page accumulation, Table.Combine, static base URL, List.Buffer per page, stop conditions, and the 'Refresh afterwards' step. Missing details about error handling, permissions, or side effects beyond creating a new query prevent a higher score.

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 two dense sentences that front-load the purpose and then efficiently explain modes, implementation, and dataPath. Every clause serves a functional role without wasted words.

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 complex 10-parameter tool with no output schema or annotations, the description provides essential algorithm and mode details. It relies on the schema for parameter definitions but could be more complete regarding error conditions, return values, or side effects.

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?

Although the schema covers most parameters (80%), the description adds semantic meaning by explaining how mode controls pageParam and nextField interaction, and clarifies dataPath semantics. It does not explain sessionId or recordFieldsExpr, but the schema partially covers those.

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 clearly states 'Generate a paginated REST source as a new query' with a specific verb and resource. It distinguishes itself from sibling tools by detailing pagination modes (offset/cursor) and implementation specifics like List.Generate and Table.Combine.

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 explains the two pagination modes and their stopping conditions, but does not explicitly compare with alternative tools or state prerequisites. Usage context is implied rather than directly stated, and no exclusions or alternatives are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyphonica/powerbi-pbix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server