Skip to content

Commit 19bd446

Browse files
committed
fix(sendgrid): document consistent page_size requirement for list_templates pagination
Per Cursor Bugbot: list_templates always defaults page_size to 20 when unset (required by SendGrid), so a follow-up pageToken-only call after a first call with a larger pageSize would silently shrink to 20 and desync page boundaries. This is inherent to a stateless tool call (SendGrid requires page_size on every request, and the tool has no way to remember the prior call's value), so clarify via param description and UI placeholder that callers must repeat the same pageSize across paginated calls.
1 parent cf311da commit 19bd446

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎apps/sim/blocks/blocks/sendgrid.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Return ONLY the JSON array.`,
447447
id: 'templatePageToken',
448448
title: 'Page Token',
449449
type: 'short-input',
450-
placeholder: 'Page token from a previous response',
450+
placeholder: 'Page token from a previous response (keep Page Size the same)',
451451
condition: { field: 'operation', value: 'list_templates' },
452452
mode: 'advanced',
453453
},

‎apps/sim/tools/sendgrid/list_templates.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ export const sendGridListTemplatesTool: ToolConfig<ListTemplatesParams, Template
2424
type: 'number',
2525
required: false,
2626
visibility: 'user-or-llm',
27-
description: 'Number of templates to return per page (default: 20, max: 200)',
27+
description:
28+
'Number of templates to return per page (default: 20, max: 200). ' +
29+
'When paginating with pageToken, pass the same pageSize used on the first request ' +
30+
'to keep page boundaries consistent.',
2831
},
2932
pageToken: {
3033
type: 'string',

0 commit comments

Comments
 (0)