1use super::ToolParam;
7
8pub fn read_file_params() -> Vec<ToolParam> {
9 vec![
10 ToolParam {
11 name: "path".into(),
12 description: "Path to the file to read. IMPORTANT: if you received \
13 an absolute path from find_files or search_files \
14 (starting with /), pass it exactly as-is. Only \
15 relative paths are resolved against the workspace root."
16 .into(),
17 param_type: "string".into(),
18 required: true,
19 },
20 ToolParam {
21 name: "start_line".into(),
22 description:
23 "First line to read (1-based, inclusive). Omit to start from the beginning.".into(),
24 param_type: "integer".into(),
25 required: false,
26 },
27 ToolParam {
28 name: "end_line".into(),
29 description: "Last line to read (1-based, inclusive). Omit to read to the end.".into(),
30 param_type: "integer".into(),
31 required: false,
32 },
33 ]
34}
35
36pub fn write_file_params() -> Vec<ToolParam> {
37 vec![
38 ToolParam {
39 name: "path".into(),
40 description: "Path to the file to create or overwrite.".into(),
41 param_type: "string".into(),
42 required: true,
43 },
44 ToolParam {
45 name: "content".into(),
46 description: "The full content to write to the file.".into(),
47 param_type: "string".into(),
48 required: true,
49 },
50 ]
51}
52
53pub fn edit_file_params() -> Vec<ToolParam> {
54 vec![
55 ToolParam {
56 name: "path".into(),
57 description: "Path to the file to edit.".into(),
58 param_type: "string".into(),
59 required: true,
60 },
61 ToolParam {
62 name: "old_string".into(),
63 description: "The exact text to find (must match exactly once). \
64 Include surrounding context lines for uniqueness."
65 .into(),
66 param_type: "string".into(),
67 required: true,
68 },
69 ToolParam {
70 name: "new_string".into(),
71 description: "The replacement text.".into(),
72 param_type: "string".into(),
73 required: true,
74 },
75 ]
76}
77
78pub fn list_directory_params() -> Vec<ToolParam> {
79 vec![ToolParam {
80 name: "path".into(),
81 description: "Path to the directory to list.".into(),
82 param_type: "string".into(),
83 required: true,
84 }]
85}
86
87pub fn search_files_params() -> Vec<ToolParam> {
88 vec![
89 ToolParam {
90 name: "pattern".into(),
91 description: "The text pattern to search for inside files.".into(),
92 param_type: "string".into(),
93 required: true,
94 },
95 ToolParam {
96 name: "path".into(),
97 description: "Directory to search in. Defaults to the workspace root. \
98 Use an absolute path (e.g. '/Users/alice/Documents') to \
99 search outside the workspace."
100 .into(),
101 param_type: "string".into(),
102 required: false,
103 },
104 ToolParam {
105 name: "include".into(),
106 description: "Glob pattern to filter filenames (e.g. '*.rs').".into(),
107 param_type: "string".into(),
108 required: false,
109 },
110 ]
111}
112
113pub fn find_files_params() -> Vec<ToolParam> {
114 vec![
115 ToolParam {
116 name: "pattern".into(),
117 description: "Search term(s) or glob pattern. Plain words are matched \
118 case-insensitively against file names (e.g. 'resume' \
119 matches Resume.pdf). Separate multiple keywords with \
120 spaces to match ANY (e.g. 'resume cv'). Use glob \
121 syntax ('*', '?') for extension filters (e.g. '*.pdf')."
122 .into(),
123 param_type: "string".into(),
124 required: true,
125 },
126 ToolParam {
127 name: "path".into(),
128 description: "Base directory for the search. Defaults to the workspace root. \
129 Use an absolute path (e.g. '/Users/alice' or '~') to \
130 search outside the workspace."
131 .into(),
132 param_type: "string".into(),
133 required: false,
134 },
135 ]
136}
137
138pub fn execute_command_params() -> Vec<ToolParam> {
139 vec![
140 ToolParam {
141 name: "command".into(),
142 description: "The shell command to execute (passed to sh -c).".into(),
143 param_type: "string".into(),
144 required: true,
145 },
146 ToolParam {
147 name: "working_dir".into(),
148 description: "Working directory for the command. Defaults to the workspace root. \
149 Use an absolute path to run elsewhere."
150 .into(),
151 param_type: "string".into(),
152 required: false,
153 },
154 ToolParam {
155 name: "timeout_secs".into(),
156 description: "Maximum seconds before killing the command (default: 30).".into(),
157 param_type: "integer".into(),
158 required: false,
159 },
160 ToolParam {
161 name: "background".into(),
162 description:
163 "Run in background immediately. Returns a sessionId for use with process tool."
164 .into(),
165 param_type: "boolean".into(),
166 required: false,
167 },
168 ToolParam {
169 name: "yieldMs".into(),
170 description: "Milliseconds to wait before auto-backgrounding (default: 10000). \
171 Set to 0 to disable auto-background."
172 .into(),
173 param_type: "integer".into(),
174 required: false,
175 },
176 ]
177}
178
179pub fn web_fetch_params() -> Vec<ToolParam> {
180 vec![
181 ToolParam {
182 name: "url".into(),
183 description: "HTTP or HTTPS URL to fetch.".into(),
184 param_type: "string".into(),
185 required: true,
186 },
187 ToolParam {
188 name: "extract_mode".into(),
189 description: "Extraction mode: 'markdown' (default) or 'text'. \
190 Markdown preserves links and structure; text is plain."
191 .into(),
192 param_type: "string".into(),
193 required: false,
194 },
195 ToolParam {
196 name: "max_chars".into(),
197 description: "Maximum characters to return (truncates if exceeded). \
198 Default: 50000."
199 .into(),
200 param_type: "integer".into(),
201 required: false,
202 },
203 ToolParam {
204 name: "use_cookies".into(),
205 description: "Use stored cookies for this request and save any \
206 Set-Cookie headers from the response. Follows browser \
207 security rules (domain scoping, Secure flag). Default: false."
208 .into(),
209 param_type: "boolean".into(),
210 required: false,
211 },
212 ToolParam {
213 name: "authorization".into(),
214 description: "Authorization header value for API requests. For Bearer tokens: \
215 'Bearer <token>'. For GitHub PATs: 'token <pat>'. This is sent \
216 as the Authorization HTTP header."
217 .into(),
218 param_type: "string".into(),
219 required: false,
220 },
221 ToolParam {
222 name: "headers".into(),
223 description: "Additional HTTP headers as JSON object, e.g. {\"X-Api-Key\": \"...\"}. \
224 Use for custom headers beyond Authorization."
225 .into(),
226 param_type: "object".into(),
227 required: false,
228 },
229 ]
230}
231
232pub fn web_search_params() -> Vec<ToolParam> {
233 vec![
234 ToolParam {
235 name: "query".into(),
236 description: "Search query string.".into(),
237 param_type: "string".into(),
238 required: true,
239 },
240 ToolParam {
241 name: "count".into(),
242 description: "Number of results to return (1-10). Default: 5.".into(),
243 param_type: "integer".into(),
244 required: false,
245 },
246 ToolParam {
247 name: "country".into(),
248 description: "2-letter country code for region-specific results (e.g., 'DE', 'US'). \
249 Default: 'US'."
250 .into(),
251 param_type: "string".into(),
252 required: false,
253 },
254 ToolParam {
255 name: "search_lang".into(),
256 description: "ISO language code for search results (e.g., 'de', 'en', 'fr').".into(),
257 param_type: "string".into(),
258 required: false,
259 },
260 ToolParam {
261 name: "freshness".into(),
262 description: "Filter results by discovery time. Values: 'pd' (past 24h), \
263 'pw' (past week), 'pm' (past month), 'py' (past year), \
264 or date range 'YYYY-MM-DDtoYYYY-MM-DD'."
265 .into(),
266 param_type: "string".into(),
267 required: false,
268 },
269 ]
270}
271
272pub fn process_params() -> Vec<ToolParam> {
273 vec![
274 ToolParam {
275 name: "action".into(),
276 description: "Action to perform: 'list', 'poll', 'log', 'write', 'send_keys', 'kill', 'clear', 'remove'.".into(),
277 param_type: "string".into(),
278 required: true,
279 },
280 ToolParam {
281 name: "sessionId".into(),
282 description: "Session ID for poll/log/write/send_keys/kill/remove actions.".into(),
283 param_type: "string".into(),
284 required: false,
285 },
286 ToolParam {
287 name: "data".into(),
288 description: "Data to write to stdin (for 'write' action).".into(),
289 param_type: "string".into(),
290 required: false,
291 },
292 ToolParam {
293 name: "keys".into(),
294 description: "Space-separated key names to send (for 'send_keys' action). Supports: Enter, Tab, Escape, Space, Backspace, Up, Down, Left, Right, Home, End, PageUp, PageDown, Delete, Insert, Ctrl-A..Ctrl-Z, F1..F12, or literal text.".into(),
295 param_type: "string".into(),
296 required: false,
297 },
298 ToolParam {
299 name: "offset".into(),
300 description: "Line offset for 'log' action (0-indexed). Omit to get last N lines.".into(),
301 param_type: "integer".into(),
302 required: false,
303 },
304 ToolParam {
305 name: "limit".into(),
306 description: "Maximum lines to return for 'log' action. Default: 50.".into(),
307 param_type: "integer".into(),
308 required: false,
309 },
310 ]
311}
312
313pub fn memory_search_params() -> Vec<ToolParam> {
314 vec![
315 ToolParam {
316 name: "query".into(),
317 description: "Search query for finding relevant memory content.".into(),
318 param_type: "string".into(),
319 required: true,
320 },
321 ToolParam {
322 name: "maxResults".into(),
323 description: "Maximum number of results to return. Default: 5.".into(),
324 param_type: "integer".into(),
325 required: false,
326 },
327 ToolParam {
328 name: "minScore".into(),
329 description: "Minimum relevance score threshold (0.0-1.0). Default: 0.1.".into(),
330 param_type: "number".into(),
331 required: false,
332 },
333 ToolParam {
334 name: "recencyBoost".into(),
335 description: "Enable recency weighting to boost recent memories. Default: true.".into(),
336 param_type: "boolean".into(),
337 required: false,
338 },
339 ToolParam {
340 name: "halfLifeDays".into(),
341 description: "Half-life for temporal decay in days. Lower values favor recent memories more strongly. Default: 30.".into(),
342 param_type: "number".into(),
343 required: false,
344 },
345 ]
346}
347
348pub fn memory_get_params() -> Vec<ToolParam> {
349 vec![
350 ToolParam {
351 name: "path".into(),
352 description: "Path to the memory file (MEMORY.md or memory/*.md).".into(),
353 param_type: "string".into(),
354 required: true,
355 },
356 ToolParam {
357 name: "from".into(),
358 description: "Starting line number (1-indexed). Default: 1.".into(),
359 param_type: "integer".into(),
360 required: false,
361 },
362 ToolParam {
363 name: "lines".into(),
364 description: "Number of lines to read. Default: entire file.".into(),
365 param_type: "integer".into(),
366 required: false,
367 },
368 ]
369}
370
371pub fn save_memory_params() -> Vec<ToolParam> {
372 vec![
373 ToolParam {
374 name: "history_entry".into(),
375 description: "A summary to append to HISTORY.md with timestamp. Use for logging events, decisions, and facts.".into(),
376 param_type: "string".into(),
377 required: true,
378 },
379 ToolParam {
380 name: "memory_update".into(),
381 description: "Optional: full new content for MEMORY.md. Replaces the entire file. Use to curate long-term facts.".into(),
382 param_type: "string".into(),
383 required: false,
384 },
385 ]
386}
387
388pub fn search_history_params() -> Vec<ToolParam> {
389 vec![
390 ToolParam {
391 name: "pattern".into(),
392 description: "Text pattern to search for in HISTORY.md entries.".into(),
393 param_type: "string".into(),
394 required: true,
395 },
396 ToolParam {
397 name: "maxResults".into(),
398 description: "Maximum number of entries to return. Default: 10.".into(),
399 param_type: "integer".into(),
400 required: false,
401 },
402 ]
403}
404
405pub fn secrets_list_params() -> Vec<ToolParam> {
406 vec![ToolParam {
407 name: "prefix".into(),
408 description: "Optional prefix to filter key names.".into(),
409 param_type: "string".into(),
410 required: false,
411 }]
412}
413
414pub fn secrets_get_params() -> Vec<ToolParam> {
415 vec![ToolParam {
416 name: "name".into(),
417 description: "The name of the credential to retrieve.".into(),
418 param_type: "string".into(),
419 required: true,
420 }]
421}
422
423pub fn secrets_store_params() -> Vec<ToolParam> {
424 vec![
425 ToolParam {
426 name: "name".into(),
427 description: "The name under which to store the credential.".into(),
428 param_type: "string".into(),
429 required: true,
430 },
431 ToolParam {
432 name: "kind".into(),
433 description: "Credential kind: api_key, token, username_password, ssh_key, secure_note, http_passkey, form_autofill, payment_method, other.".into(),
434 param_type: "string".into(),
435 required: true,
436 },
437 ToolParam {
438 name: "value".into(),
439 description: "The secret value to encrypt and store.".into(),
440 param_type: "string".into(),
441 required: true,
442 },
443 ToolParam {
444 name: "policy".into(),
445 description: "Access policy: always (agent can read freely), approval (requires user approval, default), auth (requires re-authentication), skill:<name> (only accessible by named skill).".into(),
446 param_type: "string".into(),
447 required: false,
448 },
449 ToolParam {
450 name: "description".into(),
451 description: "Optional description of the credential.".into(),
452 param_type: "string".into(),
453 required: false,
454 },
455 ToolParam {
456 name: "username".into(),
457 description: "Username (required for username_password kind).".into(),
458 param_type: "string".into(),
459 required: false,
460 },
461 ]
462}
463
464pub fn secrets_set_policy_params() -> Vec<ToolParam> {
465 vec![
466 ToolParam {
467 name: "name".into(),
468 description: "The credential name to update.".into(),
469 param_type: "string".into(),
470 required: true,
471 },
472 ToolParam {
473 name: "policy".into(),
474 description: "New access policy: always (agent can read freely), approval (requires user approval), auth (requires re-authentication), skill:<name> (only accessible by named skill).".into(),
475 param_type: "string".into(),
476 required: true,
477 },
478 ]
479}
480
481pub fn gateway_params() -> Vec<ToolParam> {
482 vec![
483 ToolParam {
484 name: "action".into(),
485 description: "Action: 'restart', 'config.get', 'config.schema', 'config.apply', 'config.patch', 'update.run'.".into(),
486 param_type: "string".into(),
487 required: true,
488 },
489 ToolParam {
490 name: "raw".into(),
491 description: "JSON config content for config.apply or config.patch.".into(),
492 param_type: "string".into(),
493 required: false,
494 },
495 ToolParam {
496 name: "baseHash".into(),
497 description: "Config hash from config.get (required for apply/patch when config exists).".into(),
498 param_type: "string".into(),
499 required: false,
500 },
501 ToolParam {
502 name: "reason".into(),
503 description: "Reason for restart or config change.".into(),
504 param_type: "string".into(),
505 required: false,
506 },
507 ToolParam {
508 name: "delayMs".into(),
509 description: "Delay before restart in milliseconds. Default: 2000.".into(),
510 param_type: "integer".into(),
511 required: false,
512 },
513 ]
514}
515
516pub fn message_params() -> Vec<ToolParam> {
517 vec![
518 ToolParam {
519 name: "action".into(),
520 description: "Action: 'send' or 'broadcast'.".into(),
521 param_type: "string".into(),
522 required: true,
523 },
524 ToolParam {
525 name: "message".into(),
526 description: "Message content to send.".into(),
527 param_type: "string".into(),
528 required: false,
529 },
530 ToolParam {
531 name: "target".into(),
532 description: "Target channel/user ID or name.".into(),
533 param_type: "string".into(),
534 required: false,
535 },
536 ToolParam {
537 name: "channel".into(),
538 description: "Channel type: telegram, discord, whatsapp, signal, slack, etc.".into(),
539 param_type: "string".into(),
540 required: false,
541 },
542 ToolParam {
543 name: "targets".into(),
544 description: "Multiple targets for broadcast action.".into(),
545 param_type: "array".into(),
546 required: false,
547 },
548 ToolParam {
549 name: "replyTo".into(),
550 description: "Message ID to reply to.".into(),
551 param_type: "string".into(),
552 required: false,
553 },
554 ToolParam {
555 name: "silent".into(),
556 description: "Send without notification. Default: false.".into(),
557 param_type: "boolean".into(),
558 required: false,
559 },
560 ]
561}
562
563pub fn tts_params() -> Vec<ToolParam> {
564 vec![
565 ToolParam {
566 name: "text".into(),
567 description: "Text to convert to speech.".into(),
568 param_type: "string".into(),
569 required: true,
570 },
571 ToolParam {
572 name: "channel".into(),
573 description: "Optional channel ID to pick output format.".into(),
574 param_type: "string".into(),
575 required: false,
576 },
577 ]
578}
579
580pub fn image_params() -> Vec<ToolParam> {
581 vec![
582 ToolParam {
583 name: "image".into(),
584 description: "Path to local image file or URL.".into(),
585 param_type: "string".into(),
586 required: true,
587 },
588 ToolParam {
589 name: "prompt".into(),
590 description: "Question or instruction about the image. Default: 'Describe the image.'"
591 .into(),
592 param_type: "string".into(),
593 required: false,
594 },
595 ]
596}
597
598pub fn nodes_params() -> Vec<ToolParam> {
599 vec![
600 ToolParam {
601 name: "action".into(),
602 description: "Action: 'status', 'describe', 'pending', 'approve', 'reject', 'notify', 'camera_snap', 'camera_list', 'screen_record', 'location_get', 'run', 'invoke'.".into(),
603 param_type: "string".into(),
604 required: true,
605 },
606 ToolParam {
607 name: "node".into(),
608 description: "Node ID or name to target.".into(),
609 param_type: "string".into(),
610 required: false,
611 },
612 ToolParam {
613 name: "requestId".into(),
614 description: "Pairing request ID for approve/reject.".into(),
615 param_type: "string".into(),
616 required: false,
617 },
618 ToolParam {
619 name: "title".into(),
620 description: "Notification title.".into(),
621 param_type: "string".into(),
622 required: false,
623 },
624 ToolParam {
625 name: "body".into(),
626 description: "Notification body text.".into(),
627 param_type: "string".into(),
628 required: false,
629 },
630 ToolParam {
631 name: "command".into(),
632 description: "Command array for 'run' action.".into(),
633 param_type: "array".into(),
634 required: false,
635 },
636 ToolParam {
637 name: "invokeCommand".into(),
638 description: "Command name for 'invoke' action.".into(),
639 param_type: "string".into(),
640 required: false,
641 },
642 ToolParam {
643 name: "facing".into(),
644 description: "Camera facing: 'front', 'back', or 'both'.".into(),
645 param_type: "string".into(),
646 required: false,
647 },
648 ]
649}
650
651pub fn browser_params() -> Vec<ToolParam> {
652 vec![
653 ToolParam {
654 name: "action".into(),
655 description: "Action: 'status', 'start', 'stop', 'profiles', 'tabs', 'open', 'focus', 'close', 'snapshot', 'screenshot', 'navigate', 'console', 'pdf', 'act'.".into(),
656 param_type: "string".into(),
657 required: true,
658 },
659 ToolParam {
660 name: "profile".into(),
661 description: "Browser profile: 'openclaw' (managed) or 'chrome' (extension relay).".into(),
662 param_type: "string".into(),
663 required: false,
664 },
665 ToolParam {
666 name: "targetUrl".into(),
667 description: "URL for 'open' or 'navigate' actions.".into(),
668 param_type: "string".into(),
669 required: false,
670 },
671 ToolParam {
672 name: "targetId".into(),
673 description: "Tab ID for targeting specific tab.".into(),
674 param_type: "string".into(),
675 required: false,
676 },
677 ToolParam {
678 name: "ref".into(),
679 description: "Element reference from snapshot for actions.".into(),
680 param_type: "string".into(),
681 required: false,
682 },
683 ToolParam {
684 name: "request".into(),
685 description: "Action request object with kind (click/type/press/hover/drag), ref, text, etc.".into(),
686 param_type: "object".into(),
687 required: false,
688 },
689 ToolParam {
690 name: "fullPage".into(),
691 description: "Capture full page for screenshot. Default: false.".into(),
692 param_type: "boolean".into(),
693 required: false,
694 },
695 ]
696}
697
698pub fn canvas_params() -> Vec<ToolParam> {
699 vec![
700 ToolParam {
701 name: "action".into(),
702 description: "Action: 'present', 'hide', 'navigate', 'eval', 'snapshot', 'a2ui_push', 'a2ui_reset'.".into(),
703 param_type: "string".into(),
704 required: true,
705 },
706 ToolParam {
707 name: "node".into(),
708 description: "Target node for canvas operations.".into(),
709 param_type: "string".into(),
710 required: false,
711 },
712 ToolParam {
713 name: "url".into(),
714 description: "URL to present or navigate to.".into(),
715 param_type: "string".into(),
716 required: false,
717 },
718 ToolParam {
719 name: "javaScript".into(),
720 description: "JavaScript code for 'eval' action.".into(),
721 param_type: "string".into(),
722 required: false,
723 },
724 ToolParam {
725 name: "width".into(),
726 description: "Canvas width in pixels.".into(),
727 param_type: "integer".into(),
728 required: false,
729 },
730 ToolParam {
731 name: "height".into(),
732 description: "Canvas height in pixels.".into(),
733 param_type: "integer".into(),
734 required: false,
735 },
736 ]
737}
738
739pub fn cron_params() -> Vec<ToolParam> {
740 vec![
741 ToolParam {
742 name: "action".into(),
743 description: "Action: 'status', 'list', 'add', 'update', 'remove', 'run', 'runs'."
744 .into(),
745 param_type: "string".into(),
746 required: true,
747 },
748 ToolParam {
749 name: "jobId".into(),
750 description: "Job ID for update/remove/run/runs actions.".into(),
751 param_type: "string".into(),
752 required: false,
753 },
754 ToolParam {
755 name: "job".into(),
756 description: "Job definition object for 'add' action.".into(),
757 param_type: "object".into(),
758 required: false,
759 },
760 ToolParam {
761 name: "patch".into(),
762 description: "Patch object for 'update' action.".into(),
763 param_type: "object".into(),
764 required: false,
765 },
766 ToolParam {
767 name: "includeDisabled".into(),
768 description: "Include disabled jobs in list. Default: false.".into(),
769 param_type: "boolean".into(),
770 required: false,
771 },
772 ]
773}
774
775pub fn sessions_list_params() -> Vec<ToolParam> {
776 vec![
777 ToolParam {
778 name: "kinds".into(),
779 description: "Filter by session kinds: 'main', 'subagent', 'cron'.".into(),
780 param_type: "array".into(),
781 required: false,
782 },
783 ToolParam {
784 name: "activeMinutes".into(),
785 description: "Only show sessions active within N minutes.".into(),
786 param_type: "integer".into(),
787 required: false,
788 },
789 ToolParam {
790 name: "limit".into(),
791 description: "Maximum sessions to return. Default: 20.".into(),
792 param_type: "integer".into(),
793 required: false,
794 },
795 ToolParam {
796 name: "messageLimit".into(),
797 description: "Include last N messages per session.".into(),
798 param_type: "integer".into(),
799 required: false,
800 },
801 ]
802}
803
804pub fn sessions_spawn_params() -> Vec<ToolParam> {
805 vec![
806 ToolParam {
807 name: "task".into(),
808 description: "What the sub-agent should do (required).".into(),
809 param_type: "string".into(),
810 required: true,
811 },
812 ToolParam {
813 name: "label".into(),
814 description: "Short label for identification.".into(),
815 param_type: "string".into(),
816 required: false,
817 },
818 ToolParam {
819 name: "agentId".into(),
820 description: "Spawn under a different agent ID.".into(),
821 param_type: "string".into(),
822 required: false,
823 },
824 ToolParam {
825 name: "model".into(),
826 description: "Override the model for this sub-agent.".into(),
827 param_type: "string".into(),
828 required: false,
829 },
830 ToolParam {
831 name: "thinking".into(),
832 description: "Override thinking level (off/low/medium/high).".into(),
833 param_type: "string".into(),
834 required: false,
835 },
836 ToolParam {
837 name: "runTimeoutSeconds".into(),
838 description: "Abort sub-agent after N seconds.".into(),
839 param_type: "integer".into(),
840 required: false,
841 },
842 ToolParam {
843 name: "cleanup".into(),
844 description: "'delete' or 'keep' session after completion.".into(),
845 param_type: "string".into(),
846 required: false,
847 },
848 ]
849}
850
851pub fn sessions_send_params() -> Vec<ToolParam> {
852 vec![
853 ToolParam {
854 name: "message".into(),
855 description: "Message to send to the target session.".into(),
856 param_type: "string".into(),
857 required: true,
858 },
859 ToolParam {
860 name: "sessionKey".into(),
861 description: "Session key to send to.".into(),
862 param_type: "string".into(),
863 required: false,
864 },
865 ToolParam {
866 name: "label".into(),
867 description: "Session label to send to (alternative to sessionKey).".into(),
868 param_type: "string".into(),
869 required: false,
870 },
871 ToolParam {
872 name: "timeoutSeconds".into(),
873 description: "Timeout for waiting on response.".into(),
874 param_type: "integer".into(),
875 required: false,
876 },
877 ]
878}
879
880pub fn sessions_history_params() -> Vec<ToolParam> {
881 vec![
882 ToolParam {
883 name: "sessionKey".into(),
884 description: "Session key to get history for.".into(),
885 param_type: "string".into(),
886 required: true,
887 },
888 ToolParam {
889 name: "limit".into(),
890 description: "Maximum messages to return. Default: 20.".into(),
891 param_type: "integer".into(),
892 required: false,
893 },
894 ToolParam {
895 name: "includeTools".into(),
896 description: "Include tool call messages. Default: false.".into(),
897 param_type: "boolean".into(),
898 required: false,
899 },
900 ]
901}
902
903pub fn session_status_params() -> Vec<ToolParam> {
904 vec![
905 ToolParam {
906 name: "sessionKey".into(),
907 description: "Session key to get status for. Default: current session.".into(),
908 param_type: "string".into(),
909 required: false,
910 },
911 ToolParam {
912 name: "model".into(),
913 description: "Set per-session model override. Use 'default' to reset.".into(),
914 param_type: "string".into(),
915 required: false,
916 },
917 ]
918}
919
920pub fn agents_list_params() -> Vec<ToolParam> {
921 vec![]
922}
923
924pub fn apply_patch_params() -> Vec<ToolParam> {
925 vec![
926 ToolParam {
927 name: "patch".into(),
928 description: "Unified diff patch content to apply.".into(),
929 param_type: "string".into(),
930 required: true,
931 },
932 ToolParam {
933 name: "path".into(),
934 description: "Target file path. If not specified, parsed from patch header.".into(),
935 param_type: "string".into(),
936 required: false,
937 },
938 ToolParam {
939 name: "dry_run".into(),
940 description: "If true, validate patch without applying. Default: false.".into(),
941 param_type: "boolean".into(),
942 required: false,
943 },
944 ]
945}
946
947pub fn skill_list_params() -> Vec<ToolParam> {
950 vec![ToolParam {
951 name: "filter".into(),
952 description: "Optional filter: 'all' (default), 'enabled', 'disabled', 'registry'.".into(),
953 param_type: "string".into(),
954 required: false,
955 }]
956}
957
958pub fn skill_search_params() -> Vec<ToolParam> {
959 vec![ToolParam {
960 name: "query".into(),
961 description: "Search query for the ClawHub registry.".into(),
962 param_type: "string".into(),
963 required: true,
964 }]
965}
966
967pub fn skill_install_params() -> Vec<ToolParam> {
968 vec![
969 ToolParam {
970 name: "name".into(),
971 description: "Name of the skill to install from ClawHub.".into(),
972 param_type: "string".into(),
973 required: true,
974 },
975 ToolParam {
976 name: "version".into(),
977 description: "Specific version to install (default: latest).".into(),
978 param_type: "string".into(),
979 required: false,
980 },
981 ]
982}
983
984pub fn skill_info_params() -> Vec<ToolParam> {
985 vec![ToolParam {
986 name: "name".into(),
987 description: "Name of the skill to get info about.".into(),
988 param_type: "string".into(),
989 required: true,
990 }]
991}
992
993pub fn skill_enable_params() -> Vec<ToolParam> {
994 vec![
995 ToolParam {
996 name: "name".into(),
997 description: "Name of the skill to enable or disable.".into(),
998 param_type: "string".into(),
999 required: true,
1000 },
1001 ToolParam {
1002 name: "enabled".into(),
1003 description: "Whether to enable (true) or disable (false) the skill.".into(),
1004 param_type: "boolean".into(),
1005 required: true,
1006 },
1007 ]
1008}
1009
1010pub fn skill_link_secret_params() -> Vec<ToolParam> {
1011 vec![
1012 ToolParam {
1013 name: "action".into(),
1014 description: "Action: 'link' or 'unlink'.".into(),
1015 param_type: "string".into(),
1016 required: true,
1017 },
1018 ToolParam {
1019 name: "skill".into(),
1020 description: "Name of the skill.".into(),
1021 param_type: "string".into(),
1022 required: true,
1023 },
1024 ToolParam {
1025 name: "secret".into(),
1026 description: "Name of the vault credential to link/unlink.".into(),
1027 param_type: "string".into(),
1028 required: true,
1029 },
1030 ]
1031}
1032
1033pub fn skill_create_params() -> Vec<ToolParam> {
1034 vec![
1035 ToolParam {
1036 name: "name".into(),
1037 description: "Kebab-case skill name used as the directory name (e.g. 'deploy-s3').".into(),
1038 param_type: "string".into(),
1039 required: true,
1040 },
1041 ToolParam {
1042 name: "description".into(),
1043 description: "A concise one-line description of what this skill does.".into(),
1044 param_type: "string".into(),
1045 required: true,
1046 },
1047 ToolParam {
1048 name: "instructions".into(),
1049 description: "The full markdown body of the skill (everything after the YAML frontmatter). \
1050 Include step-by-step guidance, tool usage patterns, and any constraints.".into(),
1051 param_type: "string".into(),
1052 required: true,
1053 },
1054 ToolParam {
1055 name: "metadata".into(),
1056 description: "Optional JSON metadata string, e.g. \
1057 '{\"openclaw\": {\"emoji\": \"⚡\", \"requires\": {\"bins\": [\"git\"]}}}'.".into(),
1058 param_type: "string".into(),
1059 required: false,
1060 },
1061 ]
1062}
1063
1064pub fn thread_describe_params() -> Vec<ToolParam> {
1067 vec![ToolParam {
1068 name: "description".into(),
1069 description: "Description of what this thread is about or currently doing.".into(),
1070 param_type: "string".into(),
1071 required: true,
1072 }]
1073}
1074
1075pub fn disk_usage_params() -> Vec<ToolParam> {
1078 vec![
1079 ToolParam {
1080 name: "path".into(),
1081 description: "Directory to scan. Defaults to '~'.".into(),
1082 param_type: "string".into(),
1083 required: false,
1084 },
1085 ToolParam {
1086 name: "depth".into(),
1087 description: "Max depth to traverse (default 1).".into(),
1088 param_type: "integer".into(),
1089 required: false,
1090 },
1091 ToolParam {
1092 name: "top".into(),
1093 description: "Number of largest entries to return (default 20).".into(),
1094 param_type: "integer".into(),
1095 required: false,
1096 },
1097 ]
1098}
1099
1100pub fn classify_files_params() -> Vec<ToolParam> {
1101 vec![ToolParam {
1102 name: "path".into(),
1103 description: "Directory whose contents should be classified.".into(),
1104 param_type: "string".into(),
1105 required: true,
1106 }]
1107}
1108
1109pub fn system_monitor_params() -> Vec<ToolParam> {
1110 vec![ToolParam {
1111 name: "metric".into(),
1112 description:
1113 "Which metric to query: 'cpu', 'memory', 'disk', 'network', or 'all' (default 'all')."
1114 .into(),
1115 param_type: "string".into(),
1116 required: false,
1117 }]
1118}
1119
1120pub fn battery_health_params() -> Vec<ToolParam> {
1121 vec![]
1122}
1123
1124pub fn app_index_params() -> Vec<ToolParam> {
1125 vec![
1126 ToolParam {
1127 name: "filter".into(),
1128 description: "Optional substring filter for app names.".into(),
1129 param_type: "string".into(),
1130 required: false,
1131 },
1132 ToolParam {
1133 name: "sort".into(),
1134 description: "Sort order: 'size' (default) or 'name'.".into(),
1135 param_type: "string".into(),
1136 required: false,
1137 },
1138 ]
1139}
1140
1141pub fn cloud_browse_params() -> Vec<ToolParam> {
1142 vec![
1143 ToolParam {
1144 name: "action".into(),
1145 description: "Action: 'detect' (find cloud folders, default) or 'list' (list files in a cloud folder).".into(),
1146 param_type: "string".into(),
1147 required: false,
1148 },
1149 ToolParam {
1150 name: "path".into(),
1151 description: "Path to list (required when action='list').".into(),
1152 param_type: "string".into(),
1153 required: false,
1154 },
1155 ]
1156}
1157
1158pub fn browser_cache_params() -> Vec<ToolParam> {
1159 vec![
1160 ToolParam {
1161 name: "action".into(),
1162 description: "Action: 'scan' (default) to report sizes or 'clean' to remove cache data.".into(),
1163 param_type: "string".into(),
1164 required: false,
1165 },
1166 ToolParam {
1167 name: "browser".into(),
1168 description: "Browser to target: 'chrome', 'firefox', 'safari', 'edge', 'arc', or 'all' (default).".into(),
1169 param_type: "string".into(),
1170 required: false,
1171 },
1172 ]
1173}
1174
1175pub fn screenshot_params() -> Vec<ToolParam> {
1176 vec![
1177 ToolParam {
1178 name: "path".into(),
1179 description: "Output file path (default 'screenshot.png').".into(),
1180 param_type: "string".into(),
1181 required: false,
1182 },
1183 ToolParam {
1184 name: "region".into(),
1185 description: "Capture region as 'x,y,width,height'. Omit for full screen.".into(),
1186 param_type: "string".into(),
1187 required: false,
1188 },
1189 ToolParam {
1190 name: "delay".into(),
1191 description: "Seconds to wait before capturing (default 0).".into(),
1192 param_type: "integer".into(),
1193 required: false,
1194 },
1195 ]
1196}
1197
1198pub fn clipboard_params() -> Vec<ToolParam> {
1199 vec![
1200 ToolParam {
1201 name: "action".into(),
1202 description: "Action: 'read' to get clipboard contents, 'write' to set them.".into(),
1203 param_type: "string".into(),
1204 required: true,
1205 },
1206 ToolParam {
1207 name: "content".into(),
1208 description: "Text to write to clipboard (required when action='write').".into(),
1209 param_type: "string".into(),
1210 required: false,
1211 },
1212 ]
1213}
1214
1215pub fn audit_sensitive_params() -> Vec<ToolParam> {
1216 vec![
1217 ToolParam {
1218 name: "path".into(),
1219 description: "Directory to scan for sensitive data (default '.').".into(),
1220 param_type: "string".into(),
1221 required: false,
1222 },
1223 ToolParam {
1224 name: "max_files".into(),
1225 description: "Maximum number of files to scan (default 500).".into(),
1226 param_type: "integer".into(),
1227 required: false,
1228 },
1229 ]
1230}
1231
1232pub fn secure_delete_params() -> Vec<ToolParam> {
1233 vec![
1234 ToolParam {
1235 name: "path".into(),
1236 description: "Path to the file or directory to securely delete.".into(),
1237 param_type: "string".into(),
1238 required: true,
1239 },
1240 ToolParam {
1241 name: "passes".into(),
1242 description: "Number of overwrite passes (default 3).".into(),
1243 param_type: "integer".into(),
1244 required: false,
1245 },
1246 ToolParam {
1247 name: "confirm".into(),
1248 description: "Must be true to proceed. First call without confirm returns file info."
1249 .into(),
1250 param_type: "boolean".into(),
1251 required: false,
1252 },
1253 ]
1254}
1255
1256pub fn summarize_file_params() -> Vec<ToolParam> {
1257 vec![
1258 ToolParam {
1259 name: "path".into(),
1260 description: "Path to the file to summarize.".into(),
1261 param_type: "string".into(),
1262 required: true,
1263 },
1264 ToolParam {
1265 name: "max_lines".into(),
1266 description: "Maximum lines for the head preview (default 50).".into(),
1267 param_type: "integer".into(),
1268 required: false,
1269 },
1270 ]
1271}
1272
1273pub fn ask_user_params() -> Vec<ToolParam> {
1274 vec![
1275 ToolParam {
1276 name: "prompt_type".into(),
1277 description: "The kind of input to request. One of: 'select' (pick one option), \
1278 'multi_select' (pick multiple), 'confirm' (yes/no), \
1279 'text' (free text input), 'form' (multiple named fields)."
1280 .into(),
1281 param_type: "string".into(),
1282 required: true,
1283 },
1284 ToolParam {
1285 name: "title".into(),
1286 description: "The question or instruction to show the user.".into(),
1287 param_type: "string".into(),
1288 required: true,
1289 },
1290 ToolParam {
1291 name: "description".into(),
1292 description: "Optional longer explanation shown below the title.".into(),
1293 param_type: "string".into(),
1294 required: false,
1295 },
1296 ToolParam {
1297 name: "options".into(),
1298 description: "Array of option objects for select/multi_select. \
1299 Each object has 'label' (required), optional 'description', \
1300 and optional 'value' (defaults to label). \
1301 Example: [{\"label\":\"Option A\"},{\"label\":\"Option B\",\"description\":\"detailed\"}]"
1302 .into(),
1303 param_type: "array".into(),
1304 required: false,
1305 },
1306 ToolParam {
1307 name: "default_value".into(),
1308 description: "Default value: index for select (number), array of indices for \
1309 multi_select, boolean for confirm, string for text."
1310 .into(),
1311 param_type: "string".into(),
1312 required: false,
1313 },
1314 ToolParam {
1315 name: "fields".into(),
1316 description: "Array of field objects for 'form' type. Each has 'name' (key), \
1317 'label' (display), optional 'placeholder', optional 'default', \
1318 and optional 'required' (boolean). \
1319 Example: [{\"name\":\"host\",\"label\":\"Hostname\",\"required\":true}]"
1320 .into(),
1321 param_type: "array".into(),
1322 required: false,
1323 },
1324 ]
1325}
1326
1327pub fn pkg_manage_params() -> Vec<ToolParam> {
1330 vec![
1331 ToolParam {
1332 name: "action".into(),
1333 description: "Action to perform: 'install', 'uninstall', 'upgrade', 'search', \
1334 'list', 'info', 'detect'."
1335 .into(),
1336 param_type: "string".into(),
1337 required: true,
1338 },
1339 ToolParam {
1340 name: "package".into(),
1341 description: "Package name for install/uninstall/upgrade/search/info actions. \
1342 For search, this is the query string."
1343 .into(),
1344 param_type: "string".into(),
1345 required: false,
1346 },
1347 ToolParam {
1348 name: "manager".into(),
1349 description: "Override auto-detected package manager (brew, apt, dnf, pacman, etc.). \
1350 Omit to auto-detect."
1351 .into(),
1352 param_type: "string".into(),
1353 required: false,
1354 },
1355 ]
1356}
1357
1358pub fn net_info_params() -> Vec<ToolParam> {
1359 vec![
1360 ToolParam {
1361 name: "action".into(),
1362 description: "Action to perform: 'interfaces', 'connections', 'routing', 'dns', \
1363 'ping', 'traceroute', 'whois', 'arp', 'public_ip', 'wifi', 'bandwidth'."
1364 .into(),
1365 param_type: "string".into(),
1366 required: true,
1367 },
1368 ToolParam {
1369 name: "target".into(),
1370 description: "Target host/IP for ping, traceroute, dns, whois. \
1371 Filter string for connections."
1372 .into(),
1373 param_type: "string".into(),
1374 required: false,
1375 },
1376 ToolParam {
1377 name: "count".into(),
1378 description: "Number of pings to send (default: 4).".into(),
1379 param_type: "integer".into(),
1380 required: false,
1381 },
1382 ]
1383}
1384
1385pub fn net_scan_params() -> Vec<ToolParam> {
1386 vec![
1387 ToolParam {
1388 name: "action".into(),
1389 description: "Scan action: 'nmap', 'tcpdump', 'port_check', 'listen', \
1390 'sniff', 'discover'."
1391 .into(),
1392 param_type: "string".into(),
1393 required: true,
1394 },
1395 ToolParam {
1396 name: "target".into(),
1397 description: "Target host/IP/subnet for nmap, port_check, discover. \
1398 BPF filter expression for tcpdump."
1399 .into(),
1400 param_type: "string".into(),
1401 required: false,
1402 },
1403 ToolParam {
1404 name: "scan_type".into(),
1405 description: "nmap scan type: 'quick' (default), 'full', 'service', 'os', \
1406 'udp', 'vuln', 'ping', 'stealth'."
1407 .into(),
1408 param_type: "string".into(),
1409 required: false,
1410 },
1411 ToolParam {
1412 name: "ports".into(),
1413 description: "Port range for nmap (e.g. '80,443' or '1-1024'). \
1414 Single port for port_check."
1415 .into(),
1416 param_type: "string".into(),
1417 required: false,
1418 },
1419 ToolParam {
1420 name: "interface".into(),
1421 description: "Network interface for tcpdump/sniff (default: 'any').".into(),
1422 param_type: "string".into(),
1423 required: false,
1424 },
1425 ToolParam {
1426 name: "count".into(),
1427 description: "Number of packets to capture for tcpdump (default: 20).".into(),
1428 param_type: "integer".into(),
1429 required: false,
1430 },
1431 ToolParam {
1432 name: "seconds".into(),
1433 description: "Duration in seconds for sniff action (default: 5).".into(),
1434 param_type: "integer".into(),
1435 required: false,
1436 },
1437 ToolParam {
1438 name: "port".into(),
1439 description: "Single port number for port_check action.".into(),
1440 param_type: "integer".into(),
1441 required: false,
1442 },
1443 ]
1444}
1445
1446pub fn service_manage_params() -> Vec<ToolParam> {
1447 vec![
1448 ToolParam {
1449 name: "action".into(),
1450 description: "Action: 'list', 'status', 'start', 'stop', 'restart', \
1451 'enable', 'disable', 'logs'."
1452 .into(),
1453 param_type: "string".into(),
1454 required: true,
1455 },
1456 ToolParam {
1457 name: "service".into(),
1458 description: "Service name for status/start/stop/restart/enable/disable/logs. \
1459 Filter string for list."
1460 .into(),
1461 param_type: "string".into(),
1462 required: false,
1463 },
1464 ToolParam {
1465 name: "lines".into(),
1466 description: "Number of log lines to show (default: 50). Used with 'logs' action."
1467 .into(),
1468 param_type: "integer".into(),
1469 required: false,
1470 },
1471 ]
1472}
1473
1474pub fn user_manage_params() -> Vec<ToolParam> {
1475 vec![
1476 ToolParam {
1477 name: "action".into(),
1478 description: "Action: 'whoami', 'list_users', 'list_groups', 'user_info', \
1479 'add_user', 'remove_user', 'add_to_group', 'last_logins'."
1480 .into(),
1481 param_type: "string".into(),
1482 required: true,
1483 },
1484 ToolParam {
1485 name: "name".into(),
1486 description: "Username for user_info, add_user, remove_user, add_to_group.".into(),
1487 param_type: "string".into(),
1488 required: false,
1489 },
1490 ToolParam {
1491 name: "group".into(),
1492 description: "Group name for add_to_group action.".into(),
1493 param_type: "string".into(),
1494 required: false,
1495 },
1496 ToolParam {
1497 name: "shell".into(),
1498 description: "Login shell for add_user (default: /bin/bash). Linux only.".into(),
1499 param_type: "string".into(),
1500 required: false,
1501 },
1502 ]
1503}
1504
1505pub fn firewall_params() -> Vec<ToolParam> {
1506 vec![
1507 ToolParam {
1508 name: "action".into(),
1509 description: "Action: 'status', 'rules', 'allow', 'deny', 'enable', 'disable'.".into(),
1510 param_type: "string".into(),
1511 required: true,
1512 },
1513 ToolParam {
1514 name: "port".into(),
1515 description: "Port number for allow/deny actions.".into(),
1516 param_type: "integer".into(),
1517 required: false,
1518 },
1519 ToolParam {
1520 name: "protocol".into(),
1521 description: "Protocol for allow/deny: 'tcp' (default) or 'udp'.".into(),
1522 param_type: "string".into(),
1523 required: false,
1524 },
1525 ]
1526}
1527
1528pub fn ollama_manage_params() -> Vec<ToolParam> {
1531 vec![
1532 ToolParam {
1533 name: "action".into(),
1534 description: "Action to perform: 'setup', 'serve', 'stop', 'status', 'pull', \
1535 'rm', 'list', 'show', 'ps', 'load', 'unload', 'copy'."
1536 .into(),
1537 param_type: "string".into(),
1538 required: true,
1539 },
1540 ToolParam {
1541 name: "model".into(),
1542 description: "Model name for pull/rm/show/load/unload/copy \
1543 (e.g. 'llama3.1', 'mistral:7b-instruct')."
1544 .into(),
1545 param_type: "string".into(),
1546 required: false,
1547 },
1548 ToolParam {
1549 name: "destination".into(),
1550 description: "Destination tag for the 'copy' action.".into(),
1551 param_type: "string".into(),
1552 required: false,
1553 },
1554 ]
1555}
1556
1557pub fn exo_manage_params() -> Vec<ToolParam> {
1558 vec![
1559 ToolParam {
1560 name: "action".into(),
1561 description: "Action to perform: 'setup', 'start', 'stop', 'status', \
1562 'models', 'state', 'downloads', 'preview', 'load', 'unload', 'update', 'log'."
1563 .into(),
1564 param_type: "string".into(),
1565 required: true,
1566 },
1567 ToolParam {
1568 name: "model".into(),
1569 description: "Model short ID for load/preview/unload \
1570 (e.g. 'llama-3.2-1b', 'Qwen3-30B-A3B-4bit').".into(),
1571 param_type: "string".into(),
1572 required: false,
1573 },
1574 ToolParam {
1575 name: "instance_id".into(),
1576 description: "Instance ID for 'unload' action (from /state endpoint).".into(),
1577 param_type: "string".into(),
1578 required: false,
1579 },
1580 ToolParam {
1581 name: "port".into(),
1582 description: "API port for 'start' action (default: 52415).".into(),
1583 param_type: "integer".into(),
1584 required: false,
1585 },
1586 ToolParam {
1587 name: "no_worker".into(),
1588 description: "If true, start exo without worker (coordinator-only node).".into(),
1589 param_type: "boolean".into(),
1590 required: false,
1591 },
1592 ToolParam {
1593 name: "offline".into(),
1594 description: "If true, start in offline/air-gapped mode.".into(),
1595 param_type: "boolean".into(),
1596 required: false,
1597 },
1598 ToolParam {
1599 name: "verbose".into(),
1600 description: "If true, enable verbose logging for 'start'.".into(),
1601 param_type: "boolean".into(),
1602 required: false,
1603 },
1604 ]
1605}
1606
1607pub fn uv_manage_params() -> Vec<ToolParam> {
1608 vec![
1609 ToolParam {
1610 name: "action".into(),
1611 description: "Action to perform: 'setup', 'version', 'venv', 'pip-install', \
1612 'pip-uninstall', 'pip-list', 'pip-freeze', 'sync', 'run', \
1613 'python', 'init'."
1614 .into(),
1615 param_type: "string".into(),
1616 required: true,
1617 },
1618 ToolParam {
1619 name: "package".into(),
1620 description: "Single package name for pip-install/pip-uninstall.".into(),
1621 param_type: "string".into(),
1622 required: false,
1623 },
1624 ToolParam {
1625 name: "packages".into(),
1626 description: "Array of package names for pip-install/pip-uninstall.".into(),
1627 param_type: "array".into(),
1628 required: false,
1629 },
1630 ToolParam {
1631 name: "name".into(),
1632 description: "Name for venv (default '.venv') or init (project name).".into(),
1633 param_type: "string".into(),
1634 required: false,
1635 },
1636 ToolParam {
1637 name: "python".into(),
1638 description: "Python version specifier for venv (e.g. '3.12').".into(),
1639 param_type: "string".into(),
1640 required: false,
1641 },
1642 ToolParam {
1643 name: "version".into(),
1644 description: "Python version for 'python' action (e.g. '3.12', '3.11.6').".into(),
1645 param_type: "string".into(),
1646 required: false,
1647 },
1648 ToolParam {
1649 name: "command".into(),
1650 description: "Command string for 'run' action.".into(),
1651 param_type: "string".into(),
1652 required: false,
1653 },
1654 ToolParam {
1655 name: "file".into(),
1656 description: "Requirements file path for 'sync' action.".into(),
1657 param_type: "string".into(),
1658 required: false,
1659 },
1660 ]
1661}
1662
1663pub fn npm_manage_params() -> Vec<ToolParam> {
1664 vec![
1665 ToolParam {
1666 name: "action".into(),
1667 description: "Action to perform: 'setup', 'version', 'init', 'npm-install', \
1668 'uninstall', 'list', 'outdated', 'update', 'run', 'start', \
1669 'build', 'test', 'npx', 'audit', 'cache-clean', 'info', \
1670 'search', 'status'."
1671 .into(),
1672 param_type: "string".into(),
1673 required: true,
1674 },
1675 ToolParam {
1676 name: "package".into(),
1677 description: "Single package name for install/uninstall/update/info.".into(),
1678 param_type: "string".into(),
1679 required: false,
1680 },
1681 ToolParam {
1682 name: "packages".into(),
1683 description: "Array of package names for install/uninstall.".into(),
1684 param_type: "array".into(),
1685 required: false,
1686 },
1687 ToolParam {
1688 name: "script".into(),
1689 description: "Script name for 'run' action (e.g. 'build', 'dev', 'start').".into(),
1690 param_type: "string".into(),
1691 required: false,
1692 },
1693 ToolParam {
1694 name: "command".into(),
1695 description: "Command string for 'npx' action (e.g. 'create-react-app my-app').".into(),
1696 param_type: "string".into(),
1697 required: false,
1698 },
1699 ToolParam {
1700 name: "query".into(),
1701 description: "Search query for 'search' action.".into(),
1702 param_type: "string".into(),
1703 required: false,
1704 },
1705 ToolParam {
1706 name: "dev".into(),
1707 description: "Install as devDependency (--save-dev). Default: false.".into(),
1708 param_type: "boolean".into(),
1709 required: false,
1710 },
1711 ToolParam {
1712 name: "global".into(),
1713 description: "Install/uninstall/list globally (-g). Default: false.".into(),
1714 param_type: "boolean".into(),
1715 required: false,
1716 },
1717 ToolParam {
1718 name: "depth".into(),
1719 description: "Depth for 'list' action. Default: 0.".into(),
1720 param_type: "integer".into(),
1721 required: false,
1722 },
1723 ToolParam {
1724 name: "fix".into(),
1725 description: "Run 'npm audit fix' instead of just 'npm audit'. Default: false.".into(),
1726 param_type: "boolean".into(),
1727 required: false,
1728 },
1729 ToolParam {
1730 name: "args".into(),
1731 description: "Extra arguments to pass after '--' when running scripts.".into(),
1732 param_type: "string".into(),
1733 required: false,
1734 },
1735 ]
1736}
1737
1738pub fn agent_setup_params() -> Vec<ToolParam> {
1739 vec![ToolParam {
1740 name: "components".into(),
1741 description: "Array of components to set up: 'uv', 'exo', 'ollama'. \
1742 Defaults to all three if omitted."
1743 .into(),
1744 param_type: "array".into(),
1745 required: false,
1746 }]
1747}
1748
1749pub fn pdf_params() -> Vec<ToolParam> {
1750 vec![
1751 ToolParam {
1752 name: "action".into(),
1753 description: "Action to perform: 'extract' (default) to extract text, \
1754 'info' to get metadata, 'page_count' to get number of pages."
1755 .into(),
1756 param_type: "string".into(),
1757 required: false,
1758 },
1759 ToolParam {
1760 name: "path".into(),
1761 description: "Path to the PDF file.".into(),
1762 param_type: "string".into(),
1763 required: true,
1764 },
1765 ToolParam {
1766 name: "start_page".into(),
1767 description: "First page to extract (1-based, inclusive). Omit to start from page 1."
1768 .into(),
1769 param_type: "integer".into(),
1770 required: false,
1771 },
1772 ToolParam {
1773 name: "end_page".into(),
1774 description: "Last page to extract (1-based, inclusive). Omit to read to the end."
1775 .into(),
1776 param_type: "integer".into(),
1777 required: false,
1778 },
1779 ToolParam {
1780 name: "max_chars".into(),
1781 description: "Maximum characters to return. Truncates output if exceeded.".into(),
1782 param_type: "integer".into(),
1783 required: false,
1784 },
1785 ]
1786}