Skip to main content
Glama

cuba_sync

Export and import knowledge graph memory between machines without a shared database. Sync over HTTP and resolve conflicts.

Instructions

Git-friendly export/import of the knowledge graph between machines that share no database. export/import/diff/status work on a local directory, ./.memory-industry/ by default and otherwise as the dir parameter describes; 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. Without it: $CUBA_SYNC_DIR if set, else ./.memory-industry/ — or ./.cuba-memorys/ on a repo that already has that older directory
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. Changed1 schema field changedv0.27.0
    • changedInput schema / properties / dir / description
      Previous value: -"Directory override (default $CUBA_SYNC_DIR or ./.cuba-memorys/)"New value: +"Directory override. Without it: $CUBA_SYNC_DIR if set, else ./.memory-industry/ — or ./.cuba-memorys/ on a repo that already has that older directory"
  2. 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)"
  3. First observedv0.18.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it usefully discloses the auth requirement (CUBA_PEER_TOKEN) and the default working directory, and the schema itself documents the destructive-import guard (tombstone threshold + confirm). However, the description never warns that import can delete observations, which is the highest-risk behavior for this tool.

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?

Two sentences, no filler, with the core purpose front-loaded and the action taxonomy immediately following. Efficient for a nine-action tool.

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?

For a 16-parameter, nine-action tool with no output schema, the description covers the purpose, the local/remote split, and the auth requirement — enough to select and call it. The main omission is any statement about import's destructive potential, which the schema only implies.

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 every parameter, enum, and default is already documented in the schema. The description's action-grouping sentence adds framing but no parameter detail beyond what the schema provides; 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 resource ('export/import of the knowledge graph') and its distinguishing context ('between machines that share no database'). It does not, however, differentiate itself from the sibling memory_sync, so an agent comparing the two gets no explicit contrast.

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?

Groups the nine actions into two behavioral families — local-directory actions (export/import/diff/status) versus peer-over-HTTP actions (pull/notify/fetch/conflicts/resolve) — which tells an agent which mode applies. It gives no when-not guidance or comparison to sibling sync tools.

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