MCP Tools Reference
AgentPreso exposes its full functionality through the Model Context Protocol (MCP). AI agents can connect to the MCP endpoint at https://api.agentpreso.com/mcp to create, edit, and render presentations programmatically.
Connection
Configure your MCP client to connect to the AgentPreso server:
{
"mcpServers": {
"agentpreso": {
"url": "https://api.agentpreso.com/mcp",
"headers": {
"Authorization": "Bearer ap_your_api_key_here"
}
}
}
}
Theme Tools
list_themes
List available presentation themes (built-in and custom).
Parameters: None
Returns: Array of theme objects with id, name, description, and type.
create_theme
Create a new custom presentation theme with optional logo configuration.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Theme name (must be unique for user) |
description | string | No | Human-readable description |
themeYaml | string | No | Raw theme.yaml content (CSS assembled automatically) |
css | string | No | Pre-built CSS content |
manifest | string | No | JSON manifest with theme metadata |
logoAssetId | string | No | Asset ID of primary logo |
logoLightAssetId | string | No | Asset ID of light logo variant |
logoPlacement | string | No | JSON string defining logo placement rules |
update_theme
Update a custom theme’s properties. Cannot modify built-in themes.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Current theme name |
newName | string | No | New theme name |
description | string | No | New description |
css | string | No | New CSS content |
logoAssetId | string/null | No | Asset ID or null to remove |
logoLightAssetId | string/null | No | Asset ID or null to remove |
logoPlacement | string/null | No | JSON placement rules or null to remove |
delete_theme
Delete a custom theme. Cannot delete built-in themes.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of theme to delete |
Deck Tools
list_decks
List all presentation decks for the authenticated user.
Parameters: None
Returns: Array of deck objects with id, slug, title, themeId, createdAt, updatedAt.
create_deck
Create a new presentation deck. Title is extracted from the first H1. Slug is auto-generated if omitted.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
markdown | string | Yes | Full markdown content for the deck |
slug | string | No | URL-safe slug (auto-generated if omitted) |
themeId | string | No | Theme ID (extracted from frontmatter if omitted) |
get_deck
Get a deck by ID or slug. Tries ID first, then slug.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id_or_slug | string | Yes | Deck ID (UUID) or slug |
Returns: Full deck object including markdown content.
update_deck
Update a deck’s markdown content. Re-extracts title and themeId from new markdown.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deck ID |
markdown | string | Yes | New markdown content |
edit_slide
Modify a single slide by index without changing other slides.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
slideIndex | number | Yes | Zero-based slide index |
newContent | string | Yes | New slide content |
add_slide
Insert a new slide at the given position. Subsequent slides shift forward.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
index | number | Yes | Zero-based position to insert |
content | string | Yes | Markdown content for new slide |
remove_slide
Delete a slide at the given index. Remaining slides are reindexed.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
index | number | Yes | Zero-based index to remove |
Rendering Tools
render_deck
Render a deck to HTML, PDF, or PPTX. PDF/PPTX return presigned download URLs valid for 1 hour. Supports template variables for {{key}} substitution.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
format | string | No | Output format: html, pdf, pptx (default: html) |
vars | object | No | Template variables — strings, numbers, booleans, or arrays |
Returns: For PDF/PPTX: { url, expiresAt, format, sizeBytes }. For HTML: raw HTML data.
preview_deck
Get deck metadata including slide count. Use preview_slide for PNG screenshots or share_deck for a viewable URL.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID to preview |
Returns: { id, slug, title, slideCount }.
preview_slide
Preview a specific slide as a PNG image. Returns a base64-encoded screenshot. Useful for AI agents to verify slide appearance without a browser.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
markdown | string | No | Full deck markdown content (provide this or deckId) |
deckId | string | No | Deck ID to preview (alternative to markdown) |
slide | number | Yes | Slide number (1-indexed) |
Returns: Base64-encoded PNG image data.
Asset Tools
upload_asset
Upload a binary asset (image, logo, etc.) as base64. Returns an asset:// URI for use in decks.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
base64 | string | Yes | Base64-encoded file content |
filename | string | Yes | Original filename (e.g., logo.png) |
mimeType | string | Yes | MIME type (e.g., image/png) |
Returns: { id, filename, mimeType, sizeBytes, uri }.
Content Tools
add_chart
Add a Chart.js chart to an existing deck. Creates a new slide or appends to an existing one. Charts render as SVG with theme-aware colors.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
chartType | string | Yes | Chart type: bar, bar-horizontal, line, pie, donut |
data | object | Yes | { labels: string[], values: number[] } |
title | string | No | Chart title |
slideIndex | number | No | Zero-based slide index (creates new if omitted) |
slideTitle | string | No | Title for new slide |
add_diagram
Add a Mermaid diagram to an existing deck. Creates a new slide or appends to an existing one. Diagrams render with theme colors.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
diagramType | string | Yes | flowchart, sequence, class, state, er, gantt, pie, mindmap |
code | string | Yes | Mermaid diagram code (without fenced code block wrapper) |
slideIndex | number | No | Zero-based slide index |
title | string | No | Title for new slide |
render_diagram
Render a standalone Mermaid diagram to SVG. Useful for previewing before adding to a deck.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Mermaid diagram code |
theme | string | No | Theme name for styling |
render_chart
Render a standalone chart to SVG from a YAML specification. Useful for previewing before adding to a deck.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
spec | string | Yes | YAML chart specification with type, data.labels, data.values, optional title |
theme | string | No | Theme name for styling |
generate_graphic
Generate an AI graphic from a text prompt using Google Imagen. Returns an asset:// URI. Automatically enhanced with theme imagery guidance when a theme is specified.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of image to generate |
aspectRatio | string | No | 1:1, 16:9, 9:16, 4:3, 3:4 (default: 1:1) |
style | string | No | photo, illustration, icon, abstract, minimal |
count | number | No | Number of images (1-4, default: 1) |
themeName | string | No | Theme name for imagery style guidance |
add_graphic
Generate an AI graphic and add it to a deck in one step. Creates a new slide or adds to an existing one.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
prompt | string | Yes | Text description of image |
slideIndex | number | No | Zero-based slide index (creates new if omitted) |
position | string | No | background, inline, left, right (default: inline) |
title | string | No | Title for new slide |
aspectRatio | string | No | 1:1, 16:9, 9:16, 4:3, 3:4 |
style | string | No | photo, illustration, icon, abstract, minimal |
altText | string | No | Alt text for accessibility |
add_illustration
Add an Excalidraw-style hand-drawn illustration to a slide using a YAML DSL. Creates sketchy, whiteboard-style diagrams with theme colors.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID |
yaml | string | Yes | YAML DSL defining elements (rectangle, ellipse, diamond, text, arrow, line, group) |
slideIndex | number | No | Zero-based slide index |
title | string | No | Title for new slide |
Sharing Tools
share_deck
Generate a public share link for a deck. Returns a URL anyone can view without authentication.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID to share |
Returns: { shareUrl, shareToken }.
unshare_deck
Revoke a public share link for a deck. The share URL stops working but can be re-enabled later with share_deck.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | Deck ID to unshare |