返回 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 "type": "object"
225 }
226 },
227 {
228 "Name": "job_kill",
229 "Description": "Request cancellation of a running background job by job id. Returns immediately; the process tree settles as killed once shutdown completes.",
230 "ReadOnly": false,
231 "Schema": {
232 "properties": {
233 "job_id": {
234 "description": "Job id returned by the tool that started the background work.",
235 "type": "string"
236 },
237 "reason": {
238 "description": "Optional short reason for stopping the job.",
239 "type": "string"
240 }
241 },
242 "required": [
243 "job_id"
244 ],
245 "type": "object"
246 }
247 },
248 {
249 "Name": "job_output",
250 "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.",
251 "ReadOnly": true,
252 "Schema": {
253 "properties": {
254 "filter": {
255 "description": "Optional regular expression; only matching lines of new output are returned.",
256 "type": "string"
257 },
258 "job_id": {
259 "description": "Job id returned by the tool that started the background work.",
260 "type": "string"
261 },
262 "timeout_ms": {
263 "description": "Maximum wait in milliseconds. Defaults to 30000 and is capped at 600000.",
264 "maximum": 600000,
265 "minimum": 1,
266 "type": "integer"
267 },
268 "wait": {
269 "description": "Wait until the job finishes or timeout_ms elapses. A timeout leaves the job running.",
270 "type": "boolean"
271 }
272 },
273 "required": [
274 "job_id"
275 ],
276 "type": "object"
277 }
278 },
279 {
280 "Name": "read_file",
281 "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.",
282 "ReadOnly": true,
283 "Schema": {
284 "properties": {
285 "cursor": {
286 "description": "Optional continuation cursor from a prior result. Invalid legacy cursors should be replaced with an explicit offset and limit.",
287 "type": "string"
288 },
289 "intent": {
290 "description": "Compatibility hint. Every value reads only this bounded window and creates no whole-file obligation.",
291 "enum": [
292 "inspect",
293 "range",
294 "full"
295 ],
296 "type": "string"
297 },
298 "limit": {
299 "description": "Maximum lines to return (default 2000)",
300 "minimum": 1,
301 "type": "integer"
302 },
303 "offset": {
304 "description": "0-based line offset to start reading from (default 0)",
305 "minimum": 0,
306 "type": "integer"
307 },
308 "path": {
309 "description": "File path",
310 "type": "string"
311 }
312 },
313 "required": [
314 "path"
315 ],
316 "type": "object"
317 }
318 },
319 {
320 "Name": "todo_write",
321 "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).",
322 "ReadOnly": true,
323 "Schema": {
324 "additionalProperties": false,
325 "properties": {
326 "todos": {
327 "description": "The complete flat task list for this turn. Replaces the previous list; [] clears it.",
328 "items": {
329 "additionalProperties": false,
330 "properties": {
331 "content": {
332 "description": "Task text. Leading and trailing whitespace is removed.",
333 "minLength": 1,
334 "type": "string"
335 },
336 "status": {
337 "enum": [
338 "pending",
339 "in_progress",
340 "completed"
341 ],
342 "type": "string"
343 }
344 },
345 "required": [
346 "content",
347 "status"
348 ],
349 "type": "object"
350 },
351 "type": "array"
352 }
353 },
354 "required": [
355 "todos"
356 ],
357 "type": "object"
358 }
359 },
360 {
361 "Name": "update_goal",
362 "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.",
363 "ReadOnly": false,
364 "Schema": {
365 "additionalProperties": false,
366 "properties": {
367 "action": {
368 "enum": [
369 "edit",
370 "pause",
371 "resume",
372 "complete",
373 "blocked"
374 ],
375 "type": "string"
376 },
377 "blocked_reason": {
378 "description": "Concrete blocker; required only for blocked.",
379 "minLength": 1,
380 "type": "string"
381 },
382 "goal_id": {
383 "minLength": 1,
384 "type": "string"
385 },
386 "max_goal_rounds": {
387 "anyOf": [
388 {
389 "minimum": 1,
390 "type": "integer"
391 },
392 {
393 "type": "null"
394 }
395 ],
396 "description": "Replacement limit for edit; null removes the limit."
397 },
398 "objective": {
399 "description": "Replacement objective; valid only for edit.",
400 "minLength": 1,
401 "type": "string"
402 },
403 "revision": {
404 "minimum": 1,
405 "type": "integer"
406 }
407 },
408 "required": [
409 "action",
410 "goal_id",
411 "revision"
412 ],
413 "type": "object"
414 }
415 },
416 {
417 "Name": "use_capability",
418 "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.",
419 "ReadOnly": true,
420 "Schema": {
421 "additionalProperties": false,
422 "properties": {
423 "action": {
424 "description": "Use search for discovery, inspect one exact result, then call. list is diagnostic only.",
425 "enum": [
426 "list",
427 "search",
428 "inspect",
429 "call",
430 "decline"
431 ],
432 "type": "string"
433 },
434 "arguments": {
435 "description": "Raw MCP tool arguments for action=call",
436 "type": "object"
437 },
438 "capability_id": {
439 "description": "Capability id such as skill:review, mcp-server:github, or mcp-tool:github/search_issues. Not required for action=list.",
440 "type": "string"
441 },
442 "cursor": {
443 "description": "Opaque cursor returned by action=list. It is valid only for the same catalog version.",
444 "type": "string"
445 },
446 "limit": {
447 "description": "Maximum results. Search defaults to 5 and allows at most 8; list defaults to 50 and allows at most 100.",
448 "maximum": 100,
449 "minimum": 1,
450 "type": "integer"
451 },
452 "query": {
453 "description": "Local catalog query required for action=search. No process or network is started.",
454 "type": "string"
455 },
456 "reason": {
457 "description": "Required non-empty reason when action=decline",
458 "type": "string"
459 }
460 },
461 "required": [
462 "action"
463 ],
464 "type": "object"
465 }
466 },
467 {
468 "Name": "view_image",
469 "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.",
470 "ReadOnly": true,
471 "Schema": {
472 "properties": {
473 "path": {
474 "description": "Image file path",
475 "type": "string"
476 }
477 },
478 "required": [
479 "path"
480 ],
481 "type": "object"
482 }
483 },
484 {
485 "Name": "write_file",
486 "Description": "Write content to a file at the given path (overwriting existing content). Creates parent directories as needed.",
487 "ReadOnly": false,
488 "Schema": {
489 "properties": {
490 "content": {
491 "description": "Full content to write",
492 "type": "string"
493 },
494 "path": {
495 "description": "File path",
496 "type": "string"
497 }
498 },
499 "required": [
500 "content",
501 "path"
502 ],
503 "type": "object"
504 }
505 }
506 ]
507
507 lines JSON