# Ably

Ably is a real-time messaging platform helping developers build live features, including chat and data synchronization, with global scalability and robust reliability for modern applications

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 25
- **Triggers:** 0
- **Slug:** `ABLY`
- **Version:** 20260312_00

## Tools

### Query Batch Presence

**Slug:** `ABLY_BATCH_PRESENCE`

This tool enables querying the presence states of multiple channels in a single API request. The API retrieves the member presence details of the specified channels in parallel.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `channels` | string | Yes | Comma-separated list of channel names to query presence for |
| `separator` | string | No | Character used to separate channel names (default is comma) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Query Batch Presence History

**Slug:** `ABLY_BATCH_PRESENCE_HISTORY`

This tool enables querying presence history for multiple channels in a single API request. It uses the GET endpoint at https://rest.ably.io/presence to retrieve the member presence history details of the specified channels in parallel.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | integer | No | End time in milliseconds since epoch |
| `limit` | integer | No | Maximum number of messages to return per channel (default 100, max 1000) |
| `start` | integer | No | Start time in milliseconds since epoch |
| `channels` | array | Yes | List of channel names to query presence history for |
| `direction` | string | No | Direction of results (backwards or forwards) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Channel Subscription

**Slug:** `ABLY_DELETE_CHANNEL_SUBSCRIPTION`

This tool allows you to unsubscribe devices or clients from push notifications for specific channels. The operation is asynchronous, so immediate requests after deletion may briefly still return the subscription.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `channel` | string | No | Optional channel name to filter subscriptions. If not provided, subscriptions across all channels for the specified device_id or client_id will be deleted. |
| `client_id` | string | No | Client ID to filter subscriptions. At least one of device_id or client_id must be provided. Cannot be used together with device_id. |
| `device_id` | string | No | Device ID to filter subscriptions. At least one of device_id or client_id must be provided. Cannot be used together with client_id. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Channel Details

**Slug:** `ABLY_GET_CHANNEL_DETAILS`

This tool retrieves metadata and details for a specific channel in Ably. It returns a ChannelDetails object containing information about the channel's status, occupancy, and other metadata. The endpoint provides visibility into channel activity, including metrics such as connections, presence, publishers, and subscribers, and requires appropriate permissions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `channel_id` | string | Yes | The ID of the channel to retrieve details for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Channel History

**Slug:** `ABLY_GET_CHANNEL_HISTORY`

This tool retrieves the message history for a specified Ably channel. It uses the GET /channels/{channelId}/messages endpoint to return a paginated list of messages in chronological order, subject to parameters such as 'channelId', 'limit', 'direction', 'start', and 'end'. The tool is useful for auditing, recovering missed messages, analyzing channel activity, and debugging message flows. Authentication is required via basic or token authentication.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | integer | No | The end of the query interval as a time in milliseconds since the epoch |
| `limit` | integer | No | The maximum number of records to return. A limit greater than 1,000 is invalid |
| `start` | integer | No | The start of the query interval as a time in milliseconds since the epoch |
| `direction` | string | No | The direction of this query. The direction determines the order of the returned result array |
| `channel_id` | string | Yes | The ID of the channel to retrieve history for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Channel Presence

**Slug:** `ABLY_GET_CHANNEL_PRESENCE`

Tool to obtain the set of members currently present for a channel. Use when you need to check which clients are currently connected and active on a specific Ably channel.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of presence members to return. Default is 100. |
| `format` | string ("json" | "jsonp" | "msgpack" | "html") | No | Response format enum. |
| `clientId` | string | No | Filter presence members by client ID |
| `channel_id` | string | Yes | The Channel's ID for which to retrieve presence information |
| `connectionId` | string | No | Filter presence members by connection ID |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Message Versions

**Slug:** `ABLY_GET_MESSAGE_VERSIONS`

Tool to retrieve all historical versions of a specific message from an Ably channel. Use when you need to track message history, including the original message and all subsequent updates or delete operations. Each version includes metadata such as timestamp, action type, and client ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `serial` | string | Yes | The message serial identifier (format: timestamp-counter@connectionId:counter) |
| `channel_id` | string | Yes | The ID of the channel containing the message |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Channel Presence History

**Slug:** `ABLY_GET_PRESENCE_HISTORY`

