tool-schemas.expected.json 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. "initial": [
  3. {
  4. "name": "bash",
  5. "description": "Execute a bash command (`bash -c`) and return its stdout/stderr. Each call runs in a fresh shell: no state (cwd, variables, functions) persists between calls — pass `workdir` instead of using `cd`. Non-zero exits are reported as `[exit code: N]`. Current harness environment facts are exposed through managed `$DSH_*` variables; inspect them when needed. Commands may run under a file sandbox; a blocked file operation is reported as `[sandbox: file access denied under <mode> mode]` — a policy denial, not a bug in the command; do not retry another way. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. Set `run_in_background: true` for long-running commands: the call returns a task id immediately; read its output with `task_output` and stop it with `task_kill`.",
  6. "parameters": {
  7. "type": "object",
  8. "properties": {
  9. "command": {
  10. "type": "string",
  11. "description": "The bash command to execute."
  12. },
  13. "description": {
  14. "type": "string",
  15. "description": "Clear, concise description of what this command does in active voice, 5-10 words (shown in the UI). Examples: \"ls\" → \"List files in current directory\"; \"git status\" → \"Show working tree status\"; \"npm install\" → \"Install package dependencies\"."
  16. },
  17. "timeoutMs": {
  18. "type": "number",
  19. "description": "Timeout in milliseconds. The executor applies its configured default and cap, and kills the command on expiry."
  20. },
  21. "workdir": {
  22. "type": "string",
  23. "description": "Working directory for this command. Defaults to the session workspace; a relative path is resolved against it."
  24. },
  25. "run_in_background": {
  26. "type": "boolean",
  27. "description": "Run in the background and return a task id immediately (collect with task_output, stop with task_kill). No timeout applies."
  28. }
  29. },
  30. "required": [
  31. "command",
  32. "description"
  33. ]
  34. }
  35. },
  36. {
  37. "name": "glob",
  38. "description": "Find files whose paths match a glob pattern. Returns matching file paths — never directories — including hidden and ignored files (VCS metadata directories are excluded). Up to 4 paths come back in modification-time order; a larger result instead returns 4 paths sampled across top-level entries, says so, and reports where the complete sorted list was saved. This tool does not enumerate directory entries.",
  39. "parameters": {
  40. "type": "object",
  41. "properties": {
  42. "pattern": {
  43. "type": "string",
  44. "description": "Glob pattern to match file paths against (e.g. \"**/*.ts\", \"src/**/*.test.js\"). A pattern with no \"/\" matches the basename at any depth, so \"*\" and \"*.ts\" both search the whole tree; include a separator to anchor the depth."
  45. },
  46. "path": {
  47. "type": "string",
  48. "description": "Directory to search in. Defaults to the session workspace; a relative path resolves against it."
  49. }
  50. },
  51. "required": [
  52. "pattern"
  53. ]
  54. }
  55. },
  56. {
  57. "name": "grep",
  58. "description": "Search file contents with a ripgrep regular expression. Returns matching lines with line numbers, grouped by file. Returns the first 250 matches inline; a capped result reports where the complete match list was saved. Use read on a matched file for surrounding context.",
  59. "parameters": {
  60. "type": "object",
  61. "properties": {
  62. "pattern": {
  63. "type": "string",
  64. "description": "Regular expression to search for (ripgrep syntax)."
  65. },
  66. "path": {
  67. "type": "string",
  68. "description": "File or directory to search. Defaults to the session workspace; a relative path resolves against it."
  69. },
  70. "include": {
  71. "type": "string",
  72. "description": "One glob filter for which files to search (e.g. \"*.ts\", \"*.{js,jsx}\"). Not a list; negation is not supported."
  73. }
  74. },
  75. "required": [
  76. "pattern"
  77. ]
  78. }
  79. }
  80. ],
  81. "changes": []
  82. }