@toolpal/markdown-to-doc
publicv2.0published 1 download this weekMIT
Converts Markdown (inline or .md/.txt file) or structured JSON/sheets locally into a formatted Word (.docx), PDF (.pdf), or Excel (.xlsx) file. Supports headings, bold/italic/code, links, lists, code blocks, blockquotes, and tables. Offline, no API key needed.
{
"manifestVersion": 1,
"name": "@toolpal/markdown-to-doc",
"version": "2.0",
"description": "Converts Markdown (inline or .md/.txt file) or structured JSON/sheets locally into a formatted Word (.docx), PDF (.pdf), or Excel (.xlsx) file. Supports headings, bold/italic/code, links, lists, code blocks, blockquotes, and tables. Offline, no API key needed.",
"license": "MIT",
"keywords": [
"markdown",
"docx",
"pdf",
"xlsx",
"word",
"excel",
"convert",
"document"
],
"entry": "dist/tool.mjs",
"sdk": "0.1.0",
"engines": {
"node": ">=22.15.0"
},
"inputSchema": {
"type": "object",
"required": [
"format"
],
"properties": {
"format": {
"anyOf": [
{
"type": "string",
"const": "docx"
},
{
"type": "string",
"const": "pdf"
},
{
"type": "string",
"const": "xlsx"
}
],
"description": "Target output format: docx, pdf, or xlsx"
},
"markdown": {
"type": "string",
"maxLength": 500000,
"description": "Markdown text to render"
},
"file": {
"type": "string",
"description": "Input .md, .txt, or .json file (alternative to inline markdown/sheets)",
"x-toolpal-file": true
},
"sheets": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"rows"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"columns": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 100
},
"rows": {
"type": "array",
"items": {
"anyOf": [
{
"type": "array",
"items": {}
},
{
"type": "object",
"patternProperties": {
"^.*$": {}
}
}
]
},
"maxItems": 50000
}
}
},
"minItems": 1,
"maxItems": 20,
"description": "Structured worksheet data (ideal for format: xlsx, also renders as tables in docx/pdf)"
},
"title": {
"type": "string",
"maxLength": 200,
"description": "Document title (docx/pdf)"
},
"subtitle": {
"type": "string",
"maxLength": 300,
"description": "Subtitle, author, or date line (docx/pdf)"
},
"filename": {
"type": "string",
"maxLength": 80,
"description": "Output filename without extension"
},
"pageSize": {
"anyOf": [
{
"type": "string",
"const": "letter"
},
{
"type": "string",
"const": "a4"
}
],
"description": "Page size for docx/pdf; letter by default"
}
}
},
"outputSchema": {
"type": "object",
"required": [
"file",
"format",
"bytes"
],
"properties": {
"file": {
"type": "string",
"description": "Generated .docx, .pdf, or .xlsx file",
"x-toolpal-file": true
},
"format": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"pages": {
"type": "integer",
"description": "Page count (for PDF output)"
},
"sheets": {
"type": "integer",
"description": "Worksheet count (for XLSX output)"
},
"blocks": {
"type": "integer",
"description": "Parsed block count (for DOCX/PDF output)"
}
}
},
"examples": [
{
"title": "Markdown brief to PDF",
"prompt": "Convert this Q4 launch plan Markdown into a formatted PDF",
"input": {
"format": "pdf",
"title": "Q4 Launch Plan",
"subtitle": "Prepared Nov 2026",
"filename": "q4-launch-plan",
"markdown": "## Milestones\n\n| Phase | Target | Owner |\n|---|---|---|\n| Beta | Nov 25 | Engineering |\n| GA | Dec 10 | Product |\n\n- Zero external dependencies\n- Offline rendering"
},
"output": {
"file": "q4-launch-plan.pdf",
"format": "pdf",
"bytes": 1587,
"pages": 1,
"blocks": 3
},
"outputFiles": {
"file": {
"name": "q4-launch-plan.pdf",
"size": 1587,
"mediaType": "application/pdf"
}
}
},
{
"title": "Structured JSON to Excel",
"prompt": "Export these pricing tiers as an Excel workbook",
"input": {
"format": "xlsx",
"filename": "pricing-tiers",
"sheets": [
{
"name": "Plans",
"columns": [
"Plan",
"Monthly USD",
"Seats"
],
"rows": [
[
"Starter",
29,
3
],
[
"Team",
99,
15
]
]
}
]
},
"output": {
"file": "pricing-tiers.xlsx",
"format": "xlsx",
"bytes": 2330,
"sheets": 1
},
"outputFiles": {
"file": {
"name": "pricing-tiers.xlsx",
"size": 2330,
"mediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
}
}
],
"permissions": {
"net": false,
"env": [],
"tmp": true
},
"limits": {
"timeoutMs": 30000,
"memoryMb": 256
},
"build": {
"toolpal": "0.1.0",
"esbuild": "0.28.2",
"options": "sha256-tMpkndD8HsDUvZadrPbEAMGGIGK7nvmTGxMMlUxy9Fo="
}
}