The type of items in the data array PaginatedResponse
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.searchDocuments,
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.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. searchDocuments with keyword,
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.
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:
Example
Example
Example
Example
Example
See