oto_guide_v2
BETA. Same surface as oto_guide, with a STRICT write contract: op=write, op=delete and op=restore REQUIRE expected_rev — read first (op=read returns rev), so a guide or readme someone else wrote meanwhile is never overwritten unseen. Load or author oto INSTRUCTION PROSE — a how-to loaded when needed, or a readme injected into every session. Two axes: scope = platform | tenant | org | group | user (who writes it, whom it applies to) and delivery = 'on-demand' (default: a guide you load for a task) | 'init' (a readme concatenated into what you receive at handshake). op=list → the on-demand catalog you can see (platform ∪ your org ∪ your own) ; op=read (slug, optional scope) → its markdown body and rev ; op=write / delete (slug, scope, body_md, title?, description?) → author for the PLATFORM (platform admin), a TENANT (its tenant admin or a platform admin; owner_id = the tenant slug, which also reads it back), your ORG (org admin), your TEAM (team lead) or YOURSELF (scope=user, the default). With delivery='init' the slug is canonical per scope — omit it (the user's own readme is scope='user', delivery='init'; an empty body clears that layer). op=patch (slug, scope, mode, ONE target: section or region) → edit ONE region of an existing on-demand guide WITHOUT re-sending its body (how you append to a long guide or a journal): same grammar as oto_doc op=patch, same writers as op=write, and the reply is a receipt, not the body. expected_rev = the rev of op=read: refused if the guide changed since. op=write / delete take expected_rev too (the rev of op=read — readmes included; absent when there was nothing): refused 409 conflict if someone changed it since, nothing written. VERSIONS: what a write, patch or delete replaces is KEPT (30 days, or the 50 most recent per guide, whichever keeps more). op=revisions (slug, scope) → the kept versions, newest first: rev, replaced_at, replaced_by, reason, size — a deleted guide included ; op=read with rev → that version's content ; op=restore (slug, scope, rev) → writes that version back as a NEW write: same writers and same expected_rev guard as op=write, and the version it replaces is kept in turn. Reading versions takes the right to read the guide. Read the relevant guide BEFORE a non-trivial task (e.g. bulk-load). This is PROSE: a repeatable process with slots is a procedure (oto_procedure), and what oto knows about the user is their profile card (oto_profile).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "oto_guide_v2"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | list | |
| rev | No | op=read: the `rev` of a KEPT version (listed by op=revisions) → that version's content instead of the current one. op=restore (required): the version to write back. | |
| _org | No | ||
| mode | No | op=patch: replace (default) | append | prepend | delete (the target, heading included; no `body_md`). | |
| slug | No | ||
| scope | No | ||
| title | No | ||
| region | No | op=patch: `preamble` = what precedes the first heading, instead of `section`. | |
| body_md | No | ||
| section | No | op=patch: the heading text of the section to edit (level and case ignored); `body_md` = its body, without the heading. | |
| delivery | No | on-demand | |
| owner_id | No | ||
| description | No | ||
| expected_rev | No | op=patch|write|delete|restore: the `rev` from op=read (or a previous write) — refused 409 `conflict` if the guide changed since; `absent` = nothing there yet. |