Skip to main content
Glama

Execute event block

execute-event-block
DestructiveIdempotent

For events on a connection with write_policy='qb_authoritative' or 'hybrid', publish the event's draft GL entries to the source-of-truth system (QuickBooks), each as its own JournalEntry. Records the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to 'posted'; the event goes 'fulfilled' once no draft remains. On rejection what landed is kept, the status is unchanged and the error is stamped on event.metadata.last_outbound_error (and returned as qb_error). Events on 'native' or 'shadow' books pass through with no QB write. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "event_id": "<event_id>"
    },
    "name": "execute-event-block"
  }
}

Input Schema

NameRequiredDescriptionDefault
event_idYesEvent ID (`evt_*` ULID) to publish. The event's `metadata.connection_id` determines which QB connection to write to; the connection's `write_policy` governs whether a write fires.
connection_idNoOverride for the connection to route the write through. Used by the close-period batch path where schedule-originated events don't carry `connection_id` in their metadata. When unset, the command reads `event.metadata.connection_id`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only flag readOnly=false, destructive=true, openWorld=true, idempotent=true; the description goes further by disclosing the synchronous write model, per-entry JournalEntry creation, the state transitions (entry→'posted', event→'fulfilled'), and the partial-failure contract (what landed is kept, status unchanged, error stamped on event.metadata.last_outbound_error and returned as qb_error). What it does not cover is retry/re-run behavior for a partially posted event, which matters for a destructive mutation.

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

Conciseness4/5

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

Four dense sentences, each carrying a distinct fact (trigger condition, success effect, rejection effect, pass-through/refusal cases) with no filler. Slight cost: it opens with a conditional clause rather than the action verb, delaying the front-loaded statement of what the tool does.

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

Completeness5/5

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

For a 2-parameter destructive mutation with no output schema, the description covers the trigger, the side effects on QuickBooks and on event metadata, the terminal statuses, the error channel name, and the two non-write paths. An agent has everything needed to decide whether a call will write and what a failure leaves behind.

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

Parameters3/5

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

Schema coverage is 100% and the event_id parameter description already explains that metadata.connection_id selects the connection and write_policy governs the write, so the description largely restates it. The connection_id override's batch-path rationale is documented in the schema, not added here, so baseline 3 applies.

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?

Names a specific verb (publish/post) and resource (draft GL entries to QuickBooks as JournalEntry records) and specifies the exact scope gate (write_policy 'qb_authoritative' or 'hybrid'). An agent can tell this is the outbound-write path versus a read/get or a preview operation without opening another schema.

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

Usage Guidelines4/5

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

Explicitly states the conditions under which a write fires ('qb_authoritative'/'hybrid'), the conditions under which it is a no-op ('native'/'shadow' pass through), and the refusal case (subsidiary's books). It never names the obvious alternative, preview-event-block, or says when to preview first, so it is strong on when/when-not but silent on alternatives.

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.