Skip to main content
Glama

Publish Record

engramic_record_publish

Publish a previously-staged event draft. Pass 2 of the two-pass record flow.

The draftId comes from a prior engramic_record_draft call. After publish the event is permanent, visible to the timeline, and the draft row is deleted.

EDITS (PATCH-style, all optional):

  • Any subset of the original record fields can be supplied to override the drafted value (e.g. update detail, add references, replace topics).

  • Omitted fields keep the drafted value.

  • Arrays REPLACE the drafted array wholesale (no append).

  • 'type' and 'actorId' are IMMUTABLE — to change them, abandon this draft (engramic_record_abandon) and stage a new one.

AUTHORIZATION: Only the operator that staged the draft can publish it (not the attributed identity); the same operator may have several drafts waiting and publishes each by its draftId. A different operator publishing returns FORBIDDEN_NOT_DRAFT_OWNER.

OUTPUT: the saved record, including url (a link to it in the app) and client (the app it was recorded through, when known).

ERROR CODES:

  • DRAFT_NOT_FOUND — draftId unknown or expired (4-hour TTL, silently dropped)

  • FORBIDDEN_NOT_DRAFT_OWNER — publishing operator ≠ the operator that staged the draft

  • IMMUTABLE_FIELD — edits tried to change type or actorId

  • VALIDATION_ERROR — merged payload failed validation (dueAt on a record that is not an action, for one); draft stays alive

Input Schema

NameRequiredDescriptionDefault
editsNoPATCH-style edits applied to the drafted payload before publish
draftIdYesThe ed_… id returned by engramic_record_draft

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only cover the read/write/idempotency profile; the description goes far beyond it by disclosing that the event becomes permanent and timeline-visible, that the draft row is deleted, the 4-hour TTL with silent drop, and the ownership-based authorization rule. The enumerated error codes and their recovery semantics (VALIDATION_ERROR leaves the draft alive) are exactly the operational detail an agent needs.

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?

Front-loaded with the core action, then clearly sectioned into EDITS, AUTHORIZATION, OUTPUT and ERROR CODES, with zero filler sentences. It is on the long side, but each block carries distinct operational information rather than repetition.

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 mutation tool with nested parameters and no output schema, the description covers permanence, ownership, return contents (url and client), and every failure mode. Nothing an agent needs to call it correctly or recover from failure is missing.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds real meaning the schema cannot express: edits are PATCH-style, omitted fields retain drafted values, arrays replace wholesale rather than append, and type/actorId are immutable. This is behavioral semantics of the edits object, not a restatement of property names.

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?

States a specific verb and resource ('Publish a previously-staged event draft') and immediately places it in the two-pass flow, explicitly disambiguating it from engramic_record_draft and engramic_record_abandon. An agent can tell exactly which sibling precedes and follows it.

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?

Gives the precondition (draftId from a prior engramic_record_draft call) and a concrete alternative path for the case where immutable fields must change: abandon the draft via engramic_record_abandon and stage a new one. It also clarifies the multi-draft case, that one operator may hold several drafts and publishes each by draftId.

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.

Resources