Docs Tools
Persistent document storage for agents. Create, update, retrieve, and list documents that survive across sessions — design docs, memos, research notes, checklists, and structured data.
docs.create
Create a new persistent document.
What it does: Creates a document that persists across sessions and can be iteratively modified via docs.update. Supports markdown, plain text, checklist, and JSON formats. Use tags to link related documents together.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
title |
string | yes | Document title |
body |
string | no | Document content (markdown by default) |
format |
string | no | Content format: markdown (default), text, checklist, json |
tags |
array | no | Tags for linking and filtering (e.g. project:api-redesign, type:design-doc) |
metadata |
object | no | Optional structured metadata |
Example:
{
"title": "API Redesign Notes",
"body": "## Goals\n\n- Simplify auth flow\n- Add rate limiting\n- Deprecate v1 endpoints",
"tags": ["project:api-redesign", "type:design-doc"]
}
Returns: ref (document reference for future operations), title, status.
Credits: 1
docs.update
Modify an existing document.
What it does: Updates a document’s content, title, tags, or metadata. Supports full body replacement or append mode for incremental additions. Each update increments the version counter.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ref |
string | yes | Document reference (doc_...) |
body |
string | no | New content (replaces existing unless append is true) |
append |
boolean | no | If true, appends body to existing content instead of replacing |
title |
string | no | New title |
tags |
array | no | Replace the document’s tags |
metadata |
object | no | Replace the document’s metadata |
Example:
{
"ref": "doc_abc123",
"body": "\n## Update: Rate limiting implemented\n\nUsing token bucket algorithm.",
"append": true
}
Returns: ref, title, version, status.
Credits: 1
docs.get
Retrieve a document by its reference.
What it does: Returns the full document content including body, title, tags, format, version, and timestamps.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ref |
string | yes | Document reference (doc_...) |
Returns: Full document object with ref, title, body, format, tags, version, metadata, created_at, updated_at.
Credits: 1
docs.list
List documents with optional filters.
What it does: Returns document summaries (ref, title, format, tags, version, timestamps) without the full body. Use docs.get to retrieve the full content of a specific document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
tags |
array | no | Filter to documents containing ALL of these tags |
search |
string | no | Filter by title substring (case-insensitive) |
format |
string | no | Filter by document format |
limit |
integer | no | Max documents to return (default 20) |
offset |
integer | no | Pagination offset |
trashed |
boolean | no | List the trash instead: deleted documents not yet purged, with who deleted each, when and why |
Example:
{
"tags": ["project:api-redesign"],
"limit": 10
}
Returns: docs (array of document summaries), total (total matching count), has_more (pagination indicator).
Credits: 1
docs.delete
Move a document to the trash.
What it does: The document leaves docs.list and docs.get but is kept for 30 days, stamped with who deleted it and the reason given. Anyone who reaches for it in that time is told it is in the trash and how to restore it. After 30 days it is purged.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ref |
string | yes | Document reference (doc_...) |
reason |
string | no | Why it is being deleted; shown to whoever looks for it later |
Credits: 1
docs.restore
Bring a document back from the trash, exactly as it was.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ref |
string | yes | Document reference (doc_...) |
Credits: 1
Use cases
- Design documents: Agents create and iteratively refine design docs across multiple sessions
- Research notes: Accumulate findings from multi-step investigations with append mode
- Checklists: Track progress on multi-step tasks with the checklist format
- Session memory: Persist decisions, context, and rationale that outlive a single conversation
- Project wikis: Organize knowledge with namespaced tags for easy retrieval