---
title: "List enrolled devices for the calling user. Each entry includes age pubkey, capabilities, last_sync_at."
method: POST
path: "/api/mcp/tools/env_sync.device_list"
tags: ["misc"]
---

# List enrolled devices for the calling user. Each entry includes age pubkey, capabilities, last_sync_at.

`POST /api/mcp/tools/env_sync.device_list`

## Request

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

List enrolled devices for the calling user. Each entry includes age pubkey, capabilities, last_sync_at.

## Request body

- object
  - `include_stale` boolean
  - `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)
