Claude actually pointed out the bug as such:
Both searchConversations and structuredConversationFilter have a cursor parameter defined in the schema but it's never used — the code always hardcodes page: 1:
const baseParams: Record<string, unknown> = {
page: 1, // <-- always 1, cursor is ignored
size: input.limit,
sortField: input.sort,
sortOrder: input.order,
};
solution:
const pageNum = input.cursor
? new URL(input.cursor).searchParams.get('page')
: 1;
const baseParams = {
page: parseInt(pageNum) || 1,
size: input.limit,
...
};
Claude actually pointed out the bug as such:
Both searchConversations and structuredConversationFilter have a cursor parameter defined in the schema but it's never used — the code always hardcodes page: 1:
solution: