Skip to content

TD-8387: remove non-functional deferredResponse; document response shape and pagination#21

Merged
chrichts merged 1 commit into
mainfrom
TD-8387-pagination-docs-and-deferredresponse
May 15, 2026
Merged

TD-8387: remove non-functional deferredResponse; document response shape and pagination#21
chrichts merged 1 commit into
mainfrom
TD-8387-pagination-docs-and-deferredresponse

Conversation

@chrichts
Copy link
Copy Markdown
Contributor

@chrichts chrichts commented May 15, 2026

Summary

Two changes addressing TD-8387:

  • Removes the deferredResponse parameter from execute-j1ql-query. It was accepted by the Zod schema but silently dropped in j1ql-service.ts before reaching GraphQL. The underlying queryV2 operation does not accept deferredResponse (only queryV1 does), so even forwarding it would not have worked.
  • Adds Response Shape and Pagination sections to execute-j1ql-query.md. The real response envelope (data, type, cursor, totalCount, estimate, status, duration, correlationId, messages, url) was not documented anywhere; the estimate flag in particular was already being returned but was undocumented. Pagination guidance now states the cursor rule explicitly: continue while cursor is present, regardless of data.length.

Patch version bump: 0.2.0 → 0.2.1.

Empirical verification

Three calls to execute-j1ql-query against j1dev — no parameter, deferredResponse: 'FORCE', deferredResponse: 'DISABLED' — returned byte-identical responses including the same correlationId. With a correctly-wired FORCE, the response type should flip to deferred with a download URL; instead all three returned type: 'list' with inline data. The parameter has been non-functional since it was introduced.

The estimate field was confirmed to surface in responses today (estimate: true observed on unbounded queries, false once the final page resolves).

Test plan

  • Existing tests pass (no test changes needed — there were no tests for deferredResponse)
  • npm run build succeeds
  • Tool schema no longer advertises deferredResponse
  • Tool description now includes Response Shape and Pagination sections

Follow-up

After this merges and publishes, a one-line PR will be needed in jupiterone-remote-mcp to refresh the lockfile and bump 1.0.22 → 1.0.23.

🤖 Generated with Claude Code

…hape and pagination

The execute-j1ql-query tool exposed a deferredResponse parameter that was
silently dropped before reaching GraphQL — verified empirically by running
identical queries with and without the parameter and getting byte-identical
responses (same correlationId). The underlying queryV2 operation does not
accept deferredResponse at all; it is a queryV1-only argument.

Removed:
- deferredResponse from the Zod schema and handler in mcp-server.ts
- deferredResponse from the parameter table in README.md

Added to execute-j1ql-query.md:
- Response Shape section enumerating the real envelope (data, type, cursor,
  totalCount, estimate, status, duration, correlationId, messages, url)
- Pagination section stating the cursor rule: continue while cursor is
  present, regardless of data.length — a zero-row page with non-null cursor
  is intentional behavior, not a completion signal
- Note that totalCount with estimate: true may shift between pages

Refs TD-8387.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chrichts chrichts merged commit b97d3f7 into main May 15, 2026
3 checks passed
@chrichts chrichts deleted the TD-8387-pagination-docs-and-deferredresponse branch May 15, 2026 15:37
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.

2 participants