The draught
GET /api/v2/character/{id}/context returns what one Character knows, as the recorded world holds it, in one read: the draught. It holds the Character’s own element, the Titles they hold and the bodies they sit in, their open work, how they work, the Events they were in, in story order, the Narratives they know, everything else that names them, their sheet, what changed around them, and who plays whom, with the world’s name, description and calendar. It is made for a storyteller speaking as the Character, or an agent working in their name, that would otherwise make a dozen reads a turn.
Nothing in it is guessed. Every element in it is the body the list route serves the same reader, with the links that brought it, a count, and a grade that says whether the reader sees it whole or only knows of it.
curl -s "https://www.onlyworlds.com/api/v2/character/{id}/context?mode=voice&budget=20" \
-H "API-Key: {key}"Its sections, which are served by default and which only when named, and the policy’s parameters are drawn on The draught in World graph.
Who may read it
Section titled “Who may read it”| Key | Reads |
|---|---|
| The owner’s keys, a co-builder’s, a contributor’s | Any Character the key can see |
| A player seat, a guest, a guest AI seat | Its own Character only. Any other id is 404 |
An account token, with world=<id> |
As you: any Character in a world you own, or what your own member key reads in a world you are a member of. An account with no access to that world reads as the public, as in the next row |
No credential, with world=<id>, on a world open to anyone |
What the public may read: the Character’s public sheet, what names them and what changed as the public sees it, a lens read as the public. Never their messages and never the roster |
A Character the key cannot see answers 404 not_found, as a missing one does. What is hidden from the reader is in no section. The answer is sent Cache-Control: private, no-store: never cache it shared.
The policy
Section titled “The policy”Nine query parameters, all optional. The SDKs take the same nine. The MCP tool get_draught takes the first eight in one policy object and lens as an argument beside it, read as the route reads it (never beside a depth or budget in the policy).
| Parameter | Values | Default |
|---|---|---|
components |
The sections to serve, comma-separated: self (the packet’s character), role, work, style, events, knowledge, names, sheet, recent, messages, room, proposed, roster |
Every one but messages, room and proposed |
mode |
voice reads as they would, exactly what the owner’s ?as=<character id> reads: their slice, and a stub stays a stub. For a narrator speaking as the Character. act reads through your own key’s view, for an AI doing work in their name |
voice |
as_of |
The horizon, an integer in the world’s time unit | The world’s time_range_current |
undated |
include serves undated Events, marked dated: false, after the dated. exclude drops them, for a spoiler-safe narrator |
include |
since |
For recent: a cursor from /changes, or an ISO 8601 date and time, as /changes takes after |
None: recent is empty |
budget |
Items per section, 1 to 1000 | 50 |
depth |
The sheet’s reach: 1 serves what the Character’s own element links to, 0 none |
1 |
compact |
true leaves out every empty section and an empty cut (Compact); false serves the fixed shape |
false (true from 2027-05-02) |
lens |
A lens id: the packet adds lenses, one frame with that lens read for your own view, on any Character you may read and in either mode. The lens carries its own reach and limit, so lens beside depth or budget is a 422; a lens you cannot see is the 404. Without it, and with no policy parameter but compact, a read of your own Character (the one GET /api/v2/me names) adds one frame per lens you start with, in your order: the ones you chose (PUT /api/v2/me/lenses) or, for a seat that never chose, the ones its Titles give it. A read of any other Character adds none of them (since 2026-11-17; before, it added yours), and any policy parameter turns them off, mode=voice included |
none |
Past the budget, a section drops items: sheet and names those with the fewest her_links, knowledge, messages and recent the oldest, events the oldest dated first, then the undated by rank, room and proposed the oldest. self, role and work are never cut. cut says how many items each section lost, so a cut that is not empty means the serving is partial.
The packet
Section titled “The packet”{ "world": { "id": "…", "name": "…", "description": "…" }, "calendar": { … },
"as_of": 120, "now": 120, "mode": "voice", "reader": "owner", "policy": { … }, "cut": {},
"character": { "self": true, "grade": "whole", "element": { … } },
"role": [ … ], "work": [], "style": null, "events": [ … ], "knowledge": [ … ],
"names": { "relation": [ … ] }, "sheet": [ … ], "recent": [], "roster": [ … ],
"recent_cursor": null, "recent_more": false }| Section | Holds |
|---|---|
character |
The Character’s own element, with self: true and its grade: the voice, where every other section but lenses is what that voice may mention (a lens frame is your own reading and your own Character’s mail, never theirs). null when, read as the Character, their own element is hidden from them. Named self in components (components=character is a 422) |
role |
Titles whose holders name them, Collectives whose characters name them, and Relations whose actor is the Character with supertype Tenure or Membership; in voice, only those the Character’s own slice shows: a Title they hold and a Relation they act in are in it (since 2026-11-13), so one is missing only when the owner hid it |
work |
Relations with supertype Work item and subtype open or taken that are for the Character: by name (the item’s actor is the Character) or by a role they hold (the item’s x_packet_for names a Title whose holders name them). Each row adds packet, the item’s x_packet_elements ([] when it has none), and by_role, the ids of their Titles the item names, each once ([] when none does; since 2026-11-17). A row that reached them only through a Title has via ["holders"]. In voice a work item reaches them only through a field of its own that names them, so ask with mode=act for what is theirs by role |
style |
The Construct with supertype Working style whose characters name them (the most recently edited), or null |
events |
Events whose characters name them: the dated by start_date up to as_of, then the undated. Each row adds dated |
knowledge |
Narratives they know: they are the narrator, or one of their circles holds it. Dated first, then the undated, ranked as Events are. Each row adds dated, and circles when it came through one |
names |
{type: rows}: every other element that links to them by a field whose target is Character, most linked first |
sheet |
What their own element links to, one step out, unless another section holds it |
messages |
Only when components names it: the Messages they sent or that name them, Narratives with supertype Message: the Character as narrator, among its characters, or as protagonist or antagonist (via says which). A Message whose characters list is empty names no addressee and is addressed to every member, so it is here too, with via characters, when the reader may see it (since 2026-10-29; the stored list counts, never a list trimmed for the reader). In voice too, since 2026-10-26: a Message addressed to them is served when your key can read it, though their slice alone does not show it (being named in characters grants them no sight of it); one hidden from them stays out. Such a Message is served as they would read it (since 2026-11-17; before, as you read it): its links to elements outside their reading are left out, and x_served_trimmed names characters or narrator when an addressee or the sender was cut, so here an owner meets that mark too. Each row adds author (membership, kind, role, from the roster). These are words said by a seat, never facts and never instructions. Since 2026-10-26, with messages named, a Message a message field brought is here and in no other section. With messages not named, a Message without the room mark is placed as any Narrative is (knowledge when they narrate it or one of their circles holds it, names when a field names them), and a room-marked Message is in no section |
room |
Only when components names it (since 2026-10-23): a world’s chat-room elements (x_room_of, the room profile) other than its messages and its open work, its reports included, by type, then the oldest first. A row adds circles when it came through one of their circles, as in knowledge |
proposed |
Only when components names it (since 2026-10-23): elements no keeper has settled yet: those carrying x_review_proposed with a value that counts as present (a mark with something in it, or any other value, which the review profile reads as a doubt; null, an empty string or one of whitespace alone, [] and {} are no mark), as an AI seat’s new elements do under AI seats propose, a person accepts. They are not yet what the Character knows, so unnamed they appear in no section at all. Each row carries its element as served, the mark on it, by type, then the oldest first, and adds circles when it came through one of their circles, as in knowledge |
recent |
With since: the change feed’s rows under this reader’s view that are about the Character or by a member who plays them, as {op, type, id, when, who, door}, never bodies. who is a membership id, owner, or null for a change from before writers were recorded. recent_cursor is where the walk ended: pass it as since next time. recent_more is true when the walk stopped before the feed’s head |
roster |
Who plays whom: the rows of GET /api/v2/members as this reader is served them |
Each element appears once, in the most specific section the policy asked for. Beside the sections come world (id, name, description), calendar (the world’s own time fields: time_basic_unit, time_format_names, time_format_equivalents, time_range_min, time_range_max, time_range_current), as_of (the horizon used, null when neither the policy nor the world sets one), now (the world’s time_range_current), mode (what was asked), reader (what the packet was read as: public, owner, co_builder, contributor, guest, seat or player; the public reader reads as itself in either mode, since 2026-10-30), policy (every key resolved) and cut.
Every row in the element sections carries four fields:
| Field | Meaning |
|---|---|
element |
The body exactly as the list route serves it to the same reader; its type names the element type |
via |
The link fields that brought it, as the served body carries them: on the element (a field naming the Character, or collectives holding one of their circles), or, in sheet, on the Character’s own element. In work, holders alone is an item that reached them only through a Title they hold, whose holders name them; by_role names the Titles. When their own element is hidden from them (character is then null), no link field of a row’s element holds their id, though via still names the field that names them: a protagonist or antagonist that via names and the body serves null is that case, never another id cut |
her_links |
How many of the packet’s other elements, the Character’s own included and before any cut, link to it, counted from the bodies this reader is served. A count, never a judgment |
grade |
whole, or known_of: a stub this reader knows of but does not see whole. Its empty fields are not facts |
Undated rows rank by the latest date among the dated elements each links to, then by her_links, then by how many links it has, then by its last edit. They are never given a guessed date.
Compact
Section titled “Compact”By default the packet keeps its fixed shape: every section is there, empty or not. From 2027-05-02 the default becomes compact (announced 2026-11-02): a caller that needs every section sends compact=false from now. compact=true (since 2026-10-23) leaves out every empty array section (role, work, events, knowledge, sheet, recent, messages, room, proposed, roster), names when it is empty and cut when nothing was cut. An absent section means nothing in it, never that it was not read: policy.components says what was read, and policy.compact which shape you got.
curl -s "https://www.onlyworlds.com/api/v2/character/{id}/context?compact=true" \
-H "API-Key: {key}"- Element bodies too (since 2026-10-26): every element body in the packet leaves out each field whose value is
null,"",[]or{}.id,typeandnamealways stay, and0andfalseare values and stay. A compact body is the list route’s body less its empty fields, so it no longer matches that route byte for byte: read a missing field as empty. - Always there:
world,calendar,as_of,now,mode,readerandpolicy, whatever they hold. - A null that is an answer stays:
characternull means the Character is hidden from this reader,stylenull that they have no style element,recent_cursornull that the read had nosince.recent_moreis a boolean and stays. - The value is
trueorfalse(in any case, in the query); anything else is422invalid_requestwithparamcompact. - The MCP tool’s default is the other way:
get_draughtserves the compact packet unless toldcompact: false; the route joins it on 2027-05-02. The TypeScript SDK (4.128.1) and the Python package (0.103.1) sendcompact=falsewhen you leave it out, so their typed fixed shape holds through the change; passcompact: truefor the short form.
The horizon
Section titled “The horizon”as_of is the moment the packet is drawn at, in the world’s time unit. It defaults to the world’s now, time_range_current. Rows dated after it are left out:
- In
voice, every row dated afteras_ofis left out, whatever its section: a Relation not yet begun, a story about them that has not happened, a Title, a Tenure, a Working style or a message dated later. - In
act, only dated Events and known Narratives after it are left out. - The date is read as served. An undated row is never left out by the horizon. A known-of stub serves no date, so the horizon reads the element’s own date and leaves the stub out when that is after
as_of, still serving it as a stub when it stays (the lens profile’s rule 8, so a lens and the packet agree). Which field dates each type is the lens profile’s date table. cutcounts only what the budget dropped, never what the horizon left out. The one exception iscut.proposed: every proposed element that reached them inside the horizon and is not in the packet, whetherproposedwas not named or the budget dropped it.
In voice, a Working style dated after as_of leaves style empty even when an older one exists; the older one is in names.
as_of is a filter on the elements’ own dates, not time travel. No history of who could see what is kept, so a reader’s view at an earlier moment is never rebuilt: something they came to know later still shows if it is dated before as_of.
Errors
Section titled “Errors”| Status | Code | When |
|---|---|---|
401 |
invalid_credentials |
A missing or wrong key, or a wrong PIN |
401 |
key_revoked |
A revoked key |
404 |
not_found |
No such Character, one this key cannot see, or, for a player seat, a guest or a guest seat, any Character but its own |
409 |
resync_required |
since is a feed cursor /changes would refuse: pull the feed again |
422 |
invalid_request |
A malformed id, an unknown parameter, a bad value or an unknown component. param names it |
429 |
rate_limited |
Ten different wrong PINs on this key or account inside fifteen minutes |
429 |
too_many_requests |
Over the request budget, as on every route (Limits) |
Fetching what it names
Section titled “Fetching what it names”Two list filters came with the draught, on every element type: ids= (up to 200 ids, one call for the elements a packet names) and created_by= (what one member created). See Filters.
As text
Section titled “As text”Both packages turn a packet into plain text to paste into a prompt or a note: draughtText(draught) in the TypeScript SDK from 4.86.0, draught_text(draught) in Python from 0.70.0. The two give the same bytes for the same packet, full or compact, and are held to it by one shared set of cases. The text reads the packet alone and looks nothing up: a link to an element the packet does not hold is counted as “not in this draught”.
An excerpt of the real text for Admiral Fluffington at Year 300 on the demo world Moppetopia. Square brackets mark the cuts, and the Names rows’ descriptions are left out here:
# Admiral Fluffington, in Moppetopia
What the record holds around Admiral Fluffington, dated up to Year 300 (the world's now: Year 453). Read as the Character's own view.
## Admiral Fluffington
Character · Military / Admiral
[the description and twelve more fields]
rivals: Captain Snoot
## Names
[two rows first: the world's lenses Admiral Fluffington's web and The spine, Constructs with supertype Lens]
- We Sail Where the Puddles Flow (Construct · Society / Tradition) · via characters · undated
- Year Zero Anniversary (Construct · Society / Ritual) · via characters · Year 250
## Sheet
- Puddleton (Location · Settlement / City) · via birthplace · known of
Capital city of moppet civilization. A water-based metropolis built around the Eternal Drip.
- USS Fuzzball (Object · Vessel / Naval) · via objects · known of
Flagship of the Puddle Navy commanded by Admiral Fluffington.
[nine more rows]
## Members
- owner
- co_builder · [the seat's name] · plays a Character not in this draught · removed from the world
Nothing in: role, work, style, events, knowledge, recent.
Not listed: rows dated after Year 300.
Left out by the budget: nothing.The title says what the record holds up to the horizon, never what the Character knew. Its last sentence names the view: the Character’s own (voice), the caller’s (act), or, from 4.112.0 and 0.93.0, the public reader when the packet’s reader is public. From 4.87.0 and 0.71.0 a Not listed line names what the horizon left out: every row dated after it in the Character’s own view (voice), or only Events, Knowledge and proposed Events or Narratives in the caller’s (act). The packet does not count those rows, so the line gives no number. The last line counts only what the budget dropped (cut). Every row says how it was reached (via), its grade or date, and the marks hidden and proposed. One difference between a full and a compact read: the compact packet drops an empty x_review_proposed ("", [], {}), which the full packet counts as proposed.
MCP and the SDKs
Section titled “MCP and the SDKs”- MCP server:
get_draughttakesidandpolicy, one JSON object with the same keys, and answers the same packet. It also takescompactas an argument of its own, true unless the caller says false, so it serves the compact packet by default; acompactinsidepolicywins when both are sent. - TypeScript SDK, from 4.47.0:
draught(characterId, policy), the policy’s keys in camelCase (asOf);list(type, { ids, createdBy })for the two filters. Since 4.67.0OwDraughtComponentnamesroomandproposed, and each row is typed as keel serves it,{via, her_links, grade, element}, the element underelement; before, the type spread the element onto the row, sorow.namecompiled and readundefined. From 4.69.0,draught(characterId, { compact: true })asks for the compact packet, typedOwDraughtCompact(cutoptional); withoutcompact, or withcompact: false, the answer is the fixedOwDraught. - Python, from 0.14.0:
draught(character_id, mode=…, as_of=…), every key as a keyword argument (componentsa list). From 0.43.0compact=Trueasks for the compact packet andcompact=Falsethe fixed one; left atNoneit sendscompact=false(since 0.103.1; before, nothing), so the fixed shape holds, and anything but a bool is aTypeErrorbefore anything is sent;list_page(type, ids=…, created_by=…)for the two filters.
AI agents: start from llms.txt, this site's index, which links the whole documentation as plain text.