---
title: "Restore all synced files to this device. Fetches every dev doc that has a local_path set and writes the content to that path on disk."
method: POST
path: "/api/mcp/tools/pull_dev_docs"
tags: ["dev-docs"]
---

# Restore all synced files to this device. Fetches every dev doc that has a local_path set and writes the content to that path on disk.

`POST /api/mcp/tools/pull_dev_docs`

## Request

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

Restore all synced files to this device. Fetches every dev doc that has a local_path set and writes the content to that path on disk.

WHEN TO USE:
- First time setup on a new machine (desktop, laptop, etc.)
- After reinstalling macOS or setting up a fresh environment
- To restore Claude memory files, CLAUDE.md configs, and other local-only files

WHAT IT DOES:
1. Fetches all your dev docs that have local_path set
2. Creates any missing parent directories automatically
3. Writes the file content to each local_path on THIS machine
4. Reports success/failure for each file

TYPICAL FILES RESTORED:
- ~/.claude/projects/.../memory/MEMORY.md (AI context memory)
- ~/projects/*/CLAUDE.md (project-specific AI instructions)
- .cursorrules, .windsurfrules (editor AI configs)

Run this once after setting up ainote MCP on a new device.

## Request body

- object
  - `category` string: Subcategory filter. Omit to pull all docs with local_path.

## 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)
