coaiajs
v0.9.2CoAIA unified TypeScript monorepo — CLI, MCP server, and library consolidating coaia-narrative, coaia-pde, coaia-planning, and coaiapy patterns into one…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
coaia_tash
Stash key-value pair to Redis
| Parameter | Type | Description |
|---|---|---|
key * | string | Redis key |
value * | string | Value to store |
ttl | integer | Optional TTL in seconds |
coaia_fetch
Fetch value from Redis by key
| Parameter | Type | Description |
|---|---|---|
key * | string | Redis key to fetch |
coaia_fuse_trace_create
Create a Langfuse trace for observability tracking
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | Unique trace identifier |
environment | string | Environment name |
input_data | Input data | |
metadata | object | Metadata dictionary |
name | string | Trace name |
output_data | Output data | |
session_id | string | Session identifier |
tags | array | Trace tags |
user_id | string | User identifier |
version | string | Application version |
coaia_fuse_add_observation
Add an observation (event, span, or generation) to a trace
| Parameter | Type | Description |
|---|---|---|
name * | string | Observation name |
observation_id * | string | Unique observation identifier |
trace_id * | string | Parent trace ID |
end_time | string | End timestamp (ISO 8601) |
input_data | Input data | |
metadata | object | Metadata |
observation_type | string | Observation type |
output_data | Output data | |
parent_id | string | Parent observation ID for nesting |
session_id | string | Session ID the observation belongs to |
start_time | string | Start timestamp (ISO 8601) |
tags | array | Trace tags |
trace_name | string | Trace name for the trace this observation belongs to |
user_id | string | User ID the observation belongs to |
coaia_fuse_trace_get
Get a specific trace by ID with all its observations
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | Trace ID to fetch |
json_output | boolean | Return raw JSON instead of formatted tree |
coaia_fuse_trace_view
View trace details with observations (alias for trace_get)
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | Trace ID |
json_output | boolean | Return raw JSON |
coaia_fuse_observation_get
Get a specific observation by ID
| Parameter | Type | Description |
|---|---|---|
observation_id * | string | Observation ID |
json_output | boolean | Return raw JSON |
coaia_fuse_traces_list
List traces with optional filtering by session, user, name, tags, and time range
| Parameter | Type | Description |
|---|---|---|
cursor | string | Cursor from a prior response |
from_timestamp | string | Filter from timestamp (ISO 8601) |
json_output | boolean | Return raw JSON instead of markdown table |
limit | integer | Items per request |
name | string | Filter by trace name |
session_id | string | Filter by session ID |
tags | array | Filter by tags |
to_timestamp | string | Filter to timestamp (ISO 8601) |
user_id | string | Filter by user ID |
coaia_fuse_traces_session_view
View all traces for a specific session
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID to view traces for |
json_output | boolean | Return raw JSON |
coaia_fuse_prompts_list
List all Langfuse prompts
coaia_fuse_prompts_get
Get a specific Langfuse prompt by name
| Parameter | Type | Description |
|---|---|---|
name * | string | Prompt name |
label | string | Optional deployment label |
coaia_fuse_datasets_list
List all Langfuse datasets
coaia_fuse_datasets_get
Get a specific dataset by name
| Parameter | Type | Description |
|---|---|---|
name * | string | Dataset name |
coaia_fuse_score_configs_list
List all Langfuse score configurations
coaia_fuse_score_configs_get
Get specific Langfuse score configuration
| Parameter | Type | Description |
|---|---|---|
name_or_id * | string | Score config name or ID |
coaia_fuse_score_apply
Apply a score configuration to a trace or observation with validation
| Parameter | Type | Description |
|---|---|---|
config_name_or_id * | string | Name or ID of the score configuration |
target_id * | string | ID of the trace or session |
target_type * | string | Target type |
value * | Score value (validated against config) | |
comment | string | Optional comment |
observation_id | string | Optional observation ID |
coaia_fuse_comments_list
List comments with optional filtering by object type/ID or author
| Parameter | Type | Description |
|---|---|---|
author_user_id | string | Filter by author user ID |
limit | integer | Items per page |
object_id | string | Filter by specific object ID |
object_type | string | Filter by object type (trace, observation, session, prompt) |
page | integer | Page number |
coaia_fuse_comments_get
Get a specific comment by ID
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Comment ID |
coaia_fuse_comments_create
Create a comment attached to an object (trace, observation, session, or prompt)
| Parameter | Type | Description |
|---|---|---|
object_id * | string | Object ID |
object_type * | string | Object type (trace, observation, session, prompt) |
text * | string | Comment text |
author_user_id | string | Author user ID |
create_entities
ADVANCED: Create traditional knowledge graph entities. For structural tension charts, use create_structural_tension_chart or add_action_step instead.
| Parameter | Type | Description |
|---|---|---|
entities * | array |
create_relations
Create multiple new relations between entities in the knowledge graph. Relations should be in active voice
| Parameter | Type | Description |
|---|---|---|
relations * | array |
add_observations
ADVANCED: Add observations to traditional knowledge graph entities. For structural tension charts, use update_current_reality instead.
| Parameter | Type | Description |
|---|---|---|
observations * | array |
delete_entities
Delete multiple entities and their associated relations from the knowledge graph
| Parameter | Type | Description |
|---|---|---|
entityNames * | array | An array of entity names to delete |
delete_observations
Delete specific observations from entities in the knowledge graph
| Parameter | Type | Description |
|---|---|---|
deletions * | array |
delete_relations
Delete multiple relations from the knowledge graph
| Parameter | Type | Description |
|---|---|---|
relations * | array | An array of relations to delete |
read_graph
RARELY USED: Dumps entire knowledge graph (all entities and relations). Only use for debugging or when you need to see ALL data. For chart work, use list_active_charts instead.
search_nodes
Search for nodes in the knowledge graph based on a query
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query to match against entity names, types, and observation content |
open_nodes
ADVANCED: Open specific entity nodes by exact name (e.g. 'chart_123_current_reality'). Only use if you need to inspect specific chart components. NOT for general chart viewing - use list_active_charts instead.
| Parameter | Type | Description |
|---|---|---|
names * | array | An array of exact entity names to retrieve (e.g. 'chart_123_desired_outcome') |
create_structural_tension_chart
Create a new structural tension chart with desired outcome, current reality, and optional action steps. CRITICAL: Use creative orientation (what you want to CREATE) not problem-solving (what you want to fix/solve). Current reality must be factual assessment, never 'ready to begin'.
| Parameter | Type | Description |
|---|---|---|
currentReality * | string | Your current situation - factual assessment only. NEVER use 'ready to begin' or similar readiness statements. |
desiredOutcome * | string | What you want to CREATE (not solve/fix). Focus on positive outcomes, not problems to eliminate. |
dueDate * | string | When you want to achieve this outcome (ISO date string) |
actionSteps | array | Optional list of action steps needed to achieve the outcome |
elementsOfPerformance | array | Optional Elements of Performance for MMOT evaluation — criteria the agent uses to self-assess output |
githubIssue | string | Optional GitHub issue this chart is written from, as the FULL path 'owner/repo#number' (e.g. jgwill/coaiajs#1). A bare '#number' is rejected — charts travel between repositories, and a bare number c… |
manage_action_step
✨ RECOMMENDED: Unified interface for managing action steps - handles both creation and expansion. Automatically detects whether you're creating a new action step (chart ID) or expanding an existing one (entity name). Provides clear error messages when parameters are invalid.
| Parameter | Type | Description |
|---|---|---|
actionDescription * | string | Title/description of the action step |
parentReference * | string | Chart ID (e.g., 'chart_123') to create new action step, OR action step entity name (e.g., 'chart_123_action_1' or 'chart_123_desired_outcome') to expand existing action step |
currentReality | string | REQUIRED for new action creation. Honest assessment of actual current state relative to this action step. Examples: 'Never used Django', 'Completed models, struggling with views'. AVOID: 'Ready to beg… |
dueDate | string | Optional due date (ISO string). Auto-distributed if not provided. |
initialActionSteps | array | Optional list of sub-actions for the action step |
performanceElements | array | Optional per-step Elements of Performance for MMOT evaluation |
add_action_step
⚠️ DEPRECATED: Use 'manage_action_step' instead for unified interface. Add a strategic action step to an existing structural tension chart (creates telescoped chart). WARNING: Requires honest current reality assessment - avoid 'ready to begin' language. Action steps become full structural tension charts.
| Parameter | Type | Description |
|---|---|---|
actionStepTitle * | string | Title of the action step (becomes desired outcome of telescoped chart) |
currentReality * | string | Current reality specific to this action step. Required to maintain structural tension - assess the actual current state relative to this action step, not readiness to begin. |
parentChartId * | string | ID of the parent chart to add the action step to |
dueDate | string | Optional due date for the action step (ISO string). If not provided, auto-distributed between now and parent due date |
telescope_action_step
⚠️ DEPRECATED: Use 'manage_action_step' instead for unified interface. Break down an action step into a detailed structural tension chart. CRITICAL: Current reality must be an honest assessment of actual current state relative to this specific action step, NOT readiness or preparation statements. This maintains structural tension essential for creative advancement.
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | Name of the action step to telescope |
newCurrentReality * | string | REQUIRED: Honest assessment of actual current state relative to this action step. Examples: 'Never used Django before', 'Completed models section, struggling with views'. AVOID: 'Ready to begin', 'Pre… |
actionSteps | array | Alias for 'initialActionSteps'. Present because create_structural_tension_chart names this same concept 'actionSteps'; supplying either works. |
initialActionSteps | array | Optional list of initial action steps for the telescoped chart. Also accepted as 'actionSteps', the name its sibling create_structural_tension_chart uses for the same concept. |
remove_action_step
Remove an action step from a structural tension chart (deletes telescoped chart)
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | Name of the action step to remove (telescoped chart's desired outcome name) |
parentChartId * | string | ID of the parent chart containing the action step |
mark_action_complete
Mark an action step as completed and update current reality. A step whose resolution was delayed has that delay ended as resolved.
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | Name of the completed action step |
completedBy | string | Who completed the step. Recorded as who ended its delay, when it had one (default 'mark_action_complete'). |
get_chart_progress
Get detailed progress for a specific chart (redundant if you just used list_active_charts which shows progress). Only use if you need the nextAction details.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to check progress for |
list_active_charts
List all active structural tension charts with their progress. Use this FIRST to see all charts and their IDs. This shows chart overview with progress - you don't need other tools after this for basic chart information.
get_chart
Get the full details of a specific structural tension chart, including its desired outcome, current reality, and all associated action steps.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to retrieve. |
get_action_step
Get the full details of a specific action step, which is itself a telescoped chart.
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | Name of the action step (e.g., 'chart_123_desired_outcome') to retrieve. |
update_action_progress
Update progress on an action step without marking it complete, optionally updating current reality
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | Name of the action step to update progress for |
progressObservation * | string | Description of progress made on this action step |
updateCurrentReality | boolean | Whether to also add this progress to current reality (optional, defaults to false) |
update_current_reality
FOR STRUCTURAL TENSION CHARTS: Add observations to current reality. DO NOT use add_observations or create_entities for chart work - use this instead.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to update current reality for |
newObservations * | array | Array of new observations to add to current reality |
update_desired_outcome
Update a chart's desired outcome (goal). Works for BOTH master charts AND action steps (which are telescoped charts). Provide the chart ID of the chart you want to update - whether it's a master chart or an action step chart.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to update (works for master charts like 'chart_123' or action step charts like 'chart_456') |
newDesiredOutcome * | string | New desired outcome text |
update_chart_due_date
Change the date a chart is due after it was created. Works for BOTH master charts AND action step charts. Moves the chart and its desired outcome together. Open action steps keep their own dates unless redistributeActionSteps is true; the count still falling after the new date is reported either way. The change is recorded as an observation on the chart.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to update (works for master charts like 'chart_123' or action step charts like 'chart_456') |
newDueDate * | string | New due date as an ISO date string (e.g. '2026-09-30T12:00:00Z') |
redistributeActionSteps | boolean | When true, open action steps and telescoped child charts are redistributed evenly between now and the new due date. When false (default), their dates are left as the caller set them. |
delay_resolution
Record on an action step that someone strategically chose to delay its resolution: until when (resolveBy, which becomes the step's due date), why, who chose it, what the delay serves, the events that should wake it, the agent session to rehydrate when it comes due, and the follow-up prompt composed now that a talking circle takes up at the date. A due date says when; this says the wait was chosen. A completed step is refused, and so is a resolveBy not in the future. Delaying a step already delayed moves the earlier record, with its follow-up prompt, into its history.
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | The step: a written step ('chart_123_action_1') or a telescoped step ('chart_456_desired_outcome', as add_action_step returns it). |
chosenBy * | string | The person or seat that chose the delay. |
reason * | string | Why delaying serves the work now. |
resolveBy * | string | When resolution is wanted, an ISO date in the future (e.g. '2026-11-01T09:00:00Z'). Becomes the step's due date. |
followUpPrompt | object | The follow-up prompt composed when the delay is chosen. At the date, what is rehydrated is this prompt, potentially with the session. Its composedAt is set by the tool to the delay's chosenAt; a value… |
primaryChoice | string | What the delay serves. Defaults to the chart's desired outcome, copied now. |
session | object | The agent session to rehydrate when the delay ends. |
wakeOn | array | Event cues, in words, that should bring the step back before resolveBy. |
list_delayed_resolutions
List delayed action steps, soonest resolveBy first, each with its chart, days remaining, whether it is owed (resolveBy has passed), what it serves, its wake cues, its agent session and its follow-up prompt's address.
| Parameter | Type | Description |
|---|---|---|
dueWithinDays | number | Keep only delays resolving within this many days from now (owed ones included). |
includeEnded | boolean | Also list steps whose latest delay has ended. |
end_delayed_resolution
End an action step's open delay, either by rehydrating it or by releasing the step. What is rehydrated is the follow-up prompt composed when the delay was chosen, potentially with the agent session: 'rehydrated' needs one of the two on the delay. The record is kept with who ended it, when, and how; the step reads as it did before the delay. When rehydrated, returns followUpPrompt beside the session's resume command, and the session's trace and rehydrateWith when it carries them.
| Parameter | Type | Description |
|---|---|---|
actionStepName * | string | The delayed step, named as for delay_resolution. |
endedBy * | string | The person or seat ending the delay. |
outcome * | string | 'rehydrated' when the follow-up prompt is taken up, potentially with the session resumed; 'released' when the step is let go of its delay. ('resolved' is written by mark_action_complete when a delayed… |
endNote | string | Optional note on how the delay ended. |
perform_mmot_evaluation
Autonomous MMOT (Managerial Moment of Truth) self-evaluation on a structural tension chart. The agent compares produced output against defined Elements of Performance, acknowledges discrepancy, analyzes dynamics, updates the chart, and recommits or redirects. Runs the four Creator's Moment of Truth steps: acknowledge → analyze → update → recommit. Can be called from any directional perspective (South/East/West/North) for collective inquiry.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to evaluate |
assessment | string | The agent's honest assessment — what was expected vs. what was delivered, observations, corrective insights |
correctiveActions | array | Optional corrective action steps to add to the chart based on evaluation |
direction | string | Optional directional perspective: South=DESIGN/structure (Mia), East=EXECUTION/narrative (Miette), West=EXECUTION/embodied (Heyva), North=DESIGN/wisdom (Echo Weaver) |
phase | string | Which MMOT phase: 'full' runs all four steps, or run individual phases |
updateReality | boolean | Whether to write evaluation observations into current reality |
create_narrative_beat
Create a new narrative beat with multi-universe perspective and optional IAIP integration. Documents story progression across three archetypal universes (engineer-world, ceremony-world, story-engine-world).
| Parameter | Type | Description |
|---|---|---|
act * | number | Act number in the narrative sequence |
description * | string | Detailed description of the narrative beat |
lessons * | array | Key lessons or insights from this beat |
parentChartId * | string | ID of the parent structural tension chart |
prose * | string | Prose narrative of the beat |
title * | string | Title of the narrative beat |
type_dramatic * | string | Dramatic type (e.g. 'Crisis/Antagonist Force', 'Setup', 'Turning Point') |
universes * | array | Universe perspectives (engineer-world, ceremony-world, story-engine-world) |
assessRelationalAlignment | boolean | Whether to call iaip-mcp assess_relational_alignment |
filePath | string | Path to narrative JSONL file (optional) |
initiateFourDirectionsInquiry | boolean | Whether to call iaip-mcp get_direction_guidance |
telescope_narrative_beat
Telescope a narrative beat into sub-beats for detailed exploration. Creates detailed sub-narrative structure from a parent beat.
| Parameter | Type | Description |
|---|---|---|
newCurrentReality * | string | Updated current reality for the telescoped beat |
parentBeatName * | string | Name of the parent narrative beat to telescope |
initialSubBeats | array | Optional initial sub-beats to create |
list_narrative_beats
List all narrative beats, optionally filtered by parent chart ID. Shows multi-universe story progression.
| Parameter | Type | Description |
|---|---|---|
parentChartId | string | Optional: Filter by parent chart ID |
init_llm_guidance
🚨 NEW LLM? Essential guidance for understanding COAIA Memory's structural tension methodology, delayed resolution principle, and proper tool usage. Run this FIRST to avoid common mistakes.
| Parameter | Type | Description |
|---|---|---|
format | string | Level of detail: 'full' for complete guidance, 'quick' for essentials only, 'save_directive' for session memory instructions |
link_chart_to_github_issue
Record on an existing chart the GitHub issue it was written from. The reference must be the full 'owner/repo#number' path.
| Parameter | Type | Description |
|---|---|---|
chartId * | string | ID of the chart to link |
githubIssue * | string | GitHub issue as the FULL path 'owner/repo#number' (e.g. jgwill/coaiajs#1). A bare '#number' is rejected. |
create_wampum_belt
Create a Wampum Belt: a non-linear mnemonic grid that runs in parallel with linear narrative beats.
| Parameter | Type | Description |
|---|---|---|
purpose * | string | What this belt encodes or remembers |
title * | string | Name of this Wampum belt |
cols | number | Grid column count (default 1) |
rows | number | Grid row count (default 1) |
add_wampum_bead
Add a bead at a grid position with mnemonic anchor, optional relational readings, and optional ceremony/accountability links.
| Parameter | Type | Description |
|---|---|---|
beltId * | string | Target belt ID |
color * | string | Bead color |
mnemonic * | string | Short anchor phrase for this bead |
position * | object | |
reading * | string | Canonical meaning for the bead |
ceremonyLink | object | |
observations | array | |
relationalReadings | object | Optional perspective-specific readings (left/center/right/row:N/col:N) |
read_wampum_belt
Read a Wampum Belt in full, or read a bead by position with relational interpretation.
| Parameter | Type | Description |
|---|---|---|
beltId * | string | Wampum belt ID |
position | object |
import_pde_decomposition
Import a .pde/*.json StoredDecomposition and create an STC session from it. Reads the decomposition result, maps it to Structural Tension Chart entities, and persists as .coaia/pde/<UUID>.jsonl.
| Parameter | Type | Description |
|---|---|---|
pde_id * | string | ID of the PDE decomposition in .pde/ folder |
workdir | string | Working directory containing .pde/ folder (default: cwd) |
create_stc_from_pde
One-shot: provide a DecompositionResult JSON directly and create a Structural Tension Chart session. Use when you already have the decomposition in memory.
| Parameter | Type | Description |
|---|---|---|
decomposition_result * | object | DecompositionResult JSON object from mcp-pde |
original_prompt * | string | The original prompt that was decomposed |
list_pde_decompositions
List available .pde/*.json decomposition files that can be imported into STC sessions.
| Parameter | Type | Description |
|---|---|---|
workdir | string | Working directory containing .pde/ folder (default: cwd) |
get_session
Get the current state of a PDE session including the Structural Tension Chart, action steps, and progress.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | The session UUID |
list_sessions
List all PDE sessions in the current directory.
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by session status |
pde_update_action_progress
[PDE session] Update progress on an action step with a factual observation.
| Parameter | Type | Description |
|---|---|---|
action_name * | string | The action step entity name (e.g., chart_abc123_action_1) |
observation * | string | Factual progress observation (what was done, not what will be done) |
session_id * | string | The session UUID |
update_current_reality | boolean | Whether to also add this observation to the chart current reality |
pde_mark_action_complete
[PDE session] Mark an action step as complete. The completion flows into current reality.
| Parameter | Type | Description |
|---|---|---|
action_name * | string | The action step entity name |
session_id * | string | The session UUID |
completion_note | string | Optional note about what was accomplished |
pde_add_action_step
[PDE session] Add a new strategic action step to the chart. Each action step is a secondary choice supporting the primary goal.
| Parameter | Type | Description |
|---|---|---|
action_description * | string | Description of the strategic action |
session_id * | string | The session UUID |
current_reality | string | Current reality for this specific action step |
pde_update_current_reality
[PDE session] Add observations to the current reality of the chart.
| Parameter | Type | Description |
|---|---|---|
observations * | array | Factual observations to add to current reality |
session_id * | string | The session UUID |
complete_session
Mark the session as completed when the desired outcome is achieved.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | The session UUID |
final_note | string | Final observation about the completed outcome |
parse_plan_structural
Parse a Claude plan as structural tension chart. Extracts desired outcome, current reality, and action steps (which telescope into sub-charts). Returns confidence scores.
| Parameter | Type | Description |
|---|---|---|
planContent | string | Alternative: raw markdown content (if path not provided) |
planPath | string | Path to the Claude plan markdown file |
plan_to_stc
Convert plan to structural tension chart (JSONL). Action steps become telescoped STCs with their own desired outcome/current reality.
| Parameter | Type | Description |
|---|---|---|
planPath * | string | Path to the Claude plan markdown file |
currentReality | string | Override: provide current reality if not detected in plan |
outputPath | string | Path to write the STC JSONL (default: <planname>.stc.jsonl) |
sync_plan_to_chart
Plan → Chart sync. When plan changes, update the structural tension chart.
| Parameter | Type | Description |
|---|---|---|
chartsPath * | string | Path to the charts JSONL file |
planPath * | string | Path to the Claude plan markdown file |
dryRun | boolean | If true, show changes without applying |
sync_chart_to_plan
Chart → Plan sync. When agents modify chart (observations, completions), regenerate plan markdown.
| Parameter | Type | Description |
|---|---|---|
chartsPath * | string | Path to the charts JSONL file |
planPath * | string | Path to write the updated plan markdown |
dryRun | boolean | If true, show proposed plan without writing |
create_plan_trace
Generate Langfuse trace data for plan→STC transformation.
| Parameter | Type | Description |
|---|---|---|
chartsPath * | string | Path to generated charts |
planPath * | string | Path to the source plan |
metadata | object | Additional trace metadata |
sessionId | string | Optional Langfuse session ID |
pde_to_plan
Convert a PDE DecompositionResult to a structural tension chart (JSONL). Takes pre-decomposed PDE output and produces coaia-narrative compatible entities and relations.
| Parameter | Type | Description |
|---|---|---|
decomposition_result | object | Alternative: provide DecompositionResult JSON directly |
original_prompt | string | The original prompt (required if providing decomposition_result) |
outputPath | string | Path to write the STC JSONL output |
pde_id | string | ID of a stored PDE decomposition in .pde/ folder |
workdir | string | Working directory containing .pde/ folder (default: cwd) |