> 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/publish-episode.md).

# publish\_episode

Reference for the \`publish\_episode\` MCP tool.

Preview or start a durable, resumable episode publishing operation.

## Contract

| Property                     | Value                                   |
| ---------------------------- | --------------------------------------- |
| Required scopes              | `mcp:media:write`, `mcp:podcasts:write` |
| Read-only                    | `false`                                 |
| Destructive                  | `true`                                  |
| Idempotent                   | `true`                                  |
| May interact outside Podigee | `true`                                  |

The MCP annotations describe client behavior. The server still applies authorization, validation, preview, confirmation, ownership, and account boundaries at execution time.

## Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "publish_episode",
    "arguments": {
      "podcast_id": 42,
      "episode_id": 314,
      "publication": {
        "mode": "draft"
      },
      "dry_run": true
    }
  }
}
```

The example uses placeholder IDs. Replace them with IDs returned for the connected account.

## Input schema

The structural schema below omits prose `description` fields so each line remains readable. The complete public descriptions follow the schema.

```json
{
  "type": "object",
  "required": [
    "podcast_id",
    "publication"
  ],
  "additionalProperties": false,
  "properties": {
    "podcast_id": {
      "type": "integer"
    },
    "episode_id": {
      "type": "integer"
    },
    "episode_attributes": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1
        },
        "subtitle": {
          "type": "string"
        },
        "show_notes": {
          "type": "string"
        },
        "show_notes_md": {
          "type": "string"
        },
        "authors": {
          "type": "string"
        },
        "number": {
          "type": "integer",
          "minimum": 1
        },
        "season": {
          "type": "integer",
          "minimum": 1
        },
        "slug": {
          "type": "string"
        },
        "explicit": {
          "type": "boolean"
        },
        "external_url": {
          "type": "string"
        },
        "publication_type": {
          "type": "string",
          "enum": [
            "full",
            "trailer",
            "bonus"
          ]
        },
        "keywords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "media": {
      "type": "object",
      "required": [
        "source",
        "upload_id"
      ],
      "additionalProperties": false,
      "properties": {
        "source": {
          "const": "upload"
        },
        "upload_id": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "publication": {
      "type": "object",
      "oneOf": [
        {
          "required": [
            "mode"
          ],
          "additionalProperties": false,
          "properties": {
            "mode": {
              "const": "draft"
            }
          }
        },
        {
          "required": [
            "mode"
          ],
          "additionalProperties": false,
          "properties": {
            "mode": {
              "const": "now"
            }
          }
        },
        {
          "required": [
            "mode",
            "published_at"
          ],
          "additionalProperties": false,
          "properties": {
            "mode": {
              "const": "scheduled"
            },
            "published_at": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      ]
    },
    "dry_run": {
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "confirm": {
      "type": "string",
      "minLength": 1
    }
  }
}
```

### Input field descriptions

No additional field descriptions are defined.

### Key constraints

* `request` requires: `podcast_id`, `publication`.
* `episode_attributes.title` has minimum length 1.
* `episode_attributes.number` has minimum 1.
* `episode_attributes.season` has minimum 1.
* `episode_attributes.publication_type` accepts: `full`, `trailer`, `bonus`.
* `media` requires: `source`, `upload_id`.
* `publication` requires: `mode`.
* `publication` requires: `mode`, `published_at`.
* `idempotency_key` has minimum length 1 and maximum length 255.
* `confirm` has minimum length 1.

## Output schema

The `structuredContent` object in a successful tool result matches this schema.

The structural schema below omits prose `description` fields. The complete public descriptions follow the schema.

