coaiajs

v0.9.2
coaiajs Checked 11 hours ago Published 1 month ago

CoAIA 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

ParameterTypeDescription
key *stringRedis key
value *stringValue to store
ttlintegerOptional TTL in seconds

coaia_fetch

Fetch value from Redis by key

ParameterTypeDescription
key *stringRedis key to fetch

coaia_fuse_trace_create

Create a Langfuse trace for observability tracking

ParameterTypeDescription
trace_id *stringUnique trace identifier
environmentstringEnvironment name
input_dataInput data
metadataobjectMetadata dictionary
namestringTrace name
output_dataOutput data
session_idstringSession identifier
tagsarrayTrace tags
user_idstringUser identifier
versionstringApplication version

coaia_fuse_add_observation

Add an observation (event, span, or generation) to a trace

ParameterTypeDescription
name *stringObservation name
observation_id *stringUnique observation identifier
trace_id *stringParent trace ID
end_timestringEnd timestamp (ISO 8601)
input_dataInput data
metadataobjectMetadata
observation_typestringObservation type
output_dataOutput data
parent_idstringParent observation ID for nesting
session_idstringSession ID the observation belongs to
start_timestringStart timestamp (ISO 8601)
tagsarrayTrace tags
trace_namestringTrace name for the trace this observation belongs to
user_idstringUser ID the observation belongs to

coaia_fuse_trace_get

Get a specific trace by ID with all its observations

ParameterTypeDescription
trace_id *stringTrace ID to fetch
json_outputbooleanReturn raw JSON instead of formatted tree

coaia_fuse_trace_view

View trace details with observations (alias for trace_get)

ParameterTypeDescription
trace_id *stringTrace ID
json_outputbooleanReturn raw JSON

coaia_fuse_observation_get

Get a specific observation by ID

ParameterTypeDescription
observation_id *stringObservation ID
json_outputbooleanReturn raw JSON

coaia_fuse_traces_list

List traces with optional filtering by session, user, name, tags, and time range

ParameterTypeDescription
cursorstringCursor from a prior response
from_timestampstringFilter from timestamp (ISO 8601)
json_outputbooleanReturn raw JSON instead of markdown table
limitintegerItems per request
namestringFilter by trace name
session_idstringFilter by session ID
tagsarrayFilter by tags
to_timestampstringFilter to timestamp (ISO 8601)
user_idstringFilter by user ID

coaia_fuse_traces_session_view

View all traces for a specific session

ParameterTypeDescription
session_id *stringSession ID to view traces for
json_outputbooleanReturn raw JSON

coaia_fuse_prompts_list

List all Langfuse prompts

coaia_fuse_prompts_get

Get a specific Langfuse prompt by name

ParameterTypeDescription
name *stringPrompt name
labelstringOptional deployment label

coaia_fuse_datasets_list

List all Langfuse datasets

coaia_fuse_datasets_get

Get a specific dataset by name

ParameterTypeDescription
name *stringDataset name

coaia_fuse_score_configs_list

List all Langfuse score configurations

coaia_fuse_score_configs_get

Get specific Langfuse score configuration

ParameterTypeDescription
name_or_id *stringScore config name or ID

coaia_fuse_score_apply

Apply a score configuration to a trace or observation with validation

ParameterTypeDescription
config_name_or_id *stringName or ID of the score configuration
target_id *stringID of the trace or session
target_type *stringTarget type
value *Score value (validated against config)
commentstringOptional comment
observation_idstringOptional observation ID

coaia_fuse_comments_list

List comments with optional filtering by object type/ID or author

ParameterTypeDescription
author_user_idstringFilter by author user ID
limitintegerItems per page
object_idstringFilter by specific object ID
object_typestringFilter by object type (trace, observation, session, prompt)
pageintegerPage number

coaia_fuse_comments_get

Get a specific comment by ID

ParameterTypeDescription
comment_id *stringComment ID

coaia_fuse_comments_create

Create a comment attached to an object (trace, observation, session, or prompt)

ParameterTypeDescription
object_id *stringObject ID
object_type *stringObject type (trace, observation, session, prompt)
text *stringComment text
author_user_idstringAuthor user ID

create_entities

ADVANCED: Create traditional knowledge graph entities. For structural tension charts, use create_structural_tension_chart or add_action_step instead.

ParameterTypeDescription
entities *array

create_relations

Create multiple new relations between entities in the knowledge graph. Relations should be in active voice

ParameterTypeDescription
relations *array

add_observations

ADVANCED: Add observations to traditional knowledge graph entities. For structural tension charts, use update_current_reality instead.

ParameterTypeDescription
observations *array

delete_entities

Delete multiple entities and their associated relations from the knowledge graph

ParameterTypeDescription
entityNames *arrayAn array of entity names to delete

