prompts: restore tool examples for better model guidance
Commit 54362bf8ee8edc0f878c875897275c921238d9e1 went too far stripping too many JSON examples to guide LLMs.
Alessandro committed
Apr 2, 2026 at 18:50 UTC
ef92a5e378c71a218bf64f04004195d154aa0caf
7 files changed
+128
-6
plugins/_code_execution/prompts/agent.system.tool.code_exe.md
+35
-1
@@ -6,11 +6,17 @@ args:
6
- `session`: terminal session id; default `0`
7
- `reset`: kill a session before running; `true` or `false`
8
rules:
9
+- place the command or script in `code`
10
- use `runtime=output` to poll running work
11
- use `input` for interactive terminal prompts
12
+- if a session is stuck, call again with the same `session` and `reset=true`
13
+- check dependencies before running code
14
+- replace placeholder or demo data with real values before execution
15
+- use `print()` or `console.log()` when you need explicit output
16
- do not interleave other tools while waiting
17
- ignore framework `[SYSTEM: ...]` info in output
13
-example:
18
+examples:
19
+1 terminal command
20
~~~json
21
{
22
"thoughts": ["I should run a terminal command in the default session."],
@@ -24,3 +30,31 @@ example:
30
}
31
}
32
~~~
33
+
34
+2 python snippet
35
+~~~json
36
+{
37
+ "thoughts": ["A short Python check is faster than using the shell."],
38
+ "headline": "Running Python snippet",
39
+ "tool_name": "code_execution_tool",
40
+ "tool_args": {
41
+ "runtime": "python",
42
+ "session": 0,
43
+ "reset": false,
44
+ "code": "import os\nprint(os.getcwd())"
45
+ }
46
+}
47
+~~~
48
+
49
+3 wait for running output
50
+~~~json
51
+{
52
+ "thoughts": ["The previous command is still running, so I should poll for output."],
53
+ "headline": "Waiting for command output",
54
+ "tool_name": "code_execution_tool",
55
+ "tool_args": {
56
+ "runtime": "output",
57
+ "session": 0
58
+ }
59
+}
60
+~~~
prompts/agent.system.tool.call_sub.md
+4
@@ -18,3 +18,7 @@ example:
18
}
19
~~~
20
reuse long subordinate output with `§§include(path)` instead of rewriting it
21
+{{if agent_profiles}}
22
+available profiles:
23
+{{agent_profiles}}
24
+{{endif}}
prompts/agent.system.tool.document_query.md
+34
-2
@@ -4,5 +4,37 @@ args:
4
- `document`: url path or list of them
5
- `queries`: optional list of questions
6
- `query`: optional single-question alias
7
-without `query` or `queries` it returns document content
8
-for local files use full path; for web documents use full urls
7
+- without `query` or `queries` it returns document content
8
+- `document` accepts one path/url or a list for cross-document comparison
9
+- for local files use full paths; for web documents use full urls
10
+examples:
11
+1 read a document
12
+~~~json
13
+{
14
+ "thoughts": ["I need the full contents of the report before answering."],
15
+ "headline": "Loading report contents",
16
+ "tool_name": "document_query",
17
+ "tool_args": {
18
+ "document": "https://example.com/report.pdf"
19
+ }
20
+}
21
+~~~
22
+
23
+2 compare documents with questions
24
+~~~json
25
+{
26
+ "thoughts": ["I need targeted answers across two documents."],
27
+ "headline": "Comparing two documents",
28
+ "tool_name": "document_query",
29
+ "tool_args": {
30
+ "document": [
31
+ "https://example.com/report-one.pdf",
32
+ "/path/to/report-two.pdf"
33
+ ],
34
+ "queries": [
35
+ "Compare the main conclusions.",
36
+ "What changed between the two versions?"
37
+ ]
38
+ }
39
+}
40
+~~~
prompts/agent.system.tool.scheduler.md
+11
@@ -14,3 +14,14 @@ methods:
14
- `scheduler:create_adhoc_task`: `name`, `system_prompt`, `prompt`, optional `attachments[]`, optional `dedicated_context`
15
- `scheduler:create_planned_task`: `name`, `system_prompt`, `prompt`, optional `attachments[]`, `plan[]` iso datetimes like `2025-04-29T18:25:00`, optional `dedicated_context`
16
- `scheduler:wait_for_task`: `uuid`; works for dedicated-context tasks
17
+example:
18
+~~~json
19
+{
20
+ "thoughts": ["I should check for an existing task before I create or run anything."],
21
+ "headline": "Looking up scheduled task",
22
+ "tool_name": "scheduler:find_task_by_name",
23
+ "tool_args": {
24
+ "name": "daily backup"
25
+ }
26
+}
27
+~~~
prompts/agent.system.tool.search_engine.md
+11
@@ -2,3 +2,14 @@
2
find live news, prices, and other real-time web data
3
arg: `query` (text search query)
4
returns urls, titles, and descriptions
5
+example:
6
+~~~json
7
+{
8
+ "thoughts": ["I need current information rather than relying on memory."],
9
+ "headline": "Searching the web",
10
+ "tool_name": "search_engine",
11
+ "tool_args": {
12
+ "query": "latest LiteLLM release notes"
13
+ }
14
+}
15
+~~~
prompts/agent.system.tool.skills.md
+12
@@ -1,6 +1,18 @@
1
### skills_tool
2
use skills only when relevant
3
+workflow:
4
- `skills_tool:list`: discover available skills
5
- `skills_tool:load`: load one skill by `skill_name`
6
after loading a skill, follow its instructions and use referenced files or scripts with other tools
7
reload a skill if its instructions are no longer in context
8
+example:
9
+~~~json
10
+{
11
+ "thoughts": ["A skill may already encode the workflow I need."],
12
+ "headline": "Loading relevant skill",
13
+ "tool_name": "skills_tool:load",
14
+ "tool_args": {
15
+ "skill_name": "playwright"
16
+ }
17
+}
18
+~~~
prompts/agent.system.tools_vision.md
+21
-3
@@ -1,4 +1,22 @@
1
+## multimodal vision tools
2
+
3
### vision_load
2
-load images into the model
3
-args: `paths` list of image paths
4
-use when visual inspection is needed
4
+load images into the model for visual reasoning
5
+args: `paths` list of absolute image paths
6
+rules:
7
+- load all relevant images in one call when comparing screenshots or pages
8
+- use when the task depends on screenshots, diagrams, scanned documents, charts, or photos
9
+- only bitmaps are supported; convert other formats first if needed
10
+example:
11
+```json
12
+{
13
+ "thoughts": [
14
+ "I need to inspect the screenshot before answering."
15
+ ],
16
+ "headline": "Loading screenshot for visual analysis",
17
+ "tool_name": "vision_load",
18
+ "tool_args": {
19
+ "paths": ["/path/to/screenshot.png"]
20
+ }
21
+}
22
+```