tool-schemas.expected.json 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {
  2. "initial": [
  3. {
  4. "name": "bash",
  5. "description": "Run commands in a bash shell\n* When invoking this tool, the contents of the \"command\" parameter does NOT need to be XML-escaped.\n* You don't have access to the internet via this tool.\n* You do have access to a mirror of common linux and python packages via apt and pip.\n* State is persistent across command calls and discussions with the user.\n* To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.\n* Please avoid commands that may produce a very large amount of output.\n* Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.",
  6. "parameters": {
  7. "type": "object",
  8. "properties": {
  9. "command": {
  10. "type": "string",
  11. "description": "The bash command to run. Relative path is preferred in the command."
  12. }
  13. },
  14. "required": [
  15. "command"
  16. ]
  17. }
  18. },
  19. {
  20. "name": "str_replace_editor",
  21. "description": "Custom editing tool for viewing, creating and editing files\n* State is persistent across command calls and discussions with the user\n* If `path` is a file, `view` displays the result of applying `cat -n`. If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep\n* The `create` command cannot be used if the specified `path` already exists as a file\n* If a `command` generates a long output, it will be truncated and marked with `<response clipped>`\n\nNotes for using the `str_replace` command:\n* The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!\n* If the `old_str` parameter is not unique in the file, the replacement will not be performed. Make sure to include enough context in `old_str` to make it unique\n* The `new_str` parameter should contain the edited lines that should replace the `old_str`",
  22. "parameters": {
  23. "type": "object",
  24. "properties": {
  25. "command": {
  26. "type": "string",
  27. "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`.",
  28. "enum": [
  29. "view",
  30. "create",
  31. "str_replace",
  32. "insert"
  33. ]
  34. },
  35. "path": {
  36. "type": "string",
  37. "description": "Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`."
  38. },
  39. "file_text": {
  40. "type": "string",
  41. "description": "Required parameter of `create` command, with the content of the file to be created."
  42. },
  43. "insert_line": {
  44. "type": "integer",
  45. "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`."
  46. },
  47. "new_str": {
  48. "type": "string",
  49. "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert."
  50. },
  51. "old_str": {
  52. "type": "string",
  53. "description": "Required parameter of `str_replace` command containing the string in `path` to replace."
  54. },
  55. "view_range": {
  56. "type": "array",
  57. "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file.",
  58. "items": {
  59. "type": "integer"
  60. }
  61. }
  62. },
  63. "required": [
  64. "command",
  65. "path"
  66. ]
  67. }
  68. }
  69. ],
  70. "changes": []
  71. }