返回 DeepSeek-Reasonix
tool_schemas.json
根目录 / internal / boot / testdata / golden / tool_schemas.json
1 [
2 {
3 "Name": "ask",
4 "Description": "Ask the user one or more multiple-choice questions when you hit a decision that is genuinely theirs to make — one you can't resolve from the request, the code, or sensible defaults. The frontend shows the options for the user to pick; their choices are returned to you. Prefer this over asking in prose for any real fork (which approach, which library, scope). Don't use it for decisions with an obvious default — pick the sensible option and proceed. Permission presets do not answer these questions for the user. Each question has a short `header` (a tab label), the `question` text, 2-4 `options` (each a `label` and optional `description`; put any recommended option first), and `multiSelect` when more than one may apply.",
5 "ReadOnly": true,
6 "Schema": {
7 "properties": {
8 "decision_id": {
9 "description": "Required when reopening a previously accepted decision; cite the original decision_id.",
10 "type": "string"
11 },
12 "new_evidence": {
13 "description": "Required with decision_id when asking again after the user already accepted a consequence.",
14 "type": "string"
15 },
16 "questions": {
17 "description": "1-3 related questions to ask together. Same ambiguity is asked only once.",
18 "items": {
19 "properties": {
20 "header": {
21 "description": "Very short label for the question (a tab title), e.g. \"Library\".",
22 "type": "string"
23 },
24 "multiSelect": {
25 "description": "Allow selecting more than one option.",
26 "type": "boolean"
27 },
28 "options": {
29 "description": "The choices. Put any recommended option first.",
30 "items": {
31 "properties": {
32 "description": {
33 "description": "Optional one-line explanation of the choice.",
34 "type": "string"
35 },
36 "label": {
37 "description": "The choice text (concise).",
38 "type": "string"
39 }
40 },
41 "required": [
42 "label"
43 ],
44 "type": "object"
45 },
46 "maxItems": 4,
47 "minItems": 2,
48 "type": "array"
49 },
50 "question": {
51 "description": "The full question to ask.",
52 "type": "string"
53 }
54 },
55 "required": [
56 "header",
57 "options",
58 "question"
59 ],
60 "type": "object"
61 },
62 "maxItems": 3,
63 "minItems": 1,
64 "type": "array"
65 }
66 },
67 "required": [
68 "questions"
69 ],
70 "type": "object"
71 }
72 },
73 {
74 "Name": "bash",
75 "Description": "Execute a command in the shell and return combined stdout/stderr. To write outside the workspace, pass additional_write_dirs with the smallest concrete directories (no globs; absolute, workspace-relative, ~, or ${HOME}) and a justification. The host will not infer write paths from the command text. Use for builds, tests, git, package managers, etc. To search/read/list/edit/move files, prefer the dedicated tools (grep, read_file, ls, glob, edit_file, move_file) over shell grep/cat/ls/find/sed/mv/Move-Item — they behave identically on every OS. For symbol search or architecture questions, prefer LSP/read tools and targeted grep before shell commands.",
76 "ReadOnly": false,
77 "Schema": {
78 "properties": {
79 "additional_write_dirs": {
80 "description": "Directories this command must write outside the workspace. Directories only, no globs. Accepts absolute paths, workspace-relative paths, ~, and ${HOME}. Request the smallest set needed; the host will not infer paths from the command text.",
81 "items": {
82 "type": "string"
83 },
84 "type": "array"
85 },
86 "command": {
87 "description": "Shell command to execute",
88 "type": "string"
89 },
90 "denial_id": {
91 "description": "Host-issued denial identifier required when retrying with danger-full-access.",
92 "type": "string"
93 },
94 "justification": {
95 "description": "Required when additional_write_dirs or sandbox_permissions is set. Explain why the access is needed.",
96 "type": "string"
97 },
98 "preserve_background_processes": {
99 "description": "After the shell command exits normally, keep any process-group members it intentionally left behind. Use only for deliberate daemonization, browser/GUI/session launchers such as playwright-cli open, or nohup/disown/setsid; cancellation and timeouts still kill the process group.",
100 "type": "boolean"
101 },
102 "run_in_background": {
103 "description": "Run detached: returns a job id immediately and keeps running across turns (no foreground timeout). Read it with job_output or stop it with job_kill.",
104 "type": "boolean"
105 },
106 "sandbox_permissions": {
107 "description": "Optional per-call permission escalation. Use workspace-write for an authorized write while the session is read-only. danger-full-access is accepted only after a host-recorded denial and explicit authorization.",
108 "enum": [
109 "workspace-write",
110 "danger-full-access"
111 ],
112 "type": "string"
113 },
114 "timeout_ms": {
115 "description": "Optional foreground timeout in milliseconds, capped by the configured shell timeout",
116 "minimum": 1,
117 "type": "integer"
118 }
119 },
120 "required": [
121 "command"
122 ],
123 "type": "object"
124 }
125 },
126 {
127 "Name": "compress",
128 "Description": "Compress a selected part of the current model-visible conversation without deleting visible history. Use only when the user explicitly asks for context compression. Choose `before` to summarize everything before the uniquely matched user turn while keeping that turn and later context, or `after` to summarize from that turn through the last completed turn while keeping the active turn. The anchor must be an exact, unique excerpt from a real user message; use a longer excerpt if the tool reports multiple matches.",
129 "ReadOnly": true,
130 "Schema": {
131 "additionalProperties": false,
132 "properties": {
133 "anchor": {
134 "description": "An exact, unique excerpt from one real user message in the current model-visible conversation.",
135 "maxLength": 512,
136 "minLength": 1,
137 "type": "string"
138 },
139 "direction": {
140 "description": "Which side of the anchor user turn to compress.",
141 "enum": [
142 "before",
143 "after"
144 ],
145 "type": "string"
146 },
147 "focus": {
148 "description": "Optional guidance about facts or decisions the summary must preserve.",
149 "maxLength": 2000,
150 "type": "string"
151 }
152 },
153 "required": [
154 "anchor",
155 "direction"
156 ],
157 "type": "object"
158 }
159 },
160 {
161 "Name": "create_goal",
162 "Description": "Create one persisted same-session goal when the current direct human request is a long-running objective that should continue across autonomous rounds. You may infer that intent without requiring the user to name goal mode. Do not use this for routine single-turn work.",
163 "ReadOnly": false,
164 "Schema": {
165 "additionalProperties": false,
166 "properties": {
167 "max_goal_rounds": {
168 "anyOf": [
169 {
170 "minimum": 1,
171 "type": "integer"
172 },
173 {
174 "type": "null"
175 }
176 ],
177 "description": "Optional positive automatic-round limit; omit or null for unlimited."
178 },
179 "objective": {
180 "minLength": 1,
181 "type": "string"
182 }
183 },
184 "required": [
185 "objective"
186 ],
187 "type": "object"
188 }
189 },
190 {
191 "Name": "edit_file",
192 "Description": "Replace an exact string in a file with another. old_string must occur exactly once; add surrounding context to disambiguate. Use for targeted edits instead of rewriting the whole file.",
193 "ReadOnly": false,
194 "Schema": {
195 "properties": {
196 "new_string": {
197 "description": "Replacement text (may be empty to delete)",
198 "type": "string"
199 },
200 "old_string": {
201 "description": "Exact text to replace (must be unique in the file)",
202 "type": "string"
203 },
204 "path": {
205 "description": "File path",
206 "type": "string"
207 }
208 },
209 "required": [
210 "new_string",
211 "old_string",
212 "path"
213 ],
214 "type": "object"
215 }
216 },
217 {
218 "Name": "get_goal",
219 "Description": "Read the current same-session goal, including its exact id/revision, objective, phase, admitted rounds, optional round limit, blocker reason, and live activation. Call this before update_goal.",
220 "ReadOnly": true,
221 "Schema": {
222 "additionalProperties": false,
223 "properties": {},
224 "required": [],
225 "type": "object"
226 }
227 },
228 {
229 "Name": "job_kill",
230 "Description": "Request cancellation of a running background job by job id. Returns immediately; the process tree settles as killed once shutdown completes.",
231 "ReadOnly": false,
232 "Schema": {
233 "properties": {
234 "job_id": {
235 "description": "Job id returned by the tool that started the background work.",
236 "type": "string"
237 },
238 "reason": {
239 "description": "Optional short reason for stopping the job.",
240 "type": "string"
241 }
242 },
243 "required": [
244 "job_id"
245 ],
246 "type": "object"
247 }
248 },
249 {
250 "Name": "job_output",
251 "Description": "Read output from a background job. Reads are non-blocking unless wait=true; every response includes the current status. Do not busy-poll a running job.",
252 "ReadOnly": true,
253 "Schema": {
254 "properties": {
255 "filter": {
256 "description": "Optional regular expression; only matching lines of new output are returned.",
257 "type": "string"
258 },
259 "job_id": {
260 "description": "Job id returned by the tool that started the background work.",
261 "type": "string"
262 },
263 "timeout_ms": {
264 "description": "Maximum wait in milliseconds. Defaults to 30000 and is capped at 600000.",
265 "maximum": 600000,
266 "minimum": 1,
267 "type": "integer"
268 },
269 "wait": {
270 "description": "Wait until the job finishes or timeout_ms elapses. A timeout leaves the job running.",
271 "type": "boolean"
272 }
273 },
274 "required": [
275 "job_id"
276 ],
277 "type": "object"
278 }
279 },
280 {
281 "Name": "read_file",
282 "Description": "Read one bounded text window with optional line offset/limit. Output prefixes each line with its 1-based number. Any successful window observes the current file version for later structured edits. Use the next-window hint to page only when more content is useful. Legacy intent and cursor fields are accepted as navigation hints and never create a whole-file completion requirement.",
283 "ReadOnly": true,
284 "Schema": {
285 "properties": {
286 "cursor": {
287 "description": "Optional continuation cursor from a prior result. Invalid legacy cursors should be replaced with an explicit offset and limit.",
288 "type": "string"
289 },
290 "intent": {
291 "description": "Compatibility hint. Every value reads only this bounded window and creates no whole-file obligation.",
292 "enum": [
293 "inspect",
294 "range",
295 "full"
296 ],
297 "type": "string"
298 },
299 "limit": {
300 "description": "Maximum lines to return (default 2000)",
301 "minimum": 1,
302 "type": "integer"
303 },
304 "offset": {
305 "description": "0-based line offset to start reading from (default 0)",
306 "minimum": 0,
307 "type": "integer"
308 },
309 "path": {
310 "description": "File path",
311 "type": "string"
312 }
313 },
314 "required": [
315 "path"
316 ],
317 "type": "object"
318 }
319 },
320 {
321 "Name": "todo_write",
322 "Description": "Replace the current turn's complete task list. Send the full flat list on every call; an empty list clears it. Items may be reordered, removed, replanned, or have any number in progress. Each item contains only content and status (pending|in_progress|completed).",
323 "ReadOnly": true,
324 "Schema": {
325 "additionalProperties": false,
326 "properties": {
327 "todos": {
328 "description": "The complete flat task list for this turn. Replaces the previous list; [] clears it.",
329 "items": {
330 "additionalProperties": false,
331 "properties": {
332 "content": {
333 "description": "Task text. Leading and trailing whitespace is removed.",
334 "minLength": 1,
335 "type": "string"
336 },
337 "status": {
338 "enum": [
339 "pending",
340 "in_progress",
341 "completed"
342 ],
343 "type": "string"
344 }
345 },
346 "required": [
347 "content",
348 "status"
349 ],
350 "type": "object"
351 },
352 "type": "array"
353 }
354 },
355 "required": [
356 "todos"
357 ],
358 "type": "object"
359 }
360 },
361 {
362 "Name": "update_goal",
363 "Description": "Update the exact current goal revision. edit, pause, and resume require current direct-human authority; complete and blocked are also allowed during the exact autonomous goal round. There is no continue action: leaving an active goal unchanged continues it automatically. Only edit consumes objective/max_goal_rounds; only blocked consumes blocked_reason. Omit unused fields; supplied unused fields are ignored.",
364 "ReadOnly": false,
365 "Schema": {
366 "additionalProperties": false,
367 "properties": {
368 "action": {
369 "enum": [
370 "edit",
371 "pause",
372 "resume",
373 "complete",
374 "blocked"
375 ],
376 "type": "string"
377 },
378 "blocked_reason": {
379 "anyOf": [
380 {
381 "type": "string"
382 },
383 {
384 "type": "null"
385 }
386 ],
387 "description": "Non-empty concrete blocker required for blocked. Ignored for other actions."
388 },
389 "goal_id": {
390 "minLength": 1,
391 "type": "string"
392 },
393 "max_goal_rounds": {
394 "anyOf": [
395 {
396 "minimum": 1,
397 "type": "integer"
398 },
399 {
400 "type": "null"
401 }
402 ],
403 "description": "Replacement limit for edit; omit to keep it, null removes the limit. Ignored for other actions."
404 },
405 "objective": {
406 "anyOf": [
407 {
408 "type": "string"
409 },
410 {
411 "type": "null"
412 }
413 ],
414 "description": "Replacement non-empty objective for edit; omit or null to keep it. Ignored for other actions."
415 },
416 "revision": {
417 "minimum": 1,
418 "type": "integer"
419 }
420 },
421 "required": [
422 "action",
423 "goal_id",
424 "revision"
425 ],
426 "type": "object"
427 }
428 },
429 {
430 "Name": "use_capability",
431 "Description": "Fixed-schema capability proxy. Prefer search(query, limit\u003c=8), then inspect one exact capability, then call it. list is a compact diagnostic inventory only. Supports stable ids such as tool:grep, skill:review, mcp-tool:server/tool, task:subagent, workflow:name, and web:/lsp:/session:/memory: namespaces. memory:remember saves facts (description+body required; activation=\"relevant\" on create; omit activation on update; \"pinned\" only if user asks); memory:forget(name); tool:memory(operation=search|read|list). decline records a reason for a prefer capability. Independent list/search/inspect calls are read-only and may be issued together. Calls keep the provider-visible schema fixed; real writers still pass permission, plan mode, sandbox, write-path, and workspace-lease checks.",
432 "ReadOnly": true,
433 "Schema": {
434 "additionalProperties": false,
435 "properties": {
436 "action": {
437 "description": "Use search for discovery, inspect one exact result, then call. list is diagnostic only.",
438 "enum": [
439 "list",
440 "search",
441 "inspect",
442 "call",
443 "decline"
444 ],
445 "type": "string"
446 },
447 "arguments": {
448 "description": "Raw MCP tool arguments for action=call",
449 "type": "object"
450 },
451 "capability_id": {
452 "description": "Capability id such as skill:review, mcp-server:github, or mcp-tool:github/search_issues. Not required for action=list.",
453 "type": "string"
454 },
455 "cursor": {
456 "description": "Opaque cursor returned by action=list. It is valid only for the same catalog version.",
457 "type": "string"
458 },
459 "limit": {
460 "description": "Maximum results. Search defaults to 5 and allows at most 8; list defaults to 50 and allows at most 100.",
461 "maximum": 100,
462 "minimum": 1,
463 "type": "integer"
464 },
465 "query": {
466 "description": "Local catalog query required for action=search. No process or network is started.",
467 "type": "string"
468 },
469 "reason": {
470 "description": "Required non-empty reason when action=decline",
471 "type": "string"
472 }
473 },
474 "required": [
475 "action"
476 ],
477 "type": "object"
478 }
479 },
480 {
481 "Name": "view_image",
482 "Description": "Read a local PNG, JPEG, GIF, or WebP image by path and return visual content through native vision or the configured image-understanding model. Use this for image paths instead of read_file. Maximum file size: 3 MiB; maximum dimensions: 40 million pixels.",
483 "ReadOnly": true,
484 "Schema": {
485 "properties": {
486 "path": {
487 "description": "Image file path",
488 "type": "string"
489 }
490 },
491 "required": [
492 "path"
493 ],
494 "type": "object"
495 }
496 },
497 {
498 "Name": "write_file",
499 "Description": "Write content to a file at the given path (overwriting existing content). Creates parent directories as needed.",
500 "ReadOnly": false,
501 "Schema": {
502 "properties": {
503 "content": {
504 "description": "Full content to write",
505 "type": "string"
506 },
507 "path": {
508 "description": "File path",
509 "type": "string"
510 }
511 },
512 "required": [
513 "content",
514 "path"
515 ],
516 "type": "object"
517 }
518 }
519 ]
520
520 lines JSON