Skip to main content
Glama

Draft Record

engramic_record_draft

Stage an event for later publication and receive the topic context bundle that should inform your decision to publish.

This is pass 1 of two. The draft is INVISIBLE to the graph — other agents and queries do not see it. You see what the graph already knows about the topic (recent decisions, open gaps, your assigned gaps, prior resolutions, active contradictions) and can use that context to decide whether to publish as-is, publish with edits, or abandon the draft.

NOT FOR TOPIC CONTENT: an event records that something HAPPENED (a decision reached, an action taken, a discovery made) as a short label and detail. It is NEVER the carrier of substantive content that belongs ON a topic — a topic's description, its details, or researched facts. If the user asked you to add to, enrich, or update a topic, edit the topic itself with the update tools (update_concept / update_goal / etc. in a workflow, or the engramic_update_* MCP tools); record at most a brief action event alongside that edit, never in place of it.

WHEN TO DRAFT:

  • ALWAYS use this instead of any single-pass record path. Engramic moved to two-pass; the previous one-shot tool is removed.

  • Use the returned bundle to check for: prior resolutions on the same topic (don't re-litigate), open gaps you might be answering (a 'resolves' reference to the gap, added at publish time, answers it if you may edit it), active contradictions you might be addressing.

INPUT: Same shape as the legacy record payload — type/label/topics required, plus optional detail, actorId, references, etc.

OUTPUT:

  • draftId: short id used to publish (or abandon, or let it expire)

  • reused: always false; every call stages a fresh draft

  • contextBundle: full TopicContextBundle per @engramic-ai/core wire contract

CONSTRAINTS:

  • actorId is the ATTRIBUTION (who the published event is credited to) and may be a different named identity you are recording on behalf of. The draft is OWNED by your session/operator identity, not by actorId.

  • Same operator; several drafts. Each call stages a fresh draft with its own draftId, so you can draft several records and publish each one. Up to 10 drafts can wait at once; an 11th returns DRAFT_LIMIT naming your oldest draft. engramic_record_get_draft lists your waiting drafts; engramic_record_abandon drops one.

  • TTL: 4 hours. Expired drafts are silently dropped.

  • dueAt is for actions only: an ISO 8601 date (2026-10-31, meaning the end of that day) or datetime. Any other type with dueAt returns VALIDATION_ERROR.

  • References to other records use engramic://e_ (or the bare e_); to a topic, engramic://t_. They are stored as /events/e_ and /topics/t_.

  • The anchor topic (topics[0]) must already exist — auto-create at draft time is not supported because the bundle needs a real topic to query.

Input Schema

NameRequiredDescriptionDefault
typeYesType of event to record. (`question` was removed in #300 — record gap topics for open questions instead.)
dueAtNoActions only: when the action is due, as an ISO 8601 date (2026-10-31) or datetime.
labelYesShort summary (2-10 words)
detailNoFull reasoning or context
domainNoParent domain for any newly created topics at publish time (defaults to "Uncategorised")
sourceNoFor discovery events: who made the discovery
topicsYesTopic IDs or labels. topics[0] anchors the context bundle and must already exist.
actorIdNoAttribution: actor ID or name the published event is credited to (may be a different identity you record on behalf of). Defaults to the session/operator actor if omitted. An unknown person name creates a pending person actor; they are linked when they join. For an action, this is the person who owns it.
subtypeNoFor discovery events: the nature of what was discovered
agreedByNoFor a decision, the people who agreed it, the user included when they agreed.
occurredAtNoISO8601 timestamp when the event occurred (defaults to publish time)
referencesNoExternal or internal references to attach. Link another record as engramic://e_<id> and a topic as engramic://t_<id>.
participantIdsNoOther actor IDs or names involved
optionsConsideredNoFor decisions: alternatives considered

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only flag a non-readonly, non-idempotent, non-destructive write; the description adds substantial context beyond that — draft invisibility to the graph, a 4-hour TTL, a 10-draft cap with a DRAFT_LIMIT error naming the oldest draft, and the ownership split between session identity and actorId. It does not describe publish-time side effects in detail, but for a staging call it is well covered.

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

Conciseness5/5

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

Long but deliberately structured with PURPOSE / WHEN TO DRAFT / INPUT / OUTPUT / CONSTRAINTS headings, and the single most decision-relevant sentence leads. Nothing reads as filler; the length is proportionate to a 14-parameter two-pass workflow.

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?

No output schema exists, so the description carries return-value disclosure itself and does it — draftId, reused (always false), and the contextBundle. Combined with TTL, draft limits, and the anchor-topic prerequisite, an agent has everything needed to call, wait on, and publish a draft.

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%, so the baseline is 3, and much of the CONSTRAINTS block does repeat schema text (dueAt=actions only, engramic:// reference formats). It earns the extra point for genuinely non-schema information: that the draft is owned by the session identity rather than actorId, that the anchor topic must pre-exist because the bundle needs a real topic, and which inputs trigger VALIDATION_ERROR.

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 ('Stage an event for later publication') and immediately frames itself as 'pass 1 of two', which distinguishes it from engramic_record_publish and engramic_event without opening either schema. The explicit negative scope ('NOT FOR TOPIC CONTENT') further pins the tool's identity against the update_* siblings.

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?

Has a dedicated WHEN TO DRAFT section that says to always prefer this over any single-pass path, names the 3 things the returned bundle should be checked for (prior resolutions, open gaps, active contradictions), and routes topic-enrichment requests to update_concept/update_goal/engramic_update_* instead. Both the when and the when-not are explicit.

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