Skip to content

Commit b197bb0

Browse files
authored
improvement(integrations): tighten sixtyfour, agentmail, agentphone outputs (#4765)
* improvement(integrations): tighten sixtyfour, agentmail, agentphone outputs * fix(agentphone): expose mediaUrls in block outputs * fix(sixtyfour): remove invalid `properties` field from block outputs * chore(skills): clarify validate-integration block vs tool outputs
1 parent 41c8193 commit b197bb0

17 files changed

Lines changed: 84 additions & 23 deletions

File tree

.agents/skills/validate-integration/SKILL.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ For **every** tool file, check:
102102
- [ ] No fields are missing that the API provides and users would commonly need
103103
- [ ] No phantom fields defined that the API doesn't return
104104
- [ ] `optional: true` is set on fields that may not exist in all responses
105-
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields
106-
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties`
105+
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields (tool outputs only — block outputs do not support `properties`)
106+
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties` (tool outputs only)
107107
- [ ] Field descriptions are accurate and helpful
108108

109109
### Types (types.ts)
@@ -190,9 +190,8 @@ For **each tool** in `tools.access`:
190190
### Block Outputs
191191
- [ ] Outputs cover the key fields returned by ALL tools (not just one operation)
192192
- [ ] Output types are correct (`'string'`, `'number'`, `'boolean'`, `'json'`)
193-
- [ ] `type: 'json'` outputs either:
194-
- Describe inner fields in the description string (GOOD): `'User profile (id, name, username, bio)'`
195-
- Use nested output definitions (BEST): `{ id: { type: 'string' }, name: { type: 'string' } }`
193+
- [ ] `type: 'json'` outputs describe inner fields in the description string: `'User profile (id, name, username, bio)'` or `'[{address, status, type}]'` for arrays
194+
- [ ] **Do NOT add a `properties: {...}` field on block outputs.** Block-level `OutputFieldDefinition` (from `@sim/workflow-types/blocks`) only accepts `{ type, description?, condition?, hiddenFromDisplay? }`. Nested `properties` is a tool-level construct (`OutputProperty`) — adding it to a block output will fail TypeScript at build time
196195
- [ ] No opaque `type: 'json'` with vague descriptions like `'Response data'`
197196
- [ ] Outputs that only appear for certain operations use `condition` if supported, or document which operations return them
198197

.claude/commands/validate-integration.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ For **every** tool file, check:
8787
- [ ] No fields are missing that the API provides and users would commonly need
8888
- [ ] No phantom fields defined that the API doesn't return
8989
- [ ] `optional: true` is set on fields that may not exist in all responses
90-
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields
91-
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties`
90+
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields (tool outputs only — block outputs do not support `properties`)
91+
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties` (tool outputs only)
9292
- [ ] Field descriptions are accurate and helpful
9393

9494
### Types (types.ts)
@@ -175,9 +175,8 @@ For **each tool** in `tools.access`:
175175
### Block Outputs
176176
- [ ] Outputs cover the key fields returned by ALL tools (not just one operation)
177177
- [ ] Output types are correct (`'string'`, `'number'`, `'boolean'`, `'json'`)
178-
- [ ] `type: 'json'` outputs either:
179-
- Describe inner fields in the description string (GOOD): `'User profile (id, name, username, bio)'`
180-
- Use nested output definitions (BEST): `{ id: { type: 'string' }, name: { type: 'string' } }`
178+
- [ ] `type: 'json'` outputs describe inner fields in the description string: `'User profile (id, name, username, bio)'` or `'[{address, status, type}]'` for arrays
179+
- [ ] **Do NOT add a `properties: {...}` field on block outputs.** Block-level `OutputFieldDefinition` (from `@sim/workflow-types/blocks`) only accepts `{ type, description?, condition?, hiddenFromDisplay? }`. Nested `properties` is a tool-level construct (`OutputProperty`) — adding it to a block output will fail TypeScript at build time
181180
- [ ] No opaque `type: 'json'` with vague descriptions like `'Response data'`
182181
- [ ] Outputs that only appear for certain operations use `condition` if supported, or document which operations return them
183182

.cursor/commands/validate-integration.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ For **every** tool file, check:
8282
- [ ] No fields are missing that the API provides and users would commonly need
8383
- [ ] No phantom fields defined that the API doesn't return
8484
- [ ] `optional: true` is set on fields that may not exist in all responses
85-
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields
86-
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties`
85+
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields (tool outputs only — block outputs do not support `properties`)
86+
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties` (tool outputs only)
8787
- [ ] Field descriptions are accurate and helpful
8888

8989
### Types (types.ts)
@@ -170,9 +170,8 @@ For **each tool** in `tools.access`:
170170
### Block Outputs
171171
- [ ] Outputs cover the key fields returned by ALL tools (not just one operation)
172172
- [ ] Output types are correct (`'string'`, `'number'`, `'boolean'`, `'json'`)
173-
- [ ] `type: 'json'` outputs either:
174-
- Describe inner fields in the description string (GOOD): `'User profile (id, name, username, bio)'`
175-
- Use nested output definitions (BEST): `{ id: { type: 'string' }, name: { type: 'string' } }`
173+
- [ ] `type: 'json'` outputs describe inner fields in the description string: `'User profile (id, name, username, bio)'` or `'[{address, status, type}]'` for arrays
174+
- [ ] **Do NOT add a `properties: {...}` field on block outputs.** Block-level `OutputFieldDefinition` (from `@sim/workflow-types/blocks`) only accepts `{ type, description?, condition?, hiddenFromDisplay? }`. Nested `properties` is a tool-level construct (`OutputProperty`) — adding it to a block output will fail TypeScript at build time
176175
- [ ] No opaque `type: 'json'` with vague descriptions like `'Response data'`
177176
- [ ] Outputs that only appear for certain operations use `condition` if supported, or document which operations return them
178177

apps/sim/blocks/blocks/agentmail.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ export const AgentMailBlock: BlockConfig = {
193193
},
194194
{
195195
id: 'replyTo',
196-
title: 'Override To',
196+
title: 'Override Recipients',
197197
type: 'short-input',
198-
placeholder: 'Override recipient (optional)',
198+
placeholder: 'Override recipient (comma-separated)',
199199
condition: { field: 'operation', value: 'reply_message' },
200200
mode: 'advanced',
201201
},
@@ -349,6 +349,7 @@ export const AgentMailBlock: BlockConfig = {
349349
type: 'short-input',
350350
placeholder: 'Optional username for email address',
351351
condition: { field: 'operation', value: 'create_inbox' },
352+
mode: 'advanced',
352353
},
353354
{
354355
id: 'domain',
@@ -564,7 +565,7 @@ export const AgentMailBlock: BlockConfig = {
564565
cc: { type: 'string', description: 'CC email addresses' },
565566
bcc: { type: 'string', description: 'BCC email addresses' },
566567
replyMessageId: { type: 'string', description: 'Message ID to reply to' },
567-
replyTo: { type: 'string', description: 'Override recipient for reply' },
568+
replyTo: { type: 'string', description: 'Override recipients for reply (comma-separated)' },
568569
replyAll: { type: 'string', description: 'Reply to all recipients' },
569570
forwardMessageId: { type: 'string', description: 'Message ID to forward' },
570571
updateMessageId: { type: 'string', description: 'Message ID to update labels on' },
@@ -603,7 +604,8 @@ export const AgentMailBlock: BlockConfig = {
603604
preview: { type: 'string', description: 'Message or draft preview text' },
604605
senders: { type: 'json', description: 'List of sender email addresses' },
605606
recipients: { type: 'json', description: 'List of recipient email addresses' },
606-
labels: { type: 'json', description: 'Thread or draft labels' },
607+
labels: { type: 'json', description: 'Thread, message, or draft labels' },
608+
timestamp: { type: 'string', description: 'Time the message was sent or drafted' },
607609
messages: { type: 'json', description: 'List of messages' },
608610
threads: { type: 'json', description: 'List of threads' },
609611
inboxes: { type: 'json', description: 'List of inboxes' },

apps/sim/blocks/blocks/agentphone.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,7 @@ export const AgentPhoneBlock: BlockConfig = {
700700
from_: { type: 'string', description: 'Sender phone number on a number message' },
701701
body: { type: 'string', description: 'Message body text' },
702702
mediaUrl: { type: 'string', description: 'Attached media URL' },
703+
mediaUrls: { type: 'json', description: 'Attached media URLs (array)' },
703704
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
704705
participant: { type: 'string', description: 'External participant phone number' },
705706
lastMessageAt: { type: 'string', description: 'ISO 8601 timestamp' },
@@ -712,7 +713,7 @@ export const AgentPhoneBlock: BlockConfig = {
712713
messages: {
713714
type: 'json',
714715
description:
715-
'Conversation messages: [{id, body, fromNumber, toNumber, direction, channel, mediaUrl, receivedAt}]',
716+
'Conversation messages: [{id, body, fromNumber, toNumber, direction, channel, mediaUrl, mediaUrls, receivedAt}]',
716717
},
717718
reactionType: { type: 'string', description: 'Reaction type applied' },
718719
messageId: { type: 'string', description: 'Message ID' },

apps/sim/blocks/blocks/sixtyfour.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,13 @@ export const SixtyfourBlock: BlockConfig = {
265265
},
266266
emails: {
267267
type: 'json',
268-
description: 'Email addresses found with validation status and type (find_email)',
268+
description:
269+
'Email addresses found (find_email): [{address, status (OK|UNKNOWN|NOT_FOUND), type (COMPANY|PERSONAL)}]',
269270
},
270271
personalEmails: {
271272
type: 'json',
272-
description: 'Personal email addresses found in PERSONAL mode (find_email)',
273+
description:
274+
'Personal email addresses found in PERSONAL mode (find_email): [{address, status, type}]',
273275
},
274276
notes: {
275277
type: 'string',
@@ -288,5 +290,9 @@ export const SixtyfourBlock: BlockConfig = {
288290
type: 'number',
289291
description: 'Quality score for the returned data, 0-10 (enrich_lead, enrich_company)',
290292
},
293+
orgChart: {
294+
type: 'json',
295+
description: 'Org chart returned when fullOrgChart is enabled (enrich_company)',
296+
},
291297
},
292298
}

apps/sim/tools/agentmail/get_message.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
5454
subject: null,
5555
text: null,
5656
html: null,
57+
labels: [],
58+
timestamp: null,
5759
createdAt: '',
5860
},
5961
}
@@ -71,6 +73,8 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
7173
subject: data.subject ?? null,
7274
text: data.text ?? null,
7375
html: data.html ?? null,
76+
labels: data.labels ?? [],
77+
timestamp: data.timestamp ?? null,
7478
createdAt: data.created_at ?? '',
7579
},
7680
}
@@ -86,6 +90,12 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
8690
subject: { type: 'string', description: 'Message subject', optional: true },
8791
text: { type: 'string', description: 'Plain text content', optional: true },
8892
html: { type: 'string', description: 'HTML content', optional: true },
93+
labels: { type: 'array', description: 'Labels assigned to the message' },
94+
timestamp: {
95+
type: 'string',
96+
description: 'Time the message was sent or drafted',
97+
optional: true,
98+
},
8999
createdAt: { type: 'string', description: 'Creation timestamp' },
90100
},
91101
}

