Create event block
create-event-blockPersist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows source (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from occurred_at); with neither it is due on receipt. A later due date is a field correction on update-event-block.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount": 250000,
"source": "quickbooks",
"agent_id": "ent_customer_acme",
"currency": "USD",
"metadata": {
"terms": "net_30",
"invoice_number": "INV-2026-0421"
},
"event_type": "invoice_issued",
"description": "April consulting retainer — Acme Corp",
"event_class": "economic",
"external_id": "qb_inv_4521",
"occurred_at": "2026-05-01T14:30:00Z",
"external_url": "https://app.qbo.intuit.com/app/invoice?txnId=4521",
"dimension_ids": [
"dim_dept_consulting"
],
"resource_type": "services",
"event_category": "sales"
},
"name": "create-event-block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Economic value of the event in **cents** of `currency`, signed. Sign convention follows the perspective of the entity that owns the graph: inflows positive, outflows negative. `null` for non-economic events (e.g. `event_class='support'`). | |
| source | Yes | 'manual' | 'system' | 'schedule', a connected provider name (e.g. 'quickbooks'), or a source_name registered via an 'external' connection. Validated against the graph's registered connections. | |
| agent_id | No | ID of the counterparty agent (customer, vendor, employee, lender) involved in the event. `null` for internal-only events. | |
| currency | No | ISO 4217 currency code for `amount`. | USD |
| due_date | No | When an obligation falls due: an `invoice_issued` or a `bill_received`. Give it, or `terms_days`; with neither, the obligation is due on receipt. Refused on any other event type. | |
| metadata | No | Free-form payload, opaque to the event surface. When `apply_handlers=True`, the matched handler's metadata schema validates this dict — required keys depend on the handler registered for `event_type`. Use `preview-event-block` to discover the expected shape without writing. | |
| entity_id | No | The entity whose books the event lands in, by id; every GL row its handler writes follows it. Omit for the group parent. | |
| event_type | Yes | Open vocabulary: 'invoice_issued' | 'contract_signed' | 'bank_transaction' | ... | |
| terms_days | No | Net terms in days from `occurred_at` (30 for net 30), in place of `due_date`. Only on an `invoice_issued` or a `bill_received`. | |
| description | No | Free-text human-readable summary of the event. | |
| document_id | No | The stored document this event rests on, as evidence: the invoice PDF, the vendor bill, the receipt photo (upload it with create-document-upload and complete-document-upload). Must be a document on this graph. While the event is live, the document cannot be deleted. | |
| event_class | No | REA event class. 'economic' events change resources and drive GL postings; 'support' events are audit-trail / value-chain primitives (typically captured with apply_handlers=False). | economic |
| external_id | No | Source-system dedup key. (source, external_id) is enforced unique when external_id is provided, so retries from external adapters are idempotent at the DB level. | |
| occurred_at | Yes | When the event happened in the real world | |
| effective_at | No | Accounting recognition date, if different from occurred_at | |
| event_action | No | Canonical action verb refining `event_category`. Disambiguates concepts ERPs collapse: `transferAllRights` (ownership transfer, no physical movement) vs `transferCustody` (physical only, no rights transfer) — load-bearing for consignment, drop-shipping, marketplace settlement, escrow. Optional; null is valid for legacy events and during adapter rollout. | |
| external_url | No | Deep link back to source-system record | |
| dimension_ids | No | Management dimension members tagging this event (department, class, location, project), one per axis. Every line its handler writes carries them on the axes the line does not tag itself. | |
| resource_type | No | REA resource kind being exchanged. One of: `goods`, `services`, `money`, `right`, `obligation`, `information`, `labor`. | |
| apply_handlers | No | When True, resolves the event_type to a handler (Python registry first, then DSL) and fires it atomically with event creation. | |
| event_category | Yes | REA classification. Economic categories (sales, purchase, financing, payroll, treasury, adjustment, recognition, other) require event_class='economic'. Support categories (control, approval, reconciliation, inquiry) require event_class='support'. The DB CHECK rejects mismatched pairings. | |
| source_version | No | The source's revision of this record: a number that only grows, such as a revision counter or a last-modified timestamp. It matters for a `journal_entry_recorded` event from the external ledger that keeps the entity's books (a connection registered with `ledger`): sending the same `external_id` again with a higher version replaces the entry in the books, in an open period. An equal or lower version, or none, is the 409 of a repeat delivery. From any other source it is stored and has no effect. | |
| discharges_event_id | No | Settlement link: the obligation this event discharges (e.g. cash_received pointing at the originating sale_invoiced). | |
| resource_element_id | No | ID of the specific element being exchanged, when known (e.g. the cash account for a treasury movement, the inventory item for a sale). | |
| obligated_by_event_id | No | Forward-materialization link: the event that scheduled or obligated this one (e.g. depreciation entries point at the asset_acquired event). |