You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mode: 'advanced', // Rarely used, hide from basic view
716
+
}
717
+
```
718
+
719
+
## WandConfig for Complex Inputs
720
+
721
+
Use `wandConfig` for fields that are hard to fill out manually, such as timestamps, JSON arrays, and complex query strings. This gives users an AI-assisted input experience.
722
+
723
+
```typescript
724
+
// Timestamps - use generationType: 'timestamp' to inject current date context
725
+
{
726
+
id: 'startTime',
727
+
title: 'Start Time',
728
+
type: 'short-input',
729
+
mode: 'advanced',
730
+
wandConfig: {
731
+
enabled: true,
732
+
prompt: 'Generate an ISO 8601 timestamp based on the user description. Return ONLY the timestamp string.',
733
+
generationType: 'timestamp',
734
+
},
735
+
}
736
+
737
+
// JSON arrays - use generationType: 'json-object'
738
+
{
739
+
id: 'mediaIds',
740
+
title: 'Media IDs',
741
+
type: 'short-input',
742
+
mode: 'advanced',
743
+
wandConfig: {
744
+
enabled: true,
745
+
prompt: 'Generate a comma-separated list of media IDs. Return ONLY the comma-separated values.',
746
+
},
747
+
}
748
+
```
749
+
750
+
## Naming Convention
751
+
752
+
All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MUST use `snake_case` (e.g., `x_create_tweet`, `slack_send_message`). Never use camelCase or PascalCase.
753
+
698
754
## Checklist Before Finishing
699
755
700
756
-[ ] All subBlocks have `id`, `title` (except switch), and `type`
701
757
-[ ] Conditions use correct syntax (field, value, not, and)
702
758
-[ ] DependsOn set for fields that need other values
703
759
-[ ] Required fields marked correctly (boolean or condition)
704
760
-[ ] OAuth inputs have correct `serviceId`
705
-
-[ ] Tools.access lists all tool IDs
706
-
-[ ] Tools.config.tool returns correct tool ID
761
+
-[ ] Tools.access lists all tool IDs (snake_case)
762
+
-[ ] Tools.config.tool returns correct tool ID (snake_case)
Copy file name to clipboardExpand all lines: .claude/commands/add-integration.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -685,13 +685,40 @@ return NextResponse.json({
685
685
|`isUserFile`|`@/lib/core/utils/user-file`| Type guard for UserFile objects |
686
686
|`FileInputSchema`|`@/lib/uploads/utils/file-schemas`| Zod schema for file validation |
687
687
688
+
### Advanced Mode for Optional Fields
689
+
690
+
Optional fields that are rarely used should be set to `mode: 'advanced'` so they don't clutter the basic UI. Examples: pagination tokens, time range filters, sort order, max results, reply settings.
691
+
692
+
### WandConfig for Complex Inputs
693
+
694
+
Use `wandConfig` for fields that are hard to fill out manually:
695
+
-**Timestamps**: Use `generationType: 'timestamp'` to inject current date context into the AI prompt
696
+
-**JSON arrays**: Use `generationType: 'json-object'` for structured data
697
+
-**Complex queries**: Use a descriptive prompt explaining the expected format
698
+
699
+
```typescript
700
+
{
701
+
id: 'startTime',
702
+
title: 'Start Time',
703
+
type: 'short-input',
704
+
mode: 'advanced',
705
+
wandConfig: {
706
+
enabled: true,
707
+
prompt: 'Generate an ISO 8601 timestamp. Return ONLY the timestamp string.',
708
+
generationType: 'timestamp',
709
+
},
710
+
}
711
+
```
712
+
688
713
### Common Gotchas
689
714
690
715
1.**OAuth serviceId must match** - The `serviceId` in oauth-input must match the OAuth provider configuration
691
-
2.**Tool IDs are snake_case** - `stripe_create_payment`, not `stripeCreatePayment`
716
+
2.**All tool IDs MUST be snake_case** - `stripe_create_payment`, not `stripeCreatePayment`. This applies to tool `id` fields, registry keys, `tools.access` arrays, and `tools.config.tool` return values
692
717
3.**Block type is snake_case** - `type: 'stripe'`, not `type: 'Stripe'`
693
718
4.**Alphabetical ordering** - Keep imports and registry entries alphabetically sorted
694
719
5.**Required can be conditional** - Use `required: { field: 'op', value: 'create' }` instead of always true
695
720
6.**DependsOn clears options** - When a dependency changes, selector options are refetched
696
721
7.**Never pass Buffer directly to fetch** - Convert to `new Uint8Array(buffer)` for TypeScript compatibility
Copy file name to clipboardExpand all lines: .claude/commands/add-tools.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,13 +272,17 @@ If creating V2 tools (API-aligned outputs), use `_v2` suffix:
272
272
- Version: `'2.0.0'`
273
273
- Outputs: Flat, API-aligned (no content/metadata wrapper)
274
274
275
+
## Naming Convention
276
+
277
+
All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`, `slack_send_message`). Never use camelCase or PascalCase for tool IDs.
278
+
275
279
## Checklist Before Finishing
276
280
281
+
-[ ] All tool IDs use snake_case
277
282
-[ ] All params have explicit `required: true` or `required: false`
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx
0 commit comments