forked from dyad-sh/dyad
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlocal_agent_advanced.spec.ts_local-agent---mention-apps-1.txt
More file actions
778 lines (778 loc) Β· 46.4 KB
/
Copy pathlocal_agent_advanced.spec.ts_local-agent---mention-apps-1.txt
File metadata and controls
778 lines (778 loc) Β· 46.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
{
"body": {
"model": "anthropic/claude-opus-4-5",
"max_tokens": 32000,
"thinking": {
"type": "adaptive",
"display": "summarized"
},
"output_config": {
"effort": "medium"
},
"system": [
{
"type": "text",
"text": "[[SYSTEM_MESSAGE]]"
}
],
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "[dump] @app:minimal-with-ai-rules hi\n\n<system-reminder>\nThe user has mentioned the following apps in their prompt: `minimal-with-ai-rules`. These apps are separate from the current app and are READ-ONLY. To inspect them, pass the app name as the `app_name` parameter to read-only tools (`read_file`, `list_files`, `grep`, `code_search`); matching is case-insensitive. Write tools cannot target these apps. Omit `app_name` to operate on the current app.\n</system-reminder>"
}
]
}
],
"tools": [
{
"name": "write_file",
"description": "Create or completely overwrite a file in the codebase",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The file path relative to the app root"
},
"content": {
"type": "string",
"description": "The content to write to the file"
},
"description": {
"description": "Brief description of the change",
"type": "string"
}
},
"required": [
"path",
"content"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "search_replace",
"description": "Use this tool to propose a search and replace operation on an existing file.\n\nThe tool will replace ONE occurrence of old_string with new_string in the specified file. Matching is line-based: old_string must match whole file lines, not a partial fragment within a line. To edit part of a line, include the entire original line in old_string and the entire edited line in new_string.\n\nCRITICAL REQUIREMENTS FOR USING THIS TOOL:\n\n1. UNIQUENESS: The old_string MUST uniquely identify the specific instance you want to change. This means:\n - Include AT LEAST 3-5 lines of context BEFORE the change point\n - Include AT LEAST 3-5 lines of context AFTER the change point\n - Include all whitespace, indentation, and surrounding code exactly as it appears in the file\n - Do NOT use only a partial fragment of a line. Include the full line containing the change.\n\n2. SINGLE INSTANCE: This tool can only change ONE instance at a time. If you need to change multiple instances:\n - Make separate calls to this tool for each instance\n - Each call must uniquely identify its specific instance using extensive context\n\n3. VERIFICATION: Before using this tool:\n - If multiple instances exist, gather enough context to uniquely identify each one\n - Plan separate tool calls for each instance\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "The path to the file you want to search and replace in."
},
"old_string": {
"type": "string",
"description": "The text block to replace. Matching is line-based: each line in old_string must match a whole line in the file, not just a substring within a line. To edit part of a line, include the entire original line in old_string and the entire edited line in new_string. The block must be unique within the file."
},
"new_string": {
"type": "string",
"description": "The edited text to replace the old_string (must be different from the old_string)"
}
},
"required": [
"file_path",
"old_string",
"new_string"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "copy_file",
"description": "Copy a file from one location to another. Can copy uploaded attachment files (attachments:<name> or .dyad/media paths) into the codebase, or copy files within the codebase.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "The source file path (can be attachments:<name>, a .dyad/media path, or a path relative to the app root)"
},
"to": {
"type": "string",
"description": "The destination file path relative to the app root"
},
"description": {
"description": "Brief description of why the file is being copied",
"type": "string"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "delete_file",
"description": "Delete a file from the codebase",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The file path to delete"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "rename_file",
"description": "Rename or move a file in the codebase",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "The current file path"
},
"to": {
"type": "string",
"description": "The new file path"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "add_dependency",
"description": "Install npm packages",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"packages": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of package names to install"
}
},
"required": [
"packages"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "read_file",
"description": "Read the content of a file from the codebase or an attachment path such as attachments:notes.txt.\n \n- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The file path to read"
},
"app_name": {
"description": "Optional. Name of a referenced app (from `@app:Name` mentions in the user's prompt) to read from instead of the current app. Omit to read from the current app.",
"type": "string"
},
"start_line_one_indexed": {
"description": "The one-indexed line number to start reading from (inclusive).",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"end_line_one_indexed_inclusive": {
"description": "The one-indexed line number to end reading at (inclusive).",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
},
"required": [
"path"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "list_files",
"description": "List files in the application directory. By default, lists only the immediate directory contents. Use recursive=true to list all files recursively. Use include_ignored=true to include git-ignored and hidden paths; recursive ignored listings require directory to be set. Results are capped at 1000 paths.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"directory": {
"description": "Optional subdirectory to list",
"type": "string"
},
"app_name": {
"description": "Optional. Name of a referenced app (from `@app:Name` mentions in the user's prompt) to list from instead of the current app. Omit to list the current app.",
"type": "string"
},
"recursive": {
"description": "Whether to list files recursively (default: false)",
"type": "boolean"
},
"include_ignored": {
"description": "Whether to include git-ignored and hidden files/directories such as node_modules (default: false).",
"type": "boolean"
}
},
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "grep",
"description": "Search for a regex pattern or exact literal text in the codebase using ripgrep.\n\n- Returns matching lines with file paths and line numbers\n- By default, the search is case-insensitive\n- Use literal=true for exact symbols/snippets with punctuation, e.g. createBooking({, import strings, route paths, or JSX tags\n- Use include_pattern to filter by file type (e.g. '*.tsx')\n- Use exclude_pattern to skip certain files (e.g. '*.test.ts')\n- Use include_ignored=true to search git-ignored and hidden files/directories such as node_modules. Pair it with include_pattern to keep searches scoped.\n- Results are limited to 100 matches by default (max 250). If results are truncated, narrow your search with include_pattern or a more specific query.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The regex pattern to search for, or the exact text when literal is true"
},
"app_name": {
"description": "Optional. Name of a referenced app (from `@app:Name` mentions in the user's prompt) to search in instead of the current app. Omit to search the current app.",
"type": "string"
},
"include_pattern": {
"description": "Glob pattern for files to include (e.g. '*.ts' for TypeScript files)",
"type": "string"
},
"exclude_pattern": {
"description": "Glob pattern for files to exclude",
"type": "string"
},
"include_ignored": {
"description": "Whether to include git-ignored and hidden files/directories such as node_modules (default: false). Use include_pattern to keep this scoped.",
"type": "boolean"
},
"case_sensitive": {
"description": "Whether the search should be case sensitive (default: false)",
"type": "boolean"
},
"literal": {
"description": "Search query as exact text instead of a regex. Use this for symbols or snippets containing punctuation such as createBooking({, route paths, JSX tags, or import strings.",
"type": "boolean"
},
"limit": {
"description": "Maximum number of matches to return (default: 100, max: 250). Use include_pattern to narrow results if limit is reached.",
"type": "number",
"minimum": 1,
"maximum": 250
}
},
"required": [
"query"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "code_search",
"description": "Search the codebase semantically to find files relevant to a query. Use this tool when you need to discover which files contain code related to a specific concept, feature, or functionality. Returns a list of file paths that are most relevant to the search query.\n\n### When to Use This Tool\n\n- Explore unfamiliar codebases\n- Ask \"how / where / what\" questions to understand behavior\n- Find code by meaning rather than exact text\n\n### When NOT to Use\n\nSkip this tool for:\n1. Exact text matches (use `grep`)\n2. Reading known files (use `read_file`)\n3. Simple symbol lookups (use `grep`)\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query to find relevant files"
},
"app_name": {
"description": "Optional. Name of a referenced app (from `@app:Name` mentions in the user's prompt) to search in instead of the current app. Omit to search the current app.",
"type": "string"
}
},
"required": [
"query"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "set_chat_summary",
"description": "Set the title/summary for this chat. Call this tool exactly once early in the turn, as soon as you understand the user's request well enough to write a short title. Do not wait until the end of the turn.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "A short summary/title for the chat"
}
},
"required": [
"summary"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "add_integration",
"description": "Prompt the user to choose and set up a database provider for the app. Do NOT set the provider parameter unless the user explicitly names a specific provider (e.g. 'Supabase' or 'Neon') in their message. The tool blocks until the user finishes the setup inside the chat and clicks Continue, then returns; you should then proceed with the next step.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"provider": {
"description": "Optional preferred database provider. Use 'none' (or omit) if the user did not explicitly name a provider. Only use 'supabase' or 'neon' if the user specifically mentions that provider name in their prompt.",
"type": "string",
"enum": [
"none",
"supabase",
"neon"
]
}
},
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "enable_nitro",
"description": "Add a Nitro server layer to this Vite app so it can run secure server-side code\n(API routes, database clients, secrets, webhooks).\n\nWHEN TO CALL: Before writing any code under server/, before referencing DATABASE_URL\nor any server-only env var, or when the user asks for an API route, webhook, or\nserver-side compute. Skip for client-side fetch with public/anon keys, for use\ncases fully covered by Supabase (anon key + RLS), or when the user explicitly\nsays \"static only\" / \"no backend\".\n\nDATABASE REQUESTS: If the user is asking for a database (or anything that needs\none β auth, persistence, CRUD, etc.) and no provider is set up yet, call\n`add_integration` FIRST and stop. Do NOT call `enable_nitro` in the same turn\nβ the user must pick their provider first. Supabase makes Nitro unnecessary.\nNeon automatically sets up the Nitro server layer as part of its integration\nflow, so do NOT call `enable_nitro` after a Neon integration either β Nitro\nwill already be in place when the integration completes. Only call\n`enable_nitro` for non-database server-side needs (API routes, webhooks,\nserver-only secrets) when no provider is involved.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "One sentence explaining why server-side code is needed for this prompt."
}
},
"required": [
"reason"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "read_logs",
"description": "Read logs at the moment this tool is called. Includes client logs, server logs, edge function logs, and network requests. Use this to debug errors, investigate issues, or understand app behavior. IMPORTANT: Logs are a snapshot from when you call this tool - they will NOT update while you are writing code or making changes. Use filters (searchTerm, type, level) to narrow down relevant logs on the first call.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"type": {
"description": "Filter by log source type (default: all). Types: 'client' = browser console logs; 'server' = backend (including development server) logs and build output; 'edge-function' = edge function logs; 'network-requests' = HTTP requests and responses (outgoing calls and their responses).",
"type": "string",
"enum": [
"all",
"client",
"server",
"edge-function",
"network-requests"
]
},
"level": {
"description": "Filter by log level (default: all)",
"type": "string",
"enum": [
"all",
"info",
"warn",
"error"
]
},
"searchTerm": {
"description": "Search for logs containing this text (case-insensitive)",
"type": "string"
},
"limit": {
"description": "Maximum number of logs to return (default: 50, max: 200)",
"type": "number",
"minimum": 1,
"maximum": 200
}
},
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "web_search",
"description": "\nUse this tool to access real-time information beyond your training data cutoff.\n\nWhen to Search:\n- Current API documentation, library versions, or breaking changes\n- Latest best practices, security advisories, or bug fixes\n- Specific error messages or troubleshooting solutions\n- Recent framework updates or deprecation notices\n\nQuery Tips:\n- Be specific: Include version numbers, exact error messages, or technical terms\n- Add context: \"React 19 useEffect cleanup\" not just \"React hooks\"\n\nExamples:\n\n<example>\nOpenAI GPT-5 API model names\n</example>\n\n<example>\nNextJS 14 app router middleware auth\n</example>\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query to look up on the web"
}
},
"required": [
"query"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "web_crawl",
"description": "\nYou can crawl a website so you can clone it.\n\n### When You MUST Trigger a Crawl\nTrigger a crawl ONLY if BOTH conditions are true:\n\n1. The user's message shows intent to CLONE / COPY / REPLICATE / RECREATE / DUPLICATE / MIMIC a website.\n - Keywords include: clone, copy, replicate, recreate, duplicate, mimic, build the same, make the same.\n\n2. The user's message contains a URL or something that appears to be a domain name.\n - e.g. \"example.com\", \"https://example.com\"\n - Do not require 'http://' or 'https://'.\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL to crawl"
}
},
"required": [
"url"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "web_fetch",
"description": "Fetch and read the content of a web page as markdown given its URL.\n\n### When to Use This Tool\nUse this tool when the user's message contains a URL (or domain name) and they want to:\n- **Read** the page's content (e.g. documentation, blog post, article)\n- **Reference** information from the page (e.g. API docs, tutorials, guides)\n- **Extract** data or context from a live web page to inform their code\n- **Follow a link** someone shared to understand its contents\n\nExamples:\n- \"Use the docs at docs.example.com/api to set up the client\"\n- \"What does this page say? https://example.com/blog/post\"\n- \"Follow the guide at example.com/tutorial\"\n\n### When NOT to Use This Tool\n- The user wants to **visually clone or replicate** a website β use `web_crawl` instead\n- The user needs to **search the web** for information without a specific URL β use `web_search` instead\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL to fetch content from"
}
},
"required": [
"url"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "generate_image",
"description": "Generate an image using AI based on a text prompt. The generated image is saved to the project's .dyad/media directory.\n\n### When to Use\n- User requests a custom image, illustration, icon, or graphic for their app\n- User wants a hero image, background, banner, or visual asset\n- Creating images that are more visually relevant than placeholder rectangles\n\n### Prompt Guidelines\nWrite detailed, descriptive prompts. Be specific about:\n- **Subject**: What is in the image (objects, people, scenes)\n- **Style**: Photography, illustration, flat design, 3D render, watercolor, etc.\n- **Composition**: Layout, perspective, framing\n- **Colors**: Specific color palette or mood\n- **Mood**: Cheerful, professional, dramatic, minimal, etc.\n\n### Examples\n- \"A modern flat illustration of a team collaborating around a laptop, using a blue and purple color palette, clean minimal style with subtle gradients, white background\"\n- \"Professional product photography of a sleek smartphone on a marble surface, soft studio lighting, shallow depth of field, warm neutral tones\"\n\n### After Generation\nThe tool returns the file path in .dyad/media. Use the copy_file tool to copy it to the appropriate location in the project (e.g., public/assets/) and reference that path in your code.\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "A detailed, descriptive prompt for the image to generate. Be specific about colors, composition, style, mood, and subject matter. Avoid generic or vague descriptions."
}
},
"required": [
"prompt"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "update_todos",
"description": "\n### When to Use This Tool\n\nUse proactively for:\n1. Complex multi-step tasks (3+ distinct steps)\n2. Non-trivial tasks requiring careful planning\n3. User explicitly requests todo list\n4. User provides multiple tasks (numbered/comma-separated)\n5. After completing tasks - mark complete with merge=true and add follow-ups\n6. When starting new tasks - mark as in_progress (ideally only one at a time)\n\n### When NOT to Use\n\nSkip for:\n1. Single, straightforward tasks\n2. Trivial tasks with no organizational benefit\n3. Tasks completable in < 3 trivial steps\n4. Purely conversational/informational requests\n5. Todo items should NOT include operational actions done in service of higher-level tasks.\n\nNEVER INCLUDE THESE IN TODOS: linting; testing; searching or examining the codebase.\n\n### Examples\n\n<example>\nUser: Add dark mode toggle to settings\nAssistant:\n- *Creates todo list:*\n1. Add state management [in_progress]\n2. Implement styles\n3. Create toggle component\n4. Update components\n- [Immediately begins working on todo 1 in the same tool call batch]\n<reasoning>\nMulti-step feature with dependencies.\n</reasoning>\n</example>\n\n<example>\n// User: Implement user registration, product catalog, shopping cart, checkout flow.\nAssistant: *Creates todo list breaking down each feature into specific tasks*\n<reasoning>\nMultiple complex features provided as list requiring organized task management.\n</reasoning>\n</example>\n\n### Task States and Management\n\n1. **Task States:**\n- pending: Not yet started\n- in_progress: Currently working on\n- completed: Finished successfully\n\n2. **Task Management:**\n- Update status in real-time\n- Mark complete IMMEDIATELY after finishing\n- Only ONE task in_progress at a time\n- Complete current tasks before starting new ones\n\n3. **Task Breakdown:**\n- Create specific, actionable items\n- Break complex tasks into manageable steps\n- Use clear, descriptive names\n\n4. **Parallel Todo Writes:**\n- Prefer creating the first todo as in_progress\n- Start working on todos by using tool calls in the same tool call batch as the todo write\n- Batch todo updates with other tool calls for better latency and lower costs for the user\n",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"merge": {
"type": "boolean",
"description": "Whether to merge the todos with the existing todos. If true, the todos will be merged into the existing todos based on the id field. You can leave unchanged properties undefined. If false, the new todos will replace the existing todos."
},
"todos": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the todo item"
},
"content": {
"description": "The description/content of the todo item",
"type": "string"
},
"status": {
"description": "The current status of the todo item",
"type": "string",
"enum": [
"pending",
"in_progress",
"completed"
]
}
},
"required": [
"id"
],
"additionalProperties": false
},
"description": "Array of todo items. When merge is true, only include todos that need updates. When merge is false, this is the complete list."
}
},
"required": [
"merge",
"todos"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "run_type_checks",
"description": "Run TypeScript type checks on the current workspace. You can provide paths to specific files or directories, or omit the argument to get diagnostics for all files.\n\n- If a file path is provided, returns diagnostics for that file only\n- If a directory path is provided, returns diagnostics for all files within that directory\n- If no path is provided, returns diagnostics for all files in the workspace\n- This tool can return type errors that were already present before your edits, so avoid calling it with a very wide scope of files\n- NEVER call this tool on a file unless you've edited it or are about to edit it",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"paths": {
"description": "Optional. An array of paths to files or directories to read type errors for. If provided, returns diagnostics for the specified files/directories only. If not provided, returns diagnostics for all files in the workspace.",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "read_guide",
"description": "Read a detailed instruction guide. Use this when the system prompt tells you to load a guide before implementing a feature.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"guide": {
"type": "string",
"description": "Name of the guide to read (e.g. 'add-authentication', 'add-email-verification', 'add-password-reset')"
}
},
"required": [
"guide"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "execute_sandbox_script",
"description": "Run a small program written in a strict, sandboxed subset of JavaScript (MustardScript) to inspect files.\n\nUse this when you need to slice, search, count, aggregate, or summarize file contents before answering. Return only the concise value you need.\n\nSupported language surface:\n- let/const, functions, closures, arrow functions, async/await, promises, arrays, plain objects, Map, Set, if/switch, loops, break/continue, try/catch/finally, throw, template literals, destructuring, optional chaining, nullish coalescing, JSON, Math, and conservative Array/String/Object/Date/Intl/RegExp helpers.\n- Top-level await is supported. Top-level return is not supported; return the final expression value instead, e.g. `const text = await read_file(\"attachments:data.csv\"); text.length;`.\n- The script has no ambient authority. It can only act through the host functions below.\n\nRecommendations:\n- Avoid defining nested helper functions in the main function.\n\nUnsupported / unavailable:\n- No var, import/export, require, CommonJS, npm packages, Node APIs, browser/DOM APIs, process, module, exports, global, environment variables, subprocesses, network/fetch, fetch, timers, setTimeout, setInterval, eval, Function constructor, with, classes, generators, custom iterator authoring, Symbols, WeakMap, WeakSet, typed arrays, ArrayBuffer, shared memory, atomics, Proxy, accessors, full prototype/property-descriptor semantics, or arbitrary filesystem access.\n- String.prototype.localeCompare is not supported; compare with <, >, or === instead.\n- `console.*` is not available.\n- Unsupported syntax or unsupported built-in behavior fails closed with an error. Rewrite using simpler JavaScript when that happens.\n\nAvoid returning shared references:\n\n```\nconst row = { key: \"x\", total: 1 };\n({ a: row, b: row }); // rejected\n```\n\nUse cloned/plain rows instead:\n\n```\nconst row = { key: \"x\", total: 1 };\n({\n a: { key: row.key, total: row.total },\n b: { key: row.key, total: row.total }\n});\n```\n\nExecution thread:\n- 'main' (default) runs in-process. Use for small / fast scripts.\n- 'worker' runs on a separate worker thread so chat streaming and other main-process work stay responsive. Use when the script is compute-heavy (parsing multi-MB CSVs, large aggregations).\n\nHost functions:\n```ts\ntype ReadFileOptions = {\n start?: number; // zero-indexed byte offset\n length?: number; // max bytes to read\n encoding?: \"utf8\" | \"base64\";\n};\n\ntype FileStats = {\n size: number;\n isText: boolean;\n mtime: string; // ISO timestamp\n};\n\ndeclare function read_file(\n path: string,\n options?: ReadFileOptions,\n): Promise<string>;\n\ndeclare function list_files(dir?: \".\" | \"attachments:\" | string): Promise<string[]>;\n\ndeclare function file_stats(path: string): Promise<FileStats>;\n```\n\nPaths are app-relative (including `.dyad/media/<stored-name>`), or attachment paths like attachments:filename.ext. Prefer range reads, filtering, aggregation, and small summaries over returning entire files.",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"script": {
"type": "string",
"maxLength": 131072,
"description": "Sandboxed JavaScript subset source code to execute."
},
"description": {
"description": "One-line human-readable summary of what the script does.",
"type": "string",
"maxLength": 160
},
"execution_thread": {
"default": "main",
"description": "Where to run the script. Default 'main' runs in-process and is the only thread that exposes MCP tools β use it for any script that calls MCP host functions, and for small / fast operations. Use 'worker' for compute-heavy work (parsing multi-MB attachments, large aggregations, anything that might take more than a few hundred milliseconds) so chat streaming and other main-process work isn't stalled. MCP host functions are NOT available on the worker thread.",
"type": "string",
"enum": [
"main",
"worker"
]
}
},
"required": [
"script"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "planning_questionnaire",
"description": "Present a structured questionnaire to gather requirements from the user. The tool displays questions in the UI and waits for the user's responses, returning them as the tool result.\n\n<when_to_use>\nUse this tool when:\n- The user wants to create a NEW app or project\n- The request is vague or open-ended\n- There are multiple reasonable interpretations\nSkip when the request is a specific, concrete change.\n</when_to_use>\n\n<input_schema>\nThe tool accepts ONLY a \"questions\" array.\n\nEach question object has these fields:\n- \"question\" (string, REQUIRED): The question text shown to the user\n- \"type\" (string, REQUIRED): One of \"text\", \"radio\", or \"checkbox\"\n- \"options\" (string array, REQUIRED for radio/checkbox, OMIT for text): 1-3 predefined choices\n- \"id\" (string, optional): Unique identifier, auto-generated if omitted\n- \"required\" (boolean, optional): Defaults to true\n- \"placeholder\" (string, optional): Placeholder for text inputs\n</input_schema>\n\n<correct_example>\nReasoning: The user asked to \"build me a todo app\". I need to clarify the tech stack and key features. I'll use radio for single-choice and checkbox for multi-choice.\n\n{\n \"questions\": [\n {\n \"type\": \"radio\",\n \"question\": \"What visual style do you prefer?\",\n \"options\": [\"Minimal & clean\", \"Colorful & playful\", \"Dark & modern\"]\n },\n {\n \"type\": \"checkbox\",\n \"question\": \"Which features do you want?\",\n \"options\": [\"Due dates\", \"Categories/tags\", \"Priority levels\"]\n }\n ]\n}\n</correct_example>\n\n<incorrect_examples>\nWRONG β Empty questions array:\n{ \"questions\": [] }\n\nWRONG β options on text type:\n{ \"type\": \"text\", \"question\": \"...\", \"options\": [\"a\"] }\n\nWRONG β Empty options array:\n{ \"type\": \"radio\", \"question\": \"...\", \"options\": [] }\n\nWRONG β Missing options for radio:\n{ \"type\": \"radio\", \"question\": \"...\" }\n\nWRONG β More than 3 questions or more than 3 options\n\nWRONG β Array with empty object (missing required \"question\" and \"type\" fields):\n{ \"questions\": [{}] }\n</incorrect_examples>",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"questions": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Unique identifier for this question (auto-generated if omitted)",
"type": "string"
},
"question": {
"type": "string",
"description": "The question text to display to the user"
},
"type": {
"type": "string",
"enum": [
"text",
"radio",
"checkbox"
],
"description": "text for free-form input, radio for single choice, checkbox for multiple choice"
},
"options": {
"description": "Options for radio/checkbox questions. Keep to max 3 β users can always provide a custom answer via the free-form text input. Omit for text questions.",
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string"
}
},
"required": {
"description": "Whether this question requires an answer (defaults to true)",
"type": "boolean"
},
"placeholder": {
"description": "Placeholder text for text inputs",
"type": "string"
}
},
"required": [
"question",
"type"
],
"additionalProperties": false
},
"description": "A non empty array of 1-3 questions to present to the user"
}
},
"required": [
"questions"
],
"additionalProperties": false
},
"eager_input_streaming": true
},
{
"name": "write_app_blueprint",
"description": "Create or update the app blueprint for the user to review before building begins.\n\nThe app blueprint is a lightweight configuration step β it captures key decisions about the app (name, design, color, optionally template/theme) AND the visual assets the app needs (with detailed image generation prompts) before implementation starts. The user can modify any field directly in the card or ask you to update it. Template and theme default to the user's settings; only override them when the user explicitly asks for a specific one by name.\n\nThis tool returns immediately and ends the current turn. The user reviews the blueprint card and, on approval, the system applies the chosen name/template/theme and starts a new turn with a follow-up message that contains the approved blueprint β that's when you proceed with implementation.\n\n<when_to_use>\nUse this tool AFTER gathering any needed preferences (via planning_questionnaire or from the user's prompt). Call it once with all fields populated, including the planned visuals.\n</when_to_use>\n\n<guidelines>\n- app_name: Generate a creative, memorable name that reflects the app's purpose. Keep it short (1-3 words).\n- template_id: Omit by default β the user's settings choice is used. ONLY set when the user explicitly names a tech stack (e.g. \"use Next.js\" β \"next\", \"use React\" β \"react\"). Don't infer from the app idea.\n- theme_id: Omit by default β the user's settings choice is used. ONLY set when the user explicitly names a built-in theme. Don't infer from the design direction.\n- design_direction: Analyze the industry, target users, and purpose to determine the right visual approach. Be specific but concise (1-2 sentences).\n- primary_color: Pick a color that fits the industry and design direction. Use hex format.\n- visuals: 3-6 is typical. Common types: \"logo\", \"photo\" (hero images, products), \"illustration\" (empty states, onboarding), \"icon\" (custom icons), \"background\" (decorative), \"other\". Write detailed prompts that specify subject, style, colors, composition, and mood.\n</guidelines>\n\n<example>\n{\n \"app_name\": \"FreshBite\",\n \"user_prompt\": \"Build me a restaurant website with online ordering\",\n \"design_direction\": \"Warm and inviting with food photography emphasis, modern restaurant aesthetic with easy-to-navigate ordering flow\",\n \"primary_color\": \"#E85D04\",\n \"visuals\": [\n {\n \"type\": \"logo\",\n \"description\": \"App logo for the restaurant website header\",\n \"prompt\": \"Minimalist restaurant logo, warm orange tones, fork and knife silhouette integrated into letterform, clean vector style, white background\"\n },\n {\n \"type\": \"photo\",\n \"description\": \"Hero section background showing restaurant ambiance\",\n \"prompt\": \"Warm inviting restaurant interior, soft ambient lighting, wooden tables, bokeh background, food photography style, warm color grading\"\n }\n ]\n}\n</example>",
"input_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"app_name": {
"type": "string",
"description": "A creative, memorable app name generated based on the user's prompt"
},
"user_prompt": {
"type": "string",
"description": "The original user prompt that describes what they want to build"
},
"attachments": {
"default": [],
"description": "File paths of user attachments from the original prompt",
"type": "array",
"items": {
"type": "string"
}
},
"template_id": {
"description": "The template/tech stack to use. ONLY set this when the user explicitly asks for a specific stack by name (e.g. \"use Next.js\" β \"next\"). Otherwise OMIT it and the user's default template from settings will be used. Valid values: \"react\", \"next\", \"react-vite-nitro\", \"portal-mini-store\".",
"type": "string"
},
"theme_id": {
"description": "The theme to apply. ONLY set this when the user explicitly asks for a specific built-in theme by name. Otherwise OMIT it and the user's default theme from settings will be used. Valid values: \"default\".",
"type": "string"
},
"design_direction": {
"type": "string",
"description": "A brief description of the design direction for the app. Consider the industry, target audience, and mood. Example: 'Modern and professional with clean typography for a B2B SaaS dashboard'"
},
"primary_color": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "The primary/accent color for the app as a 6-digit hex code (e.g. '#3B82F6'). Choose based on the industry and design direction."
},
"visuals": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"logo",
"photo",
"illustration",
"icon",
"background",
"other"
],
"description": "The type of visual asset needed"
},
"description": {
"type": "string",
"description": "What this visual is for and where it will be used in the app"
},
"prompt": {
"type": "string",
"description": "A detailed image generation prompt for creating this visual. Be specific about style, composition, colors, and mood."
}
},
"required": [
"type",
"description",
"prompt"
],
"additionalProperties": false
},
"description": "Array of visual assets the app needs (logo, photos, illustrations, icons, backgrounds). Generate detailed image prompts for each."
}
},
"required": [
"app_name",
"user_prompt",
"design_direction",
"primary_color",
"visuals"
],
"additionalProperties": false
},
"eager_input_streaming": true
}
],
"tool_choice": {
"type": "auto"
},
"stream": true
},
"headers": {
"authorization": "Bearer testdyadkey"
}
}