This tool retrieves the history of presence messages for a specified channel in Ably. It allows you to query presence events on a channel within a given time period.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | integer | No | The end of the query interval as a time in milliseconds since the epoch. Defaults to current time. |
| `limit` | integer | No | The maximum number of records to return. Maximum value is 1000. |
| `start` | integer | No | The start of the query interval as a time in milliseconds since the epoch |
| `direction` | string | No | The direction of results. Can be either 'backwards' or 'forwards'. |
| `channel_id` | string | Yes | The channel name to get presence history for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Push Device Registration

**Slug:** `ABLY_GET_PUSH_DEVICE`

Tool to get the full details of a device registration for push notifications. Use when you need to retrieve information about a specific device registered for push notifications, including its platform, state, recipient details, and metadata. Requires the device ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("json" | "jsonp" | "msgpack" | "html") | No | Response format options for the API |
| `device_id` | string | Yes | Device's ID. Unique identifier for the device registration. |
| `X_Ably_Version` | string | No | The version of the API you wish to use. If not specified, the default version will be used. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Ably Service Time

**Slug:** `ABLY_GET_SERVICE_TIME`

This tool retrieves the current server time from Ably's service in milliseconds since the epoch. It is particularly useful for time synchronization and generating valid TokenRequest timestamps to prevent replay attacks. The endpoint supports multiple content types, handles HTTP errors, network issues, and is a fundamental tool for ensuring accurate timing in Ably applications.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Application Stats

**Slug:** `ABLY_GET_STATS`

This tool retrieves your application's usage statistics from Ably. The stats endpoint returns a paginated list of your application's usage statistics by minute, hour, day, or month. It supports optional parameters such as start, end, direction, limit, and unit to filter and format the returned data. The stats include metrics for: - Message counts and data transferred - Connection counts - Channel usage - API request counts - Push notification metrics - Token request counts

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | integer | No | Latest time in milliseconds since epoch for stats retrieval. Times are rounded down based on the unit parameter. If omitted, defaults to current time |
| `unit` | string | No | Time interval granularity for stats aggregation. Must be 'minute', 'hour', 'day', or 'month'. Defaults to 'minute' |
| `limit` | integer | No | Maximum number of stats records to return (1-1000). Defaults to 100. Use with pagination for larger datasets |
| `start` | integer | No | Earliest time in milliseconds since epoch for stats retrieval. Times are rounded down based on the unit parameter. If omitted, stats are retrieved from the beginning of available data |
| `direction` | string | No | Query direction determining result order. 'backwards' returns newest first (default), 'forwards' returns oldest first |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Channels

**Slug:** `ABLY_LIST_CHANNELS`

Tool to enumerate all active channels in the Ably application. Use when you need to discover available channels or monitor channel activity. Returns paginated results and is heavily rate-limited. Can return either channel names only or full channel details with occupancy data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `by` | string ("id" | "value") | No | Channel enumeration options. |
| `limit` | integer | No | Maximum number of channels to return. Default is 100, maximum is 1000. |
| `format` | string ("json" | "jsonp" | "msgpack" | "html") | No | Response format options for the API. |
| `prefix` | string | No | Filter to return only channels whose name starts with the given prefix |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Push Channels

**Slug:** `ABLY_LIST_PUSH_CHANNELS`

Tool to list all channels with at least one subscribed device. Use when you need to discover which channels have active push notification subscriptions in your Ably application.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("json" | "jsonp" | "msgpack" | "html") | No | Response format enum for Ably API. |
| `x_ably_version` | string | No | The version of the Ably API you wish to use. When not specified, the default API version is used. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Push Channel Subscriptions

**Slug:** `ABLY_LIST_PUSH_CHANNEL_SUBSCRIPTIONS`

This tool retrieves a list of all push notification channel subscriptions. It allows you to view all active push notification subscriptions for channels in your Ably application. Allows filtering by channel, deviceId, and clientId, supports pagination with limit parameter, and returns detailed push notification subscription information including channel, deviceId, and clientId.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The maximum number of records to return. Maximum value is 1000. |
| `channel` | string | No | Filter to restrict to subscriptions associated with that channel. At least one of channel, client_id, or device_id must be specified. |
| `client_id` | string | No | Filter to restrict to subscriptions associated with that clientId. Cannot be used with device_id unless concat_filters is True. At least one of channel, client_id, or device_id must be specified. |
| `device_id` | string | No | Filter to restrict to subscriptions for that deviceId. Cannot be used with client_id unless concat_filters is True. At least one of channel, client_id, or device_id must be specified. |
| `concat_filters` | boolean | No | When set to true, allows combining client_id and device_id filters to find all subscriptions matching either filter |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Registered Push Devices