```json
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "dry_run",
        "action",
        "plan",
        "request_digest",
        "confirm"
      ],
      "additionalProperties": false,
      "properties": {
        "dry_run": {
          "const": true
        },
        "action": {
          "const": "publish_episode"
        },
        "plan": {
          "type": "object",
          "required": [
            "podcast_id",
            "create_episode",
            "episode_attributes",
            "publication"
          ],
          "additionalProperties": false,
          "properties": {
            "podcast_id": {
              "type": "integer"
            },
            "episode_id": {
              "type": "integer"
            },
            "create_episode": {
              "type": "boolean"
            },
            "episode_attributes": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "subtitle": {
                  "type": "string"
                },
                "show_notes": {
                  "type": "string"
                },
                "show_notes_md": {
                  "type": "string"
                },
                "authors": {
                  "type": "string"
                },
                "number": {
                  "type": "integer",
                  "minimum": 1
                },
                "season": {
                  "type": "integer",
                  "minimum": 1
                },
                "slug": {
                  "type": "string"
                },
                "explicit": {
                  "type": "boolean"
                },
                "external_url": {
                  "type": "string"
                },
                "publication_type": {
                  "type": "string",
                  "enum": [
                    "full",
                    "trailer",
                    "bonus"
                  ]
                },
                "keywords": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "media": {
              "type": "object",
              "required": [
                "source",
                "upload_id"
              ],
              "additionalProperties": false,
              "properties": {
                "source": {
                  "const": "upload"
                },
                "upload_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            },
            "publication": {
              "type": "object",
              "oneOf": [
                {
                  "required": [
                    "mode"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "mode": {
                      "const": "draft"
                    }
                  }
                },
                {
                  "required": [
                    "mode"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "mode": {
                      "const": "now"
                    }
                  }
                },
                {
                  "required": [
                    "mode",
                    "published_at"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "mode": {
                      "const": "scheduled"
                    },
                    "published_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              ]
            }
          }
        },
        "request_digest": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "confirm": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "operation_type",
        "state",
        "stage",
        "retryable",
        "attempts",
        "operation_id",
        "next_action"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "operation_type": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "waiting",
            "succeeded",
            "failed_retryable",
            "failed_terminal",
            "cancelled"
          ]
        },
        "stage": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        },
        "podcast_id": {
          "type": "integer"
        },
        "episode_id": {
          "type": "integer"
        },
        "production_id": {
          "type": "integer"
        },
        "podcast_import_id": {
          "type": "integer"
        },
        "listener_id": {
          "type": "integer"
        },
        "attempts": {
          "type": "integer"
        },
        "result": {
          "oneOf": [
            {
              "type": "object",
              "maxProperties": 0,
              "additionalProperties": false,
              "properties": {}
            },
            {
              "type": "object",
              "required": [
                "reset_record_id"
              ],
              "additionalProperties": false,
              "properties": {
                "reset_record_id": {
                  "type": "integer"
                },
                "delivery_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "delivery_committed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "delivery_sent_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "episode_id"
              ],
              "additionalProperties": false,
              "properties": {
                "episode_id": {
                  "type": "integer"
                },
                "production_id": {
                  "type": "integer"
                },
                "publication_mode": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "now",
                    "scheduled"
                  ]
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "podcast_import_id",
                "imported_episode_ids"
              ],
              "additionalProperties": false,
              "properties": {
                "podcast_import_id": {
                  "type": "integer"
                },
                "podcast_id": {
                  "type": "integer"
                },
                "imported_episode_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            },
            {
              "type": "object",
              "required": [
                "operation_id",
                "listener_id",
                "reset_email_sent",
                "listener"
              ],
              "additionalProperties": false,
              "properties": {
                "operation_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "listener_id": {
                  "type": "integer"
                },
                "reset_email_sent": {
                  "const": true
                },
                "listener": {
                  "type": "object",
                  "required": [
                    "id",
                    "podcast_id",
                    "status",
                    "created_at",
                    "updated_at"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "podcast_id": {
                      "type": "integer"
                    },
                    "email": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "active",
                        "inactive",
                        "resent"
                      ]
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "anyOf": [
                    {
                      "required": [
                        "email"
                      ]
                    },
                    {
                      "required": [
                        "username"
                      ]
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "id"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subtitle": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subdomain": {
                  "type": "string"
                },
                "language": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publication_type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "published_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "protected": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "authors": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "website_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "explicit": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "quality": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "low",
                    "high",
                    "super_high",
                    "ice_portal_compatible_audio",
                    null
                  ]
                },
                "keywords": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "feed_items": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "copyright_text": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "owner_email": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ad_free_feed": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "transcriptions_enabled": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "feed_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cover_image_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category_ids": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "id",
                "podcast_id"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "integer"
                },
                "podcast_id": {
                  "type": "integer"
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subtitle": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "number": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "season": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publication_type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "published_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "explicit": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "has_media": {
                  "type": "boolean"
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "show_notes": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "show_notes_md": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "authors": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "guid": {
                  "type": "string"
                },
                "external_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "keywords": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "labels": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "bypass_ad_insertion": {
                  "type": "boolean"
                },
                "ad_provider": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "intro_outro_include": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "video_content_rating": {
                  "type": "string"
                },
                "video_thumbnail_source": {
                  "type": "string"
                },
                "production_id": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "duration": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "permalink": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cover_image_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "chapter_marks": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [],
                        "additionalProperties": false,
                        "properties": {
                          "title": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "start_time": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "url": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "transcription": {
                  "type": "object",
                  "required": [
                    "available",
                    "segment_count"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "segment_count": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          ]
        },
        "error": {
          "oneOf": [
            {
              "type": "object",
              "maxProperties": 0,
              "additionalProperties": false,
              "properties": {}
            },
            {
              "type": "object",
              "minProperties": 1,
              "additionalProperties": false,
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "error_type": {
                  "type": "string"
                },
                "error_class": {
                  "type": "string"
                },
                "error_message": {
                  "type": "string"
                },
                "occurred_at": {
                  "type": "string"
                },
                "failed_at": {
                  "type": "string"
                },
                "job_id": {
                  "type": "string"
                },
                "retry_count": {
                  "type": "integer"
                },
                "source_feed_title": {
                  "type": "string"
                },
                "imported_to_existing": {
                  "type": "boolean"
                },
                "skipped_episode_guids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "manual_retry_count": {
                  "type": "integer"
                },
                "failed_episode_guid": {
                  "type": "string"
                },
                "pause_count": {
                  "type": "integer"
                },
                "paused": {
                  "type": "boolean"
                },
                "failed_episode_title": {
                  "type": "string"
                },
                "failed_episode_number": {
                  "type": "integer"
                },
                "failed_media_url": {
                  "type": "string"
                },
                "connection_results": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "setup": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "started_at": {
          "type": "string",
          "format": "date-time"
        },
        "completed_at": {
          "type": "string",
          "format": "date-time"
        },
        "failed_at": {
          "type": "string",
          "format": "date-time"
        },
        "cancelled_at": {
          "type": "string",
          "format": "date-time"
        },
        "progress": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "current",
            "total",
            "percent"
          ],
          "properties": {
            "current": {
              "type": "integer"
            },
            "total": {
              "type": "integer"
            },
            "percent": {
              "type": "integer"
            },
            "current_episode_title": {
              "type": "string"
            },
            "current_episode_number": {
              "type": "integer"
            }
          }
        },
        "operation_id": {
          "type": "string",
          "format": "uuid"
        },
        "next_action": {
          "type": "object",
          "required": [
            "tool",
            "arguments"
          ],
          "additionalProperties": false,
          "properties": {
            "tool": {
              "const": "get_operation"
            },
            "arguments": {
              "type": "object",
              "required": [
                "operation_id"
              ],
              "additionalProperties": false,
              "properties": {
                "operation_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      }
    }
  ]
}
```

