Skip to main content
Glama

cuba_sync

Export, import, and diff a knowledge graph between machines, then sync changes over HTTP with a peer to resolve conflicts when no shared database exists.

Instructions

Git-friendly export/import of the knowledge graph between machines that share no database. export/import/diff/status work on a local directory (default ./.cuba-memorys/); pull/notify/fetch/conflicts/resolve talk to a peer over HTTP with CUBA_PEER_TOKEN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoresolve only: the conflict id from action=conflicts
dirNoDirectory override (default $CUBA_SYNC_DIR or ./.cuba-memorys/)
urlNofetch only: the peer's base address, e.g. https://brain.example.net
keepNoresolve only: which text stays current (default 'both', which loses nothing)
peerNofetch only: which peer to pull from (default 'default')
limitNopull only: max files per page
scopeNoExport scope: active project only (default) or all data
actionYesexport/import/diff/status: local bundle round-trip. pull: return the bundle in the response instead of writing it, for a peer to fetch. notify: tell a peer what changed. fetch: pull a peer's bundle over HTTP and import it. conflicts/resolve: list and settle rows two machines disagree about.
offsetNopull only: index of the first bundle file to return
confirmNoRequired when the import's tombstones would delete more than 10% of this machine's observations and at least 25 rows
node_idNonotify only: self-asserted id of the sending node
summaryNonotify only: what changed, in at most 2000 characters
conflictNoHow to resolve a row that exists on both sides (default merge; merge and skip keep local content, overwrite takes the incoming version)
node_nameNonotify only: readable name of the sending node
manifest_hashNonotify only: the bundle hash this notice refers to
with_embeddingsNoInclude embeddings (default false on export, true on pull)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.25.0
    • changedInput schema / properties / action / description
      Previous value: -"Sync mode"New value: +"export/import/diff/status: local bundle round-trip. pull: return the bundle in the response instead of writing it, for a peer to fetch. notify: tell a peer what changed. fetch: pull a peer's bundle over HTTP and import it. conflicts/resolve: list and settle rows two machines disagree about."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "export",
      -  "import",
      -  "diff",
      -  "status"
      -]New value: +[
      +  "export",
      +  "import",
      +  "diff",
      +  "status",
      +  "pull",
      +  "notify",
      +  "fetch",
      +  "conflicts",
      +  "resolve"
      +]
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Required when the import's tombstones would delete more than 10% of this machine's observations and at least 25 rows",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / conflict / description
      Previous value: -"Import conflict policy (default merge)"New value: +"How to resolve a row that exists on both sides (default merge; merge and skip keep local content, overwrite takes the incoming version)"
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "resolve only: the conflict id from action=conflicts",
      +  "type": "string"
      +}
    • addedInput schema / properties / keep
      Added value: +{
      +  "description": "resolve only: which text stays current (default 'both', which loses nothing)",
      +  "enum": [
      +    "ours",
      +    "theirs",
      +    "both"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "pull only: max files per page",
      +  "type": "integer"
      +}
    • addedInput schema / properties / manifest_hash
      Added value: +{
      +  "description": "notify only: the bundle hash this notice refers to",
      +  "type": "string"
      +}
    • addedInput schema / properties / node_id
      Added value: +{
      +  "description": "notify only: self-asserted id of the sending node",
      +  "type": "string"
      +}
    • addedInput schema / properties / node_name
      Added value: +{
      +  "description": "notify only: readable name of the sending node",
      +  "type": "string"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "pull only: index of the first bundle file to return",
      +  "type": "integer"
      +}
    • addedInput schema / properties / peer
      Added value: +{
      +  "description": "fetch only: which peer to pull from (default 'default')",
      +  "type": "string"
      +}
    • changedInput schema / properties / scope / description
      Previous value: -"Export scope: only the active project (default) or all data"New value: +"Export scope: active project only (default) or all data"
    • addedInput schema / properties / summary
      Added value: +{
      +  "description": "notify only: what changed, in at most 2000 characters",
      +  "type": "string"
      +}
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "fetch only: the peer's base address, e.g. https://brain.example.net",
      +  "type": "string"
      +}
    • changedInput schema / properties / with_embeddings / description
      Previous value: -"Include the embeddings.bin.zst blob on export (default false)"New value: +"Include embeddings (default false on export, true on pull)"
  2. First observedv0.18.0

TDQS

A3.6/5.0
Behavior2/5

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

No annotations, so the description must carry the behavioral load. It discloses transport (local dir vs HTTP) and the CUBA_PEER_TOKEN requirement, but says nothing about import's destructive tombstone deletions, the confirm threshold, permission scope, or reversibility—all critical for a mutation-capable sync tool. Some context, but a major gap.

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 core purpose and then the action grouping. Every clause earns its place; no filler or repetition.

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?

The rich schema (16 documented params, detailed action enum, confirm parameter for destructive imports) fills most gaps. The description adds transport grouping and defaults, but omits a high-level warning about import deletions. With no output schema and no annotations, this is reasonably complete but not exhaustive.

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 coverage is 100%; every parameter already has a description in the input schema. The tool description adds only action grouping and default directory knowledge, which is useful context but not parameter-level syntax beyond schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('export/import of the knowledge graph') and scopes it to machines without a shared database. It also splits the nine actions into local-directory and peer-HTTP groups, letting an agent tell it apart from generic sync tools. It lacks explicit mention of the sibling memory_sync, but is otherwise precise.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context: export/import/diff/status operate on a local directory (default ./.cuba-memorys/); pull/notify/fetch/conflicts/resolve require a peer over HTTP with CUBA_PEER_TOKEN. No when-not conditions or named alternatives are provided, so it stops short of 5.

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