AI Answer Copier
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| harmonize_markdown | Standardize and normalize Markdown syntax without changing the document's meaning. Re-formats headers (ATX-style), normalizes list markers to '-', enforces fenced code blocks with backticks, and applies consistent indentation. Side effects: when output_path is provided, writes the harmonized Markdown to disk (creates parent directories as needed, overwrites existing files). When output_path is omitted, returns the harmonized text as a string with no file I/O. Returns: harmonized Markdown string (if no output_path), or JSON with { success, file_path, file_size_bytes, format } (if output_path set). Use this tool when you need to clean up inconsistent Markdown formatting before further processing. Prefer convert_to_md with harmonize=true if you also need to save the result, as it combines both steps. Not suitable for converting Markdown to other formats — use the convert_to_* tools instead. |
| convert_to_txt | Convert Markdown to plain text by stripping all formatting — removes headers, bold/italic markers, links, images, code fences, and HTML tags. The result is a human-readable plain-text string with no markup. This is a destructive conversion: formatting information is permanently lost. Side effects: when output_path is provided, writes the plain text to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the plain text string directly. Returns: plain text string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this instead of convert_to_md when you need formatting-free content (e.g. for indexing, search, or clipboard). Use convert_to_html or convert_to_pdf if you need to preserve the document's visual structure. |
| convert_to_rtf | Convert Markdown to Rich Text Format (RTF). Produces an RTF document string preserving basic formatting: bold, italic, headers (as styled paragraphs), lists, and code blocks. Side effects: when output_path is provided, writes the RTF file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the raw RTF markup as a string. Returns: RTF markup string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when the target application requires RTF (e.g. legacy word processors, email clients). Prefer convert_to_docx for modern Word documents, or convert_to_html for web display. |
| convert_to_latex | Convert Markdown to LaTeX source code. Produces a LaTeX document fragment with \section, \textbf, \textit, \begin{itemize}/\begin{enumerate} list environments, verbatim code blocks, and table environments. KaTeX math expressions in the Markdown are passed through as native LaTeX math. Side effects: when output_path is provided, writes the .tex file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the LaTeX source as a string. Returns: LaTeX source string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you need to embed content in a LaTeX workflow or compile to PDF via pdflatex/xelatex externally. For direct PDF output without a LaTeX toolchain, use convert_to_pdf instead. |
| convert_to_docx | Convert Markdown to a Microsoft Word DOCX file. Produces a binary .docx document with styled headings, bold/italic text, numbered and bulleted lists, and code formatting. This is a binary format — output_path should almost always be provided. Side effects: when output_path is provided, writes the DOCX binary to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns a JSON object with { format: 'docx', file_size_bytes, hint, base64_preview } — the hint will tell you to re-call with output_path to save the file. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this for Word-compatible documents. Prefer convert_to_rtf for legacy word processors, convert_to_pdf for read-only distribution, or convert_to_html for web. |
| convert_to_pdf | Convert Markdown to a PDF document. Renders the Markdown as styled HTML (GFM tables, KaTeX math) and then prints it to PDF via a headless Chromium browser (Puppeteer). Requires a locally installed Chrome, Edge, or Chromium — set PUPPETEER_EXECUTABLE_PATH env var to override auto-detection. This is a binary format — output_path should almost always be provided. Side effects: launches a transient headless browser process for rendering (no network requests are made for the conversion itself, though the HTML references a CDN KaTeX stylesheet which may be fetched). When output_path is provided, writes the PDF to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'pdf', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this for high-fidelity, print-ready document output. Prefer convert_to_html for web-viewable output, convert_to_docx for editable documents, or convert_to_latex for LaTeX toolchains. |
| convert_to_image | Convert Markdown to a PNG image. Renders the Markdown as styled HTML (GFM tables, KaTeX math) and takes a full-page screenshot via a headless Chromium browser (Puppeteer). Requires a locally installed Chrome, Edge, or Chromium — set PUPPETEER_EXECUTABLE_PATH env var to override auto-detection. This is a binary format — output_path should almost always be provided. Side effects: launches a transient headless browser process (no persistent state; may fetch KaTeX CDN stylesheet). When output_path is provided, writes the PNG to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'png', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this when you need a visual snapshot of the rendered Markdown (e.g. for embedding in chat, previews, social cards). Prefer convert_to_pdf for paginated print output, or convert_to_html for interactive web content. |
| convert_to_csv | Extract tables from Markdown and convert them to CSV format. Parses GFM pipe-tables from the input and outputs comma-separated values. If the Markdown contains multiple tables, they are concatenated with a blank line separator. Non-table content is ignored. If the Markdown contains no tables, returns an empty string. Side effects: when output_path is provided, writes the CSV to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the CSV text directly as a string. Returns: CSV text string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this for lightweight tabular export or when downstream tools expect CSV. Prefer convert_to_xlsx for Excel-compatible spreadsheets with multiple sheets, or convert_to_json for structured data. |
| convert_to_json | Convert Markdown to a structured JSON representation. Parses the document into a JSON object with the document title as the root key, containing arrays of section objects with headings, paragraphs, lists, code blocks, and tables. Useful for programmatic analysis or feeding structured content into other systems. Side effects: when output_path is provided, writes the JSON to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the JSON string directly. Returns: JSON string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you need a machine-readable AST-like representation of the Markdown content. Prefer convert_to_xml for XML-based interchange, or convert_to_csv/convert_to_xlsx for tabular data extraction. |
| convert_to_xml | Convert Markdown to an XML document. Parses the Markdown into a structured XML tree with a root element named after the title parameter, containing , , , , , and elements. Produces well-formed XML with an declaration. Side effects: when output_path is provided, writes the XML to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the XML string directly. Returns: XML string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this for XML-based data interchange or when downstream systems require XML input. Prefer convert_to_json for JSON APIs, convert_to_html for XHTML/web content, or convert_to_csv for flat tabular data. |
| convert_to_xlsx | Convert Markdown tables to a Microsoft Excel XLSX spreadsheet. Parses GFM pipe-tables from the input and creates an Excel workbook. Each table becomes a sheet in the workbook. Non-table content is ignored. If the Markdown contains no tables, produces an empty workbook. This is a binary format — output_path should almost always be provided. Side effects: when output_path is provided, writes the XLSX binary to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'xlsx', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this when you need a full Excel file with formatting. Prefer convert_to_csv for lightweight plain-text tabular export, or convert_to_json for structured programmatic access. |
| convert_to_html | Convert Markdown to a complete, styled HTML document. Renders GFM (tables, task lists, strikethrough) and KaTeX math into semantic HTML with an embedded stylesheet for clean presentation. The output is a full document with (charset, KaTeX CSS CDN link, inline styles) and . Side effects: when output_path is provided, writes the HTML file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the full HTML string directly. Returns: HTML document string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you need a file saved to disk or when you need the full document. Prefer generate_html if you only need the HTML string returned directly (no file I/O) and want inline styles without a CDN link. Prefer convert_to_pdf for print-ready output, or convert_to_image for a visual snapshot. |
| convert_to_md | Export Markdown content, optionally harmonizing its formatting first. When harmonize=false (default), returns the input Markdown unchanged. When harmonize=true, applies the same normalization as harmonize_markdown (ATX-style headers, '-' list markers, fenced code blocks, consistent indentation) before returning. Side effects: when output_path is provided, writes the Markdown to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the Markdown string directly. Returns: Markdown string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you want to save Markdown to a file (with or without cleanup). Prefer harmonize_markdown if you only want to normalize formatting without saving to disk. Use the convert_to_* family for other output formats. |
| generate_html | Generate a complete, self-contained HTML document from Markdown with all styles inlined. Renders GFM (tables, task lists, strikethrough) and KaTeX math into a full HTML page with an embedded block and a KaTeX CSS CDN link. Returns the HTML string directly — no file is written to disk. Side effects: none. This tool is read-only and performs no file I/O. Returns: a complete HTML document string (…) with inline styles, ready for rendering in a browser. The optional title parameter sets the tag in the HTML section. Use this when you need styled HTML output returned as a string (e.g., for embedding in responses or previewing). Prefer convert_to_html when you need to write the HTML to a file on disk. Prefer convert_to_pdf or convert_to_image for non-HTML visual output formats. |
| convert_to_slack | Convert Markdown to Slack mrkdwn format. Transforms bold (**) to single asterisks, italic to underscores, links to Slack <url|text> syntax, and headers to bold text. Use this when pasting formatted content into Slack messages. |
| convert_to_discord | Convert Markdown to Discord-compatible format. Transforms headers to styled bold/underline text that renders correctly in Discord messages. Code blocks and basic formatting are preserved. |
| convert_to_jira | Convert Markdown to JIRA wiki markup. Transforms headers to h1./h2., bold to single asterisks, code blocks to {code} blocks, links to [text|url], and lists to JIRA * and # syntax. |
| convert_to_confluence | Convert Markdown to Confluence wiki markup. Similar to JIRA but includes Confluence-specific {info}, {note} panels and {code:language=x} syntax. |
| convert_to_asciidoc | Convert Markdown to AsciiDoc format. Transforms headers to = syntax, code blocks to ---- delimited blocks, links to url[text] syntax, and images to image::url[alt] directives. |
| convert_to_rst | Convert Markdown to reStructuredText (RST) format. Transforms headers to underlined text, code blocks to .. code-block:: directives, and links to RST reference syntax. |
| convert_to_mediawiki | Convert Markdown to MediaWiki markup. Transforms headers to == syntax, bold to triple quotes, code to tags, and tables to {| wikitable format. |
| convert_to_bbcode | Convert Markdown to BBCode format. Transforms formatting to [b], [i], [s], [code], [url], [img] tags. Used for forum posts on phpBB, vBulletin, and similar platforms. |
| convert_to_textile | Convert Markdown to Textile markup format. Used by Redmine, older versions of Basecamp, and some CMS platforms. |
| convert_to_orgmode | Convert Markdown to Emacs Org Mode format. Transforms headers to * syntax, bold to text, code blocks to #+BEGIN_SRC/#+END_SRC, and links to [[url][text]] syntax. |
| convert_to_email_html | Convert Markdown to email-optimized HTML with all styles inlined. Produces HTML compatible with Outlook, Gmail, Apple Mail, and other email clients. No external CSS dependencies. Wraps content in a responsive email table layout. |
| html_to_markdown | Convert HTML to Markdown. Performs round-trip import of HTML content back to Markdown format. Handles headings, tables, lists, code blocks, links, images, and inline formatting. Useful for importing web content or converting HTML emails to Markdown. |
| repair_markdown | Repair broken Markdown from LLM output or copy-paste. Fixes unclosed code fences, broken tables (mismatched columns, missing separators), stray emphasis markers, missing heading spaces, inconsistent list indentation, broken links, and excessive whitespace. |
| lint_markdown | Lint Markdown and report issues. Returns a JSON array of lint issues found in the document, each with line number, column, severity (error/warning/info), rule name, message, and fixable flag. Checks for: missing heading spaces, trailing whitespace, inconsistent list markers, hard tabs, multiple blank lines, bare URLs, unclosed emphasis, and unclosed code fences. |
| extract_code_blocks | Extract all code blocks from a Markdown document. Returns a JSON array of code blocks, each with language, code content, and start/end line numbers. Useful for extracting code snippets from LLM responses or documentation. |
| extract_links | Extract all links and images from a Markdown document. Returns a JSON array with link text, URL, line number, and type (inline, reference, image, autolink). Useful for link checking, SEO analysis, or extracting references. |
| generate_toc | Generate a Table of Contents from Markdown headings. Returns a Markdown-formatted TOC with indented links to each heading. Handles duplicate heading slugs. The max_depth parameter controls the deepest heading level to include. |
| analyze_document | Analyze a Markdown document and return comprehensive statistics. Returns JSON with: line/word/character/paragraph/sentence counts, heading/code block/table/link/image/list/blockquote counts, and estimated reading time in minutes. |
| extract_structure | Extract the full structure of a Markdown document. Returns JSON with document statistics, heading outline, code block summary (language, line count, positions), and link summary (totals by type, unique URL count). Provides a bird's-eye view of document architecture. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| convert-document | Convert a Markdown document to a specified output format. Supports: PDF, DOCX, HTML, LaTeX, CSV, JSON, XML, XLSX, RTF, PNG, TXT, MD. |
| extract-tables | Extract all tables from a Markdown document and export them as CSV or XLSX spreadsheet format. |
| format-for-sharing | Prepare a Markdown document for sharing by harmonizing formatting and converting to portable formats (PDF and HTML) with professional styling. |
| analyze-and-repair | Analyze a Markdown document for issues, repair any problems found, and return both the lint report and the repaired document. |
| convert-for-platform | Convert Markdown to a platform-specific format. Supports: slack, discord, jira, confluence, asciidoc, rst, mediawiki, bbcode, textile, orgmode. |
| document-overview | Get a comprehensive overview of a Markdown document: statistics, structure, table of contents, code blocks, and links. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Supported Output Formats | Complete list of all 22+ supported output formats with tool names, types, and descriptions |
| Conversion Guide | Guide for choosing the right output format based on your use case |
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/XJTLUmedia/MCP_Markdown_Formatter'
If you have feedback or need assistance with the MCP directory API, please join our Discord server