tool-schemas.expected.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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* A null placeholder for a parameter unused by the selected command is treated as omitted. Required parameters still need values; omit `str_replace.new_str` rather than setting it to null when deleting a match\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. "oneOf": [
  41. {
  42. "type": "string"
  43. },
  44. {
  45. "type": "null"
  46. }
  47. ],
  48. "description": "Required string parameter of `create` command, with the content of the file to be created. A null placeholder is treated as omitted by commands that do not use this parameter."
  49. },
  50. "insert_line": {
  51. "oneOf": [
  52. {
  53. "type": "integer"
  54. },
  55. {
  56. "type": "null"
  57. }
  58. ],
  59. "description": "Required integer parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`. A null placeholder is treated as omitted by commands that do not use this parameter."
  60. },
  61. "new_str": {
  62. "oneOf": [
  63. {
  64. "type": "string"
  65. },
  66. {
  67. "type": "null"
  68. }
  69. ],
  70. "description": "Optional string parameter of `str_replace` command containing the new string (if omitted, no string will be added). Required string parameter of `insert` command containing the string to insert. A null placeholder is accepted only by commands that do not use this parameter."
  71. },
  72. "old_str": {
  73. "oneOf": [
  74. {
  75. "type": "string"
  76. },
  77. {
  78. "type": "null"
  79. }
  80. ],
  81. "description": "Required string parameter of `str_replace` command containing the string in `path` to replace. A null placeholder is treated as omitted by commands that do not use this parameter."
  82. },
  83. "view_range": {
  84. "oneOf": [
  85. {
  86. "type": "array",
  87. "items": {
  88. "type": "integer"
  89. }
  90. },
  91. {
  92. "type": "null"
  93. }
  94. ],
  95. "description": "Optional parameter of `view` command when `path` points to a file. If omitted or null, 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."
  96. }
  97. },
  98. "required": [
  99. "command",
  100. "path"
  101. ]
  102. }
  103. }
  104. ],
  105. "changes": []
  106. }