---
title: "Wrapper around vault file sync. action=list|pull|push to work against the primary vault. list/pull are paginated — narrow with `path`/`since` and follow `next_cursor` instead of pulling the whole vault. To fetch specific files, pull with `paths` (up to 100 exact paths, one call). For push: WAF-bypass via `content_b64` or `content: '__B64__:...'` prefix (mirrors sync_push)."
method: POST
path: "/api/mcp/tools/vault_sync"
tags: ["vaults"]
---

# Wrapper around vault file sync. action=list|pull|push to work against the primary vault. list/pull are paginated — narrow with \`path\`/\`since\` and follow \`next_cursor\` instead of pulling the whole vault. To fetch specific files, pull with \`paths\` (up to 100 exact paths, one call). For push: WAF-bypass via \`content_b64\` or \`content: '__B64__:...'\` prefix (mirrors sync_push).

`POST /api/mcp/tools/vault_sync`

## Request

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

Wrapper around vault file sync. action=list|pull|push to work against the primary vault. list/pull are paginated — narrow with `path`/`since` and follow `next_cursor` instead of pulling the whole vault. To fetch specific files, pull with `paths` (up to 100 exact paths, one call). For push: WAF-bypass via `content_b64` or `content: '__B64__:...'` prefix (mirrors sync_push).

## Request body

- object
  - `action` 'list' | 'pull' | 'push': Sync action. Default list.
  - `path` string: push: target file path. list/pull: a directory (everything under it, e.g. 'global') or an exact file path (e.g. 'global/MEMORY.md'); a trailing slash is ignored.
  - `paths` string[]: pull only: up to 100 exact file paths fetched in ONE call. The response lists absent paths in `missing`. Cannot be combined with path/since/cursor.
  - `content` string: Required for push (or `content_b64`). Prefix with '__B64__:' for WAF bypass.
  - `content_b64` string: Optional: base64-encoded content (use INSTEAD of `content`) for WAF-bypass on large bodies. Server decodes before storing.
  - `since` string: ISO 8601 timestamp for incremental list/pull (files updated strictly after it). Deletions are not reported — compare a full list against your local copy to find them.
  - `limit` integer: Max entries per page. list: default 200, max 1000. pull: default 25, max 100.
  - `cursor` string: Pass `next_cursor` from the previous response to fetch the next page.

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