cccc
cccc copied to clipboard
fix(mcp): omit nextCursor when no more pages in tools/list
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