Skip to main content
Glama
jhauga
by jhauga

Create document card from markdown

create_markdown_card

Converts 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

TableJSON Schema
NameRequiredDescriptionDefault
partNoPart number for large documents (1-based). Long documents split automatically; while structuredContent.parts.hasMore is true, call again with the next part.
pathNoPath 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.
titleNoCard title; defaults to the document's first H1
markdownNoMarkdown content to render
subtitleNo
openFirstNoOpen the first section initially (default true)
tutorTermsNoEducational 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.
splitSectionsNoFold H2 sections into reveals (default true)
contextActionsNoRight-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

TableJSON Schema
NameRequiredDescriptionDefault
cardYes
partsYesSplit 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.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full responsibility for behavioral disclosure, and it delivers. It explicitly warns that raw HTML is shown as literal text, explains that long documents split at H2 boundaries into ~32,000-character parts, and tells the caller how to detect remaining parts via structuredContent.parts. This goes well beyond the title and gives the agent actionable expectations about side effects and output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but efficient: a concrete first sentence, input options, one important formatting caveat, and a clear explanation of splitting behavior. No sentence is wasted, and the most important behavioral facts are front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's rendering behavior, input alternatives, the raw-HTML limitation, split behavior, and how to check for remaining parts. Given the rich input schema and presence of an output schema, an agent has enough context to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is high (89%), so the schema already documents most parameters. The description adds valuable semantics by explaining the either-or relationship between markdown and path, the splitting behavior tied to part, and the constraint that path refers to the machine running the server. This supplements rather than merely restates the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Render a markdown document as one interactive card.' It then lists concrete affordances (tables become card tables, code gets copy buttons, H2 sections fold into reveals) that make the tool's purpose unmistakable. It also distinguishes it from sibling card creators by tying it to markdown input.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly communicates when to use the tool: pass either markdown content or a previously generated markdown file. It also gives practical guidance about using markdown syntax because raw HTML is not rendered. It does not explicitly name alternative card-creation tools, but the input source and rendering behavior make the intended use unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhauga/mcp-chat-cards'

If you have feedback or need assistance with the MCP directory API, please join our Discord server