Skip to main content
Glama

Update event block

update-event-block
Destructive

Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler (else the matching event handler's template) fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; an event with a handler cannot skip to pending or fulfilled without rows. A bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch classified_flow_qname (or flow_qname on each classified_allocations part) with an rs-gaap flow concept such as rs-gaap:ProceedsFromIssuanceOfLongTermDebt. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it. A payment or bank line records the invoices or bills it settles with discharge_allocations (positive cents per document, together at most its amount) or one discharges_event_id; each is checked: an invoice for money in, a bill for money out, on its own entity, not voided.

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": {
      "event_id": "evt_abc123",
      "transition_to": "committed"
    },
    "name": "update-event-block"
  }
}

Input Schema

NameRequiredDescriptionDefault
due_dateNoNew due date of an obligation (an `invoice_issued` or a `bill_received`), such as an extension granted. Unset = unchanged. It moves no ledger row, so it is accepted in a closed period.
event_idYesTarget event ID.
descriptionNoReplacement free-text summary. Unset = unchanged; pass an empty string to clear.
document_idNoSet or replace the stored document the event rests on; an empty string detaches it. Must be a document on this graph. Unset = unchanged.
effective_atNoNew accounting recognition date. Unset = unchanged. Useful when an event was captured against the wrong period.
event_actionNoSet or correct the canonical action verb. Unset = unchanged. Useful when an adapter improvement makes a previously-NULL verb fillable, or when reclassifying after the fact.
transition_toNoStatus transition. Valid moves depend on current status: captured → classified | committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. captured → classified records an account choice without posting (bank-feed lines: patch classified_element_id, or accept_suggestion: true, in the same call); the later commit fires the handler. Note: classified and fulfilled are otherwise set by handlers, not by callers, but the transition is allowed for corrections.
metadata_patchNoKey-value pairs merged into existing metadata (additive patch, not replace).
source_retractedNoWith `transition_to: voided`, for an event from the external ledger that keeps the entity's books: the source no longer holds this record, so its posted entries are taken out of the books and the event is voided, in an open period. Refused for any other event.
superseded_by_idNoNew event id that replaces this one. Required when transition_to='superseded'.
discharges_event_idNoSet the settlement link: the one invoice or bill this payment settles, at its full amount; an empty string clears it. Replaces any `discharge_allocations`. Checked as they are.
discharge_allocationsNoWhat this payment settles, document by document: one row per invoice or bill with the positive cents applied to it, together at most the payment's amount (the rest is unapplied). Replaces any held; an empty list clears them, and the settlement link becomes the first row's. Each must be an obligation of this event's entity, not voided: an invoice for money in, a bill for money out; a journal entry, which moves no cash, may settle either (bills converted into a note). A person chooses them; the open items a bank line may settle are `list-discharge-candidates` over MCP and `dischargeCandidates` over GraphQL.
obligated_by_event_idNoSet/update the forward-materialization link.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses consequential behavior: handler execution on commit, 422 error surfacing, final retraction semantics, closed-period re-tagging without balance movement, and refusal conditions for bank-feed lines. These details materially help an agent avoid destructive mistakes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded, and most sentences carry substantive information rather than filler. However, the description is a single dense paragraph with many nested conditions, which makes it harder to parse than necessary for a tool with this much behavioral nuance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool, it covers the key transition, handler, error, flow, and settlement behaviors, while relying on the rich schema for individual parameter details. It is still missing success-response expectations and contains unsupported parameter references, but it is substantially complete overall.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the schema itself documents most parameters thoroughly, so the baseline is 3. The description adds operational meaning around transitions, metadata patches, flow tagging, and discharge validation, but it also references fields such as accept_suggestion and classified_allocations that do not appear in the input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and resource: apply a status transition and/or field corrections to an existing event block. It also clarifies that only supplied fields are updated, which distinguishes it from create/get/execute operations without requiring sibling-name inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit transition rules, when captured-to-classified should be used, when committed fires a handler, and when retractions are refused. It also names concrete alternatives in edge cases, such as reversing posted entries instead of voiding and using list-discharge-candidates for open items.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.