chats_export
Export one chat to durable Markdown, YAML, JSON, HTML, or PDF files under an export directory, returning saved paths and host gate status; set async to enqueue a job.
Instructions
Export one chat via extension builders and write files under exportDir (returns paths + host gate). Prefer for durable files; use chats_get for in-memory payload, jobs_enqueue kind=export/export_batch for bulk/async queues. Set async:true to return job_id instead of blocking. Captcha is never auto-solved. Requires browsers_bind; writes to disk.
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": {
"platform": "<platform>",
"chatId": "<chatId>",
"formats": "<formats>"
},
"name": "chats_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| async | No | When true, enqueue via jobs and return job_id instead of blocking | |
| branch | No | Conversation branch: active thread only, or all branches when the provider supports them | |
| chatId | Yes | Chat id to export | |
| outDir | No | Absolute path under HOME; default server exportDir | |
| schema | No | Text layout schema (name/version). Default: server settings.exportSchema then browser default chat-export/1 | |
| formats | Yes | One or more export formats to write | |
| platform | Yes | Provider id: chatgpt | grok | grok-x | copilot | claude | qwen | deepseek | perplexity | kimi | zai | minimax | |
| ensureTab | No | If true, tabs_ensure before the mutate when needed (default false) | |
| onCaptcha | No | Captcha policy (default stop). Captcha is never auto-solved. stop=error immediately; wait_human=poll host_state until cleared; allow_agent=return structured challenge and only permit UI action when the operator opted in via the client prompt |