Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .agents/skills/validate-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ For **every** tool file, check:
- [ ] No fields are missing that the API provides and users would commonly need
- [ ] No phantom fields defined that the API doesn't return
- [ ] `optional: true` is set on fields that may not exist in all responses
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties`
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields (tool outputs only — block outputs do not support `properties`)
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties` (tool outputs only)
- [ ] Field descriptions are accurate and helpful

### Types (types.ts)
Expand Down Expand Up @@ -190,9 +190,8 @@ For **each tool** in `tools.access`:
### Block Outputs
- [ ] Outputs cover the key fields returned by ALL tools (not just one operation)
- [ ] Output types are correct (`'string'`, `'number'`, `'boolean'`, `'json'`)
- [ ] `type: 'json'` outputs either:
- Describe inner fields in the description string (GOOD): `'User profile (id, name, username, bio)'`
- Use nested output definitions (BEST): `{ id: { type: 'string' }, name: { type: 'string' } }`
- [ ] `type: 'json'` outputs describe inner fields in the description string: `'User profile (id, name, username, bio)'` or `'[{address, status, type}]'` for arrays
- [ ] **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
- [ ] No opaque `type: 'json'` with vague descriptions like `'Response data'`
- [ ] Outputs that only appear for certain operations use `condition` if supported, or document which operations return them

Expand Down
9 changes: 4 additions & 5 deletions .claude/commands/validate-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ For **every** tool file, check:
- [ ] No fields are missing that the API provides and users would commonly need
- [ ] No phantom fields defined that the API doesn't return
- [ ] `optional: true` is set on fields that may not exist in all responses
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties`
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields (tool outputs only — block outputs do not support `properties`)
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties` (tool outputs only)
- [ ] Field descriptions are accurate and helpful

### Types (types.ts)
Expand Down Expand Up @@ -175,9 +175,8 @@ For **each tool** in `tools.access`:
### Block Outputs
- [ ] Outputs cover the key fields returned by ALL tools (not just one operation)
- [ ] Output types are correct (`'string'`, `'number'`, `'boolean'`, `'json'`)
- [ ] `type: 'json'` outputs either:
- Describe inner fields in the description string (GOOD): `'User profile (id, name, username, bio)'`
- Use nested output definitions (BEST): `{ id: { type: 'string' }, name: { type: 'string' } }`
- [ ] `type: 'json'` outputs describe inner fields in the description string: `'User profile (id, name, username, bio)'` or `'[{address, status, type}]'` for arrays
- [ ] **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
- [ ] No opaque `type: 'json'` with vague descriptions like `'Response data'`
- [ ] Outputs that only appear for certain operations use `condition` if supported, or document which operations return them

