cdt-mcp
v0.1.0Coherence Data Types (CDTs) as a Model Context Protocol server: multi-agent state synchronization by wave superposition.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
cdt_create
Create a coherence field, or return the existing one with that name. Args: name: Field identifier (letters, digits, `_ . : @ -`; max 128 chars). bins: Phase resolution (2-4096). More bins = finer distinction between keys. decay_rate: Continuous decay per second; 0 keeps state forever. tau_k: Temporal coherence coefficient (metadata; density-averaged on merge). kernel_width: Impulse spread in radians; 0 writes to a single bin. max_records: Cap on retained write events before weakest are pruned.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
bins | integer | |
decay_rate | number | |
kernel_width | number | |
max_records | integer | |
tau_k | number |
cdt_write
Emit a coherence impulse into a field. Superposes with existing writes; never overwrites. Args: field: Field name (auto-created with defaults if missing and `auto_create`). value: Magnitude of the proposal. Negative values interfere destructively (register disagreement) with writes at the same phase. key: Semantic address, hashed to a deterministic phase. Use this for labels like "merge-strategy:rebase". Exactly one of key/phase. phase: Explicit phase in radians (wrapped to [0, 2*pi)). coherenc…
| Parameter | Type | Description |
|---|---|---|
field * | string | |
agent_id | ||
auto_create | boolean | |
coherence | number | |
key | ||
payload | ||
phase | ||
value | number |
cdt_read
Sample a field's amplitude at a key or phase, with the payloads that landed there.
| Parameter | Type | Description |
|---|---|---|
field * | string | |
key | ||
phase |
cdt_consensus
Read the consensus state: the phase bin of highest spectral density. Returns the winning bin, its aggregated payloads (the top one is the current truth), `confidence` (peak/mean amplitude), `share` (peak/total, 0-1), and the `top_k` strongest alternatives.
| Parameter | Type | Description |
|---|---|---|
field * | string | |
top_k | integer |
cdt_list
List all fields with their sizes and energies.
cdt_snapshot
Export a field as a JSON snapshot for transport to another replica. Feed the result to `cdt_sync` on the other side. Set `include_field` to also embed the rendered complex field ([re, im] per bin).
| Parameter | Type | Description |
|---|---|---|
field * | string | |
include_field | boolean |
cdt_sync
Absorb a remote snapshot into a local field (union of write events). Idempotent and order-independent: applying the same snapshot twice, or two snapshots in either order, yields the same field.
| Parameter | Type | Description |
|---|---|---|
field * | string | |
snapshot * | object | |
create | boolean |
cdt_merge
Superpose several fields into `into` (created if missing). Sources are left intact. All sources must share the same `bins`.
| Parameter | Type | Description |
|---|---|---|
into * | string | |
sources * | array |
cdt_decay
Record a decay event exp(-rate*dt) on every impulse written so far, then prune negligible ones. Use to deliberately forget stale context. `rate` defaults to the field's own decay_rate. The decay is stored as an event and travels with snapshots, so replicas that sync afterwards see the same fading. Pruning (if `prune_below` > 0) physically drops writes and is the irreversible part.
| Parameter | Type | Description |
|---|---|---|
dt * | number | |
field * | string | |
prune_below | number | |
rate |
cdt_delete
Delete a field and its persisted snapshot. Irreversible.
| Parameter | Type | Description |
|---|---|---|
field * | string |
cdt_phase_of
Return the deterministic phase (radians) a key hashes to. Pure function.
| Parameter | Type | Description |
|---|---|---|
key * | string |