---
title: "Save a document to AI Note cloud for multi-device sync and persistent storage."
method: POST
path: "/api/mcp/tools/create_dev_doc"
tags: ["dev-docs"]
---

# Save a document to AI Note cloud for multi-device sync and persistent storage.

`POST /api/mcp/tools/create_dev_doc`

## Request

- Base URL: `https://api.ainote.dev`
- URL: `https://api.ainote.dev/api/mcp/tools/create_dev_doc`
- Auth: API key in header `Authorization`

Save a document to AI Note cloud for multi-device sync and persistent storage.

PRIMARY USE CASES:
- Memory files: ~/.claude/projects/.../memory/MEMORY.md (AI context that survives device switches)
- AI config files: CLAUDE.md, .cursorrules, .windsurfrules (not in git, local-only)
- Local env notes: API keys reference, server credentials (NOT actual secret values)
- Project notes: architecture decisions, dev diaries, planning docs

MULTI-DEVICE WORKFLOW:
  Laptop → push: create_dev_doc(title, content, local_path="~/.claude/.../MEMORY.md")
  Desktop → pull: pull_dev_docs() → automatically writes files to their local paths

CATEGORIES (subcategories under dev/):
- memory: Claude/AI memory files (~/.claude/projects/.../memory/)
- claude: CLAUDE.md files and Claude-specific configs
- cursor: .cursorrules files
- env: environment notes and config references
- docs: general project documentation

Set local_path to enable pull_dev_docs auto-sync to this machine.

## Request body

- object
  - `title` string, required: Filename as title (e.g., ainote-memory.md, project-claude.md)
  - `content` string, required: Full file content (markdown, json, yaml, text)
  - `category` string: Subcategory: memory | claude | cursor | env | docs | custom. Default: docs
  - `content_type` 'markdown' | 'json' | 'yaml' | 'text': Content type. Auto-detected from title extension if omitted.
  - `local_path` string: Absolute path on this machine (e.g., ~/.claude/projects/-Users-seunghan/memory/MEMORY.md). Used by pull_dev_docs to restore file on other devices. Supports ~ expansion.
  - `memory_type` 'state' | 'event' | 'preference': Memory update semantics: 'state' = latest value replaces the past (used by memory_search latest_state mode), 'event' = immutable accumulating log, 'preference' = user preference. Omit for plain documents.

## Response `200`

Tool executed successfully

- ToolSuccessResponse: Successful tool invocation. `content` mirrors the MCP `tools/call` result shape: an array of content blocks (text and optionally a structured resource payload).
  - `content` object[]
    - `type` 'text' | 'resource'
    - `text` string

## Other responses

- `400`: Invalid arguments or business-rule violation
- `401`: Missing or invalid McpKey

---

[API](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror.md) · [All operations](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/llms.txt) · [OpenAPI document](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/revisions/f6c91d85e027?raw)
