Skip to main content
Glama

Api2Pdf MCP by usefulapi

Convert document to Markdown (MarkItDown)

api2pdf_convert_to_markdown
Destructive

Convert a document or file (given as a URL — PDF, Office docs, and more) to Markdown text via MarkItDown. Great for feeding a document's contents back to an agent. Returns a { FileUrl } (valid ~24h). BILLED. Api2Pdf API: POST /markitdown.

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the document/file to convert to Markdown.
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'.
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?

Adds real behavioral facts beyond the annotation: the call is BILLED, the result is a short-lived FileUrl (~24h), and the underlying endpoint is disclosed. It does not cover auth requirements or what happens when a source URL is unreachable, but the annotations only declare destructiveHint so the description is doing meaningful work.

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 tight sentences: what it does, why you'd want it, and the practical output/billing facts, with the endpoint last. Nothing is padding and the most decision-relevant information leads.

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?

No output schema exists, and the description compensates by naming the return shape (FileUrl, ~24h validity). Combined with a 100%-documented 8-parameter schema including nested storage/options objects, an agent has enough to invoke it correctly; only auth and failure behavior are left unstated.

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% across all 8 parameters, so the schema already carries the semantics and the baseline is 3. The description restates only that the input is a URL and that a FileUrl comes back; it adds no format, size, or option-passing detail beyond 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?

States a specific verb and resource ('Convert a document or file ... to Markdown text') and names the engine (MarkItDown) plus accepted input families (PDF, Office docs). The direction-of-conversion is explicit, which cleanly separates it from the sibling api2pdf_markdown_to_pdf without needing to name it.

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?

One sentence gives implied usage ('Great for feeding a document's contents back to an agent'), which is a genuine context hint, but there is no when-not guidance, no mention of prerequisites (e.g. accessible/public URL, auth via extraHTTPHeaders), and no pointers to alternatives such as api2pdf_markdown_to_pdf for the reverse direction.

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.