Skip to main content
Glama

Create a document

create_document

Make a document from a web page, HTML or Markdown and return it. Use this when the user wants to save, share, print or download something: output pdf or docx returns a download link that works for 48 hours; markdown, html or json returns the content itself. Give exactly one of url, html or markdown. To read a page for your own use, call read_page instead. Markdown and json output leave link addresses out unless include_links is true, and are never cut short, however long the page. Counts as one document on the API key's plan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoA web page to turn into a document. Starts with https://.
htmlNoHTML to turn into a document, instead of a url. Up to 2 MB of markup.
titleNoThe document's title. Used for html and markdown input; a url supplies its own.
outputYespdf or docx: a file with a download link. markdown or html: the clean content. json: the content with its details (title, author, date, word count).
markdownNoMarkdown to turn into a document, instead of a url. Up to 1 MB.
page_sizeNoPaper size for pdf and docx. letter for the US and Canada, a4 elsewhere.
include_linksNoKeep link addresses in the Markdown, as [text](url). Affects markdown and json output only. Off by default.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputYesThe format that was made.
contentNoThe document itself (markdown and html only).
documentYesThe page's details: title, url, site, author, date, excerpt, image and word_count. For json output it also holds content_html and content_markdown.
file_urlNoDownload link for the PDF or Word file (pdf and docx only). Valid for 48 hours.
expires_atNoWhen the download link stops working, as an ISO 8601 time (pdf and docx only).
size_bytesNoSize of the file in bytes (pdf and docx only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources