ODocs.co

v1.0.1
co.odocs/odocs Checked 4 days ago Published 23 days ago

One link any agent can edit: shared docs for people and AI agents, live.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create-document Create Document

Creates a new ODocs.co document from a title and optional initial content, and returns its id and shareable URL. Anyone who has the URL can read and edit the document; there is no per-person access control. Documents are temporary: a document is deleted after 7 days in which nobody, person or agent, opens or edits it. A signed-in user can save a document in the cloud from the editor, up to their account's limit; a saved document is kept until it is made temporary again. The editor offers a Markdown download. This tool only creates new documents; it does not change an existing one.

ParameterTypeDescription
title *stringDocument title
authorstringName shown on your edits and comments (e.g. "MyAgent"), with a robot mark as an agent. Invisible and text-direction characters are removed, line breaks and control characters become spaces, and it is…
contentstringInitial document content (default: empty)

get-document Get Document

Reads an ODocs.co document by ID. The default result is a readable plaintext (.txt-style) view: a metadata frontmatter (id, title, version, persistent, commentCount, openCommentCount, note) followed by the body. format:"json" returns { id, title, content, version, persistent, commentCount, openCommentCount } as an object; frontmatter:false returns just the body. version is the value patch-document accepts as expectedVersion for conflict detection. openCommentCount is the number of unresolved comment threads; includeComments:true adds the threads to the result. persistent is true for a document…

ParameterTypeDescription
id *stringDocument ID (UUID from the doc URL)
formatstringResponse format: 'text' (default) is a readable .txt-style view; 'json' is the structured object.
frontmatterboolean(text format only) Include the metadata frontmatter block. Default true; false returns just the body.
includeCommentsbooleanInclude the comment threads in the result (the same threads list-comments returns). Default false. In json they are a comments array. In text format each thread wraps the text at its anchor (placement…

patch-document Edit Document

Applies one or more edit operations, in order, to an existing ODocs.co document; people who have it open see each edit in real time. Returns { id, version, ok }, plus a warning when the author name was changed. Two kinds of operation: text-anchored (insert-after / insert-before / replace-text / delete-text), where the server finds the given exact text and resolves it to a position, so no character offsets are needed; and position-based (insert / delete / replace) at an exact character offset. expectedVersion enables conflict detection: if the document changed since that version, the patch is r…

ParameterTypeDescription
id *stringDocument ID
operations *arrayOperations, applied in order. Text-anchored ops (insert-after / insert-before / replace-text / delete-text) name exact text that the server resolves to a position; position-based ops (insert / delete…
authorstringName shown on your edits and comments (e.g. "MyAgent"), with a robot mark as an agent. Invisible and text-direction characters are removed, line breaks and control characters become spaces, and it is…
expectedVersionintegerThe document version from your last read. If the document has changed since, the patch is refused with 409 and nothing is applied (conflict detection).

list-versions List Document Versions

Lists an ODocs.co document's saved versions (version history) as an array of { index, timestamp, contributors } (contributors: who edited in that version, each { label, kind }: the name shown and human or agent), or an empty array when no version has been saved yet. The content of a version is returned by get-version for its index.

ParameterTypeDescription
id *stringDocument ID

get-version Get Document Version

Returns the content of one saved version of an ODocs.co document, by its index in list-versions. The default result is a plaintext view (frontmatter: timestamp, title, note; then the content); format:"json" returns { timestamp, title, content }; frontmatter:false returns just the content. The note (that the text is written by anyone with the link) is the frontmatter's note field in the text view; json and frontmatter:false results carry it as a second text item.

ParameterTypeDescription
id *stringDocument ID
index *integerVersion index, as listed by list-versions
formatstringResponse format: 'text' (default) is a readable .txt-style view; 'json' is the structured object.
frontmatterboolean(text format only) Include the metadata frontmatter block. Default true; false returns just the body.

get-instructions Get ODocs Agent Guide

Returns the ODocs.co integration guide as plain text: how patch positions and text anchors are matched, conflict detection with expectedVersion, document lifetime (temporary by default), error codes and rate limits. Relevant when working with an ODocs.co document link without other documentation.

list-comments List Comments

Returns the comment threads people or agents left on an ODocs.co document. Each thread has an id, the quoted text it refers to, whether it is resolved, and its replies. The default result is a readable plaintext <comment> list after a frontmatter (id, commentCount, openCommentCount, note); format:"json" returns the structured array, which also carries contextBefore / contextAfter around the quote, approximateLineNumber, anchored (true when that line is where the comment is attached, false when it is only where the quote text first appears), anchorState ("attached" or "detached": the text was c…

ParameterTypeDescription
id *stringDocument ID
formatstringResponse format: 'text' (default) is a readable .txt-style view; 'json' is the structured object.
includeResolvedbooleanInclude resolved threads too (default true); false returns open threads only.

create-comment Create Comment

Opens a new comment thread on specific text in an ODocs.co document, without changing the document text. Suited to review: flagging a problem, asking a question, or suggesting a change for a person to decide on. The comment is anchored to `quote` (exact text from the document, matched like replace-text; occurrence selects one match when the quote appears more than once) and is shown highlighted in the editor. Returns the new thread, including its id, as JSON, with a note (that comments are written by anyone with the link) as a second text item.

ParameterTypeDescription
body *stringComment text
id *stringDocument ID
quote *stringExact text in the document to comment on, matched exactly against the current text, like replace-text.
authorstringName shown on your edits and comments (e.g. "MyAgent"), with a robot mark as an agent. Invisible and text-direction characters are removed, line breaks and control characters become spaces, and it is…
occurrenceinteger0-based index of the match (the earliest match is 0); required when the quote appears more than once. It counts every match in the whole doc text, including the phrase inside longer lines; approximate…

reply-to-comment Reply to Comment

Adds a reply to an existing comment thread on an ODocs.co document, e.g. a note that the feedback was addressed. It does not open, resolve or re-open a thread. threadId is the thread's id from list-comments (or from get-document with includeComments). Returns the updated thread as JSON, with a note (that comments are written by anyone with the link) as a second text item.

ParameterTypeDescription
body *stringReply text
id *stringDocument ID
threadId *stringComment thread ID (a thread's id in list-comments results)
authorstringName shown on your edits and comments (e.g. "MyAgent"), with a robot mark as an agent. Invisible and text-direction characters are removed, line breaks and control characters become spaces, and it is…

resolve-comment Resolve Comment

Marks a comment thread on an ODocs.co document resolved, or re-opens it with resolved:false. Resolved threads are not counted in openCommentCount. The optional note is recorded as a reply before the thread closes, so people can see what was done. threadId is the thread's id from list-comments (or from get-document with includeComments). Returns the updated thread as JSON, with a note (that comments are written by anyone with the link) as a second text item.

ParameterTypeDescription
id *stringDocument ID
threadId *stringComment thread ID (a thread's id in list-comments results)
authorstringName shown on your edits and comments (e.g. "MyAgent"), with a robot mark as an agent. Invisible and text-direction characters are removed, line breaks and control characters become spaces, and it is…
notestringOptional note recorded as a reply before the thread closes, e.g. "rewrote the intro as asked"
resolvedbooleanfalse re-opens the thread. Default true (resolve).