cccc icon indicating copy to clipboard operation
cccc copied to clipboard

fix(mcp): omit nextCursor when no more pages in tools/list

Open KQAR opened this issue 9 months ago • 0 comments

Previously, tools/list always returned "nextCursor": "" even when all tools fit in a single page. Cursor-agent treats any present nextCursor (including empty string) as "more pages available", causing an infinite pagination loop (~170k requests in 55s) that exhausts the V8 heap and crashes with OOM.

Only include nextCursor in the response when there are actually more pages to fetch.

Made-with: Cursor

KQAR avatar Mar 03 '26 06:03 KQAR