apps/sim/tools/agentmail/get_thread.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ export const agentmailGetThreadTool: ToolConfig<GetThreadParams, GetThreadResult
8080
subject: (msg.subject as string) ?? null,
8181
text: (msg.text as string) ?? null,
8282
html: (msg.html as string) ?? null,
83+
labels: (msg.labels as string[]) ?? [],
84+
timestamp: (msg.timestamp as string) ?? null,
8385
createdAt: (msg.created_at as string) ?? '',
8486
})),
8587
},
@@ -110,6 +112,12 @@ export const agentmailGetThreadTool: ToolConfig<GetThreadParams, GetThreadResult
110112
subject: { type: 'string', description: 'Message subject', optional: true },
111113
text: { type: 'string', description: 'Plain text content', optional: true },
112114
html: { type: 'string', description: 'HTML content', optional: true },
115+
labels: { type: 'array', description: 'Labels assigned to the message' },
116+
timestamp: {
117+
type: 'string',
118+
description: 'Time the message was sent or drafted',
119+
optional: true,
120+
},
113121
createdAt: { type: 'string', description: 'Creation timestamp' },
114122
},
115123
},

apps/sim/tools/agentmail/list_messages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const agentmailListMessagesTool: ToolConfig<ListMessagesParams, ListMessa
6868
to: (msg.to as string[]) ?? [],
6969
subject: (msg.subject as string) ?? null,
7070
preview: (msg.preview as string) ?? null,
71+
timestamp: (msg.timestamp as string) ?? null,
7172
createdAt: (msg.created_at as string) ?? '',
7273
})),
7374
count: data.count ?? 0,
@@ -88,6 +89,11 @@ export const agentmailListMessagesTool: ToolConfig<ListMessagesParams, ListMessa
8889
to: { type: 'array', description: 'Recipient email addresses' },
8990
subject: { type: 'string', description: 'Message subject', optional: true },
9091
preview: { type: 'string', description: 'Message preview text', optional: true },
92+
timestamp: {
93+
type: 'string',
94+
description: 'Time the message was sent or drafted',
95+
optional: true,
96+
},
9197
createdAt: { type: 'string', description: 'Creation timestamp' },
9298
},
9399
},

apps/sim/tools/agentmail/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ export interface GetThreadResult extends ToolResponse {
366366
subject: string | null
367367
text: string | null
368368
html: string | null
369+
labels: string[]
370+
timestamp: string | null
369371
createdAt: string
370372
}>
371373
}
@@ -417,6 +419,7 @@ export interface ListMessagesResult extends ToolResponse {
417419
to: string[]
418420
subject: string | null
419421
preview: string | null
422+
timestamp: string | null
420423
createdAt: string
421424
}>
422425
count: number
@@ -442,6 +445,8 @@ export interface GetMessageResult extends ToolResponse {
442445
subject: string | null
443446
text: string | null
444447
html: string | null
448+
labels: string[]
449+
timestamp: string | null
445450
createdAt: string
446451
}
447452
}

0 commit comments

Comments
 (0)