**Slug:** `ABLY_LIST_REGISTERED_PUSH_DEVICES`

Tool to list all devices registered for receiving push notifications in your Ably application. Use when you need to view, filter, or audit push notification device registrations. Supports filtering by deviceId and clientId, with pagination via limit parameter.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The maximum number of records to return. Default is 100, maximum is 1000 |
| `format` | string ("json" | "jsonp" | "msgpack" | "html") | No | Response format options. |
| `clientId` | string | No | Optional filter to restrict to devices associated with that clientId |
| `deviceId` | string | No | Optional filter to restrict to devices associated with that deviceId |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Patch Push Device Registration

**Slug:** `ABLY_PATCH_PUSH_DEVICE_REGISTRATION`

Tool to partially update specific attributes of an existing device registration in Ably's push notification system. Use when you need to modify device properties like formFactor, clientId, platform, or push recipient details without replacing the entire registration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | Unique identifier for the device generated by the device itself |
| `format` | string | No | The response format you would like (json, jsonp, msgpack, html) |
| `clientId` | string | No | Optional trusted client identifier for the device |
| `metadata` | object | No | Optional metadata object for this device. The metadata for a device may only be set by clients with push-admin privileges and will be used more extensively in the future with smart notifications |
| `platform` | string ("ios" | "android" | "browser") | No | Enum for platform types. |
| `device_id` | string | Yes | Device's ID - the unique identifier for the device to update |
| `formFactor` | string ("phone" | "tablet" | "desktop" | "tv" | "watch" | "car" | "embedded") | No | Enum for form factor types. |
| `push_state` | string ("Active" | "Failing" | "Failed") | No | Enum for push state. |
| `deviceSecret` | string | No | Secret value for the device |
| `X_Ably_Version` | string | No | The version of the API you wish to use |
| `push_recipient` | object | No | Model for push recipient details. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Publish Messages

**Slug:** `ABLY_PUBLISH_BATCH_MESSAGES`

Tool to batch publish messages to multiple channels in parallel. Use when you need to send the same set of messages to multiple channels simultaneously for efficient broadcasting.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `channels` | array | Yes | Array of channel names to publish messages to. Maximum 100 channels. |
| `messages` | array | Yes | Array of messages to publish. Maximum 1000 messages. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Publish Message to Channel

**Slug:** `ABLY_PUBLISH_MESSAGE_TO_CHANNEL`

This tool will allow users to publish a message to a specified Ably channel using a POST request. It covers the essentials like channel name, message data, optional event name/type, and additional metadata for push notifications. It is an independent and fundamental operation within Ably's real-time messaging platform.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `client_id` | string | No | Optional client identifier to associate with the message. |
| `channel_id` | string | Yes | The name of the channel to publish the message to. |
| `event_name` | string | No | Optional event name/type for the message. |
| `message_id` | string | No | Optional unique message ID for idempotent publishing. |
| `message_data` | string | Yes | The message payload. Can be a string or a JSON object. |
| `push_notification` | object | No | Optional push notification configuration. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Publish Push Notification

**Slug:** `ABLY_PUBLISH_PUSH_NOTIFICATION`

Tool to publish a push notification directly to device(s) via Ably's Push Notifications API. Use when you need to send push notifications to specific devices identified by device ID, client ID, or platform-specific tokens. The API returns HTTP 204 on success with no response body.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `push` | object | No | Push notification payload details. |
| `recipient` | object | Yes | Push recipient details for a device. Must specify at least one identifier (client_id, device_id, device_token, or registration_token). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Publish Push Notifications

**Slug:** `ABLY_PUBLISH_PUSH_NOTIFICATIONS_BATCH`

Tool to batch publish push notifications directly to specific recipients. Use when you need to send multiple push notifications efficiently in a single request. Supports up to 10,000 notifications per batch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `items` | array | Yes | Array of push notification items to publish. Maximum 10,000 notifications per request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Register Push Device

**Slug:** `ABLY_REGISTER_PUSH_DEVICE`

