Productivity & Projects · Customer Support

Plain MCP

Read and manage Plain support threads, customers, tenants, broadcasts, help-center content, Sidekick sessions, and workspace settings through Plain's hosted MCP server.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Addgeneratedreply

    Add an AI-generated reply suggestion to a thread. Required fields: - threadId: The ID of the thread to add the generated reply to. - timelineEntryId: The ID of the timeline entry to associate the reply with. - markdown: The markdown content of the generated reply.

  • Createbroadcast

    Create a new broadcast: a message authored once and posted to many Slack channels at once. Creating one never sends it — a new broadcast is a DRAFT, and scheduling the real send is done by a human in the Plain app. Required input fields: `name`, `content`, `contentFormat`, `type`. - `name` identifies the broadcast internally and is never shown to recipients. It is what `searchBroadcasts` matches on. - `notificationTitle` is what recipients see in the notification the broadcast arrives as. It does leave Plain. Optional here, but the broadcast cannot be sent or tested until it is set. - `type` must be `SLACK`. It is fixed at creation: content is written against a channel's rendering rules, so a broadcast cannot be moved to another channel later. - `contentFormat` and `content` go together. From MCP, send `SLACK_BLOCK_KIT` and a JSON array of Slack blocks, as `chat.postMessage` would take. A one-paragraph body looks like this, passed as a string: "[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Hello\"}}]" Buttons need a `url` — interactive elements do nothing in a broadcast. Images must be publicly reachable. This format cannot be edited in the Plain app. `TIPTAP` is still accepted (a serialised Tiptap document) and is what the app composer writes; do not use it unless you are copying content already stored that way. - `isLinkUnfurlingEnabled` controls whether Slack expands links and media. Defaults to true, which is Slack's own behaviour. - `senderType` is who the broadcast is sent as: `PLAIN_WORKSPACE` posts under the workspace's own name and logo and takes no `senderUserId`; `PLAIN_USER` posts as a Plain user and requires `senderUserId`. Get user IDs from `getMyUser` or `getUserByEmail`. Leave `senderEmailAddress` unset: it belongs to a future email channel, not to a Slack broadcast. - `sendTarget` is who the broadcast reaches, resolved to concrete channels at send time. `scope: ALL_TENANTS` means every tenant with a connected channel and rejects `filters`; `scope: MATCHING` requires `filters`. Omit `scope` to target only the channels named in `recipients`. Inside `filters`, dimensions AND together and values within a dimension OR, and it must constrain something — reaching everyone is `ALL_TENANTS`, not an empty filter. `audienceIds` reference saved audiences (`getBroadcastAudiences`), which must be of the same type as the broadcast. Both the sender and the target can be left unset here and filled in later with `updateBroadcast`. Use `sendTestBroadcast` to post a test copy to channels you name before a human schedules the real send.

  • Createbroadcastaudience

    Create a reusable broadcast audience: a named set of broadcast recipients, resolved to concrete Slack channels at send time rather than when saved. Required input fields: `name`, `type`, `filters`. - `name` identifies the audience internally and is never shown to recipients. - `type` must be `SLACK`. It is fixed at creation, and an audience can only be attached to a broadcast of the same type. - `filters` is what the audience selects. Dimensions on one node AND together and values within a dimension OR: `tierIds: [a, b]` means either tier, while `tierIds: [a]` plus `slackChannelNameContains: ["eng"]` means both must hold. An empty dimension cannot be written — omit it instead. - `tenantIds` / `tierIds` — get IDs from `getTenants` or `searchTenants`. - `tenantFields` — filter on a tenant field by its `externalFieldId`, supplying the value field matching the field's type. - `slackChannels` — channels pinned by ID, nothing re-resolves these, so an audience holding only these is a saved channel list. - `slackChannelNameContains` — unanchored, case-insensitive name substrings, ORed with each other and resolved at send time, so channels created or renamed later are picked up. - `and` / `or` / `not` hold further filters. `and` and `or` nest at most two levels deep. `not` may name a single dimension and nothing else. - `audienceIds` is rejected here: an audience cannot be defined in terms of another audience. It is only valid on a broadcast's own send target. - `filters: {}` — no rows at all — means every tenant, and is the only way to say so. Every nested node must constrain something. `filters` is validated against `type`, so a filter naming a dimension this type cannot resolve is rejected here rather than silently resolving to nobody at send time. Editing an audience later changes who every broadcast using it will reach on its next send.

  • Createlabeltype

    Create a new label type for organizing threads. Label types can be single-select or multi-select, and can be hierarchical with parent label types. Use this to add new labels to your workspace's label taxonomy.

  • Createnote

    Create an internal note on a thread. Notes are visible to support agents only, not to customers. Requires a customerId and text content. Optionally provide a threadId to attach the note to a specific thread, and markdown for rich formatting.

  • Createsnippet

    Create a new snippet (reusable reply template) in the workspace. `name` is what agents search for when inserting the snippet. `text` is the plain-text body (required). Optionally provide `markdown` for rich-text channels, and `path` (alphanumeric only) to place the snippet in a folder in the Plain app. Snippet bodies may include template variables that Plain interpolates when the snippet is inserted, for example: {{ customer.email }}, {{ customer.fullName }}, {{ customer.shortName }}, {{ user.publicName }}, {{ user.fullName }}, {{ thread.ref }}, {{ thread.id }}

  • Createthread

    Create a new thread for a customer. A thread is the unit of conversation in Plain. Use this when you need to open a new ticket on behalf of a customer (for example, capturing an internal report or a back-channel conversation). To send a message to the customer after creation, use `replyToThread`. To attach an internal note, use `createNote`. Required fields on `input`: - customerIdentifier: One of `customerId` (e.g. `c_...`), `externalId`, or `emailAddress`. The customer must already exist — call `upsertCustomer` first if it doesn't. Common optional fields: - title: Short summary of the thread. Defaults to `Support request` if omitted. - description: Preview text shown in thread lists. Inferred from message content when omitted (which only happens if you also send a first message). - priority: Integer 0–3, where 0 is most urgent and 3 is least urgent. Defaults to 2 (normal). Anything outside 0–3 is rejected. - assignedTo: Provide exactly one of `userId` or `machineUserId`. - labelTypeIds: Array of label type IDs (e.g. `lt_...`). Look these up via `getLabels` first; unknown IDs return a validation error. - threadFields: Each entry needs a `key` and `type` that match an existing thread field schema (see `getThreadFieldSchemas`). The schema must exist before you can attach a value. - tenantIdentifier: Provide either `tenantId` or `externalId` for an existing tenant. Unknown tenants return a validation error. - externalId: Your own unique identifier for this thread. Must be unique per workspace. - channel: One of `API` (default), `EMAIL`, `CHAT`, `INTERNAL`, `SLACK`, or `MS_TEAMS`. The schema also exposes `DISCORD` and `IMPORT`, but they are not accepted here — don't use them. - channelDetails: REQUIRED when `channel` is `SLACK` (provide `channelDetails.slack.{slackChannelId, slackTeamId}`) or `MS_TEAMS` (provide `channelDetails.msTeams.{msTeamsChannelId, msTeamsTeamId}`). MUST be omitted for any other channel — passing it returns a validation error. Gotchas: - This mutation only creates the thread shell. It does NOT send a message to the customer. Follow up with `replyToThread` if a customer-visible message is needed. - The legacy `components` and `attachmentIds` input fields are deprecated and should not be set — use `replyToThread` (or chat mutations) afterwards instead. - SLACK threads created this way are linked to a Slack channel/team but no Slack message is posted until you reply. - `customerIdentifier.emailAddress` will not auto-create a customer; the mutation fails if no customer matches. Thread URL format: https://app.plain.com/workspace/{workspaceId}/thread/{threadId}/ where `{threadId}` is the `id` returned below (starts with `th_`) and `{workspaceId}` comes from `getMyWorkspace` (starts with `w_`). Do not invent IDs — only use values returned by the MCP tools.

  • Createthreadfieldschema

    Create a new thread field schema to capture structured data on threads. Thread field schemas define custom fields that can be added to threads (e.g., priority score, department, due date). Supports text, number, boolean, date, and enum field types with optional defaults and AI auto-fill.

  • Createworkspaceslackintegrationfromauth

    Connect workspace Slack notifications using a Slack connection the workspace already has. There is no second OAuth install. Pass the id of an existing workspace Slack channel integration (`workspaceSlackChannelIntegrations`). Requires `workspaceSlackIntegration:create`. This does not choose the channel notifications post to, and it does not start posting. After it succeeds, set the `notification/slack/channel_id` setting on the new integration. Until that setting is present, Plain drops workspace Slack notifications for it.

  • Replytothread

    Reply to the last message in a thread. Supports replying to threads where the last message is a Slack message, an email, or a form submission. If the thread is empty, it will send an email to the customer. Required fields: - threadId: The ID of the thread to reply to. - textContent: The plain text content of the reply. Optional fields: - markdownContent: Markdown formatted version of the reply. - attachmentIds: IDs of previously uploaded attachments to include. - channelSpecificOptions: Channel-specific options (e.g. additional email recipients).

  • Sendsidekickmessage

    Send a follow-up message into an existing Sidekick session. discussionId is the `thdis_...` handle returned by startSidekickSession. Use this to answer a question from Sidekick, redirect it, or give it the next task in the same session. Sidekick keeps the earlier conversation as context. If the session is idle the agent starts a new turn. If the agent is mid-turn the message is queued and picked up when the turn ends. A null discussionMessage together with a null error means the message was QUEUED, not that it failed. It will appear in queuedAgentSessionMessages on getSidekickSession until the agent picks it up. This tool returns as soon as the message is accepted. Poll getSidekickSession for the reply.

  • Sendtestbroadcast

    Send a test copy of a broadcast to Slack channels you name, so you can see what recipients will get before the real audience does. This posts real messages into real channels. Everyone in the channels you name will see it. It carries a notice at the top marking it as a test, and it goes out through the same pipeline and under the broadcast's own sender, so what arrives is what any channel would have received. Confirm the channel list with the user before calling this. - `channels` takes between 1 and 10 `{ slackTeamId, slackChannelId }` pairs. A channel ID is only unique within its Slack team, so both are needed. Every channel must already be connected to this workspace, and naming the same channel twice posts to it once. - The channels are independent of the broadcast's own audience, which is left untouched. The broadcast needs a sender and a notification title, but it does not need any channels of its own — testing is what you do before choosing them. - A test send never changes the broadcast's `status`, and never locks or unlocks editing. Only available while the broadcast can still be edited: once its real send has started, it can no longer be tested. The response includes the test send's id. Pass it to `getBroadcastSendDeliveries` to see whether each channel got it. This does not schedule the real send. Queuing a broadcast to its actual audience is done by a human in the Plain app.

  • Startsidekicksession

    Start a new Sidekick session and return the handle used by every other Sidekick tool. Sidekick is Plain's AI agent. It runs asynchronously in a sandbox. This tool returns as soon as the session is created, NOT when the agent has answered. Poll getSidekickSession with the returned discussion id to follow progress and collect the reply. Arguments: - markdownContent: the task for Sidekick. Brief it as you would a colleague. - threadId: optional. Attaches the session to a Plain thread (starts with `th_`) so Sidekick has that thread as context. Omit for a standalone session. - additionalContext: optional free-form context about what the user is looking at. The returned `discussion.id` (starts with `thdis_`) is the handle. Pass it to getSidekickSession, sendSidekickMessage and resolveSidekickApproval. The agent session id (`as_...`) is returned for reference only and is not accepted by the other tools. Errors: - A sidekick-disabled or credits error means the workspace cannot run Sidekick right now. Do not retry. Tell the user. - On a timeout do NOT retry blindly. There is no idempotency key, so a retry starts a second session and bills a second sandbox. Call listSidekickSessions first to check whether the first attempt landed.