Skip to main content
Glama
platypus-db

platypus-db

Official

next_page

Read the next rows from a query cursor when run_query stops at max_rows or max_bytes, returning another page without rerunning the statement.

Instructions

Reads the next rows of a result that run_query cut at max_rows or max_bytes, from the cursor it returned, instead of running the statement again: the pages come from the rows read with the first one (up to 10000 more rows, 4 MB or 250 ms of reading; the answer says when the result has more than that), so they do not change if the data does. Same format, max_rows (default 100) and max_bytes as run_query, with the connection's limits and calls per minute; sensitive columns stay masked as in the first page. A cursor is kept 5 minutes after its last use and belongs to this session; an unknown, expired or another session's cursor is refused.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cursor": "<cursor>"
    },
    "name": "next_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorYesThe `cursor` a `run_query` or an earlier `next_page` returned.
formatNo`text` (an aligned table, the default) or `json`.
max_rowsNoRows returned at most (default 100, up to 10000).
max_bytesNoBytes of output at most (default 32768, up to 1048576).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses snapshot semantics (pages come from rows read with the first one, so they do not change if the data does), hard caps (10000 more rows, 4 MB, 250 ms), rate limits and connection limits, continued masking of sensitive columns, cursor lifetime (5 minutes after last use), session ownership, and the failure mode for unknown/expired/foreign cursors.

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?

Purpose is front-loaded in the first clause, and every clause adds operational detail. It is a dense multi-clause sentence chained with semicolons, which costs a little readability but wastes essentially no words.

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 cursor-pagination tool with no annotations and no output schema, the description covers return format (same as run_query, with text/json), truncation signalling, error cases and resource limits — everything needed to invoke it correctly and interpret the response.

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, but the description adds meaning not in the schema: it ties max_rows/max_bytes to run_query's semantics and connection limits, and explains cursor provenance, expiry and session ownership, which governs the required parameter's validity.

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 ("Reads the next rows of a result") and scopes it precisely to results that run_query truncated at max_rows or max_bytes, resuming from the returned cursor rather than re-executing the statement. This cleanly separates it from the run_query sibling without needing its schema.

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?

Explicitly frames the alternative it replaces ("instead of running the statement again") and states the precondition (a cursor from run_query or an earlier next_page). It does not enumerate other siblings to avoid, but the trigger condition is unambiguous.

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