commitments.create

Live

Explicitly create a commitment.

CategoryCommitments
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/commitments/src/tools/commitments-create.ts

Description

Write routes through the action engine for ledger writes per FR55. Auto-extracted commitments from consolidation Phase 2 use the same table; the surface is unified. Per ADR-0021 §read-API Family C.

Input schema

FieldTypeRequiredDescription
counterparty_idstringnoOptional — commitments not tied to a counterparty are valid (e.g., personal task tracking).
subjectstringyesPlain-language commitment subject.
due_atstring (ISO-8601)noTarget completion time.
source_episode_idstringnoProvenance link to an episode.
notesstringnoFree-form notes.

Output shape

typescript
{ commitment_id: string; ok: true }

Example call

JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):

jsontools/call params
{
  "name": "commitments.create",
  "arguments": {
    "counterparty_id": "entity_01HXMARCUS",
    "subject": "Send Marcus the timeline doc",
    "due_at": "2026-06-13T17:00:00Z"
  }
}

Example response

Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):

jsonparsed result body
{ "commitment_id": "cmt_01H...", "ok": true }

Errors this tool can return

CodeMeaning
invalid_argumentsTool input failed Zod validation.
unauthorizedMissing or invalid bearer token.
quota_exceededPer-minute, daily call, or daily inference budget exceeded.

See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).