Skip to main content
Glama

chat_cache_sync

Sync a chat from the bound browser into a local SQLite cache with blocks and FTS5 indexes, enabling repeated cache reads on long threads without live fetches.

Instructions

Fetch a chat from the bound browser and store blocks+FTS5 in the temp SQLite cache. Prefer before repeated chat_cache_read on long threads; use chat_outline/chat_read when you need live outline/slice without an explicit sync. Writes local cache only; requires browsers_bind for the host fetch.

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>"
    },
    "name": "chat_cache_sync"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoWhen true, refresh even if a cache copy already exists
branchNoBranch selector when the provider supports multiple branches
chatIdYesChat id to sync into the local cache
platformYesProvider id: chatgpt | grok | grok-x | copilot | claude | qwen | deepseek | perplexity | kimi | zai | minimax
browserIdNoOverride bound browserId for this sync

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.1
    • 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. Changed5 schema fields changedv1.0.4
    • addedInput schema / properties / branch / description
      Added value: +"Branch selector when the provider supports multiple branches"
    • addedInput schema / properties / browserId / description
      Added value: +"Override bound browserId for this sync"
    • addedInput schema / properties / chatId / description
      Added value: +"Chat id to sync into the local cache"
    • addedInput schema / properties / force / description
      Added value: +"When true, refresh even if a cache copy already exists"
    • addedInput schema / properties / platform / description
      Added value: +"Provider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity"
  3. First observedv1.0.3

TDQS

A4.3/5.0
Behavior4/5

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

Annotations say non-read-only, non-destructive, non-idempotent; the description adds the crucial scope of the write ('writes local cache only') and a hard prerequisite ('requires browsers_bind for the host fetch'), which annotations cannot convey. It stops short of saying what happens to an existing cache entry when force is false, or whether a failed host fetch leaves partial cache state.

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?

Three sentences, front-loaded with the action and side effect, then routing, then constraints — no filler. The 'Prefer before repeated chat_cache_read' clause is elliptically compressed and takes a second read, which slightly undercuts clarity.

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

Completeness4/5

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

No output schema exists, so the description carries return-value burden; it implies the cache is consumable by chat_cache_read but never says what a sync returns (cache key, block count, or errors). For a cache-population tool with a stated prerequisite and write scope, the definition is otherwise sufficient to call it correctly.

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 enum for platform, force, branch, browserId and chatId are already documented. The description adds only an indirect hint that browserId is tied to the browsers_bind prerequisite; it does not explain force/branch semantics beyond the schema. Baseline 3 applies.

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 concrete verb pair (fetch + store) with the resource (chat), the target store (temp SQLite cache) and the artifacts written (blocks + FTS5). It also explicitly positions itself against chat_cache_read, chat_outline and chat_read, so an agent can pick it without opening sibling schemas.

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 a positive use condition ('prefer before repeated chat_cache_read on long threads') and names alternatives with the condition that selects them ('use chat_outline/chat_read when you need live outline/slice without an explicit sync'). The when-not case is covered by the alternative clause.

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