Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Pagination Planner

integration.pagination_plan

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

You send mode OFFSET_LIMIT or PAGE_NUMBER, required totalItems and pageSize. OFFSET_LIMIT uses startOffset default 0. PAGE_NUMBER uses base ZERO or ONE (default ONE) and startPage. Optional maxItems truncates the plan and sets truncated true. At most 100,000 pages. Integer overflow is refused. This does not make requests or discover cursors.

A caller that guesses the last page from mental arithmetic will skip or duplicate rows.

Reliability

Integer overflow is PAGINATION_INVALID. PAGINATION_INVALID — trigger: more than 100,000 pages, overflow, or a missing mode; retryable: no; next: raise pageSize or lower the total.

Context footprint

Page descriptors only. A successful call costs 1 execution credit.

When to use it

When totalItems and pageSize are known and the next requests must be listed.

When the total is unknown or the API uses an opaque cursor.

Scope

Note
Calculates bounded page requests from a known total, page size and optional start or item cap.

Non-goals

  • Does not discover cursors
  • Does not make requests
  • Does not adapt rate limits

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
modestringYesOFFSET_LIMIT uses startOffset; PAGE_NUMBER uses startPage and base.
totalItemsintegerYesKnown total item count, including zero.
pageSizeintegerYesPositive page size used for every planned request.
startOffsetintegerNoFirst OFFSET_LIMIT offset. Omit it for 0.
startPageintegerNoFirst PAGE_NUMBER page. Omit it for 1 when base is ONE, else 0.
basestringNoPAGE_NUMBER numbering. Omit it for ONE.
maxItemsintegerNoOptional item cap that truncates the plan. Omit it to plan the full total.

Output schema

FieldTypeRequiredDescription
modestringYesEchoed OFFSET_LIMIT or PAGE_NUMBER.
pageCountintegerYesHow many pages were planned.
plannedItemsintegerYesHow many items the plan covers.
truncatedbooleanYesTrue when maxItems stopped the plan before the total.
pagesarrayYesBounded array of 0 through 100000 ordered page-request descriptors.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"integration.pagination_plan","input":{"mode":"OFFSET_LIMIT","totalItems":5,"pageSize":2}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("integration.pagination_plan", {"pageSize":2,"mode":"OFFSET_LIMIT","totalItems":5});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
PAGINATION_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not discover cursors
  • Does not make requests
  • Does not adapt rate limits
  • Unknown-total loops
  • Cursor-based pagination discovery

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "integration.pagination_plan",
  "input": {
    "pageSize": 2,
    "mode": "OFFSET_LIMIT",
    "totalItems": 5
  }
}

Examples

Five items at page size 2 yield three OFFSET_LIMIT pages

Inputjson
{
  "pageSize": 2,
  "mode": "OFFSET_LIMIT",
  "totalItems": 5
}
Expected outputjson
{
  "pages": [
    {
      "offset": 0,
      "limit": 2
    },
    {
      "offset": 2,
      "limit": 2
    },
    {
      "offset": 4,
      "limit": 1
    }
  ],
  "pageCount": 3,
  "mode": "OFFSET_LIMIT",
  "plannedItems": 5,
  "truncated": false
}
Tip
The last page has limit 1.

A zero total yields no pages and truncated false

Inputjson
{
  "pageSize": 10,
  "mode": "OFFSET_LIMIT",
  "totalItems": 0
}
Expected outputjson
{
  "pages": [],
  "pageCount": 0,
  "mode": "OFFSET_LIMIT",
  "plannedItems": 0,
  "truncated": false
}
Tip
pageCount is 0 and pages is empty.
  • Split 5 items into pages of 2
  • Report truncation when maxItems is smaller than the total

Avoid for

  • Unknown-total loops
  • Cursor-based pagination discovery

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

validationintegration