delete_observations

Delete specific observations from entities in the knowledge graph

ParameterTypeDescription
deletions *array

delete_relations

Delete multiple relations from the knowledge graph

ParameterTypeDescription
relations *arrayAn 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

ParameterTypeDescription
query *stringThe 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.

ParameterTypeDescription
names *arrayAn 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'.

ParameterTypeDescription
currentReality *stringYour current situation - factual assessment only. NEVER use 'ready to begin' or similar readiness statements.
desiredOutcome *stringWhat you want to CREATE (not solve/fix). Focus on positive outcomes, not problems to eliminate.
dueDate *stringWhen you want to achieve this outcome (ISO date string)
actionStepsarrayOptional list of action steps needed to achieve the outcome
elementsOfPerformancearrayOptional Elements of Performance for MMOT evaluation — criteria the agent uses to self-assess output
githubIssuestringOptional 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.

ParameterTypeDescription
actionDescription *stringTitle/description of the action step
parentReference *stringChart 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
currentRealitystringREQUIRED 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…
dueDatestringOptional due date (ISO string). Auto-distributed if not provided.
initialActionStepsarrayOptional list of sub-actions for the action step
performanceElementsarrayOptional 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.

ParameterTypeDescription
actionStepTitle *stringTitle of the action step (becomes desired outcome of telescoped chart)
currentReality *stringCurrent 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 *stringID of the parent chart to add the action step to
dueDatestringOptional 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.

ParameterTypeDescription
actionStepName *stringName of the action step to telescope
newCurrentReality *stringREQUIRED: 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…
actionStepsarrayAlias for 'initialActionSteps'. Present because create_structural_tension_chart names this same concept 'actionSteps'; supplying either works.
initialActionStepsarrayOptional 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)

ParameterTypeDescription
actionStepName *stringName of the action step to remove (telescoped chart's desired outcome name)
parentChartId *stringID 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.

ParameterTypeDescription
actionStepName *stringName of the completed action step
completedBystringWho 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.

ParameterTypeDescription
chartId *stringID 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.

ParameterTypeDescription
chartId *stringID of the chart to retrieve.

get_action_step

Get the full details of a specific action step, which is itself a telescoped chart.

ParameterTypeDescription
actionStepName *stringName 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

ParameterTypeDescription
actionStepName *stringName of the action step to update progress for
progressObservation *stringDescription of progress made on this action step
updateCurrentRealitybooleanWhether 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.

ParameterTypeDescription
chartId *stringID of the chart to update current reality for
newObservations *arrayArray 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.

ParameterTypeDescription
chartId *stringID of the chart to update (works for master charts like 'chart_123' or action step charts like 'chart_456')
newDesiredOutcome *stringNew 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.

ParameterTypeDescription
chartId *stringID of the chart to update (works for master charts like 'chart_123' or action step charts like 'chart_456')
newDueDate *stringNew due date as an ISO date string (e.g. '2026-09-30T12:00:00Z')
redistributeActionStepsbooleanWhen 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.

ParameterTypeDescription
actionStepName *stringThe step: a written step ('chart_123_action_1') or a telescoped step ('chart_456_desired_outcome', as add_action_step returns it).
chosenBy *stringThe person or seat that chose the delay.
reason *stringWhy delaying serves the work now.
resolveBy *stringWhen resolution is wanted, an ISO date in the future (e.g. '2026-11-01T09:00:00Z'). Becomes the step's due date.
followUpPromptobjectThe 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…
primaryChoicestringWhat the delay serves. Defaults to the chart's desired outcome, copied now.
sessionobjectThe agent session to rehydrate when the delay ends.
wakeOnarrayEvent 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.

ParameterTypeDescription
dueWithinDaysnumberKeep only delays resolving within this many days from now (owed ones included).
includeEndedbooleanAlso 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.

ParameterTypeDescription
actionStepName *stringThe delayed step, named as for delay_resolution.
endedBy *stringThe 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…
endNotestringOptional 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.

ParameterTypeDescription
chartId *stringID of the chart to evaluate
assessmentstringThe agent's honest assessment — what was expected vs. what was delivered, observations, corrective insights
correctiveActionsarrayOptional corrective action steps to add to the chart based on evaluation
directionstringOptional directional perspective: South=DESIGN/structure (Mia), East=EXECUTION/narrative (Miette), West=EXECUTION/embodied (Heyva), North=DESIGN/wisdom (Echo Weaver)
phasestringWhich MMOT phase: 'full' runs all four steps, or run individual phases
updateRealitybooleanWhether 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).

