Skip to main content
Glama

Api2Pdf MCP by usefulapi

Markdown to PDF (Chrome)

api2pdf_markdown_to_pdf
Destructive

Render a Markdown string to a PDF using headless Chrome. Returns a { FileUrl } (valid ~24h). BILLED. Api2Pdf API: POST /chrome/pdf/markdown.

Input Schema

NameRequiredDescriptionDefault
inlineNoIf true (Api2Pdf default), the generated file is served inline; if false, as an attachment.
optionsNoEngine-specific render options (page size, margins, orientation, headers/footers, etc.). Passed through verbatim to Api2Pdf.
storageNoCustom storage target, used when useCustomStorage is true.
fileNameNoA name for the generated file, e.g. 'invoice.pdf'.
markdownYesThe Markdown source to render into a PDF.
output_binaryNoIf true, return the raw file bytes as base64 instead of a FileUrl. Default false (recommended for agents — returns a short-lived link).
extraHTTPHeadersNoExtra HTTP headers Api2Pdf forwards when it fetches a source URL (e.g. auth for a protected page/file).
useCustomStorageNoIf true, Api2Pdf uploads the result to your own storage (see `storage`) instead of hosting it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only supply destructiveHint=true, a lower bar, and the description adds genuinely useful behavior the annotation cannot convey: the return is a FileUrl with a ~24h validity window and the call is BILLED (consumes credits). It still omits what 'destructive' means here, rate limits, or credit cost magnitude, so it is strong but not exhaustive.

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 short sentences, front-loaded with the action, then the return value, then the billing flag and endpoint. No filler; each sentence carries distinct information.

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 takes on the burden of describing the return and does so ({ FileUrl }, ~24h expiry), plus it discloses billing. It does not touch the options passthrough or output_binary alternative, but those are covered in the schema, so the gap is minor.

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 description coverage is 100%, so all 8 parameters (including nested options/storage) are already documented in the schema, establishing the baseline of 3. The description adds no parameter-level detail beyond the schema, so no credit above baseline is warranted.

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 ('Render a Markdown string to a PDF using headless Chrome') and names the engine, which cleanly separates it from siblings like html_to_pdf, url_to_pdf and wkhtml_to_pdf. An agent can identify the input type and output type without opening the schema.

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

Usage Guidelines3/5

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

The description implies usage (a Markdown source string is required) and flags the billing cost, but never states when to pick this over html_to_pdf/wkhtml_to_pdf/url_to_pdf. No exclusions or prerequisites are given, so routing between the Chrome/WKHTML/URL PDF variants is left to inference.

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.