Skip to main content
Glama

apex-dev

Markdown to pdf

markdown_to_pdf
Read-onlyIdempotent

Convert Markdown (headings, GFM tables, fenced code blocks, lists, links) into a styled print-ready base64 PDF via hermetic sandboxed headless Chrome. $0.003 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for terms, then call again with payment.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "markdown": "<markdown>"
    },
    "name": "markdown_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
themeNoOptional typography theme: clean (default), editorial, or compact.
titleNoOptional document title.
formatNoOptional paper format: A4 (default), Letter, Legal, Tabloid, A3, or A5.
marginNoOptional margin preset: none, compact, normal (default), or wide.
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).
markdownYesMarkdown document to render into PDF (up to 256 KB).
landscapeNoOptional landscape orientation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by disclosing the rendering engine (hermetic sandboxed headless Chrome), the output encoding (base64 PDF), pricing ($0.003 per call) and accepted payment rails (x402, USDC on Arc/Base/Solana, XNT on X1). The two-step payment handshake is exactly the kind of behavior an agent needs before invoking.

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?

Three tightly packed sentences: capability first, delivery mechanism and cost second, invocation protocol third. No filler and no repetition of schema fields.

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

Completeness4/5

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

With no output schema, the description supplies the return format (base64 PDF) and the payment protocol, which covers the main unknowns. A note on failure modes or output size limits would make it fully self-contained.

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

Parameters3/5

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

Schema coverage is 100%, so all seven parameters including `payment`, `theme`, and `format` are already documented in structured form. The description adds no per-parameter meaning beyond the 256 KB size limit already in the schema, so baseline 3 applies.

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?

States a specific verb and resource ('Convert Markdown ... into a styled print-ready base64 PDF') and enumerates the supported Markdown constructs, which clearly separates it from the sibling html_to_pdf without naming it.

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?

Gives an explicit procedural rule for the paid flow: call once without `payment` to get terms, then call again with `payment`. It does not state when to prefer this over html_to_pdf, so it stops short of full alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources