get_draft
Fetch a single draft by ID with headers, body, and attachment metadata; optionally save the JSON to a local path or retrieve metadata only.
Instructions
Fetch a single draft by ID, including headers, body, and attachment metadata.
Args: draft_id: The draft ID (from list_drafts or create_draft). local_path: Optional local filesystem path (file or directory) to write the draft JSON to instead of returning it inline. Bypasses the response-size cap, for drafts with very large bodies. A path ending in '/' is a directory, created if missing. A file in place of a parent directory, or at a path ending in '/', raises ValueError; an existing file at a plain file path is replaced. include_body: When False, fetch only metadata: no body is downloaded, and body_plain, body_html, and attachments are left out.
Returns: {"id": draft ID, "message": ...}, where message has the same shape as get_message's result (including its include_body=False shape and its body_decode_errors / body_fetch_errors). Raises an error naming the size if the draft is over the response-size cap and local_path is not set. If local_path is set, returns {local_path, draft_id, bytes_written} instead, plus body_fetch_errors / body_decode_errors (each entry with message_id) when present. On API failure, {"error": "..."}.
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": {
"draft_id": "<draft_id>"
},
"name": "get_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft_id | Yes | ||
| local_path | No | ||
| include_body | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||