Skip to main content
Glama

chat_cache_sync

Fetch a chat from the bound browser and store its blocks with FTS5 in a local SQLite cache, so repeated reads on long threads use the cached copy instead of refetching live.

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 | claude | copilot | qwen | deepseek | perplexity
browserIdNoOverride bound browserId for this sync

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations, it discloses that only the local cache is written (no remote mutation) and that a bound browser is a prerequisite. The annotation set already declares non-readOnly, non-destructive, non-openWorld, so this adds genuine context rather than repeating it. It does not explain what happens to an existing cache entry when force is false or how errors surface if the browser is unbound, so it falls short of 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.

Conciseness4/5

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

Three sentences, front-loaded with the core action and followed by routing and constraints — no wasted clauses. Minor deduction for the compressed phrasing 'Prefer before repeated chat_cache_read', which reads awkwardly and requires a reread.

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?

With no output schema, the description correctly states what is stored (blocks plus FTS5 index) and where (temp SQLite cache), plus the browser_bind prerequisite. It leaves the failure mode for an unbound browser and the cache-replacement semantics of force unspecified, which is a small but real gap for a write tool.

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 platform, chatId, force, branch and browserId; the description adds no parameter-level meaning beyond that. Baseline 3 applies since the description defers entirely to the schema here.

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 two-step verb chain — fetch a chat from the bound browser, then store blocks+FTS5 into the temp SQLite cache — naming the exact resource and storage target. It explicitly contrasts itself with chat_cache_read, chat_outline and chat_read, so an agent can pick it apart from siblings without opening 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 an affirmative trigger (prefer before repeated chat_cache_read on long threads) and an explicit when-not with named alternatives (chat_outline/chat_read for live outline/slice without an explicit sync). It also states the prerequisite that browsers_bind is required for the host fetch.

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