{
  "access": "public",
  "type": "reference",
  "format": "markdown",
  "title": "Docs Tools Reference",
  "chunked": true,
  "url": "https://library.datagrout.ai/docs-tools",
  "summary": "Persistent document storage for agents. Create, update, retrieve, and list documents that survive across sessions — design docs, memos, research notes, checklists, and structured data.",
  "content_markdown": "# Docs Tools\n\nPersistent document storage for agents. Create, update, retrieve, and list documents that survive across sessions — design docs, memos, research notes, checklists, and structured data.\n\n## docs.create\n\nCreate a new persistent document.\n\n**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.\n\n**Parameters:**\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `title` | string | yes | Document title |\n| `body` | string | no | Document content (markdown by default) |\n| `format` | string | no | Content format: `markdown` (default), `text`, `checklist`, `json` |\n| `tags` | array | no | Tags for linking and filtering (e.g. `project:api-redesign`, `type:design-doc`) |\n| `metadata` | object | no | Optional structured metadata |\n\n**Example:**\n\n```json\n{\n  \"title\": \"API Redesign Notes\",\n  \"body\": \"## Goals\\n\\n- Simplify auth flow\\n- Add rate limiting\\n- Deprecate v1 endpoints\",\n  \"tags\": [\"project:api-redesign\", \"type:design-doc\"]\n}\n```\n\n**Returns:** `ref` (document reference for future operations), `title`, `status`.\n\n**Credits:** 1\n\n---\n\n## docs.update\n\nModify an existing document.\n\n**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.\n\n**Parameters:**\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `ref` | string | yes | Document reference (`doc_...`) |\n| `body` | string | no | New content (replaces existing unless `append` is true) |\n| `append` | boolean | no | If true, appends `body` to existing content instead of replacing |\n| `title` | string | no | New title |\n| `tags` | array | no | Replace the document's tags |\n| `metadata` | object | no | Replace the document's metadata |\n\n**Example:**\n\n```json\n{\n  \"ref\": \"doc_abc123\",\n  \"body\": \"\\n## Update: Rate limiting implemented\\n\\nUsing token bucket algorithm.\",\n  \"append\": true\n}\n```\n\n**Returns:** `ref`, `title`, `version`, `status`.\n\n**Credits:** 1\n\n---\n\n## docs.get\n\nRetrieve a document by its reference.\n\n**What it does:** Returns the full document content including body, title, tags, format, version, and timestamps.\n\n**Parameters:**\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `ref` | string | yes | Document reference (`doc_...`) |\n\n**Returns:** Full document object with `ref`, `title`, `body`, `format`, `tags`, `version`, `metadata`, `created_at`, `updated_at`.\n\n**Credits:** 1\n\n---\n\n## docs.list\n\nList documents with optional filters.\n\n**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.\n\n**Parameters:**\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `tags` | array | no | Filter to documents containing ALL of these tags |\n| `search` | string | no | Filter by title substring (case-insensitive) |\n| `format` | string | no | Filter by document format |\n| `limit` | integer | no | Max documents to return (default 20) |\n| `offset` | integer | no | Pagination offset |\n\n**Example:**\n\n```json\n{\n  \"tags\": [\"project:api-redesign\"],\n  \"limit\": 10\n}\n```\n\n**Returns:** `docs` (array of document summaries), `total` (total matching count), `has_more` (pagination indicator).\n\n**Credits:** 1\n\n---\n\n## Use cases\n\n- **Design documents**: Agents create and iteratively refine design docs across multiple sessions\n- **Research notes**: Accumulate findings from multi-step investigations with append mode\n- **Checklists**: Track progress on multi-step tasks with the checklist format\n- **Session memory**: Persist decisions, context, and rationale that outlive a single conversation\n- **Project wikis**: Organize knowledge with namespaced tags for easy retrieval\n"
}