# Discord

Your Toolhouse AI Worker can connect to Discord using 28 specialized tools.

## Auth Connection

This service requires an auth connection to use its tools. You can set this up in your Toolhouse dashboard under [Auth Connections](https://toolhouse.app/auth-connections?authkit_slugs=discord).

## Tools (28)

### `Discord Consume Entitlement`

Integration name: **DISCORD\_CONSUME\_ENTITLEMENT**

Marks a one-time purchase consumable entitlement as consumed for a given application. Only applicable to entitlements backed by one-time purchase consumable SKUs.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example | Description                                          |
| ---------------- | ------ | :------: | ------- | ---------------------------------------------------- |
| `application_id` | string |     ✅    | —       | The ID of the application that owns the entitlement. |
| `entitlement_id` | string |     ✅    | —       | The ID of the entitlement to mark as consumed.       |

***

### `Discord Delete Test Entitlement`

Integration name: **DISCORD\_DELETE\_TEST\_ENTITLEMENT**

Deletes a currently active test entitlement for a given application. Use this to clean up test entitlements that are no longer needed.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example | Description                                               |
| ---------------- | ------ | :------: | ------- | --------------------------------------------------------- |
| `application_id` | string |     ✅    | —       | The ID of the application that owns the test entitlement. |
| `entitlement_id` | string |     ✅    | —       | The ID of the test entitlement to delete.                 |

***

### `Discord Delete User Application Role Connection`

Integration name: **DISCORD\_DELETE\_USER\_APPLICATION\_ROLE\_CONNECTION**

Deletes the current user's application role connection for the specified application. Removes the platform metadata and linked role connection.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example                 | Description                                                  |
| ---------------- | ------ | :------: | ----------------------- | ------------------------------------------------------------ |
| `application_id` | string |     ✅    | `"1215698105417207858"` | The ID of the application to delete the role connection for. |

***

### `Discord Edit Application Command Permissions`

Integration name: **DISCORD\_EDIT\_APPLICATION\_COMMAND\_PERMISSIONS**

Edits the permissions for a specific application command in a guild. Requires OAuth2 Bearer token (bot tokens will error). The authorizing user must have MANAGE\_GUILD and MANAGE\_ROLES permissions in the target guild.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example               | Description                                                       |
| ---------------- | ------ | :------: | --------------------- | ----------------------------------------------------------------- |
| `guild_id`       | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the guild.                |
| `command_id`     | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the application command.  |
| `permissions`    | array  |     ✅    | —                     | List of permission overrides to set for the command in the guild. |
| `application_id` | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the application.          |

***

### `Discord Get Application Command Permissions`

Integration name: **DISCORD\_GET\_APPLICATION\_COMMAND\_PERMISSIONS**

Retrieves the permissions for a specific application command in a guild. Requires OAuth2 Bearer token (bot tokens will error). The authorizing user must have MANAGE\_GUILD and MANAGE\_ROLES permissions in the target guild.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example               | Description                                                      |
| ---------------- | ------ | :------: | --------------------- | ---------------------------------------------------------------- |
| `guild_id`       | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the guild.               |
| `command_id`     | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the application command. |
| `application_id` | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the application.         |

***

### `Discord Get Batch Application Command Permissions`

Integration name: **DISCORD\_GET\_BATCH\_APPLICATION\_COMMAND\_PERMISSIONS**

Retrieves permissions for all commands of an application in a guild. Returns a list of permission objects for each command. Requires OAuth2 Bearer token (Bot tokens will error).

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example | Description                |
| ---------------- | ------ | :------: | ------- | -------------------------- |
| `guild_id`       | string |     ✅    | —       | The ID of the guild.       |
| `application_id` | string |     ✅    | —       | The ID of the application. |

***

### `Discord Get Current User Application Entitlements`

Integration name: **DISCORD\_GET\_CURRENT\_USER\_APPLICATION\_ENTITLEMENTS**

Tool to retrieve entitlements for the current user for a given application. Use when you need to check what premium offerings or subscriptions the authenticated user has access to.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter         | Type    | Required | Example                 | Description                                                                                 |
| ----------------- | ------- | :------: | ----------------------- | ------------------------------------------------------------------------------------------- |
| `after`           | string  |          | —                       | Retrieve entitlements after this entitlement ID (snowflake). Used for forward pagination.   |
| `limit`           | integer |          | —                       | Maximum number of entitlements to return (1-100, default 100).                              |
| `before`          | string  |          | —                       | Retrieve entitlements before this entitlement ID (snowflake). Used for backward pagination. |
| `sku_ids`         | array   |          | —                       | Optional list of SKU IDs to filter entitlements by.                                         |
| `exclude_ended`   | boolean |          | —                       | Whether ended entitlements should be omitted. Defaults to false.                            |
| `application_id`  | string  |     ✅    | `"1215698105417207858"` | The ID of the application to retrieve entitlements for.                                     |
| `exclude_deleted` | boolean |          | —                       | Whether deleted entitlements should be omitted. Defaults to true.                           |

***

### `Discord Get Gateway`

Integration name: **DISCORD\_GET\_GATEWAY**

Tool to retrieve a valid WebSocket (wss) URL for establishing a Gateway connection to Discord. Use when you need to connect to the Discord Gateway for real-time events.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord Get Guild Template`

Integration name: **DISCORD\_GET\_GUILD\_TEMPLATE**

Tool to retrieve information about a Discord guild template using its unique template code. Use when you need to get details about a guild template for creating new servers.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example          | Description                                                             |
| --------- | ------ | :------: | ---------------- | ----------------------------------------------------------------------- |
| `code`    | string |     ✅    | `"asFz8FjydMJa"` | The unique template code identifier for the guild template to retrieve. |

***

### `Discord Get Guild Widget`

Integration name: **DISCORD\_GET\_GUILD\_WIDGET**

Tool to retrieve the guild widget in JSON format. Use when you need to get public information about a Discord guild's widget that can be displayed on external websites. The widget must be enabled in the guild's server settings.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter  | Type   | Required | Example               | Description                                        |
| ---------- | ------ | :------: | --------------------- | -------------------------------------------------- |
| `guild_id` | string |     ✅    | `"81384788765712384"` | The unique identifier of the guild (snowflake ID). |

***

### `Discord Get Guild Widget Png`

Integration name: **DISCORD\_GET\_GUILD\_WIDGET\_PNG**

Tool to retrieve a PNG image widget for a Discord guild. Use when you need a visual representation of the guild widget that can be displayed on external websites. The widget must be enabled in the guild's server settings.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter  | Type   | Required | Example               | Description                                                                                                                                                                    |
| ---------- | ------ | :------: | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `style`    | string |          | —                     | Customizes the visual appearance of the widget image. Options: 'shield' (compact badge-style), 'banner1', 'banner2', 'banner3', 'banner4' (various horizontal banner formats). |
| `guild_id` | string |     ✅    | `"81384788765712384"` | The unique identifier of the guild (snowflake ID).                                                                                                                             |

***

### `Discord Get Invite`

Integration name: **DISCORD\_GET\_INVITE**

DEPRECATED: Use DISCORD\_INVITE\_RESOLVE instead. Tool to retrieve information about a specific invite code. Use when you need to get details about a guild or channel associated with an invite. Response may be null or partial for expired, revoked, or inaccessible invites; do not infer guild membership or channel access from the response.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                  | Type    | Required | Example              | Description                                                                                                                                                                                                                                                             |
| -------------------------- | ------- | :------: | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `invite_code`              | string  |     ✅    | `"0vCdhLbwjZZTWZLD"` | A single Discord invite code (e.g., "0vCdhLbwjZZTWZLD"). Can be provided as a bare code or as a full URL like "<https://discord.gg/0vCdhLbwjZZTWZLD>". Only one invite code should be provided. If multiple codes or URLs are present, only the first one will be used. |
| `with_counts`              | boolean |          | —                    | Whether to include approximate member and presence counts in the response (approximate\_member\_count and approximate\_presence\_count fields).                                                                                                                         |
| `with_expiration`          | boolean |          | —                    | Whether to include the expiration date (expires\_at field) in the response. Note: expires\_at is typically returned regardless of this parameter.                                                                                                                       |
| `guild_scheduled_event_id` | string  |          | —                    | The ID of a guild scheduled event to include with the invite. When provided, the response will include guild\_scheduled\_event details.                                                                                                                                 |

***

### `Discord Get My Guild Member`

Integration name: **DISCORD\_GET\_MY\_GUILD\_MEMBER**

Retrieves the guild member object for the currently authenticated user within a specified guild, including roles, nickname, join date, and permissions.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter  | Type   | Required | Example               | Description                                                                                               |
| ---------- | ------ | :------: | --------------------- | --------------------------------------------------------------------------------------------------------- |
| `guild_id` | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the Discord guild (server) from which to fetch the member object. |

***

### `Discord Get My Oauth2 Authorization`

Integration name: **DISCORD\_GET\_MY\_OAUTH2\_AUTHORIZATION**

Retrieves current OAuth2 authorization details for the application, including app info, scopes, token expiration, and user data (contingent on scopes like 'identify').

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord Get My User`

Integration name: **DISCORD\_GET\_MY\_USER**

Fetches comprehensive profile information for the currently authenticated Discord user, including email if the 'email' scope is granted.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord Get Openid Connect Userinfo`

Integration name: **DISCORD\_GET\_OPENID\_CONNECT\_USERINFO**

Retrieve OpenID Connect compliant user information for the authenticated user. Returns standardized OIDC user claims (sub, email, nickname, picture, locale, etc.) following the OpenID Connect specification. Requires OAuth2 access token with 'openid' scope; additional fields require 'identify' and 'email' scopes.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord Get Public Keys`

Integration name: **DISCORD\_GET\_PUBLIC\_KEYS**

Tool to retrieve Discord OAuth2 public keys. Use when you need to verify OAuth2 tokens or access public keys for cryptographic operations.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord Get Sku Subscription`

Integration name: **DISCORD\_GET\_SKU\_SUBSCRIPTION**

Retrieves a specific subscription by ID for a given SKU. Use to check details of a single user subscription.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter         | Type   | Required | Example | Description                                    |
| ----------------- | ------ | :------: | ------- | ---------------------------------------------- |
| `sku_id`          | string |     ✅    | —       | The ID of the SKU the subscription belongs to. |
| `subscription_id` | string |     ✅    | —       | The ID of the subscription to retrieve.        |

***

### `Discord Get User`

Integration name: **DISCORD\_GET\_USER**

Retrieve information about a Discord user. With OAuth Bearer token authentication, this returns the authenticated user's information (use '@me'). With Bot token authentication, you can query any user by their ID. Use this when you need user details like username, avatar, email (if email scope is granted), locale, premium status, or other profile information.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                                                                              |
| --------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `user_id` | string |     ✅    | `"@me"` | The ID of the user to retrieve. Use '@me' to get the current authenticated user. Note: With OAuth Bearer token authentication, only '@me' is supported. With Bot token authentication, you can query any user ID (snowflake format). If you're unsure, start with '@me'. |

***

### `Discord Get User Application Role Connection`

Integration name: **DISCORD\_GET\_USER\_APPLICATION\_ROLE\_CONNECTION**

Retrieves the application role connection for the currently authenticated user for a specified application. Requires the role\_connections.write OAuth2 scope.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example                | Description                                                                             |
| ---------------- | ------ | :------: | ---------------------- | --------------------------------------------------------------------------------------- |
| `application_id` | string |     ✅    | `"123456789012345678"` | The unique identifier (snowflake ID) of the application to get the role connection for. |

***

### `Discord Invite Resolve`

Integration name: **DISCORD\_INVITE\_RESOLVE**

Tool to resolve and retrieve information about a Discord invite code. Use when you need to get details about a guild, channel, or event associated with an invite code.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                  | Type    | Required | Example         | Description                                                                                                                                                  |
| -------------------------- | ------- | :------: | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `code`                     | string  |     ✅    | `"discord-api"` | The invite code to resolve (e.g., "discord-api" for vanity URLs, "abc123xyz" for regular invite codes, or a full URL like "<https://discord.gg/abc123xyz>"). |
| `with_counts`              | boolean |          | —               | Whether to include approximate member counts (approximate\_member\_count and approximate\_presence\_count) in the response.                                  |
| `with_expiration`          | boolean |          | —               | Whether to include the expiration date (expires\_at) in the response. Note: This parameter is deprecated as expires\_at is now always returned.              |
| `guild_scheduled_event_id` | string  |          | —               | The guild scheduled event ID to include with the invite. When provided with a valid event ID, returns guild\_scheduled\_event data in the response.          |

***

### `Discord Leave Guild`

Integration name: **DISCORD\_LEAVE\_GUILD**

Leaves a Discord guild (server) on behalf of the currently authenticated user.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter  | Type   | Required | Example               | Description                                                 |
| ---------- | ------ | :------: | --------------------- | ----------------------------------------------------------- |
| `guild_id` | string |     ✅    | `"81384788765712384"` | The unique identifier (snowflake ID) of the guild to leave. |

***

### `Discord List My Connections`

Integration name: **DISCORD\_LIST\_MY\_CONNECTIONS**

Retrieves a list of the authenticated user's connected third-party accounts on Discord.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord List My Guilds`

Integration name: **DISCORD\_LIST\_MY\_GUILDS**

Lists the current user's guilds, returning partial data for each; primarily used for displaying server lists or verifying memberships.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter     | Type    | Required | Example | Description                                                    |
| ------------- | ------- | :------: | ------- | -------------------------------------------------------------- |
| `after`       | string  |          | —       | Get guilds after this guild ID.                                |
| `limit`       | integer |          | —       | Max number of guilds to return (1-200, default 200).           |
| `before`      | string  |          | —       | Get guilds before this guild ID.                               |
| `with_counts` | boolean |          | —       | Include approximate member and presence counts for each guild. |

***

### `Discord List Sku Subscriptions`

Integration name: **DISCORD\_LIST\_SKU\_SUBSCRIPTIONS**

Lists all subscriptions for a given SKU. When using a Bot token, the user\_id query parameter is required. Returns paginated subscription objects.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                      |
| --------- | ------- | :------: | ------- | ------------------------------------------------------------------------------------------------ |
| `after`   | string  |          | —       | Retrieve subscriptions after this subscription ID for forward pagination.                        |
| `limit`   | integer |          | —       | Maximum number of subscriptions to return (1-100, default 100).                                  |
| `before`  | string  |          | —       | Retrieve subscriptions before this subscription ID for backward pagination.                      |
| `sku_id`  | string  |     ✅    | —       | The ID of the SKU to list subscriptions for.                                                     |
| `user_id` | string  |          | —       | The user ID to filter subscriptions for. Required when using a Bot token; not needed for OAuth2. |

***

### `Discord List Sticker Packs`

Integration name: **DISCORD\_LIST\_STICKER\_PACKS**

Tool to retrieve all available Discord Nitro sticker packs. Use when you need to list or browse official Discord sticker packs.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called. *No parameters required.*

***

### `Discord Modify Current User`

Integration name: **DISCORD\_MODIFY\_CURRENT\_USER**

Modifies the currently authenticated Discord user's profile. Can update username (limited to 2 changes per hour) and avatar.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter       | Type    | Required | Example | Description                                                                                               |
| --------------- | ------- | :------: | ------- | --------------------------------------------------------------------------------------------------------- |
| `avatar`        | string  |          | —       | New avatar as a base64-encoded image data URI (e.g., 'data:image/png;base64,...').                        |
| `username`      | string  |          | —       | New username for the user. Limited to 2 changes per hour by Discord.                                      |
| `remove_avatar` | boolean |          | —       | Set to true to remove the user's avatar (sends null to Discord API). Cannot be used together with avatar. |

***

### `Discord Update User Application Role Connection`

Integration name: **DISCORD\_UPDATE\_USER\_APPLICATION\_ROLE\_CONNECTION**

Updates the application role connection for the currently authenticated user for a specified application. Requires the role\_connections.write OAuth2 scope.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter           | Type   | Required | Example                | Description                                                                                |
| ------------------- | ------ | :------: | ---------------------- | ------------------------------------------------------------------------------------------ |
| `metadata`          | object |          | —                      | Object mapping application role connection metadata keys to their string-ified values.     |
| `platform_name`     | string |          | —                      | The vanity name of the platform a bot has connected (max 50 characters).                   |
| `application_id`    | string |     ✅    | `"123456789012345678"` | The unique identifier (snowflake ID) of the application to update the role connection for. |
| `platform_username` | string |          | —                      | The username on the platform a bot has connected (max 100 characters).                     |

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toolhouse.ai/toolhouse/integrations/discord.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