### Output field descriptions

### `(oneOf 2).result (oneOf 6).quality`

The audio encoding profile new media is encoded to. It says nothing about the editorial or production quality of the show, and "low" is not a problem to report to the user.

### `(oneOf 2).result (oneOf 6).feed_items`

How many of the most recent episodes the RSS feed lists at once. Older episodes stay reachable through paged feeds, so this is not the number of episodes the podcast has.

### `(oneOf 2).result (oneOf 7).has_media`

Whether playable audio or video is attached. An episode with has\_media false cannot be published: publish\_episode rejects it, and setting published\_at on it produces a dated episode that never goes out. Attach media first.

### `(oneOf 2).progress`

Per-episode progress for long-running imports. Absent when the operation does not track item-level progress yet.

## Safety and retries

Use `dry_run: true` to inspect the normalized plan before any consequential change. When the preview requires confirmation, repeat the same request with the exact returned `confirm` value before it expires. Reuse one stable `idempotency_key` for retries of the same intended action. Use a new key for a different action.

Do not retry validation, authorization, plan, or ownership errors unchanged. Retry transient errors only when the response marks them as retryable. For durable work, use the returned operation ID instead of starting the same action again.

## Related guides

* [Publish an episode that already has media](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/publish-an-episode-that-already-has-media.md)
* [Publish new local media from start to finish](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/publish-new-local-media-from-start-to-finish.md)
* [Schedule publication while preparing media](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/schedule-publication-while-preparing-media.md)
* [Take an episode offline without deleting it](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/take-an-episode-offline-without-deleting-it.md)
* [Recover an interrupted publication](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/recover-an-interrupted-publication.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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
