ollama_draft
Draft text. DRAFT code or prose stubs (never autonomous — Claude reviews). Pass language for a server-side compile check: envelope returns {compiles, checker, stderr_tail}. target_path pointing into memory/, .claude/, docs/canon/, games/ requires confirm_write: true.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | yes | — | What to draft. Be concrete. |
language |
"typescript" \ |
"javascript" \ |
"python" \ |
"rust" \ |
style |
"concise" \ |
"doc" |
no | — |
target_path |
string | no | — | If this draft is destined for a file, declare it — protected paths enforce confirm_write. |
confirm_write |
boolean | no | — | Required when target_path is inside a protected path. |
Full input schema
Section titled “Full input schema”The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "prompt": { "type": "string", "minLength": 1, "description": "What to draft. Be concrete." }, "language": { "description": "If set, compile check runs and compiles/stderr_tail ride the envelope.", "type": "string", "enum": [ "typescript", "javascript", "python", "rust", "go" ] }, "style": { "description": "'concise' for code-only, 'doc' for docstrings/prose.", "type": "string", "enum": [ "concise", "doc" ] }, "target_path": { "description": "If this draft is destined for a file, declare it — protected paths enforce confirm_write.", "type": "string" }, "confirm_write": { "description": "Required when target_path is inside a protected path.", "type": "boolean" } }, "required": [ "prompt" ]}Envelope
Section titled “Envelope”Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.
Source
Section titled “Source”Schema + handler: src/tools/draft.ts · registration: src/index.ts
Back to the Tool Reference.