Skip to content

fix(threat_feed): use startAfterCursor instead of deprecated page_cursor (SURF-2363) - #264

Draft
Gerardo Sabetta (gerardosabetta) wants to merge 1 commit into
mainfrom
gerardosabetta/surf-2363-socket-mcp-threat_feed-should-stop
Draft

Gerardo Sabetta (gerardosabetta) wants to merge 1 commit into
mainfrom
gerardosabetta/surf-2363-socket-mcp-threat_feed-should-stop

Conversation

@gerardosabetta

@gerardosabetta Gerardo Sabetta (gerardosabetta) commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

threat_feed sent its cursor as page_cursor, a deprecated alias. It now sends startAfterCursor, as the alerts tool does. The tool description, the cursor input description and docs/service.md now name endCursor as the next-page cursor instead of the deprecated nextPageCursor.

The tool's input is unchanged: callers still pass cursor. The upstream response is still passed through as is, so endCursor was already in it. Only the docs pointed at the old field.

Spec evidence

From https://api.socket.dev/v0/openapi, fetched 2026-12-04, path /orgs/{org_slug}/threat-feed:

  • startAfterCursor: "Pass the previous response endCursor to retrieve the next page. Takes precedence over page_cursor when both are supplied. Unsupported cursor aliases return 400."
  • page_cursor (deprecated: true): "Deprecated alias for startAfterCursor. Existing nextPageCursor values remain accepted."
  • Response endCursor: the next-page cursor. nextPageCursor (deprecated: true): "Deprecated alias for endCursor."

Heads-up: old nextPageCursor values still work as startAfterCursor, so a caller halfway through paging won't break.

Verification

  • pnpm run fmt, pnpm run lint: clean
  • pnpm run check (fmt:check, oxlint, tsc, build, manifest versions, content scan): pass
  • pnpm test: 740 tests in 76 files pass
  • The unit tests now check that startAfterCursor is sent, that page_cursor is not, and that endCursor comes back in the tool output. The MCP schema golden file has the new cursor description.
  • Not covered: a live call to api.socket.dev. Nock mocks the upstream.

Linear: https://linear.app/socketdev/issue/SURF-2363/socket-mcp-threat-feed-should-stop-using-the-deprecated-page-cursor

Slides

cover

gap

spec

verify

🤖 Generated with Claude Code

…sor (SURF-2363)

The threat-feed spec marks page_cursor and nextPageCursor as deprecated
aliases of startAfterCursor and endCursor. Send startAfterCursor and
document endCursor as the next-page cursor, matching the alerts tool.
Gerardo Sabetta (gerardosabetta) added a commit that referenced this pull request Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant