Create document card from markdown
create_markdown_cardConverts markdown documents into interactive chat cards with copyable code, foldable sections, and table rendering, making long guides readable in chat.
Instructions
Render a markdown document as one interactive card: tables become card tables, fenced code gets copy buttons, and H2 sections fold into show/hide reveals. Pass either the markdown content or the path of a markdown file generated earlier in the conversation (for example a walkthrough or guide) to plug it into the chat in one call. Raw HTML in the markdown is NOT rendered as markup: it is shown as literal text, the same as in every other card's text fields, so use markdown syntax for formatting. Long documents split at H2 boundaries into parts of about 32,000 rendered characters each; the result's structuredContent.parts {current,total,hasMore} says whether more parts remain. A document with no H2 headings cannot be split and renders as one part.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | Part number for large documents (1-based). Long documents split automatically; while structuredContent.parts.hasMore is true, call again with the next part. | |
| path | No | Path to a markdown file ON THE MACHINE RUNNING THIS SERVER, not in the caller's sandbox. Over a remote bridge those are different machines: if the file exists only on your side, pass its text as markdown instead. | |
| title | No | Card title; defaults to the document's first H1 | |
| markdown | No | Markdown content to render | |
| subtitle | No | ||
| openFirst | No | Open the first section initially (default true) | |
| tutorTerms | No | Educational tutor terms. The first occurrence of each term in the card's visible prose is underlined; hovering ~1.2s shows the tip and notifies the host so the model can follow up. Terms are matched once per card, longest first, and never inside code samples, tooltips, or another term's tip. Matching is CASE-SENSITIVE, so "PATH" does not attach its tip to a filesystem "path"; set caseInsensitive on a term to match any casing. Term and tip are PLAIN text. | |
| splitSections | No | Fold H2 sections into reveals (default true) | |
| contextActions | No | Right-click menu actions the model anticipates being useful. Choosing one sends its prompt to the conversation; use {{selection}} to include the user's selected text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card | Yes | ||
| parts | Yes | Split state, present on EVERY card result so one completeness check works for all card types. Cards that cannot split always report {current:1,total:1,hasMore:false}; create_markdown_card and create_code_tour_card pack oversized content into parts and can report more. Read hasMore rather than the card title to decide whether content was withheld. |