get_slide_format
Retrieve the authoritative Deckrun slide format specification. Learn all layout tags, Markdown syntax, and rules before writing slides. Returns JSON.
Instructions
Fetch the authoritative Deckrun slide format specification. Call this first to learn all layout tags, Markdown syntax, and rules before writing slides. Returns JSON with layout_tags, surface_syntax, example_markdown, and limits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- deckrun_mcp.py:282-328 (handler)The _get_slide_format() function that executes the tool logic — fetches live schema from SCHEMA_URL, parses JSON, and returns a formatted summary with slide_separator, layout_tags, two_column, notes, example_markdown, limits, heading_convention, and schema_version. Falls back to cached defaults on error.
async def _get_slide_format() -> list[types.TextContent]: """Fetch the Deckrun slide format schema and return it as text.""" try: resp = requests.get(SCHEMA_URL, timeout=15) resp.raise_for_status() data = resp.json() summary = { "slide_separator": data.get("surface_syntax", {}).get("slide_separator", "---"), "layout_tags": data.get("surface_syntax", {}).get("layout_tags", []), "two_column": data.get("surface_syntax", {}).get("two_column", {}), "notes": data.get("surface_syntax", {}).get("notes", ""), "example_markdown": data.get("example_markdown", ""), "limits": { "max_slides": 10, "max_body_size_kb": 50, "pdf_expiry_days": 90, }, "heading_convention": ( "Title slide uses # (H1) for presentation title. " "All other slides use ## (H2) for slide heading." ), "schema_version": SCHEMA_VERSION, } return [types.TextContent(type="text", text=json.dumps(summary, indent=2))] except Exception as exc: fallback = { "error": f"Could not fetch live schema ({exc}). Using cached rules.", "slide_separator": "---", "layout_tags": [ "<!-- <title-slide /> --> — first slide: title + subtitle", "<!-- <title-content-slide /> --> — heading + bullets", "<!-- <section-header-slide /> --> — section divider", "<!-- <two-content-slide /> --> — two-column", "<!-- <title-only-slide /> --> — heading only", "<!-- <title-no-footer-slide /> --> — no footer bar", "<!-- <content-with-caption-slide /> --> — image with caption", "<!-- <full-blank-slide /> --> — fully blank", "<!-- <blank-slide /> --> — blank with chrome", "<!-- <footer-only-slide /> --> — footer bar only", ], "heading_convention": ( "# (H1) for title slide title, ## (H2) for all other slide headings." ), "limits": {"max_slides": 10, "max_body_size_kb": 50}, "schema_version": SCHEMA_VERSION, } return [types.TextContent(type="text", text=json.dumps(fallback, indent=2))] - deckrun_mcp_http.py:312-351 (handler)The _get_slide_format() function in the HTTP transport variant — identical logic to deckrun_mcp.py, fetches live schema and returns formatted JSON or cached fallback.
async def _get_slide_format() -> list[types.TextContent]: try: resp = requests.get(SCHEMA_URL, timeout=15) resp.raise_for_status() data = resp.json() summary = { "slide_separator": data.get("surface_syntax", {}).get("slide_separator", "---"), "layout_tags": data.get("surface_syntax", {}).get("layout_tags", []), "two_column": data.get("surface_syntax", {}).get("two_column", {}), "notes": data.get("surface_syntax", {}).get("notes", ""), "example_markdown": data.get("example_markdown", ""), "limits": {"max_slides": 10, "max_body_size_kb": 50, "pdf_expiry_days": 90}, "heading_convention": ( "Title slide uses # (H1) for presentation title. " "All other slides use ## (H2) for slide heading." ), "schema_version": SCHEMA_VERSION, } return [types.TextContent(type="text", text=json.dumps(summary, indent=2))] except Exception as exc: fallback = { "error": f"Could not fetch live schema ({exc}). Using cached rules.", "slide_separator": "---", "layout_tags": [ "<!-- <title-slide /> --> — first slide: title + subtitle", "<!-- <title-content-slide /> --> — heading + bullets", "<!-- <section-header-slide /> --> — section divider", "<!-- <two-content-slide /> --> — two-column", "<!-- <title-only-slide /> --> — heading only", "<!-- <title-no-footer-slide /> --> — no footer bar", "<!-- <content-with-caption-slide /> --> — image with caption", "<!-- <full-blank-slide /> --> — fully blank", "<!-- <blank-slide /> --> — blank with chrome", "<!-- <footer-only-slide /> --> — footer bar only", ], "heading_convention": "# (H1) for title slide, ## (H2) for all other slides.", "limits": {"max_slides": 10, "max_body_size_kb": 50}, "schema_version": SCHEMA_VERSION, } return [types.TextContent(type="text", text=json.dumps(fallback, indent=2))] - deckrun_mcp.py:226-240 (schema)The tool schema/definition: name='get_slide_format', description, and empty inputSchema (no required params). Registered in list_tools().
return [ types.Tool( name="get_slide_format", description=( "Fetch the authoritative Deckrun slide format specification. " "Call this first to learn all layout tags, Markdown syntax, " "and rules before writing slides. Returns JSON with layout_tags, " "surface_syntax, example_markdown, and limits." ), inputSchema={ "type": "object", "properties": {}, "required": [], }, ), - deckrun_mcp_http.py:84-93 (schema)The tool schema/definition in the HTTP variant: types.Tool with name='get_slide_format', description, and empty inputSchema.
_TOOL_GET_SLIDE_FORMAT = types.Tool( name="get_slide_format", description=( "Fetch the authoritative Deckrun slide format specification. " "Call this first to learn all layout tags, Markdown syntax, " "and rules before writing slides. Returns JSON with layout_tags, " "surface_syntax, example_markdown, and limits." ), inputSchema={"type": "object", "properties": {}, "required": []}, ) - deckrun_mcp.py:273-276 (registration)The call_tool() handler dispatches name='get_slide_format' to await _get_slide_format() — this is the registration/dispatch point.
@app.call_tool() async def call_tool(name: str, arguments: dict) -> list[types.TextContent]: if name == "get_slide_format": return await _get_slide_format()