Tool to register a device for receiving push notifications in Ably. Use when you need to enable push notifications for a specific device across various platforms including iOS (APNs), Android (FCM/GCM), and web browsers (Web Push). The device must be registered before it can receive push notifications through Ably's push notification system.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier for the device generated by the device itself. This is a client-generated ID that uniquely identifies the device. |
| `metadata` | object | No | Optional metadata object for this device. The metadata may only be set by clients with push-admin privileges and will be used for smart notifications. |
| `platform` | string ("ios" | "android" | "browser") | Yes | Platform of the push device. Must be one of: ios, android, or browser. |
| `client_id` | string | No | Optional trusted client identifier for the device. Used to associate the device with a specific client in your Ably app. |
| `push_state` | string ("Active" | "Failing" | "Failed") | No | State types for push devices. |
| `form_factor` | string ("phone" | "tablet" | "desktop" | "tv" | "watch" | "car" | "embedded") | Yes | Form factor of the push device. Must be one of: phone, tablet, desktop, tv, watch, car, or embedded. |
| `device_secret` | string | No | Secret value for the device. Used for device authentication. |
| `push_recipient` | object | Yes | Push recipient details for the device. Contains transport type and platform-specific configuration like device tokens or web push endpoints. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Request Access Token

**Slug:** `ABLY_REQUEST_ACCESS_TOKEN`

Request an access token for Ably authentication. Use this when you need to generate a token with specific capabilities and client identifiers for secure authentication. The token can be used to authenticate clients with limited permissions and time-bound access.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ttl` | integer | No | Time-to-live for the token in milliseconds. Defaults to 60 minutes (3600000ms) if not specified. |
| `nonce` | string | No | Random nonce string for token request uniqueness. Prevents replay attacks. If not provided, Ably generates one. |
| `key_name` | string | Yes | The key name comprises of the app ID and key ID of an API key. Format: appId.keyId (e.g., 'rLhKFg.1Hf06Q') |
| `client_id` | string | No | Optional client identifier to associate with this token. When set, the token can only be used by the specified client ID. |
| `timestamp` | integer | No | Token request timestamp in milliseconds since epoch. If not provided, Ably will use the current server time. Used for token request validation. |
| `capability` | string | No | JSON-stringified capability text specifying permissions. Use '{"*":["*"]}' for full access, or specify specific channels and operations. Must be a valid JSON string. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unregister All Push Devices

**Slug:** `ABLY_UNREGISTER_ALL_PUSH_DEVICES`

Tool to unregister matching devices for push notifications. Use when you need to remove device registrations from Ably's push notification system. You can filter by deviceId or clientId, but not both simultaneously.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `client_id` | string | No | Optional filter to restrict to devices associated with that clientId. Cannot be used with device_id. |
| `device_id` | string | No | Optional filter to restrict to devices associated with that deviceId. Cannot be used with client_id. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unregister Push Device

**Slug:** `ABLY_UNREGISTER_PUSH_DEVICE`

Tool to unregister a single device from push notifications in Ably. Use when you need to remove a device's push notification registration. This permanently removes the device from receiving push notifications until it is registered again.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("json" | "jsonp" | "msgpack" | "html") | No | Enum for response format options |
| `device_id` | string | Yes | The unique identifier of the device to unregister from push notifications. This is the device ID that was used when the device was originally registered. |
| `X-Ably-Version` | string | No | The version of the Ably API you wish to use. Example: '1.2' |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Push Device Registration

**Slug:** `ABLY_UPDATE_PUSH_DEVICE`

Tool to update (upsert) a device registration for push notifications in Ably. Use when registering a new device or updating an existing device's push notification configuration. This is an upsert operation - if the device doesn't exist, it will be created; if it exists, it will be updated.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier for the device generated by the device itself. This should match device_id. |
| `metadata` | object | No | Optional metadata object for this device. May only be set by clients with push-admin privileges. |
| `platform` | string ("ios" | "android" | "browser") | Yes | Platform of the push device (ios, android, or browser). |
| `client_id` | string | No | Optional trusted client identifier for the device. |
| `device_id` | string | Yes | Device's ID. This is the unique identifier for the device being registered/updated. |
| `push_state` | string ("Active" | "Failing" | "Failed") | No | Push device state types. |
| `form_factor` | string ("phone" | "tablet" | "desktop" | "tv" | "watch" | "car" | "embedded") | Yes | Form factor of the push device (phone, tablet, desktop, tv, watch, car, or embedded). |
| `device_secret` | string | No | Secret value for the device. |
| `push_recipient` | object | Yes | Push recipient details for the device, including transport type and device/registration tokens. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
