Skip to main content
Glama

Import Chats

sync_workspace_data

Import and normalize conversations from pasted content, local files, or editor transcript folders into the archive, handling ChatGPT, Claude, Cline/Continue, JSONL and Markdown formats.

Instructions

Import conversations into the archive from pasted content, a local file, or an editor's transcript folder, normalizing ChatGPT, Claude, Cline/Continue JSON, JSONL and Markdown formats. Use it to bring outside history in; to save the current conversation use manage_session_state(action='save'). source_type 'raw_content': payload is the chat JSON (string or object); 'local_path': payload is a file path inside the archive, the current directory, the temp directory or a configured transcripts folder (other paths are refused); 'agent_transcripts': scans the transcripts folder for 'client' ('cursor', 'continue', 'cline', 'copilot', or source_dir) and imports up to 'limit' newest files, skipping ones already imported; 'cursor_agent_transcripts' is a deprecated alias for Cursor. Writes new JSON files into the archive and updates the search index; never deletes. Imports with an existing title overwrite that chat. Returns a confirmation string for single imports, or {imported: [{file, status, dest}], errors, total_scanned} for folder syncs.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum newest transcript files to scan for folder syncs.
titleNoArchive name for 'raw_content' or 'local_path' imports. Defaults to a timestamped or source-derived name.
clientNoArchive namespace to import into; for 'agent_transcripts' it also picks the source editor ('cursor', 'continue', 'cline', 'copilot'). Omit for 'default'.default
payloadNoChat JSON for 'raw_content', a file path for 'local_path', or a folder path for 'agent_transcripts' (same as source_dir).
source_dirNoOverride folder to scan for 'agent_transcripts'; must be inside an allowed root.
source_typeYesWhere to import from (see the tool description).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.6.2
    • addedInput schema / properties / client / description
      Added value: +"Archive namespace to import into; for 'agent_transcripts' it also picks the source editor ('cursor', 'continue', 'cline', 'copilot'). Omit for 'default'."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum newest transcript files to scan for folder syncs."
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / payload / description
      Added value: +"Chat JSON for 'raw_content', a file path for 'local_path', or a folder path for 'agent_transcripts' (same as source_dir)."
    • addedInput schema / properties / source_dir / description
      Added value: +"Override folder to scan for 'agent_transcripts'; must be inside an allowed root."
    • addedInput schema / properties / source_type / description
      Added value: +"Where to import from (see the tool description)."
    • addedInput schema / properties / source_type / enum
      Added value: +[
      +  "agent_transcripts",
      +  "cursor_agent_transcripts",
      +  "local_path",
      +  "raw_content"
      +]
    • addedInput schema / properties / title / description
      Added value: +"Archive name for 'raw_content' or 'local_path' imports. Defaults to a timestamped or source-derived name."
  2. First observedv1.5.4

TDQS

A4.1/5.0
Behavior1/5

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

Annotations declare destructiveHint=false, but the description says imports with an existing title overwrite that chat; overwriting existing content is a destructive update and conflicts with that annotation. The description otherwise discloses writes, index updates, path refusals, and skip behavior, but the contradiction dominates this dimension.

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 description is front-loaded with purpose and the key alternative, then moves through source modes, behavior, and return values. It is dense but organized, and every section appears to earn its place for a six-parameter import tool.

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?

Given the tool's complexity, six parameters, and existing output schema, the description covers the important source-mode distinctions, overwrite caveat, indexing behavior, path constraints, skip/limit behavior, and return shapes. An agent has enough context to invoke it correctly apart from the annotation conflict.

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 the baseline is 3, but the description adds meaningful conditional semantics for source_type, payload, client, source_dir, and limit. Some details such as title and limit defaults remain in the schema, so it is not fully exhaustive.

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: imports external conversation history into the archive from raw content, local paths, or editor transcript folders, with format normalization. It also explicitly distinguishes this from saving the current conversation via manage_session_state(action='save').

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 clear when-to-use guidance: bring outside history in, not save the current conversation. It further details each source_type, allowed path locations, folder scan behavior, and a deprecated alias, leaving little ambiguity about tool selection.

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