|
7184 | 7184 | } |
7185 | 7185 | }, |
7186 | 7186 | { |
7187 | | - "description": "Perform filesystem operations inside a Daytona sandbox: read a file, write content to a path, append content to an existing file, list a directory, delete a path, make a directory, or fetch file metadata. For files larger than a few KB, create the file with action='write' and empty content, then send the body via multiple 'append' calls of ~4KB each to stay within tool-call payload limits.", |
| 7187 | + "description": "Perform filesystem operations inside a Daytona sandbox: read, write, append, list, delete, mkdir, info, exists, move, find (content grep), search (filename glob), chmod (permissions/owner/group), and replace (bulk find-and-replace across files). For files larger than a few KB, create the file with action='write' and empty content, then send the body via multiple 'append' calls of ~4KB each to stay within tool-call payload limits.", |
7188 | 7188 | "env_vars": [ |
7189 | 7189 | { |
7190 | 7190 | "default": null, |
|
7334 | 7334 | "daytona" |
7335 | 7335 | ], |
7336 | 7336 | "run_params_schema": { |
| 7337 | + "allOf": [ |
| 7338 | + { |
| 7339 | + "if": { |
| 7340 | + "properties": { |
| 7341 | + "action": { |
| 7342 | + "enum": [ |
| 7343 | + "read", |
| 7344 | + "write", |
| 7345 | + "append", |
| 7346 | + "list", |
| 7347 | + "delete", |
| 7348 | + "mkdir", |
| 7349 | + "info", |
| 7350 | + "exists", |
| 7351 | + "move", |
| 7352 | + "find", |
| 7353 | + "search", |
| 7354 | + "chmod" |
| 7355 | + ] |
| 7356 | + } |
| 7357 | + } |
| 7358 | + }, |
| 7359 | + "then": { |
| 7360 | + "required": [ |
| 7361 | + "path" |
| 7362 | + ] |
| 7363 | + } |
| 7364 | + }, |
| 7365 | + { |
| 7366 | + "if": { |
| 7367 | + "properties": { |
| 7368 | + "action": { |
| 7369 | + "const": "append" |
| 7370 | + } |
| 7371 | + } |
| 7372 | + }, |
| 7373 | + "then": { |
| 7374 | + "required": [ |
| 7375 | + "content" |
| 7376 | + ] |
| 7377 | + } |
| 7378 | + }, |
| 7379 | + { |
| 7380 | + "if": { |
| 7381 | + "properties": { |
| 7382 | + "action": { |
| 7383 | + "const": "move" |
| 7384 | + } |
| 7385 | + } |
| 7386 | + }, |
| 7387 | + "then": { |
| 7388 | + "required": [ |
| 7389 | + "destination" |
| 7390 | + ] |
| 7391 | + } |
| 7392 | + }, |
| 7393 | + { |
| 7394 | + "if": { |
| 7395 | + "properties": { |
| 7396 | + "action": { |
| 7397 | + "enum": [ |
| 7398 | + "find", |
| 7399 | + "search" |
| 7400 | + ] |
| 7401 | + } |
| 7402 | + } |
| 7403 | + }, |
| 7404 | + "then": { |
| 7405 | + "required": [ |
| 7406 | + "pattern" |
| 7407 | + ] |
| 7408 | + } |
| 7409 | + }, |
| 7410 | + { |
| 7411 | + "if": { |
| 7412 | + "properties": { |
| 7413 | + "action": { |
| 7414 | + "const": "replace" |
| 7415 | + } |
| 7416 | + } |
| 7417 | + }, |
| 7418 | + "then": { |
| 7419 | + "required": [ |
| 7420 | + "paths", |
| 7421 | + "pattern", |
| 7422 | + "replacement" |
| 7423 | + ] |
| 7424 | + } |
| 7425 | + }, |
| 7426 | + { |
| 7427 | + "if": { |
| 7428 | + "properties": { |
| 7429 | + "action": { |
| 7430 | + "const": "chmod" |
| 7431 | + } |
| 7432 | + } |
| 7433 | + }, |
| 7434 | + "then": { |
| 7435 | + "anyOf": [ |
| 7436 | + { |
| 7437 | + "required": [ |
| 7438 | + "mode" |
| 7439 | + ] |
| 7440 | + }, |
| 7441 | + { |
| 7442 | + "required": [ |
| 7443 | + "owner" |
| 7444 | + ] |
| 7445 | + }, |
| 7446 | + { |
| 7447 | + "required": [ |
| 7448 | + "group" |
| 7449 | + ] |
| 7450 | + } |
| 7451 | + ] |
| 7452 | + } |
| 7453 | + } |
| 7454 | + ], |
7337 | 7455 | "properties": { |
7338 | 7456 | "action": { |
7339 | | - "description": "The filesystem action to perform: 'read' (returns file contents), 'write' (create or replace a file with content), 'append' (append content to an existing file \u2014 use this for writing large files in chunks to avoid hitting tool-call size limits), 'list' (lists a directory), 'delete' (removes a file/dir), 'mkdir' (creates a directory), 'info' (returns file metadata).", |
| 7457 | + "description": "The filesystem action to perform: 'read' (returns file contents); 'write' (create or replace a file with content); 'append' (append content to an existing file \u2014 use this for writing large files in chunks to avoid hitting tool-call size limits); 'list' (lists a directory); 'delete' (removes a file/dir); 'mkdir' (creates a directory); 'info' (returns file metadata); 'exists' (returns whether a path exists); 'move' (rename or relocate a file/dir; requires 'destination'); 'find' (grep file CONTENTS recursively; requires 'pattern'); 'search' (find files by NAME pattern; requires 'pattern'); 'chmod' (change permissions/owner/group; pass at least one of 'mode', 'owner', 'group'); 'replace' (find-and-replace text across files; requires 'paths', 'pattern', and 'replacement').", |
7340 | 7458 | "enum": [ |
7341 | 7459 | "read", |
7342 | 7460 | "write", |
7343 | 7461 | "append", |
7344 | 7462 | "list", |
7345 | 7463 | "delete", |
7346 | 7464 | "mkdir", |
7347 | | - "info" |
| 7465 | + "info", |
| 7466 | + "exists", |
| 7467 | + "move", |
| 7468 | + "find", |
| 7469 | + "search", |
| 7470 | + "chmod", |
| 7471 | + "replace" |
7348 | 7472 | ], |
7349 | 7473 | "title": "Action", |
7350 | 7474 | "type": "string" |
|
7368 | 7492 | "description": "Content to write or append. If omitted for 'write', an empty file is created. For files larger than a few KB, prefer one 'write' with empty content followed by multiple 'append' calls of ~4KB each to stay within tool-call payload limits.", |
7369 | 7493 | "title": "Content" |
7370 | 7494 | }, |
| 7495 | + "destination": { |
| 7496 | + "anyOf": [ |
| 7497 | + { |
| 7498 | + "type": "string" |
| 7499 | + }, |
| 7500 | + { |
| 7501 | + "type": "null" |
| 7502 | + } |
| 7503 | + ], |
| 7504 | + "default": null, |
| 7505 | + "description": "For action='move': absolute destination path.", |
| 7506 | + "title": "Destination" |
| 7507 | + }, |
| 7508 | + "group": { |
| 7509 | + "anyOf": [ |
| 7510 | + { |
| 7511 | + "type": "string" |
| 7512 | + }, |
| 7513 | + { |
| 7514 | + "type": "null" |
| 7515 | + } |
| 7516 | + ], |
| 7517 | + "default": null, |
| 7518 | + "description": "For action='chmod': new file group.", |
| 7519 | + "title": "Group" |
| 7520 | + }, |
7371 | 7521 | "mode": { |
7372 | | - "default": "0755", |
7373 | | - "description": "For action='mkdir': octal permission string (default 0755).", |
7374 | | - "title": "Mode", |
7375 | | - "type": "string" |
| 7522 | + "anyOf": [ |
| 7523 | + { |
| 7524 | + "type": "string" |
| 7525 | + }, |
| 7526 | + { |
| 7527 | + "type": "null" |
| 7528 | + } |
| 7529 | + ], |
| 7530 | + "default": null, |
| 7531 | + "description": "Octal permission string. For 'mkdir' it sets the new directory permissions (defaults to '0755' if omitted). For 'chmod' it sets the target's mode (e.g. '755' to make a script executable). Ignored for other actions.", |
| 7532 | + "title": "Mode" |
| 7533 | + }, |
| 7534 | + "owner": { |
| 7535 | + "anyOf": [ |
| 7536 | + { |
| 7537 | + "type": "string" |
| 7538 | + }, |
| 7539 | + { |
| 7540 | + "type": "null" |
| 7541 | + } |
| 7542 | + ], |
| 7543 | + "default": null, |
| 7544 | + "description": "For action='chmod': new file owner (user name).", |
| 7545 | + "title": "Owner" |
7376 | 7546 | }, |
7377 | 7547 | "path": { |
7378 | | - "description": "Absolute path inside the sandbox.", |
7379 | | - "title": "Path", |
7380 | | - "type": "string" |
| 7548 | + "anyOf": [ |
| 7549 | + { |
| 7550 | + "type": "string" |
| 7551 | + }, |
| 7552 | + { |
| 7553 | + "type": "null" |
| 7554 | + } |
| 7555 | + ], |
| 7556 | + "default": null, |
| 7557 | + "description": "Absolute path inside the sandbox. Required for all actions except 'replace' (which uses 'paths' instead).", |
| 7558 | + "title": "Path" |
| 7559 | + }, |
| 7560 | + "paths": { |
| 7561 | + "anyOf": [ |
| 7562 | + { |
| 7563 | + "items": { |
| 7564 | + "type": "string" |
| 7565 | + }, |
| 7566 | + "type": "array" |
| 7567 | + }, |
| 7568 | + { |
| 7569 | + "type": "null" |
| 7570 | + } |
| 7571 | + ], |
| 7572 | + "default": null, |
| 7573 | + "description": "For action='replace': list of absolute file paths in which to replace 'pattern' with 'replacement'.", |
| 7574 | + "title": "Paths" |
| 7575 | + }, |
| 7576 | + "pattern": { |
| 7577 | + "anyOf": [ |
| 7578 | + { |
| 7579 | + "type": "string" |
| 7580 | + }, |
| 7581 | + { |
| 7582 | + "type": "null" |
| 7583 | + } |
| 7584 | + ], |
| 7585 | + "default": null, |
| 7586 | + "description": "For 'find': substring matched against file CONTENTS. For 'search': glob-style pattern matched against file NAMES (e.g. '*.py'). For 'replace': text to replace inside files.", |
| 7587 | + "title": "Pattern" |
7381 | 7588 | }, |
7382 | 7589 | "recursive": { |
7383 | 7590 | "default": false, |
7384 | 7591 | "description": "For action='delete': remove directories recursively.", |
7385 | 7592 | "title": "Recursive", |
7386 | 7593 | "type": "boolean" |
| 7594 | + }, |
| 7595 | + "replacement": { |
| 7596 | + "anyOf": [ |
| 7597 | + { |
| 7598 | + "type": "string" |
| 7599 | + }, |
| 7600 | + { |
| 7601 | + "type": "null" |
| 7602 | + } |
| 7603 | + ], |
| 7604 | + "default": null, |
| 7605 | + "description": "For action='replace': replacement text for 'pattern'.", |
| 7606 | + "title": "Replacement" |
7387 | 7607 | } |
7388 | 7608 | }, |
7389 | 7609 | "required": [ |
7390 | | - "action", |
7391 | | - "path" |
| 7610 | + "action" |
7392 | 7611 | ], |
7393 | 7612 | "title": "DaytonaFileToolSchema", |
7394 | 7613 | "type": "object" |
|
0 commit comments