Skip to main content
Glama

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

NameRequiredDescriptionDefault
asyncNoWhen true, enqueue via jobs and return job_id instead of blocking
branchNoConversation branch: active thread only, or all branches when the provider supports them
chatIdYesChat id to export
outDirNoAbsolute path under HOME; default server exportDir
schemaNoText layout schema (name/version). Default: server settings.exportSchema then browser default chat-export/1
formatsYesOne or more export formats to write
platformYesProvider id: chatgpt | grok | grok-x | copilot | claude | qwen | deepseek | perplexity | kimi | zai | minimax
ensureTabNoIf true, tabs_ensure before the mutate when needed (default false)
onCaptchaNoCaptcha 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.1.1
    • addedInput schema / properties / ensureTab
      Added value: +{
      +  "description": "If true, tabs_ensure before the mutate when needed (default false)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / onCaptcha
      Added value: +{
      +  "description": "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",
      +  "enum": [
      +    "stop",
      +    "wait_human",
      +    "allow_agent"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / platform / description
      Previous value: -"Provider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity"New value: +"Provider id: chatgpt | grok | grok-x | copilot | claude | qwen | deepseek | perplexity | kimi | zai | minimax"
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "chatgpt",
      -  "grok",
      -  "grok-x",
      -  "copilot",
      -  "claude",
      -  "qwen",
      -  "deepseek",
      -  "perplexity"
      -]New value: +[
      +  "chatgpt",
      +  "grok",
      +  "grok-x",
      +  "copilot",
      +  "claude",
      +  "qwen",
      +  "deepseek",
      +  "perplexity",
      +  "kimi",
      +  "zai",
      +  "minimax"
      +]
  2. Changed1 schema field changedv1.0.7
    • addedInput schema / properties / schema
      Added value: +{
      +  "description": "Text layout schema (name/version). Default: server settings.exportSchema then browser default chat-export/1",
      +  "enum": [
      +    "chat-export/1",
      +    "sharegpt/1"
      +  ],
      +  "type": "string"
      +}
  3. Changed6 schema fields changedv1.0.4
    • changedInput schema / properties / async / description
      Previous value: -"When true, returns job_id from jobs_enqueue instead of blocking"New value: +"When true, enqueue via jobs and return job_id instead of blocking"
    • addedInput schema / properties / branch / description
      Added value: +"Conversation branch: active thread only, or all branches when the provider supports them"
    • addedInput schema / properties / chatId / description
      Added value: +"Chat id to export"
    • addedInput schema / properties / formats / description
      Added value: +"One or more export formats to write"
    • addedInput schema / properties / formats / items / description
      Added value: +"Export format id supported by the extension builders"
    • addedInput schema / properties / platform / description
      Added value: +"Provider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity"
  4. First observedv1.0.3

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond annotations: it declares the write-to-disk side effect, the browsers_bind prerequisite, the return shape (paths plus host gate), and the captcha policy that is never auto-solved. The write side effect is consistent with readOnlyHint=false and not destructive in the destructiveHint=false sense, so there is no contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four front-loaded sentences with no filler: purpose and output first, then routing alternatives, then the async switch, then constraints. Slightly dense with parentheticals, but every clause carries actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter mutation tool with no output schema, the description covers the prerequisite binding, the on-disk side effect, the return value, the captcha gate, and the async alternative. Nothing an agent needs in order to invoke it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description still adds meaning by explaining that async:true returns a job_id instead of blocking and by scoping output to exportDir. It reinforces the captcha policy behind onCaptcha but leaves branch, schema, ensureTab, and outDir entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Export one chat'), the mechanism ('via extension builders'), the output ('write files under exportDir, returns paths + host gate'), and explicitly contrasts with chats_get and jobs_enqueue. An agent can distinguish this from all named siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit selection criteria: prefer this for durable files, use chats_get for an in-memory payload, use jobs_enqueue kind=export/export_batch for bulk or async queues. It also states the in-tool alternative (async:true) and its effect, so both routing and mode choice are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.