---
title: "Ingest a batched envelope of client-recorded env_sync mutations. HLC-skew gated, partial-success on conflict."
method: POST
path: "/api/mcp/tools/env_sync_txn_push"
tags: ["misc"]
---

# Ingest a batched envelope of client-recorded env_sync mutations. HLC-skew gated, partial-success on conflict.

`POST /api/mcp/tools/env_sync_txn_push`

## Request

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

Ingest a batched envelope of client-recorded env_sync mutations. HLC-skew gated, partial-success on conflict.

## Request body

- object
  - `operations` object[], required
    - `tool` string, required
    - `args` object, required
    - `hlc` string, required
    - `client_txn_id` string
  - `device_id` string: Optional calling device id for audit attribution. The X-Ainote-Device-Id header is the canonical source; this argument is the backwards-compatible fallback for clients that predate the header. If both are sent and disagree, the request is rejected (DEVICE_MISMATCH).

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