> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/episodes.md). Agents can also search and read this documentation through its [MCP server](https://docs.podigee.com/~gitbook/mcp).

# Episode tools

MCP tools that find, read, create, copy, change, and delete episodes, one or up to 50 at a time.

These tools find and read episodes, create a draft, and copy an episode. They also change the texts and settings of one or many episodes, and delete an episode. They do not publish: to publish, schedule, or take an episode offline, use `publish_episode` on [Media and publishing tools](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/media-and-publishing.md).

Every Model Context Protocol (MCP) client gets the full JSON (JavaScript Object Notation) input and output schemas of each tool from `tools/list`. This page gives the contract, the parameters, the most useful output fields, one example, and the errors that each tool adds.

In the Required column, a value such as "Yes, for the preview" or "Yes, for the change" is a rule of the call. The JSON schema can show the field as optional.

| Tool                   | What it does                                                                 | Scopes               | Read-only or write |
| ---------------------- | ---------------------------------------------------------------------------- | -------------------- | ------------------ |
| `list_episodes`        | Lists the episodes of one podcast or of all podcasts, with filters and sort. | `mcp:podcasts:read`  | Read-only          |
| `get_episode`          | Reads one episode: texts, state, recording, chapters, and transcript status. | `mcp:podcasts:read`  | Read-only          |
| `create_episode`       | Creates a draft episode.                                                     | `mcp:podcasts:write` | Write              |
| `duplicate_episode`    | Makes a draft copy of an episode under a new title, without the recording.   | `mcp:podcasts:write` | Write              |
| `update_episode`       | Changes the texts and settings of one episode.                               | `mcp:podcasts:write` | Write              |
| `delete_episode`       | Deletes an episode permanently.                                              | `mcp:podcasts:write` | Write              |
| `bulk_update_episodes` | Changes up to 50 episodes of one podcast with one confirmation.              | `mcp:podcasts:write` | Write              |

Each section has a contract line. The values come from the tool annotations. "Open world" means that the tool can read or change something outside Podigee. The scope rules are on [Authorization and scopes](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/authorization-and-scopes.md). The rules for previews, confirm values, idempotency keys, and the wait before a delete are on [Preview and confirm changes](https://docs.podigee.com/documentation/start-here/ai-agents/work-safely/preview-and-confirm-changes.md).

## Episode fields

The write tools take the same `attributes` object. These fields need care:

| Field                                            | Type          | Meaning                                                                                                                                                                              |
| ------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `title`, `subtitle`, `description`               | string        | The texts of the episode.                                                                                                                                                            |
| `show_notes_md`                                  | string        | The show notes as Markdown, the source that the Podigee editor opens. Without `show_notes`, Podigee makes the published HTML (HyperText Markup Language) from it. Prefer this field. |
| `show_notes`                                     | string        | The show notes as HTML. The website and the feeds publish this field. When you send both fields, Podigee publishes `show_notes` as you sent it.                                      |
| `chapter_marks`                                  | array         | Each item has `title`, `start_time`, `url`, and `image`. `start_time` is `HH:MM:SS` or `HH:MM:SS.mmm`, for example `00:12:30`. Plain seconds are refused.                            |
| `transcription`                                  | array         | Each segment has `start`, `end`, `text`, and `speaker_id`.                                                                                                                           |
| `publication_type`                               | string        | `full`, `trailer`, or `bonus`.                                                                                                                                                       |
| `cover_image_upload_id`                          | string (UUID) | The `upload_id` of a PNG or JPEG cover that you sent with `create_upload`. Do not send `cover_image` with it. Not in `bulk_update_episodes`.                                         |
| `ad_provider`                                    | string        | `podigee` or `podigee_programmatic`.                                                                                                                                                 |
| `video_content_rating`, `video_thumbnail_source` | string        | `eighteen_plus` or `unspecified`; `auto` or `custom`.                                                                                                                                |

`chapter_marks` and `transcription` replace the whole list. They do not add to it. Read the episode first with `get_episode` and send the merged list. Other fields are `authors`, `number`, `season`, `slug`, `explicit`, `guid`, `external_url`, `keywords`, `labels`, `contributor_ids`, `cover_image`, `facebook_image`, `bypass_ad_insertion`, and `intro_outro_include`. A UUID is a universally unique identifier.

## `list_episodes`

`list_episodes` lists the episodes of one podcast. When you leave out `podcast_id`, it lists the episodes of all podcasts of the connection. Filter by title words, by state, or by the time an episode was published, created, or changed, instead of reading every page. For the newest work across all podcasts, also recordings and generated content, use `list_recent_work` on [Account and help tools](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/account-and-help.md). Studio recordings are not episodes until they are converted; their tools are on [Content and recording tools](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/content-and-recordings.md).

**Contract:** scope `mcp:podcasts:read`. Read-only: yes. Destructive: no. Idempotent: yes. Open world: no.

| Parameter                        | Type               | Required | Default      | Limits                                                              | Meaning                                                                              |
| -------------------------------- | ------------------ | -------- | ------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `podcast_id`                     | integer            | No       | All podcasts | A podcast of this connection                                        | Only the episodes of this podcast.                                                   |
| `query`                          | string             | No       | None         | At least 1 character                                                | Words from the title.                                                                |
| `state`                          | string             | No       | All states   | `draft`, `scheduled`, `published`                                   | `draft` has no publication date, `scheduled` has a future date, `published` is live. |
| `published_from`, `published_to` | string (date-time) | No       | None         | ISO 8601; from before or equal to to                                | Only episodes published in this window.                                              |
| `created_from`, `created_to`     | string (date-time) | No       | None         | ISO 8601 with an offset; from before or equal to to                 | Only episodes created in this window.                                                |
| `updated_from`, `updated_to`     | string (date-time) | No       | None         | ISO 8601 with an offset; from before or equal to to                 | Only episodes changed in this window.                                                |
| `sort`                           | string             | No       | `newest`     | `newest`, `oldest`, `title`, `recently_created`, `recently_updated` | `newest` and `oldest` sort by publication date.                                      |
| `limit`                          | integer            | No       | 25           | 1 to 100; other values are clamped                                  | The number of episodes on a page.                                                    |
| `offset`                         | integer            | No       | 0            | 0 or more                                                           | The number of episodes to skip.                                                      |

| Output field                                                 | Meaning                                                                                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| `episodes[].id`, `episodes[].podcast_id`, `episodes[].title` | The episode, its podcast, and its title.                                                                                            |
| `episodes[].podcast_title`                                   | The podcast title. Only in a list across podcasts.                                                                                  |
| `episodes[].published_at`, `episodes[].published_at_local`   | The publication time, also in the time zone of the person. Use the local value when you tell the person a time.                     |
| `episodes[].has_media`                                       | Whether playable audio or video is attached. Without media, `publish_episode` refuses the episode, and a date on it never goes out. |
| `pagination.total`, `pagination.next_offset`                 | The number of matches, and the offset of the next page when there is one.                                                           |

Example request:

```json
{
  "podcast_id": 42,
  "state": "draft",
  "sort": "recently_updated",
  "limit": 25
}
```

Errors: a time that the tool cannot read, or a `from` value after its `to` value, returns `invalid_params`. The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## `get_episode`

`get_episode` reads one episode: its texts and whether it is a draft, scheduled, or live (`published_at`). It also reads the length of the recording, the chapters, and whether it has a transcript. The `media` object gives the state of the recording at the time of the call. When no operation runs, `media` is the place to read the recording state.

**Contract:** scope `mcp:podcasts:read`. Read-only: yes. Destructive: no. Idempotent: yes. Open world: no.

| Parameter    | Type    | Required | Default | Limits                        | Meaning                                                              |
| ------------ | ------- | -------- | ------- | ----------------------------- | -------------------------------------------------------------------- |
| `episode_id` | integer | Yes      | None    | An episode of this connection | The episode ID, from `list_episodes`.                                |
| `podcast_id` | integer | No       | None    | None                          | The podcast that the episode belongs to. A wrong podcast is refused. |

| Output field                                             | Meaning                                                                                                                                                                                                        |
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`, `description`, `show_notes`, `show_notes_md`    | The texts. `show_notes_md` is `null` when the notes exist only as HTML.                                                                                                                                        |
| `published_at`, `published_at_local`                     | `null` for a draft, a future time for a scheduled episode.                                                                                                                                                     |
| `duration`, `duration_text`                              | The length of the recording in seconds and in words. The detail has no `has_media`; read `media.state`.                                                                                                        |
| `media.state`                                            | `none`, `uploaded` (the file is stored and waits for a publish; nothing runs), `processing`, `ready`, or `failed`.                                                                                             |
| `media.kind`, `media.changed_at`                         | `audio` or `video`, and the last change.                                                                                                                                                                       |
| `media.problem`                                          | For `failed`: `code`, `sentence`, and `next_step`.                                                                                                                                                             |
| `chapter_marks`                                          | The chapters.                                                                                                                                                                                                  |
| `transcription.available`, `transcription.segment_count` | Whether a transcript exists. The text is read with `get_episode_transcript` on [Content and recording tools](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/content-and-recordings.md). |
| `production_id`, `permalink`, `cover_image_url`          | The production of the recording, the episode link, and the cover.                                                                                                                                              |

Example request:

```json
{
  "episode_id": 1234,
  "podcast_id": 42
}
```

Errors: an episode that this connection cannot see returns `not_found`. A `podcast_id` that is not the podcast of the episode returns `validation_error`. The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## `create_episode`

`create_episode` creates a draft episode in a podcast. It does not attach a recording and does not publish. To create, attach a recording, and publish in one flow, use `publish_episode` on [Media and publishing tools](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/media-and-publishing.md).

The tool takes a preview with `dry_run: true`. The change needs an `idempotency_key` but no `confirm` value.

**Contract:** scope `mcp:podcasts:write`. Read-only: no. Destructive: no. Idempotent: yes. Open world: yes.

| Parameter         | Type    | Required             | Default | Limits                       | Meaning                                       |
| ----------------- | ------- | -------------------- | ------- | ---------------------------- | --------------------------------------------- |
| `podcast_id`      | integer | Yes                  | None    | A podcast of this connection | The podcast of the new episode.               |
| `attributes`      | object  | Yes                  | None    | See "Episode fields"         | The texts and settings of the new episode.    |
| `dry_run`         | boolean | Yes, for the preview | None    | `true` for the preview       | `true` shows the preview and changes nothing. |
| `idempotency_key` | string  | Yes, for the change  | None    | 1 to 255 characters          | Any unique text for this change.              |

| Output field                        | Meaning                                                           |
| ----------------------------------- | ----------------------------------------------------------------- |
| Preview: `attributes`               | The fields as Podigee will store them.                            |
| Result: `id`, `podcast_id`, `title` | The new draft.                                                    |
| Result: `media`                     | The recording state, as in `get_episode`. A new draft has `none`. |

Example request (preview):

```json
{
  "podcast_id": 42,
  "attributes": {
    "title": "Episode 12: Cold brew at home",
    "show_notes_md": "Three ways to make cold brew."
  },
  "dry_run": true
}
```

Errors: `forbidden` when the person may not create episodes in this podcast. `validation_error` for a value that Podigee does not accept. The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## `duplicate_episode`

`duplicate_episode` makes a draft copy of an episode under a new title. The copy goes into the same podcast or, with `target_podcast_id`, into another podcast of this account. The copy carries over the texts (subtitle, description, show notes, keywords, authors, explicit flag, and episode type) and the chapter marks.

The copy does not get the recording (audio or video), the artwork, or the transcript. It is a draft without a recording. The person adds a recording on the episode page in the browser, or you send one with `create_upload` when you can read the file. Tell the person this when you report the copy. To change texts of the copy, for example to translate them, call `update_episode` on the new episode.

The tool takes a preview with `dry_run: true`. The change needs an `idempotency_key` but no `confirm` value.

**Contract:** scope `mcp:podcasts:write`. Read-only: no. Destructive: no. Idempotent: yes. Open world: yes.

| Parameter           | Type    | Required             | Default                     | Limits                                                 | Meaning                                       |
| ------------------- | ------- | -------------------- | --------------------------- | ------------------------------------------------------ | --------------------------------------------- |
| `episode_id`        | integer | Yes                  | None                        | An episode of this connection                          | The episode to copy.                          |
| `title`             | string  | Yes                  | None                        | 1 to 255 characters; not blank after markup is removed | The title of the copy.                        |
| `target_podcast_id` | integer | No                   | The podcast of the original | A podcast of this account                              | The podcast that gets the copy.               |
| `dry_run`           | boolean | Yes, for the preview | None                        | `true` for the preview                                 | `true` shows the preview and changes nothing. |
| `idempotency_key`   | string  | Yes, for the change  | None                        | 1 to 255 characters                                    | Any unique text for this change.              |

| Output field                             | Meaning                                                                           |
| ---------------------------------------- | --------------------------------------------------------------------------------- |
| Preview: `podcast_id`, `title`, `copies` | The target podcast, the stored title, and the list of fields that the copy gets.  |
| `recording_copied`, `artwork_copied`     | Always `false`.                                                                   |
| Result: `id`, `source_episode_id`        | The new draft and the original episode. The other fields are as in `get_episode`. |

Example request (preview):

```json
{
  "episode_id": 1234,
  "title": "Episode 12 (German edition)",
  "target_podcast_id": 43,
  "dry_run": true
}
```

Errors: `forbidden` when the person may not create episodes in the source podcast or in the target podcast. `validation_error` when the title is empty after markup is removed. The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## `update_episode`

`update_episode` changes the texts and settings of one episode. Send only the fields to change, with `dry_run: true` first. The preview shows the fields as Podigee will store them, also the HTML that Podigee makes from `show_notes_md`. The cover of the episode comes from a web address (`cover_image`) or from a file that you sent with `create_upload` (`cover_image_upload_id`).

To publish, schedule, or take an episode offline, use `publish_episode` with the publication mode `now`, `scheduled`, or `draft`. To change many episodes, use `bulk_update_episodes`.

**Contract:** scope `mcp:podcasts:write`. Read-only: no. Destructive: yes. Idempotent: yes. Open world: yes.

| Parameter         | Type    | Required             | Default | Limits                        | Meaning                                                                        |
| ----------------- | ------- | -------------------- | ------- | ----------------------------- | ------------------------------------------------------------------------------ |
| `episode_id`      | integer | Yes                  | None    | An episode of this connection | The episode to change.                                                         |
| `attributes`      | object  | Yes                  | None    | See "Episode fields"          | Only the fields to change.                                                     |
| `dry_run`         | boolean | Yes, for the preview | None    | `true` for the preview        | `true` shows the preview and changes nothing.                                  |
| `confirm`         | string  | Yes, for the change  | None    | From the preview              | Send it only after the person saw the preview and said yes in a later message. |
| `idempotency_key` | string  | Yes, for the change  | None    | 1 to 255 characters           | Any unique text for this change.                                               |

| Output field                                  | Meaning                                                          |
| --------------------------------------------- | ---------------------------------------------------------------- |
| Preview: `attributes`, `confirm`, `next_step` | The changes, the confirm value, and what to do with the preview. |
| Result                                        | The episode after the change, as in `get_episode`, with `media`. |

Example request (preview):

```json
{
  "episode_id": 1234,
  "attributes": {
    "chapter_marks": [
      { "title": "Intro", "start_time": "00:00:00" },
      { "title": "The recipe", "start_time": "00:04:30" }
    ]
  },
  "dry_run": true
}
```

Errors: `forbidden` when the person may not change episodes of this podcast. An organization admin can give the permission. `validation_error` for a value that Podigee does not accept. The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## `delete_episode`

`delete_episode` deletes an episode permanently and removes it from connected platforms. You cannot undo it, and there is no restore tool. To take an episode offline and keep it, use `publish_episode` with the publication mode `draft`.

A call without `confirm` returns the preview. Show the preview to the person and wait for their yes. A confirm that comes less than 15 seconds after its preview is refused with `confirmation_too_early`. The confirm value stays valid, so send the same request again after the wait. The full rule is on [Preview and confirm changes](https://docs.podigee.com/documentation/start-here/ai-agents/work-safely/preview-and-confirm-changes.md).

**Contract:** scope `mcp:podcasts:write`. Read-only: no. Destructive: yes. Idempotent: yes. Open world: yes.

| Parameter    | Type    | Required            | Default                         | Limits                                         | Meaning                                       |
| ------------ | ------- | ------------------- | ------------------------------- | ---------------------------------------------- | --------------------------------------------- |
| `episode_id` | integer | Yes                 | None                            | An episode of this connection                  | The episode to delete.                        |
| `dry_run`    | boolean | No                  | `true` when `confirm` is absent | None                                           | `true` shows the preview and deletes nothing. |
| `confirm`    | string  | Yes, for the delete | None                            | From the preview; at least 15 seconds after it | Send it only after the person said yes.       |

| Output field                                  | Meaning                                                          |
| --------------------------------------------- | ---------------------------------------------------------------- |
| Preview: `episode_id`, `confirm`, `next_step` | The episode, the confirm value, and what to do with the preview. |
| Result: `deleted`, `episode_id`               | `true` and the deleted episode.                                  |

Example request (preview):

```json
{
  "episode_id": 1234,
  "dry_run": true
}
```

Errors:

* `confirmation_too_early`: the confirm came less than 15 seconds after the preview. Nothing was deleted. When the person has said yes, send the same request again after the wait.
* `forbidden`: the person may not delete this episode.

The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## `bulk_update_episodes`

`bulk_update_episodes` changes up to 50 episodes of one podcast with one preview and one confirmation. Each entry has its own `attributes`. Thus the tool can set the same value everywhere, or a different value for each episode, for example for a find-and-replace. Narrow the set with `list_episodes` filters first.

Before it changes anything, the tool checks the whole set. An episode of another podcast, or an episode that appears twice, rejects the whole request. After the confirmation, Podigee updates each episode on its own. One failed episode does not stop the others, and each result has its own outcome. Send a new request only for the failed episodes.

**Contract:** scope `mcp:podcasts:write`. Read-only: no. Destructive: yes. Idempotent: yes. Open world: no.

| Parameter              | Type    | Required             | Default | Limits                                           | Meaning                                                    |
| ---------------------- | ------- | -------------------- | ------- | ------------------------------------------------ | ---------------------------------------------------------- |
| `podcast_id`           | integer | Yes                  | None    | A podcast of this connection                     | The podcast of all episodes in the set.                    |
| `updates`              | array   | Yes                  | None    | 1 to 50 entries; each `episode_id` once          | One entry for each episode: `episode_id` and `attributes`. |
| `updates[].attributes` | object  | Yes                  | None    | See "Episode fields"; no `cover_image_upload_id` | The fields to change on this episode.                      |
| `dry_run`              | boolean | Yes, for the preview | None    | `true` for the preview                           | `true` shows the preview and changes nothing.              |
| `confirm`              | string  | Yes, for the change  | None    | From the preview                                 | Send it only after the person said yes.                    |
| `idempotency_key`      | string  | Yes, for the change  | None    | 1 to 255 characters                              | Any unique text for this change.                           |

| Output field                                                        | Meaning                                                               |
| ------------------------------------------------------------------- | --------------------------------------------------------------------- |
| Preview: `episode_count`, `updates[].title`, `updates[].attributes` | The number of episodes, the current title of each, and its changes.   |
| Result: `updated_count`, `failed_count`                             | The number of updated and failed episodes.                            |
| Result: `results[].status`, `results[].code`, `results[].error`     | `updated` or `failed` for each episode, with the reason of a failure. |

Example request (preview):

```json
{
  "podcast_id": 42,
  "updates": [
    { "episode_id": 1234, "attributes": { "authors": "Jamie Brooks" } },
    { "episode_id": 1235, "attributes": { "authors": "Jamie Brooks" } }
  ],
  "dry_run": true
}
```

Errors: `invalid_params` when an episode is not in `podcast_id` or appears twice. `forbidden` when the person may not change episodes of this podcast. The common errors are on [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md).

## Next step

* To do these jobs step by step, read [Manage episodes](https://docs.podigee.com/documentation/start-here/ai-agents/podcasts-and-episodes/manage-episodes.md).
* To attach a recording and publish, read [Media and publishing tools](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/media-and-publishing.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/mcp-tools/episodes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