ParameterTypeDescription
act *numberAct number in the narrative sequence
description *stringDetailed description of the narrative beat
lessons *arrayKey lessons or insights from this beat
parentChartId *stringID of the parent structural tension chart
prose *stringProse narrative of the beat
title *stringTitle of the narrative beat
type_dramatic *stringDramatic type (e.g. 'Crisis/Antagonist Force', 'Setup', 'Turning Point')
universes *arrayUniverse perspectives (engineer-world, ceremony-world, story-engine-world)
assessRelationalAlignmentbooleanWhether to call iaip-mcp assess_relational_alignment
filePathstringPath to narrative JSONL file (optional)
initiateFourDirectionsInquirybooleanWhether 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.

ParameterTypeDescription
newCurrentReality *stringUpdated current reality for the telescoped beat
parentBeatName *stringName of the parent narrative beat to telescope
initialSubBeatsarrayOptional initial sub-beats to create

list_narrative_beats

List all narrative beats, optionally filtered by parent chart ID. Shows multi-universe story progression.

ParameterTypeDescription
parentChartIdstringOptional: 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.

ParameterTypeDescription
formatstringLevel of detail: 'full' for complete guidance, 'quick' for essentials only, 'save_directive' for session memory instructions

create_wampum_belt

Create a Wampum Belt: a non-linear mnemonic grid that runs in parallel with linear narrative beats.

ParameterTypeDescription
purpose *stringWhat this belt encodes or remembers
title *stringName of this Wampum belt
colsnumberGrid column count (default 1)
rowsnumberGrid 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.

ParameterTypeDescription
beltId *stringTarget belt ID
color *stringBead color
mnemonic *stringShort anchor phrase for this bead
position *object
reading *stringCanonical meaning for the bead
ceremonyLinkobject
observationsarray
relationalReadingsobjectOptional 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.

ParameterTypeDescription
beltId *stringWampum belt ID
positionobject

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.

ParameterTypeDescription
pde_id *stringID of the PDE decomposition in .pde/ folder
workdirstringWorking 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.

ParameterTypeDescription
decomposition_result *objectDecompositionResult JSON object from mcp-pde
original_prompt *stringThe original prompt that was decomposed

list_pde_decompositions

List available .pde/*.json decomposition files that can be imported into STC sessions.

ParameterTypeDescription
workdirstringWorking 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.

ParameterTypeDescription
session_id *stringThe session UUID

list_sessions

List all PDE sessions in the current directory.

ParameterTypeDescription
statusstringFilter by session status

pde_update_action_progress

[PDE session] Update progress on an action step with a factual observation.

ParameterTypeDescription
action_name *stringThe action step entity name (e.g., chart_abc123_action_1)
observation *stringFactual progress observation (what was done, not what will be done)
session_id *stringThe session UUID
update_current_realitybooleanWhether 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.

ParameterTypeDescription
action_name *stringThe action step entity name
session_id *stringThe session UUID
completion_notestringOptional 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.

ParameterTypeDescription
action_description *stringDescription of the strategic action
session_id *stringThe session UUID
current_realitystringCurrent reality for this specific action step

pde_update_current_reality

[PDE session] Add observations to the current reality of the chart.

ParameterTypeDescription
observations *arrayFactual observations to add to current reality
session_id *stringThe session UUID

complete_session

Mark the session as completed when the desired outcome is achieved.

ParameterTypeDescription
session_id *stringThe session UUID
final_notestringFinal 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.

ParameterTypeDescription
planContentstringAlternative: raw markdown content (if path not provided)
planPathstringPath 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.

ParameterTypeDescription
planPath *stringPath to the Claude plan markdown file
currentRealitystringOverride: provide current reality if not detected in plan
outputPathstringPath to write the STC JSONL (default: <planname>.stc.jsonl)

sync_plan_to_chart

Plan → Chart sync. When plan changes, update the structural tension chart.

ParameterTypeDescription
chartsPath *stringPath to the charts JSONL file
planPath *stringPath to the Claude plan markdown file
dryRunbooleanIf true, show changes without applying

sync_chart_to_plan

Chart → Plan sync. When agents modify chart (observations, completions), regenerate plan markdown.

ParameterTypeDescription
chartsPath *stringPath to the charts JSONL file
planPath *stringPath to write the updated plan markdown
dryRunbooleanIf true, show proposed plan without writing

create_plan_trace

Generate Langfuse trace data for plan→STC transformation.

ParameterTypeDescription
chartsPath *stringPath to generated charts
planPath *stringPath to the source plan
metadataobjectAdditional trace metadata
sessionIdstringOptional 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.

ParameterTypeDescription
decomposition_resultobjectAlternative: provide DecompositionResult JSON directly
original_promptstringThe original prompt (required if providing decomposition_result)
outputPathstringPath to write the STC JSONL output
pde_idstringID of a stored PDE decomposition in .pde/ folder
workdirstringWorking directory containing .pde/ folder (default: cwd)