set_cover_image
Assign a cover thumbnail to a draft using a CDN URL from upload_image or any public URL, and receive an updated draft summary.
Instructions
Set the cover (thumbnail) image for a draft.
The cover image is shown on the publication homepage, in social shares, and as the email header. Use upload_image first to get a CDN URL.
Args: post_id: Draft ID. image_url: Substack CDN URL from upload_image, or any public image URL.
Returns: Updated draft summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | Yes | ||
| image_url | Yes |
Implementation Reference
- src/substack_mcp/server.py:108-122 (handler)MCP tool handler for set_cover_image: validates args via type hints, delegates to SubstackClient.set_cover_image.
@mcp.tool() def set_cover_image(post_id: str, image_url: str) -> dict: """Set the cover (thumbnail) image for a draft. The cover image is shown on the publication homepage, in social shares, and as the email header. Use upload_image first to get a CDN URL. Args: post_id: Draft ID. image_url: Substack CDN URL from upload_image, or any public image URL. Returns: Updated draft summary. """ return _get_client().set_cover_image(post_id=post_id, image_url=image_url) - src/substack_mcp/server.py:108-108 (registration)Tool registration via @mcp.tool() decorator on set_cover_image function.
@mcp.tool() - src/substack_mcp/client.py:230-232 (handler)SubstackClient.set_cover_image implementation: calls self._api.put_draft with cover_image=image_url, returns draft summary.
def set_cover_image(self, post_id: str, image_url: str) -> dict: result = self._api.put_draft(post_id, cover_image=image_url) return self._summarize_draft(result)