Skip to main content
Glama

chat_cache_append

Append turns to an existing local SQLite chat cache and refresh FTS and totals for incremental offline updates without writing to the provider UI.

Instructions

Append turns to an existing local SQLite cache copy and refresh FTS/totals. Prefer for incremental offline updates; use chat_cache_sync to rebuild from the live tab, chat_cache_update_block to edit one turn. Does not write to the provider UI.

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": {
      "turns": "<turns>"
    },
    "name": "chat_cache_append"
  }
}

Input Schema

NameRequiredDescriptionDefault
turnsYesOne or more turns to append
chatIdNoChat id when selecting cache by platform+chatId
cacheIdNoCache row id to append into
platformNoProvider id: chatgpt | grok | grok-x | copilot | claude | qwen | deepseek | perplexity | kimi | zai | minimax

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. Changed7 schema fields changedv1.0.4
    • addedInput schema / properties / cacheId / description
      Added value: +"Cache row id to append into"
    • addedInput schema / properties / chatId / description
      Added value: +"Chat id when selecting cache by platform+chatId"
    • addedInput schema / properties / platform / description
      Added value: +"Provider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity"
    • addedInput schema / properties / turns / description
      Added value: +"One or more turns to append"
    • addedInput schema / properties / turns / items / properties / content / description
      Added value: +"Alternate content field when text is not used"
    • addedInput schema / properties / turns / items / properties / role / description
      Added value: +"Turn role (user/assistant/system/tool)"
    • addedInput schema / properties / turns / items / properties / text / description
      Added value: +"Plain text body for the turn"
  3. First observedv1.0.3

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, closed-world, so the safety bar is partly covered. The description still adds real context beyond them: the write target is a local SQLite cache, FTS and totals are refreshed as a side effect, and nothing reaches the provider UI. It could go further on whether appending identical turns duplicates rows (relevant given idempotentHint=false).

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?

Two sentences, front-loaded with the action and followed by routing guidance; every clause carries information and nothing is padded.

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 covers target, side effects, and remote-write exclusion, which is enough to invoke it safely. Return shape and duplicate-handling on repeated appends are the only notable omissions for a non-idempotent local mutation.

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%, with every parameter and the turn sub-fields documented inline, so the baseline of 3 applies. The description does not clarify the selection logic between cacheId and platform+chatId, which is the one ambiguity the schema leaves open.

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 leads with a specific verb and resource: "Append turns to an existing local SQLite cache copy and refresh FTS/totals." It also names the two nearest siblings and what each does, so an agent can place the tool in the family without opening any 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 states the preferred case ("Prefer for incremental offline updates") and pairs each alternative with the condition that selects it: chat_cache_sync to rebuild from the live tab, chat_cache_update_block to edit one turn. That is explicit when-to-use plus named alternatives.

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