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:

ParameterTypeRequiredDescription
namestringYesTheme name (must be unique for user)
descriptionstringNoHuman-readable description
themeYamlstringNoRaw theme.yaml content (CSS assembled automatically)
cssstringNoPre-built CSS content
manifeststringNoJSON manifest with theme metadata
logoAssetIdstringNoAsset ID of primary logo
logoLightAssetIdstringNoAsset ID of light logo variant
logoPlacementstringNoJSON string defining logo placement rules

update_theme

Update a custom theme’s properties. Cannot modify built-in themes.

Parameters:

ParameterTypeRequiredDescription
namestringYesCurrent theme name
newNamestringNoNew theme name
descriptionstringNoNew description
cssstringNoNew CSS content
logoAssetIdstring/nullNoAsset ID or null to remove
logoLightAssetIdstring/nullNoAsset ID or null to remove
logoPlacementstring/nullNoJSON placement rules or null to remove

delete_theme

Delete a custom theme. Cannot delete built-in themes.

Parameters:

ParameterTypeRequiredDescription
namestringYesName 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:

ParameterTypeRequiredDescription
markdownstringYesFull markdown content for the deck
slugstringNoURL-safe slug (auto-generated if omitted)
themeIdstringNoTheme ID (extracted from frontmatter if omitted)

get_deck

Get a deck by ID or slug. Tries ID first, then slug.

Parameters:

ParameterTypeRequiredDescription
id_or_slugstringYesDeck 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:

ParameterTypeRequiredDescription
idstringYesDeck ID
markdownstringYesNew markdown content

edit_slide

Modify a single slide by index without changing other slides.

Parameters:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
slideIndexnumberYesZero-based slide index
newContentstringYesNew slide content

add_slide

Insert a new slide at the given position. Subsequent slides shift forward.

Parameters:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
indexnumberYesZero-based position to insert
contentstringYesMarkdown content for new slide

remove_slide

Delete a slide at the given index. Remaining slides are reindexed.

Parameters:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
indexnumberYesZero-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:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
formatstringNoOutput format: html, pdf, pptx (default: html)
varsobjectNoTemplate 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:

ParameterTypeRequiredDescription
deckIdstringYesDeck 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:

ParameterTypeRequiredDescription
markdownstringNoFull deck markdown content (provide this or deckId)
deckIdstringNoDeck ID to preview (alternative to markdown)
slidenumberYesSlide 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:

ParameterTypeRequiredDescription
base64stringYesBase64-encoded file content
filenamestringYesOriginal filename (e.g., logo.png)
mimeTypestringYesMIME 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:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
chartTypestringYesChart type: bar, bar-horizontal, line, pie, donut
dataobjectYes{ labels: string[], values: number[] }
titlestringNoChart title
slideIndexnumberNoZero-based slide index (creates new if omitted)
slideTitlestringNoTitle 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:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
diagramTypestringYesflowchart, sequence, class, state, er, gantt, pie, mindmap
codestringYesMermaid diagram code (without fenced code block wrapper)
slideIndexnumberNoZero-based slide index
titlestringNoTitle for new slide

render_diagram

Render a standalone Mermaid diagram to SVG. Useful for previewing before adding to a deck.

Parameters:

ParameterTypeRequiredDescription
codestringYesMermaid diagram code
themestringNoTheme name for styling

render_chart

Render a standalone chart to SVG from a YAML specification. Useful for previewing before adding to a deck.

Parameters:

ParameterTypeRequiredDescription
specstringYesYAML chart specification with type, data.labels, data.values, optional title
themestringNoTheme 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:

ParameterTypeRequiredDescription
promptstringYesText description of image to generate
aspectRatiostringNo1:1, 16:9, 9:16, 4:3, 3:4 (default: 1:1)
stylestringNophoto, illustration, icon, abstract, minimal
countnumberNoNumber of images (1-4, default: 1)
themeNamestringNoTheme 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:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
promptstringYesText description of image
slideIndexnumberNoZero-based slide index (creates new if omitted)
positionstringNobackground, inline, left, right (default: inline)
titlestringNoTitle for new slide
aspectRatiostringNo1:1, 16:9, 9:16, 4:3, 3:4
stylestringNophoto, illustration, icon, abstract, minimal
altTextstringNoAlt 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:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID
yamlstringYesYAML DSL defining elements (rectangle, ellipse, diamond, text, arrow, line, group)
slideIndexnumberNoZero-based slide index
titlestringNoTitle for new slide

Sharing Tools

share_deck

Generate a public share link for a deck. Returns a URL anyone can view without authentication.

Parameters:

ParameterTypeRequiredDescription
deckIdstringYesDeck 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:

ParameterTypeRequiredDescription
deckIdstringYesDeck ID to unshare