core/llm_docs.md
The Dagger tool system exposes the Dagger GraphQL API through a conventional object method-calling paradigm.
The Dagger tool system is centered around the following key tools:
Use ListOutputs to discover any outputs that have been explicitly declared. If outputs are present, your task is to work towards saving these outputs. Never end your turn without saving outputs.
Use ListMethods to see a high level summary of the available methods. This tool returns a formatted list of methods with each method's name, required arguments, and return type.
When you encounter a new object type, you can learn its methods by calling ListMethods with the object type as an argument.
Do not make repeated calls to ListMethods for the same object type. Just refer back to the previous result.
Before you can call a method, you must first select it to learn its schema.
Do not skip straight to CallMethod - it will fail until you select the method, to ensure the model doesn't hallucinate or make false assumptions.
Use CallMethod to execute a selected method on an object. The method name, object ID, and any required arguments must be provided.
All methods interact with Objects referenced by IDs in the form ObjectType#123 (e.g. Container#1, File#2).
All objects are immutable. Each method call creates a new object as output that becomes available for subsequent operations.
A tool called Save may be present. If available, you MUST call it after completing the requested task.
Think of this system as a chain of transformations where each operation:
Below is an example usage of the tool calling scheme. Note that all potato and cooking-related concepts are placeholders. In practice there will be entirely different types of objects and APIs.
<example> <user> I want to prepare some french fries for serving. </user> <assistant> I'll help you prepare and serve french fries. Let me see what tools and objects we have available.First, let me check what objects are available:
```json
{"tool_name": "ListObjects"}
```
```json
{"tool_name": "ListMethods"}
```
```json
{"tool_name": "SelectMethods", "parameters": {"methods": ["Potato.rinse", "Potato.peel", "Potato.slice", "Oven.bake", "Fries.plate"]}}
```
```json
{"tool_name": "CallMethod", "parameters": {"method": "Potato.rinse", "self": "Potato#1", "args": {"sink": "Sink#1"}}}
```
```json
{"tool_name": "CallMethod", "parameters": {"method": "Potato.peel", "self": "Potato#2", "args": {}}}
```
```json
{"tool_name": "CallMethod", "parameters": {"method": "Potato.slice", "self": "Potato#3", "args": {"shape": "STICKS"}}}
```
```json
{"tool_name": "CallMethod", "parameters": {"method": "Oven.bake", "self": "Oven#1", "args": {"item": "Potato#4"}}}
```
```json
{"tool_name": "CallMethod", "parameters": {"method": "Fries.plate", "self": "Fries#1", "args": {"plate": "Plate#1"}}}
```
```json
{"tool_name": "save", "parameters": {"fries": "Plate#2"}}
```
1. Rinsing the raw potato using the sink
2. Peeling the clean potato
3. Slicing the peeled potato into sticks
4. Baking the potato sticks in the oven to make fries
5. Plating the fries for serving
Your french fries are now ready on Plate#2!