Expand Down
9 changes: 4 additions & 5 deletions .cursor/commands/validate-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ For **every** tool file, check:
- [ ] No fields are missing that the API provides and users would commonly need
- [ ] No phantom fields defined that the API doesn't return
- [ ] `optional: true` is set on fields that may not exist in all responses
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties`
- [ ] When using `type: 'json'` and the shape is known, `properties` defines the inner fields (tool outputs only — block outputs do not support `properties`)
- [ ] When using `type: 'array'`, `items` defines the item structure with `properties` (tool outputs only)
- [ ] Field descriptions are accurate and helpful

### Types (types.ts)
Expand Down Expand Up @@ -170,9 +170,8 @@ For **each tool** in `tools.access`:
### Block Outputs
- [ ] Outputs cover the key fields returned by ALL tools (not just one operation)
- [ ] Output types are correct (`'string'`, `'number'`, `'boolean'`, `'json'`)
- [ ] `type: 'json'` outputs either:
- Describe inner fields in the description string (GOOD): `'User profile (id, name, username, bio)'`
- Use nested output definitions (BEST): `{ id: { type: 'string' }, name: { type: 'string' } }`
- [ ] `type: 'json'` outputs describe inner fields in the description string: `'User profile (id, name, username, bio)'` or `'[{address, status, type}]'` for arrays
- [ ] **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
- [ ] No opaque `type: 'json'` with vague descriptions like `'Response data'`
- [ ] Outputs that only appear for certain operations use `condition` if supported, or document which operations return them

Expand Down
10 changes: 6 additions & 4 deletions apps/sim/blocks/blocks/agentmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ export const AgentMailBlock: BlockConfig = {
},
{
id: 'replyTo',
title: 'Override To',
title: 'Override Recipients',
type: 'short-input',
placeholder: 'Override recipient (optional)',
placeholder: 'Override recipient (comma-separated)',
condition: { field: 'operation', value: 'reply_message' },
mode: 'advanced',
},
Expand Down Expand Up @@ -349,6 +349,7 @@ export const AgentMailBlock: BlockConfig = {
type: 'short-input',
placeholder: 'Optional username for email address',
condition: { field: 'operation', value: 'create_inbox' },
mode: 'advanced',
},
{
id: 'domain',
Expand Down Expand Up @@ -564,7 +565,7 @@ export const AgentMailBlock: BlockConfig = {
cc: { type: 'string', description: 'CC email addresses' },
bcc: { type: 'string', description: 'BCC email addresses' },
replyMessageId: { type: 'string', description: 'Message ID to reply to' },
replyTo: { type: 'string', description: 'Override recipient for reply' },
replyTo: { type: 'string', description: 'Override recipients for reply (comma-separated)' },
replyAll: { type: 'string', description: 'Reply to all recipients' },
forwardMessageId: { type: 'string', description: 'Message ID to forward' },
updateMessageId: { type: 'string', description: 'Message ID to update labels on' },
Expand Down Expand Up @@ -603,7 +604,8 @@ export const AgentMailBlock: BlockConfig = {
preview: { type: 'string', description: 'Message or draft preview text' },
senders: { type: 'json', description: 'List of sender email addresses' },
recipients: { type: 'json', description: 'List of recipient email addresses' },
labels: { type: 'json', description: 'Thread or draft labels' },
labels: { type: 'json', description: 'Thread, message, or draft labels' },
timestamp: { type: 'string', description: 'Time the message was sent or drafted' },
messages: { type: 'json', description: 'List of messages' },
threads: { type: 'json', description: 'List of threads' },
inboxes: { type: 'json', description: 'List of inboxes' },
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/blocks/blocks/agentphone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ export const AgentPhoneBlock: BlockConfig = {
from_: { type: 'string', description: 'Sender phone number on a number message' },
body: { type: 'string', description: 'Message body text' },
mediaUrl: { type: 'string', description: 'Attached media URL' },
mediaUrls: { type: 'json', description: 'Attached media URLs (array)' },
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
participant: { type: 'string', description: 'External participant phone number' },
lastMessageAt: { type: 'string', description: 'ISO 8601 timestamp' },
Expand All @@ -712,7 +713,7 @@ export const AgentPhoneBlock: BlockConfig = {
messages: {
type: 'json',
description:
'Conversation messages: [{id, body, fromNumber, toNumber, direction, channel, mediaUrl, receivedAt}]',
'Conversation messages: [{id, body, fromNumber, toNumber, direction, channel, mediaUrl, mediaUrls, receivedAt}]',
},
reactionType: { type: 'string', description: 'Reaction type applied' },
messageId: { type: 'string', description: 'Message ID' },
Expand Down
10 changes: 8 additions & 2 deletions apps/sim/blocks/blocks/sixtyfour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,13 @@ export const SixtyfourBlock: BlockConfig = {
},
emails: {
type: 'json',
description: 'Email addresses found with validation status and type (find_email)',
description:
'Email addresses found (find_email): [{address, status (OK|UNKNOWN|NOT_FOUND), type (COMPANY|PERSONAL)}]',
},
personalEmails: {
type: 'json',
description: 'Personal email addresses found in PERSONAL mode (find_email)',
description:
'Personal email addresses found in PERSONAL mode (find_email): [{address, status, type}]',
},
notes: {
type: 'string',
Expand All @@ -288,5 +290,9 @@ export const SixtyfourBlock: BlockConfig = {
type: 'number',
description: 'Quality score for the returned data, 0-10 (enrich_lead, enrich_company)',
},
orgChart: {
type: 'json',
description: 'Org chart returned when fullOrgChart is enabled (enrich_company)',
},
},
}
10 changes: 10 additions & 0 deletions apps/sim/tools/agentmail/get_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
subject: null,
text: null,
html: null,
labels: [],
timestamp: null,
createdAt: '',
},
}
Expand All @@ -71,6 +73,8 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
subject: data.subject ?? null,
text: data.text ?? null,
html: data.html ?? null,
labels: data.labels ?? [],
timestamp: data.timestamp ?? null,
createdAt: data.created_at ?? '',
},
}
Expand All @@ -86,6 +90,12 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
subject: { type: 'string', description: 'Message subject', optional: true },
text: { type: 'string', description: 'Plain text content', optional: true },
html: { type: 'string', description: 'HTML content', optional: true },
labels: { type: 'array', description: 'Labels assigned to the message' },
timestamp: {
type: 'string',
description: 'Time the message was sent or drafted',
optional: true,
},
createdAt: { type: 'string', description: 'Creation timestamp' },
},
}
8 changes: 8 additions & 0 deletions apps/sim/tools/agentmail/get_thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export const agentmailGetThreadTool: ToolConfig<GetThreadParams, GetThreadResult
subject: (msg.subject as string) ?? null,
text: (msg.text as string) ?? null,
html: (msg.html as string) ?? null,
labels: (msg.labels as string[]) ?? [],
timestamp: (msg.timestamp as string) ?? null,
createdAt: (msg.created_at as string) ?? '',
})),
},
Expand Down Expand Up @@ -110,6 +112,12 @@ export const agentmailGetThreadTool: ToolConfig<GetThreadParams, GetThreadResult
subject: { type: 'string', description: 'Message subject', optional: true },
text: { type: 'string', description: 'Plain text content', optional: true },
html: { type: 'string', description: 'HTML content', optional: true },
labels: { type: 'array', description: 'Labels assigned to the message' },
timestamp: {
type: 'string',
description: 'Time the message was sent or drafted',
optional: true,
},
createdAt: { type: 'string', description: 'Creation timestamp' },
},
},
Expand Down
6 changes: 6 additions & 0 deletions apps/sim/tools/agentmail/list_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const agentmailListMessagesTool: ToolConfig<ListMessagesParams, ListMessa
to: (msg.to as string[]) ?? [],
subject: (msg.subject as string) ?? null,
preview: (msg.preview as string) ?? null,
timestamp: (msg.timestamp as string) ?? null,
createdAt: (msg.created_at as string) ?? '',
})),
count: data.count ?? 0,
Expand All @@ -88,6 +89,11 @@ export const agentmailListMessagesTool: ToolConfig<ListMessagesParams, ListMessa
to: { type: 'array', description: 'Recipient email addresses' },
subject: { type: 'string', description: 'Message subject', optional: true },
preview: { type: 'string', description: 'Message preview text', optional: true },
timestamp: {
type: 'string',
description: 'Time the message was sent or drafted',
optional: true,
},
createdAt: { type: 'string', description: 'Creation timestamp' },
},
},
Expand Down
5 changes: 5 additions & 0 deletions apps/sim/tools/agentmail/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ export interface GetThreadResult extends ToolResponse {
subject: string | null
text: string | null
html: string | null
labels: string[]
timestamp: string | null
createdAt: string
}>
}
Expand Down Expand Up @@ -417,6 +419,7 @@ export interface ListMessagesResult extends ToolResponse {
to: string[]
subject: string | null
preview: string | null
timestamp: string | null
createdAt: string
}>
count: number
Expand All @@ -442,6 +445,8 @@ export interface GetMessageResult extends ToolResponse {
subject: string | null
text: string | null
html: string | null
labels: string[]
timestamp: string | null
createdAt: string
}
}
6 changes: 6 additions & 0 deletions apps/sim/tools/agentphone/get_conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const agentphoneGetConversationTool: ToolConfig<
direction: (msg.direction as string) ?? '',
channel: (msg.channel as string | null) ?? null,
mediaUrl: (msg.mediaUrl as string | null) ?? null,
mediaUrls: Array.isArray(msg.mediaUrls) ? (msg.mediaUrls as string[]) : [],
Comment thread
waleedlatif1 marked this conversation as resolved.
receivedAt: (msg.receivedAt as string) ?? '',
})
)
Expand Down Expand Up @@ -129,6 +130,11 @@ export const agentphoneGetConversationTool: ToolConfig<
direction: { type: 'string', description: 'inbound or outbound' },
channel: { type: 'string', description: 'sms, mms, or imessage', optional: true },
mediaUrl: { type: 'string', description: 'Attached media URL', optional: true },
mediaUrls: {
type: 'array',
description: 'All attached media URLs',
items: { type: 'string' },
},
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
},
},
Expand Down
6 changes: 6 additions & 0 deletions apps/sim/tools/agentphone/get_conversation_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const agentphoneGetConversationMessagesTool: ToolConfig<
direction: (msg.direction as string) ?? '',
channel: (msg.channel as string | null) ?? null,
mediaUrl: (msg.mediaUrl as string | null) ?? null,
mediaUrls: Array.isArray(msg.mediaUrls) ? (msg.mediaUrls as string[]) : [],
receivedAt: (msg.receivedAt as string) ?? '',
})
),
Expand All @@ -107,6 +108,11 @@ export const agentphoneGetConversationMessagesTool: ToolConfig<
direction: { type: 'string', description: 'inbound or outbound' },
channel: { type: 'string', description: 'sms, mms, or imessage', optional: true },
mediaUrl: { type: 'string', description: 'Attached media URL', optional: true },
mediaUrls: {
type: 'array',
description: 'All attached media URLs',
items: { type: 'string' },
},
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
},
},
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/tools/agentphone/list_contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const agentphoneListContactsTool: ToolConfig<
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Number of results to return (default 50)',
description: 'Number of results to return (default 50, max 200)',
},
offset: {
type: 'number',
Expand Down
1 change: 1 addition & 0 deletions apps/sim/tools/agentphone/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface AgentPhoneConversationMessage {
direction: string
channel: string | null
mediaUrl: string | null
mediaUrls: string[]
receivedAt: string
}

Expand Down
6 changes: 6 additions & 0 deletions apps/sim/tools/agentphone/update_conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const agentphoneUpdateConversationTool: ToolConfig<
direction: (message.direction as string) ?? '',
channel: (message.channel as string | null) ?? null,
mediaUrl: (message.mediaUrl as string | null) ?? null,
mediaUrls: Array.isArray(message.mediaUrls) ? (message.mediaUrls as string[]) : [],
receivedAt: (message.receivedAt as string) ?? '',
})
)
Expand Down Expand Up @@ -138,6 +139,11 @@ export const agentphoneUpdateConversationTool: ToolConfig<
description: 'Media URL if any',
optional: true,
},
mediaUrls: {
type: 'array',
description: 'All attached media URLs',
items: { type: 'string' },
},
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
},
},
Expand Down
6 changes: 6 additions & 0 deletions apps/sim/tools/sixtyfour/enrich_company.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const sixtyfourEnrichCompanyTool: ToolConfig<
structuredData: data.structured_data ?? {},
references: data.references ?? {},
confidenceScore: data.confidence_score ?? null,
orgChart: data.org_chart ?? null,
},
}
},
Expand All @@ -139,5 +140,10 @@ export const sixtyfourEnrichCompanyTool: ToolConfig<
description: 'Quality score for the returned data (0-10)',
optional: true,
},
orgChart: {
type: 'json',
description: 'Org chart returned when fullOrgChart is enabled',
optional: true,
},
},
}
1 change: 1 addition & 0 deletions apps/sim/tools/sixtyfour/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,6 @@ export interface SixtyfourEnrichCompanyResponse extends ToolResponse {
structuredData: Record<string, unknown>
references: Record<string, string>
confidenceScore: number | null
orgChart: Record<string, unknown> | unknown[] | null
}
}
Loading