gpt-5-tools.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. {
  2. "tools": [
  3. {
  4. "type": "function",
  5. "function": {
  6. "name": "view",
  7. "description": "View a file or directory. For files, optionally search within the file using a regex pattern or limit to a line range. Exclude the 'electron' folder by default unless explicitly requested.",
  8. "parameters": {
  9. "type": "object",
  10. "properties": {
  11. "type": {
  12. "type": "string",
  13. "enum": ["file", "directory"],
  14. "description": "Whether to view a single file or a directory listing (up to 2 levels)."
  15. },
  16. "path": {
  17. "type": "string",
  18. "description": "Path relative to the repository root."
  19. },
  20. "view_range": {
  21. "type": "array",
  22. "items": { "type": "integer" },
  23. "minItems": 2,
  24. "maxItems": 2,
  25. "description": "Optional [start_line, end_line] 1-based inclusive range for files."
  26. },
  27. "search_query_regex": {
  28. "type": "string",
  29. "description": "Optional regex to search within file content (single-line regex)."
  30. },
  31. "case_sensitive": {
  32. "type": "boolean",
  33. "default": false,
  34. "description": "Whether the regex search is case-sensitive."
  35. },
  36. "context_lines_before": {
  37. "type": "integer",
  38. "default": 5,
  39. "description": "Lines of context to include before each regex match."
  40. },
  41. "context_lines_after": {
  42. "type": "integer",
  43. "default": 5,
  44. "description": "Lines of context to include after each regex match."
  45. }
  46. },
  47. "required": ["type", "path"],
  48. "additionalProperties": false
  49. }
  50. }
  51. },
  52. {
  53. "type": "function",
  54. "function": {
  55. "name": "grep-search",
  56. "description": "Search across multiple files/directories or the whole codebase. Use for finding text/symbols across many files. Excludes 'electron/**' by default unless explicitly overridden.",
  57. "parameters": {
  58. "type": "object",
  59. "properties": {
  60. "query": {
  61. "type": "string",
  62. "description": "Text or regex to search for."
  63. },
  64. "paths": {
  65. "type": "array",
  66. "items": { "type": "string" },
  67. "description": "Optional list of directories or files to limit the search scope."
  68. },
  69. "include_globs": {
  70. "type": "array",
  71. "items": { "type": "string" },
  72. "description": "Optional glob patterns to include (e.g., 'src/**/*.ts')."
  73. },
  74. "exclude_globs": {
  75. "type": "array",
  76. "items": { "type": "string" },
  77. "default": ["electron/**"],
  78. "description": "Optional glob patterns to exclude. Defaults to excluding the 'electron' folder."
  79. },
  80. "case_sensitive": {
  81. "type": "boolean",
  82. "default": false,
  83. "description": "Case sensitivity for the search."
  84. },
  85. "context_lines_before": {
  86. "type": "integer",
  87. "default": 5,
  88. "description": "Lines of context before each match."
  89. },
  90. "context_lines_after": {
  91. "type": "integer",
  92. "default": 5,
  93. "description": "Lines of context after each match."
  94. },
  95. "max_results": {
  96. "type": "integer",
  97. "default": 5000,
  98. "description": "Limit the number of matches returned."
  99. }
  100. },
  101. "required": ["query"],
  102. "additionalProperties": false
  103. }
  104. }
  105. },
  106. {
  107. "type": "function",
  108. "function": {
  109. "name": "codebase-retrieval",
  110. "description": "High-level retrieval across the current codebase to locate relevant files, classes, functions, or patterns when you don't know where to look.",
  111. "parameters": {
  112. "type": "object",
  113. "properties": {
  114. "information_request": {
  115. "type": "string",
  116. "description": "Natural-language description of what you need to find."
  117. }
  118. },
  119. "required": ["information_request"],
  120. "additionalProperties": false
  121. }
  122. }
  123. },
  124. {
  125. "type": "function",
  126. "function": {
  127. "name": "git-commit-retrieval",
  128. "description": "Use the repository’s commit history to find how similar changes were made in the past or why changes happened.",
  129. "parameters": {
  130. "type": "object",
  131. "properties": {
  132. "information_request": {
  133. "type": "string",
  134. "description": "Question about past changes (e.g., how/why a feature was implemented)."
  135. }
  136. },
  137. "required": ["information_request"],
  138. "additionalProperties": false
  139. }
  140. }
  141. },
  142. {
  143. "type": "function",
  144. "function": {
  145. "name": "str-replace-editor",
  146. "description": "Edit existing files safely. Use 'str_replace' for in-place replacements with explicit line ranges, or 'insert' to insert new content at a specific line.",
  147. "parameters": {
  148. "type": "object",
  149. "properties": {
  150. "command": {
  151. "type": "string",
  152. "enum": ["str_replace", "insert"],
  153. "description": "Edit mode: 'str_replace' or 'insert'."
  154. },
  155. "path": {
  156. "type": "string",
  157. "description": "Path of the file to edit, relative to repo root."
  158. },
  159. "instruction_reminder": {
  160. "type": "string",
  161. "description": "Must be exactly: 'ALWAYS BREAK DOWN EDITS INTO SMALLER CHUNKS OF AT MOST 150 LINES EACH.'"
  162. },
  163. "insert_line_1": {
  164. "type": "integer",
  165. "description": "For 'insert': 1-based line number after which to insert. Use 0 to insert at the very beginning."
  166. },
  167. "new_str_1": {
  168. "type": "string",
  169. "description": "For 'str_replace' and 'insert': the new content."
  170. },
  171. "old_str_1": {
  172. "type": "string",
  173. "description": "For 'str_replace': the exact original text to replace (must match exactly, including whitespace)."
  174. },
  175. "old_str_start_line_number_1": {
  176. "type": "integer",
  177. "description": "For 'str_replace': 1-based start line of old_str_1."
  178. },
  179. "old_str_end_line_number_1": {
  180. "type": "integer",
  181. "description": "For 'str_replace': 1-based end line of old_str_1 (inclusive)."
  182. }
  183. },
  184. "required": ["command", "path", "instruction_reminder"],
  185. "additionalProperties": false
  186. }
  187. }
  188. },
  189. {
  190. "type": "function",
  191. "function": {
  192. "name": "save-file",
  193. "description": "Create a new file. Does not modify existing files.",
  194. "parameters": {
  195. "type": "object",
  196. "properties": {
  197. "instructions_reminder": {
  198. "type": "string",
  199. "description": "Must be exactly: 'LIMIT THE FILE CONTENT TO AT MOST 300 LINES. IF MORE CONTENT NEEDS TO BE ADDED USE THE str-replace-editor TOOL TO EDIT THE FILE AFTER IT HAS BEEN CREATED.'"
  200. },
  201. "path": {
  202. "type": "string",
  203. "description": "Path for the new file, relative to repo root."
  204. },
  205. "file_content": {
  206. "type": "string",
  207. "description": "Content to write into the new file."
  208. },
  209. "add_last_line_newline": {
  210. "type": "boolean",
  211. "default": true,
  212. "description": "Whether to ensure a trailing newline."
  213. }
  214. },
  215. "required": ["instructions_reminder", "path", "file_content"],
  216. "additionalProperties": false
  217. }
  218. }
  219. },
  220. {
  221. "type": "function",
  222. "function": {
  223. "name": "remove-files",
  224. "description": "Delete files from the workspace in a reversible way.",
  225. "parameters": {
  226. "type": "object",
  227. "properties": {
  228. "file_paths": {
  229. "type": "array",
  230. "items": { "type": "string" },
  231. "description": "List of file paths to remove, relative to repo root."
  232. }
  233. },
  234. "required": ["file_paths"],
  235. "additionalProperties": false
  236. }
  237. }
  238. },
  239. {
  240. "type": "function",
  241. "function": {
  242. "name": "launch-process",
  243. "description": "Run a shell command. Use wait=true for short commands. OS is win32; shell is 'bash'.",
  244. "parameters": {
  245. "type": "object",
  246. "properties": {
  247. "command": { "type": "string", "description": "The shell command to execute." },
  248. "wait": { "type": "boolean", "description": "Whether to wait for the process to complete." },
  249. "max_wait_seconds": { "type": "integer", "description": "Timeout in seconds when wait=true." },
  250. "cwd": { "type": "string", "description": "Absolute working directory for the command." }
  251. },
  252. "required": ["command", "wait", "max_wait_seconds", "cwd"],
  253. "additionalProperties": false
  254. }
  255. }
  256. },
  257. { "type": "function", "function": {
  258. "name": "read-process",
  259. "description": "Read output from a previously launched process.",
  260. "parameters": {
  261. "type": "object",
  262. "properties": {
  263. "terminal_id": { "type": "integer", "description": "Target terminal ID." },
  264. "wait": { "type": "boolean", "description": "Whether to wait for completion." },
  265. "max_wait_seconds": { "type": "integer", "description": "Timeout when wait=true." }
  266. },
  267. "required": ["terminal_id", "wait", "max_wait_seconds"],
  268. "additionalProperties": false
  269. }
  270. }},
  271. { "type": "function", "function": {
  272. "name": "write-process",
  273. "description": "Write input to a running process’s stdin.",
  274. "parameters": {
  275. "type": "object",
  276. "properties": {
  277. "terminal_id": { "type": "integer", "description": "Target terminal ID." },
  278. "input_text": { "type": "string", "description": "Text to write to stdin." }
  279. },
  280. "required": ["terminal_id", "input_text"],
  281. "additionalProperties": false
  282. }
  283. }},
  284. { "type": "function", "function": {
  285. "name": "kill-process",
  286. "description": "Kill a running process by terminal ID.",
  287. "parameters": {
  288. "type": "object",
  289. "properties": {
  290. "terminal_id": { "type": "integer", "description": "Target terminal ID." }
  291. },
  292. "required": ["terminal_id"],
  293. "additionalProperties": false
  294. }
  295. }},
  296. { "type": "function", "function": {
  297. "name": "list-processes",
  298. "description": "List all known terminals created with the launch-process tool.",
  299. "parameters": { "type": "object", "properties": {}, "additionalProperties": false }
  300. }},
  301. {
  302. "type": "function",
  303. "function": {
  304. "name": "diagnostics",
  305. "description": "Return IDE issues (errors, warnings, etc.) for specified files.",
  306. "parameters": {
  307. "type": "object",
  308. "properties": {
  309. "paths": {
  310. "type": "array",
  311. "items": { "type": "string" },
  312. "description": "List of file paths to get issues for."
  313. }
  314. },
  315. "required": ["paths"],
  316. "additionalProperties": false
  317. }
  318. }
  319. },
  320. {
  321. "type": "function",
  322. "function": {
  323. "name": "read-terminal",
  324. "description": "Read the visible output from the active or most-recently used VSCode terminal.",
  325. "parameters": {
  326. "type": "object",
  327. "properties": {
  328. "only_selected": {
  329. "type": "boolean",
  330. "description": "Whether to read only the selected text."
  331. }
  332. },
  333. "additionalProperties": false
  334. }
  335. }
  336. },
  337. {
  338. "type": "function",
  339. "function": {
  340. "name": "open-browser",
  341. "description": "Open a URL in the default browser.",
  342. "parameters": {
  343. "type": "object",
  344. "properties": {
  345. "url": { "type": "string", "description": "URL to open." }
  346. },
  347. "required": ["url"],
  348. "additionalProperties": false
  349. }
  350. }
  351. },
  352. {
  353. "type": "function",
  354. "function": {
  355. "name": "web-search",
  356. "description": "Search the web using Google Custom Search API.",
  357. "parameters": {
  358. "type": "object",
  359. "properties": {
  360. "query": { "type": "string", "description": "Search query." },
  361. "num_results": {
  362. "type": "integer",
  363. "minimum": 1,
  364. "maximum": 10,
  365. "default": 5,
  366. "description": "Number of results to return (1–10)."
  367. }
  368. },
  369. "required": ["query"],
  370. "additionalProperties": false
  371. }
  372. }
  373. },
  374. {
  375. "type": "function",
  376. "function": {
  377. "name": "web-fetch",
  378. "description": "Fetch a webpage and return its content in Markdown format.",
  379. "parameters": {
  380. "type": "object",
  381. "properties": {
  382. "url": { "type": "string", "description": "URL to fetch." }
  383. },
  384. "required": ["url"],
  385. "additionalProperties": false
  386. }
  387. }
  388. },
  389. {
  390. "type": "function",
  391. "function": {
  392. "name": "view-range-untruncated",
  393. "description": "View a specific line range from previously truncated content by reference ID.",
  394. "parameters": {
  395. "type": "object",
  396. "properties": {
  397. "reference_id": { "type": "string", "description": "Reference ID from truncation footer." },
  398. "start_line": { "type": "integer", "description": "1-based inclusive start line." },
  399. "end_line": { "type": "integer", "description": "1-based inclusive end line." }
  400. },
  401. "required": ["reference_id", "start_line", "end_line"],
  402. "additionalProperties": false
  403. }
  404. }
  405. },
  406. {
  407. "type": "function",
  408. "function": {
  409. "name": "search-untruncated",
  410. "description": "Search within previously untruncated content by reference ID.",
  411. "parameters": {
  412. "type": "object",
  413. "properties": {
  414. "reference_id": { "type": "string", "description": "Reference ID from truncation footer." },
  415. "search_term": { "type": "string", "description": "Text to search for." },
  416. "context_lines": { "type": "integer", "default": 2, "description": "Context lines around matches." }
  417. },
  418. "required": ["reference_id", "search_term"],
  419. "additionalProperties": false
  420. }
  421. }
  422. },
  423. {
  424. "type": "function",
  425. "function": {
  426. "name": "view_tasklist",
  427. "description": "View the current task list for the conversation.",
  428. "parameters": { "type": "object", "properties": {}, "additionalProperties": false }
  429. }
  430. },
  431. {
  432. "type": "function",
  433. "function": {
  434. "name": "add_tasks",
  435. "description": "Add one or more new tasks (and optional subtasks) to the task list.",
  436. "parameters": {
  437. "type": "object",
  438. "properties": {
  439. "tasks": {
  440. "type": "array",
  441. "items": {
  442. "type": "object",
  443. "properties": {
  444. "name": { "type": "string" },
  445. "description": { "type": "string" },
  446. "parent_task_id": { "type": "string" },
  447. "after_task_id": { "type": "string" },
  448. "state": {
  449. "type": "string",
  450. "enum": ["NOT_STARTED", "IN_PROGRESS", "CANCELLED", "COMPLETE"]
  451. }
  452. },
  453. "required": ["name", "description"],
  454. "additionalProperties": false
  455. }
  456. }
  457. },
  458. "required": ["tasks"],
  459. "additionalProperties": false
  460. }
  461. }
  462. },
  463. {
  464. "type": "function",
  465. "function": {
  466. "name": "update_tasks",
  467. "description": "Update one or more tasks' properties (state, name, description). Prefer batch updates.",
  468. "parameters": {
  469. "type": "object",
  470. "properties": {
  471. "tasks": {
  472. "type": "array",
  473. "items": {
  474. "type": "object",
  475. "properties": {
  476. "task_id": { "type": "string" },
  477. "state": {
  478. "type": "string",
  479. "enum": ["NOT_STARTED", "IN_PROGRESS", "CANCELLED", "COMPLETE"]
  480. },
  481. "name": { "type": "string" },
  482. "description": { "type": "string" }
  483. },
  484. "required": ["task_id"],
  485. "additionalProperties": false
  486. }
  487. }
  488. },
  489. "required": ["tasks"],
  490. "additionalProperties": false
  491. }
  492. }
  493. },
  494. {
  495. "type": "function",
  496. "function": {
  497. "name": "reorganize_tasklist",
  498. "description": "Major restructuring of the task list using a full markdown representation.",
  499. "parameters": {
  500. "type": "object",
  501. "properties": {
  502. "markdown": { "type": "string", "description": "Full task list in markdown with exactly one root task." }
  503. },
  504. "required": ["markdown"],
  505. "additionalProperties": false
  506. }
  507. }
  508. },
  509. {
  510. "type": "function",
  511. "function": {
  512. "name": "remember",
  513. "description": "Store long-term memory that can be useful in future interactions.",
  514. "parameters": {
  515. "type": "object",
  516. "properties": {
  517. "memory": { "type": "string", "description": "One concise sentence to remember." }
  518. },
  519. "required": ["memory"],
  520. "additionalProperties": false
  521. }
  522. }
  523. },
  524. {
  525. "type": "function",
  526. "function": {
  527. "name": "render-mermaid",
  528. "description": "Render a Mermaid diagram from the provided definition.",
  529. "parameters": {
  530. "type": "object",
  531. "properties": {
  532. "diagram_definition": { "type": "string", "description": "Mermaid definition code." },
  533. "title": { "type": "string", "description": "Optional title for the diagram." }
  534. },
  535. "required": ["diagram_definition"],
  536. "additionalProperties": false
  537. }
  538. }
  539. }
  540. ]
  541. }