Skip to content

Commit 0ea25f4

Browse files
authored
fix(integrations): validate twilio, sendgrid, resend, mailgun, discord, telegram and whatsapp (#10073)
* fix(integrations): sweep2 v3 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(integrations): address v3 review findings - twilio: trim account SID and From number once, mark sender/recipient outputs nullable, make From optional on the block when a Messaging Service is used - discord: truncate fractional limits, reject more than one message cursor, mark nullable outputs - telegram: only keep spoiler spans, drop NUL so input cannot alias a protected segment, mark optional animation fields, fall back to model poll options when the stored field is blank - resend: clamp list limit to 1-100, sentence covers segment or audience, nullable broadcast outputs - mailgun: clamp events limit to 300 - twilio voice: nextPageToken nullable - fix test-types errors in twilio and whatsapp tests * fix(integrations): clamp twilio voice page size, mark discord user avatar nullable * fix(discord): match get_user output nullability to the User object * chore: regenerate tool metadata and mapper-operation baseline after rebase
1 parent c7abe25 commit 0ea25f4

111 files changed

Lines changed: 1817 additions & 453 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/integrations/discord.mdx‎

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Send a message to a Discord channel
4040
| --------- | ---- | -------- | ----------- |
4141
| `channelId` | string | Yes | The Discord channel ID to send the message to, e.g., 123456789012345678 |
4242
| `content` | string | No | The text content of the message |
43-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
43+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
4444
| `files` | file[] | No | Files to attach to the message |
4545

4646
#### Output
4747

4848
| Parameter | Type | Description |
4949
| --------- | ---- | ----------- |
50-
| `message` | string | Success or error message |
50+
| `message` | string | Content of the sent message |
5151
| `files` | file[] | Files attached to the message |
5252
| `data` | object | Discord message data |
5353
| ↳ `id` | string | Message ID |
@@ -80,6 +80,9 @@ Retrieve messages from a Discord channel
8080
| --------- | ---- | -------- | ----------- |
8181
| `channelId` | string | Yes | The Discord channel ID to retrieve messages from, e.g., 123456789012345678 |
8282
| `limit` | number | No | Maximum number of messages to retrieve \(default: 10, max: 100\) |
83+
| `before` | string | No | Return messages before this message ID, to page back through history. Use only one of before, after, or around. |
84+
| `after` | string | No | Return messages after this message ID, e.g. to read only messages newer than the last one seen |
85+
| `around` | string | No | Return messages around this message ID |
8386

8487
#### Output
8588

@@ -157,11 +160,12 @@ Retrieve information about a Discord user
157160
| ↳ `id` | string | User ID |
158161
| ↳ `username` | string | Username |
159162
| ↳ `discriminator` | string | User discriminator \(4-digit number\) |
163+
| ↳ `global_name` | string | User display name, if set |
160164
| ↳ `avatar` | string | User avatar hash |
161165
| ↳ `bot` | boolean | Whether user is a bot |
162166
| ↳ `system` | boolean | Whether user is a system user |
163-
| ↳ `email` | string | User email \(if available\) |
164-
| ↳ `verified` | boolean | Whether user email is verified |
167+
| ↳ `email` | string | User email. Not returned for a user looked up by ID |
168+
| ↳ `verified` | boolean | Whether the user email is verified. Not returned for a user looked up by ID |
165169

166170
</ReferenceDetails>
167171

@@ -178,7 +182,7 @@ Edit an existing message in a Discord channel
178182
| `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
179183
| `messageId` | string | Yes | The ID of the message to edit, e.g., 123456789012345678 |
180184
| `content` | string | No | The new text content for the message |
181-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
185+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
182186

183187
#### Output
184188

@@ -205,7 +209,7 @@ Delete a message from a Discord channel
205209
| --------- | ---- | -------- | ----------- |
206210
| `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
207211
| `messageId` | string | Yes | The ID of the message to delete, e.g., 123456789012345678 |
208-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
212+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
209213

210214
#### Output
211215

@@ -227,7 +231,7 @@ Delete 2-100 messages from a Discord channel in a single request
227231
| --------- | ---- | -------- | ----------- |
228232
| `channelId` | string | Yes | The Discord channel ID to delete messages from, e.g., 123456789012345678 |
229233
| `messageIds` | json | Yes | Array of 2-100 message IDs to delete. Messages older than 2 weeks cannot be bulk deleted. |
230-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
234+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
231235

232236
#### Output
233237

@@ -250,7 +254,7 @@ Add a reaction emoji to a Discord message
250254
| `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
251255
| `messageId` | string | Yes | The ID of the message to react to, e.g., 123456789012345678 |
252256
| `emoji` | string | Yes | The emoji to react with \(unicode emoji or custom emoji in name:id format\) |
253-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
257+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
254258

255259
#### Output
256260

@@ -274,7 +278,7 @@ Remove a reaction from a Discord message
274278
| `messageId` | string | Yes | The ID of the message with the reaction, e.g., 123456789012345678 |
275279
| `emoji` | string | Yes | The emoji to remove \(unicode emoji or custom emoji in name:id format\) |
276280
| `userId` | string | No | The user ID whose reaction to remove \(omit to remove bot's own reaction\), e.g., 123456789012345678 |
277-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
281+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
278282

279283
#### Output
280284

@@ -296,7 +300,7 @@ Pin a message in a Discord channel
296300
| --------- | ---- | -------- | ----------- |
297301
| `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
298302
| `messageId` | string | Yes | The ID of the message to pin, e.g., 123456789012345678 |
299-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
303+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
300304

301305
#### Output
302306

@@ -318,7 +322,7 @@ Unpin a message in a Discord channel
318322
| --------- | ---- | -------- | ----------- |
319323
| `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
320324
| `messageId` | string | Yes | The ID of the message to unpin, e.g., 123456789012345678 |
321-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
325+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
322326

323327
#### Output
324328

@@ -375,7 +379,7 @@ Create a thread in a Discord channel
375379
| `messageId` | string | No | The message ID to create a thread from \(if creating from existing message\), e.g., 123456789012345678 |
376380
| `autoArchiveDuration` | number | No | Duration in minutes to auto-archive the thread \(60, 1440, 4320, 10080\) |
377381
| `isPublic` | boolean | No | Whether the standalone thread is public \(visible to everyone in the channel\) or private. Ignored when creating a thread from an existing message, which always inherits the parent channel visibility. Defaults to public if omitted. |
378-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
382+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
379383

380384
#### Output
381385

@@ -402,7 +406,7 @@ Join a thread in Discord
402406
| Parameter | Type | Required | Description |
403407
| --------- | ---- | -------- | ----------- |
404408
| `threadId` | string | Yes | The thread ID to join, e.g., 123456789012345678 |
405-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
409+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
406410

407411
#### Output
408412

@@ -423,7 +427,7 @@ Leave a thread in Discord
423427
| Parameter | Type | Required | Description |
424428
| --------- | ---- | -------- | ----------- |
425429
| `threadId` | string | Yes | The thread ID to leave, e.g., 123456789012345678 |
426-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
430+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
427431

428432
#### Output
429433

@@ -445,7 +449,7 @@ Archive or unarchive a thread in Discord
445449
| --------- | ---- | -------- | ----------- |
446450
| `threadId` | string | Yes | The thread ID to archive/unarchive, e.g., 123456789012345678 |
447451
| `archived` | boolean | Yes | Whether to archive \(true\) or unarchive \(false\) the thread |
448-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
452+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
449453

450454
#### Output
451455

@@ -470,8 +474,8 @@ Create a new channel in a Discord server
470474
| --------- | ---- | -------- | ----------- |
471475
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
472476
| `name` | string | Yes | The name of the channel \(1-100 characters\) |
473-
| `type` | number | No | Channel type \(0=text, 2=voice, 4=category, 5=announcement, 13=stage\) |
474-
| `topic` | string | No | Channel topic \(0-1024 characters\) |
477+
| `type` | number | No | Channel type \(0=text, 2=voice, 4=category, 5=announcement, 13=stage, 15=forum\) |
478+
| `topic` | string | No | Channel topic \(up to 1024 characters for text channels, 4096 for forum channels\) |
475479
| `parentId` | string | No | Parent category ID for the channel, e.g., 123456789012345678 |
476480

477481
#### Output
@@ -500,7 +504,7 @@ Update a Discord channel
500504
| `channelId` | string | Yes | The Discord channel ID to update, e.g., 123456789012345678 |
501505
| `name` | string | No | The new name for the channel |
502506
| `topic` | string | No | The new topic for the channel |
503-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
507+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
504508

505509
#### Output
506510

@@ -526,7 +530,7 @@ Delete a Discord channel
526530
| Parameter | Type | Required | Description |
527531
| --------- | ---- | -------- | ----------- |
528532
| `channelId` | string | Yes | The Discord channel ID to delete, e.g., 123456789012345678 |
529-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
533+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
530534

531535
#### Output
532536

@@ -552,7 +556,7 @@ Get information about a Discord channel
552556
| Parameter | Type | Required | Description |
553557
| --------- | ---- | -------- | ----------- |
554558
| `channelId` | string | Yes | The Discord channel ID to retrieve, e.g., 123456789012345678 |
555-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
559+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
556560

557561
#### Output
558562

@@ -884,7 +888,7 @@ Create an invite link for a Discord channel
884888
| `maxAge` | number | No | Duration of invite in seconds \(0 = never expires, default 86400\) |
885889
| `maxUses` | number | No | Max number of uses \(0 = unlimited, default 0\) |
886890
| `temporary` | boolean | No | Whether invite grants temporary membership |
887-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
891+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
888892

889893
#### Output
890894

@@ -911,7 +915,7 @@ Get information about a Discord invite
911915
| Parameter | Type | Required | Description |
912916
| --------- | ---- | -------- | ----------- |
913917
| `inviteCode` | string | Yes | The invite code to retrieve |
914-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
918+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
915919

916920
#### Output
917921

@@ -938,7 +942,7 @@ Delete a Discord invite
938942
| Parameter | Type | Required | Description |
939943
| --------- | ---- | -------- | ----------- |
940944
| `inviteCode` | string | Yes | The invite code to delete |
941-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
945+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
942946

943947
#### Output
944948

@@ -960,7 +964,7 @@ Create a webhook in a Discord channel
960964
| --------- | ---- | -------- | ----------- |
961965
| `channelId` | string | Yes | The Discord channel ID to create the webhook in, e.g., 123456789012345678 |
962966
| `name` | string | Yes | Name of the webhook \(1-80 characters\) |
963-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
967+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
964968

965969
#### Output
966970

@@ -990,7 +994,7 @@ Execute a Discord webhook to send a message
990994
| `webhookToken` | string | Yes | The webhook token |
991995
| `content` | string | Yes | The message content to send |
992996
| `username` | string | No | Override the default username of the webhook |
993-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
997+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
994998

995999
#### Output
9961000

@@ -1016,7 +1020,7 @@ Get information about a Discord webhook
10161020
| Parameter | Type | Required | Description |
10171021
| --------- | ---- | -------- | ----------- |
10181022
| `webhookId` | string | Yes | The webhook ID to retrieve, e.g., 123456789012345678 |
1019-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
1023+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
10201024

10211025
#### Output
10221026

@@ -1043,7 +1047,7 @@ Delete a Discord webhook
10431047
| Parameter | Type | Required | Description |
10441048
| --------- | ---- | -------- | ----------- |
10451049
| `webhookId` | string | Yes | The webhook ID to delete, e.g., 123456789012345678 |
1046-
| `serverId` | string | Yes | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
1050+
| `serverId` | string | No | The Discord server ID \(guild ID\), e.g., 123456789012345678 |
10471051

10481052
#### Output
10491053

‎apps/docs/content/docs/integrations/mailgun.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ List events (logs) for messages sent through Mailgun
9494
| --------- | ---- | -------- | ----------- |
9595
| `domain` | string | Yes | Mailgun domain for listing events \(e.g., mg.example.com\) |
9696
| `event` | string | No | Filter by event type \(accepted, delivered, failed, opened, clicked, etc.\) |
97-
| `limit` | number | No | Maximum number of events to return \(default: 100\) |
97+
| `limit` | number | No | Maximum number of events to return \(default: 100, max: 300\) |
9898

9999
#### Output
100100

‎apps/docs/content/docs/integrations/resend.mdx‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ List all contacts in Resend
141141

142142
| Parameter | Type | Required | Description |
143143
| --------- | ---- | -------- | ----------- |
144+
| `limit` | number | No | Number of contacts to return, 1 to 100 \(Resend defaults to 20\) |
145+
| `after` | string | No | Pagination cursor: the ID of the last contact from the previous page, to fetch the next page |
144146

145147
#### Output
146148

@@ -315,15 +317,16 @@ Delete an audience from Resend by ID
315317

316318
### Create Broadcast
317319

318-
Create a broadcast email for an audience in Resend
320+
Create a broadcast email for a segment (or legacy audience) in Resend
319321

320322
<ReferenceDetails>
321323

322324
#### Input
323325

324326
| Parameter | Type | Required | Description |
325327
| --------- | ---- | -------- | ----------- |
326-
| `audienceId` | string | Yes | The ID of the audience to send the broadcast to |
328+
| `segmentId` | string | No | The ID of the segment to send the broadcast to. Provide this or audienceId; segmentId takes precedence |
329+
| `audienceId` | string | No | Deprecated by Resend in favor of segmentId: the ID of the audience to send the broadcast to |
327330
| `broadcastFrom` | string | Yes | Sender email address \(e.g., "sender@example.com" or "Sender Name &lt;sender@example.com&gt;"\) |
328331
| `broadcastSubject` | string | Yes | Broadcast email subject line |
329332
| `broadcastHtml` | string | No | HTML content of the broadcast |
@@ -383,7 +386,7 @@ Retrieve details of a broadcast by ID
383386
| `segmentId` | string | Segment ID \(the current recipient field\) |
384387
| `from` | string | Sender email address |
385388
| `subject` | string | Broadcast subject |
386-
| `replyTo` | string | Reply-to email address |
389+
| `replyTo` | array | Reply-to email addresses |
387390
| `previewText` | string | Inbox preview text |
388391
| `status` | string | Broadcast status \(e.g., draft, sent\) |
389392
| `createdAt` | string | Broadcast creation timestamp |
@@ -402,6 +405,8 @@ List all verified domains in your Resend account
402405

403406
| Parameter | Type | Required | Description |
404407
| --------- | ---- | -------- | ----------- |
408+
| `limit` | number | No | Number of domains to return, 1 to 100 \(Resend defaults to 20\) |
409+
| `after` | string | No | Pagination cursor: the ID of the last domain from the previous page, to fetch the next page |
405410

406411
#### Output
407412

‎apps/docs/content/docs/integrations/sendgrid.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,15 @@ Get a specific template by ID from SendGrid
331331

332332
### SendGrid List Templates
333333

334-
Get all email templates from SendGrid
334+
List email templates from SendGrid. Returns legacy templates only unless generations includes dynamic
335335

336336
<ReferenceDetails>
337337

338338
#### Input
339339

340340
| Parameter | Type | Required | Description |
341341
| --------- | ---- | -------- | ----------- |
342-
| `generations` | string | No | Filter by generation \(legacy, dynamic, or both\) |
342+
| `generations` | string | No | Template generations to return: legacy, dynamic, or legacy,dynamic \(default when omitted: legacy only\) |
343343
| `pageSize` | number | No | Number of templates to return per page \(default: 20, max: 200\). When paginating with pageToken, pass the same pageSize used on the first request to keep page boundaries consistent. |
344344
| `pageToken` | string | No | Page token from a previous response \(nextPageToken\) to fetch the next page |
345345

0 commit comments

Comments
 (0)