Skip to main content
Glama

chats_export

Export a single chat from supported AI platforms to durable Markdown, YAML, JSON, HTML, or PDF files under a chosen directory; optionally queue the export as an async job.

Instructions

Export one chat via extension builders and write files under exportDir (returns paths). 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. 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
formatsYesOne or more export formats to write
platformYesProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. First observedv1.0.3

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare this is a write operation (readOnlyHint=false, destructiveHint=false, openWorldHint=true). The description adds meaningful behavioral context beyond them: it writes files to disk, returns file paths, requires browsers_bind, and changes return behavior when async:true is set. It does not explain overwrite/file-collision behavior, which keeps it from a 5.

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

Conciseness5/5

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

The definition is compact and front-loaded: the primary action and disk-write behavior come first, followed by routing alternatives and the async option. Every sentence carries operational information with no filler.

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 six-parameter export tool with full schema coverage but no output schema, the description covers the essential behavior: durable file output, returned paths, disk writes, prerequisite browsers_bind, and async job behavior. An agent has enough context to invoke it correctly and choose alternatives.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all six parameters including formats, outDir, branch, and async. The description repeats the async behavior but does not add substantial semantics beyond the schema, so the baseline 3 is appropriate.

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?

The description states a specific verb and resource: 'Export one chat via extension builders and write files under exportDir (returns paths).' It clearly distinguishes this from chats_get and jobs_enqueue, so an agent can identify its role without opening the 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?

It gives explicit routing guidance: prefer this for durable files, use chats_get for in-memory payloads, and use jobs_enqueue for bulk/async queues. The async:true option is also framed as the non-blocking alternative to default blocking behavior.

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