The type of items in the data array
Array of items for current page.
Contains the actual data items for the current page/offset. Array length may be less than limit on last page or when fewer items match the query.
Type: Array of generic type T Min Length: 0 (empty result set) Max Length: limit value (typically 50-100)
// Full page
data: [
{ id: "person/1", name: "MEP 1", ... },
{ id: "person/2", name: "MEP 2", ... },
// ... 48 more items for limit=50
]
Indicates if more items may exist beyond the current page.
Boolean flag for "load more" / "next page" logic. When true,
another page may exist and the caller should fetch it. When false,
the current page is definitively the last one.
For server-paginated results this is a heuristic based on the
underlying server page fullness, not always on the filtered
data.length returned to the caller:
hasMore is typically
derived from server page fullness (effectively whether the server
returned limit items). A full page suggests more data may follow,
but can be a false positive when the dataset size is an exact
multiple of limit.getPlenarySessions,
getParliamentaryQuestions), hasMore is derived from the
unfiltered server page size before client-side filtering. This
means hasMore can be true even when the filtered data array
contains fewer than limit items or is empty.searchDocuments: hasMore still reflects pre-filter
server page fullness (so callers continue paginating for more matches),
but total is derived from the post-filter data.length — guaranteeing
the identity total === offset + data.length + (hasMore ? 1 : 0).Callers should paginate until hasMore is false. For in-memory
paginated results, hasMore is exact: (offset + data.length) < total.
Maximum items per page (requested page size).
The limit value that was requested for this query. Determines maximum array size for data field. Actual data length may be less on last page or with filtered queries.
EP API Field: Query parameter limit
Min Value: 1
Max Value: 100 (enforced by API)
Default: 50
Recommended: 50-100 for performance
Number of items skipped (pagination offset).
Number of items to skip from the beginning of the result set.
Used for offset-based pagination. To get page N, use
offset = (N - 1) * limit.
EP API Field: Query parameter offset
Min Value: 0 (first page)
Max Value: total - 1
Calculation: (currentPage - 1) * limit
Total number of items matching the query (exact or heuristic estimate).
For in-memory paginated results (e.g. getCurrentMEPs with filters,
getVotingRecords), this is the exact count of all matching items.
For server-paginated results where the EP API does not return a total count header, this is a heuristic sentinel:
hasMore === false): the value is exact
(offset + data.length), assuming offset is within the actual
result range. If the caller requests an out-of-range offset
(beyond the dataset), the EP API returns an empty page and total
becomes offset, which may overestimate the real count.hasMore === true): the value is
offset + data.length + 1. This signals that more data may exist
but may overestimate by 1 when the dataset size is an exact
multiple of limit (i.e., the last server page is exactly full).For client-filtered server endpoints (e.g. getPlenarySessions with
location, getParliamentaryQuestions with author/topic), total and
hasMore are derived from the unfiltered server page size, not
from data.length after client-side filtering. This means hasMore can
be true even when the filtered data array is empty, and total will
not reflect the count of filtered matches.
Exception — searchDocuments: total is derived from the
post-filter data.length, not the unfiltered server page size.
Concretely, this endpoint guarantees the envelope identity
total === offset + data.length + (hasMore ? 1 : 0) while hasMore
remains pre-filter (server page fullness). Note that total here is a
pagination-envelope sentinel, not a count of items matching the
post-filter query: because offset is the raw server offset (not a
cumulative count of filtered matches across previous pages), total
may exceed the true number of matches. Its role is purely to keep the
envelope internally consistent. This prevents misleading responses such
as data:[] total:21 hasMore:true when a full server page is
eliminated by keyword/committee/date filters (the new envelope in that
case is data:[] total:1 hasMore:true). Callers should still paginate
until hasMore === false to enumerate all matches.
Do not use this value for exact "X of Y" UI or page-count
calculations on server-paginated endpoints. Instead, iterate all
pages (using hasMore) to determine the true dataset size.
Min Value: 0 (no matches)
Generic paginated response wrapper for API results.
Standard pagination format used across all European Parliament MCP Server endpoints. Wraps arrays of data with pagination metadata enabling efficient iteration through large datasets. Implements offset-based pagination pattern.
Pagination Strategy: Offset-based (not cursor-based)
Performance Considerations:
Interface
PaginatedResponse
Example
Example
Example
Example
Example
See