chat_doc_read
ChatGPTReads the document a chat task is bound to: without section and entities the heading outline; with section that section ({doc, section, md, more?}; pass more back as cursor); with entities those records' fields and links (use them for exact old values).
chat_task_get
ChatGPTTakes one chat request and returns the person's message, the selected record and time zone, the recent conversation, the deadline and a brief of the one document the request is bound to (rev and hash there are the CAS pair for remove or whole-body changes). A finished task returns its result instead.
chat_task_list
ChatGPTOpen requests the person sent from Thegram document chats to this connected account, oldest first: [task_id, document title, message, status, deadline].
chat_task_submit
ChatGPTFinishes a chat task once: reply is shown to the person in their language; operations, when the request asks for changes, are gram_patch operations applied in one revision to the bound document only (no path or request_id). set and unset need old exactly as read; remove and whole-body text, drop-text or rich need base_revision and expected_hash from chat_task_get. A rejected change leaves the task open: fix it and submit again before the deadline.
gram_brief
ChatGPTStart here. One call orients you in a project folder (folder) or one memory document (path): docs [path, title, rev, hash, last recorded, last effective, template?] (rev and hash are the CAS pair for gram_patch), counts by type, open records [path#id, type, title, status, priority] (work types only, blockers and risks first; proposed and finished ones left out), recent revisions [path, rev, recorded, effective, by, "+added ~changed -removed"], and next: keep it and pass it to gram_changes since on your next visit.
gram_capabilities
ChatGPTTools, whether semantic search actually works now, and the folder's index state.
gram_changes
ChatGPTWhat changed after since (ISO time, exclusive) in a folder or document, or after since_revision in one document: each revision with add [id, type, title], set [id, title, changed keys], del [id, title]; the document owner is doc. next is the time to pass as since later; more continues the page.
gram_context
ChatGPTRead many entities in one call: fields (default t d x p owner tag due at value unit source ref), links and bounded rich text for each {path, entity}; a decision adds implemented, the date of its earliest implementing event. Prefer this to repeated gram_get.
gram_create
ChatGPTCreate a .gram document; a new folder in the path becomes a new project folder. content is md text or {text|rich, records, fields, blocks}. template (schedule@1, project@1, knowledge@1) declares one; without content its sections start the body. effective_at records when facts happened.
gram_delete
ChatGPTMove one document or folder (with its contents) to the mount's trash. Nothing is erased: gram_list {path: <mount key>, trash: true} lists the trash and gram_restore brings an item back. A document must be unchanged since this call's sync. Only when the person asks to delete.
gram_folder
ChatGPTCreate a folder (and any missing parent folders) in a vault or Google Drive mount, e.g. @mounts/<id>/Clients/Acme. A real folder appears in the vault and in Google Drive. An existing folder is returned with created false.
gram_get
ChatGPTOne entity's selected fields/blocks/links, optionally at a past revision. outline:true lists the body's top-level blocks as [node id, type, shown as, label]. For several entities use gram_context.
gram_list
ChatGPTNo path: every document as [path, title, rev, template?] plus folders (every folder, empty ones too); path of a folder: the documents and folders in it. trash: true lists the trash of the mount or folder in path (all mounts without path) as [original path, kind, id, trashed at, explicit]; explicit false means it went with its folder. With select {type?, status?, tag?, from?, to?, date?}: matching records as [path#id, type, title, status|null, date?], filtered by inclusive date span, sorted by the selected date; date-only to includes that day and YYYY-MM / YYYY are shorthand. Date defaults by record type: event at, metric observed, task due, otherwise at; date names another field. Path of a .gram: its entity ids in source order, optionally at a past revision.
gram_move
ChatGPTRename and/or move one document or folder (with its contents) inside the same mount: path is the current @mounts path, to the new one. Missing destination folders are created. A document keeps its history and records. Only when the person asks.
gram_patch
ChatGPTChange one document in one revision using only the listed operations: set or unset a field (old is the value you read, null if it was empty; values sets a repeated field in order), link or unlink two records, add a record (place puts it in the body: end, none, {after:id} or {section:heading or node id}), remove a record, or change the body with edit-text, text, drop-text or rich. Omit base_revision and expected_hash to write on the latest revision; remove and whole-body text, drop-text or rich need both. Reuse request_id only to retry the same change. effective_at records when the facts happened.
gram_profile
ChatGPTWrite and read contract: the .gram vocabulary, the md body and its gram-rich/1 nodes, and how Thegram shows them. Read it before the first write; topic templates for document templates.
gram_projects
ChatGPTThe Thegram folder shared with agents plus mounted collections: local project folders and mounts as {key, id, kind, name, count, access}. Use the exact mount key from this list as a path prefix, e.g. @mounts/<mount-id>/proj/notes.gram. The @mounts namespace is reserved so mount paths never shadow local projects. Mount access never exceeds existing agent approval.
gram_range
ChatGPTHistory events of one document; with query, only changes relevant to it.
gram_read
ChatGPTRead one document a section at a time. Without section: the heading outline [level, heading, node id, chars]. With section: {doc, section, level, md, more?}; historical reads also include at. Agent record lines include id and raw type/x/p; at, due, the first value and optional unit/observed; non-empty d on the next line; and replaces links. at/observed dates beginning YYYY-MM-DD are shortened to 10 characters; a decision without at shows its earliest implementing event's date. Other fields (owner/tag/source/ref), other links, and extra values require gram_context. Collections use raw-type headings and id-bearing bullets; images use Markdown image refs. No separate records index is returned. A long section continues with cursor = more.
gram_recall
ChatGPTSearch by relevance. Inclusive from/to filter record dates; date-only to includes the day, and YYYY-MM/YYYY mean a span; date selects a field. Defaults are event at, metric observed, task due, otherwise at. A date/month/year query in keyword, exact or auto matches record dates. scope means exact s-tag membership only (not section or type); type filters record type; status keeps an x value or a declared template's class (open, done, closed), all statuses when omitted. Hits are the latest revision with x and the document's rev. Filters refill top_k from further candidates. When available, the final hit value is cosine similarity; compare only for the same query and model, not against a universal floor. Prefer hybrid or keyword when semantic hits are loose.
gram_relations
ChatGPTExplicit links and REL edges from one entity; defaults to its project documents.
gram_restore
ChatGPTRestore a trashed document or folder (a folder brings back everything trashed with it). path is the item's original @mounts path, or the mount key with id from gram_list {trash: true}. Restores into the root when its old folder is gone; a name clash gets a (1) suffix.
gram_state
ChatGPTOne document as it was at a revision, at a write time (recorded_at), or at the time its facts happened (effective_at).