code_write
Generate boilerplate code (tests, mocks, stubs, configs) that matches a reference file's style and structure, and write it directly to disk without using frontier model tokens.
Instructions
Generates boilerplate code (tests, mocks, stubs, configs) matching the patterns of a reference file. Can write directly to disk without consuming frontier output tokens.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"spec": "<spec>",
"reference_path": "<reference_path>"
},
"name": "code_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | Description of what code to generate | |
| model | No | Optional model override (or 'auto' to select the best available writer model) | |
| provider | No | Optional provider override (gemini, groq, openai, deepseek, anthropic, ollama, openrouter) | |
| target_path | No | Optional path where generated code should be written directly on disk | |
| reference_path | Yes | Path to reference file whose conventions, style, and structure should be replicated |