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 (Word) returns a download link that works for 48 hours; markdown, html, json or text (plain text) 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, text 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

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 (Word): a file with a download link. markdown or html: the clean content. text: the clean content as plain text, with no Markdown syntax. 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 (Word). letter for the US and Canada, a4 elsewhere.
include_linksNoKeep link addresses: as [text](url) in Markdown, or as text (url) in plain text. Affects markdown, text and json output only. Off by default.

Output Schema

NameRequiredDescriptionDefault
outputYesThe format that was made.
contentNoThe document itself (markdown, html and text 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, for pdf and docx (Word) output only. Valid for 48 hours.
expires_atNoWhen the download link stops working, as an ISO 8601 time. For pdf and docx (Word) output only.
size_bytesNoSize of the file in bytes. For pdf and docx (Word) output only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / include_links / description
      Previous value: -"Keep link addresses in the Markdown, as [text](url). Affects markdown and json output only. Off by default."New value: +"Keep link addresses: as [text](url) in Markdown, or as text (url) in plain text. Affects markdown, text and json output only. Off by default."
    • changedInput schema / properties / output / description
      Previous value: -"pdf or docx (Word): a file with a download link. markdown or html: the clean content. json: the content with its details (title, author, date, word count)."New value: +"pdf or docx (Word): a file with a download link. markdown or html: the clean content. text: the clean content as plain text, with no Markdown syntax. json: the content with its details (title, author, date, word count)."
    • changedInput schema / properties / output / enum
      Previous value: -[
      -  "pdf",
      -  "docx",
      -  "markdown",
      -  "html",
      -  "json"
      -]New value: +[
      +  "pdf",
      +  "docx",
      +  "markdown",
      +  "html",
      +  "json",
      +  "text"
      +]
    • changedOutput schema / properties / content / description
      Previous value: -"The document itself (markdown and html only)."New value: +"The document itself (markdown, html and text only)."
    • changedOutput schema / properties / output / enum
      Previous value: -[
      -  "pdf",
      -  "docx",
      -  "markdown",
      -  "html",
      -  "json"
      -]New value: +[
      +  "pdf",
      +  "docx",
      +  "markdown",
      +  "html",
      +  "json",
      +  "text"
      +]
  2. Changed5 schema fields changed
    • changedInput schema / properties / output / description
      Previous value: -"pdf 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)."New value: +"pdf or docx (Word): a file with a download link. markdown or html: the clean content. json: the content with its details (title, author, date, word count)."
    • changedInput schema / properties / page_size / description
      Previous value: -"Paper size for pdf and docx. letter for the US and Canada, a4 elsewhere."New value: +"Paper size for pdf and docx (Word). letter for the US and Canada, a4 elsewhere."
    • changedOutput schema / properties / expires_at / description
      Previous value: -"When the download link stops working, as an ISO 8601 time (pdf and docx only)."New value: +"When the download link stops working, as an ISO 8601 time. For pdf and docx (Word) output only."
    • changedOutput schema / properties / file_url / description
      Previous value: -"Download link for the PDF or Word file (pdf and docx only). Valid for 48 hours."New value: +"Download link for the PDF or Word file, for pdf and docx (Word) output only. Valid for 48 hours."
    • changedOutput schema / properties / size_bytes / description
      Previous value: -"Size of the file in bytes (pdf and docx only)."New value: +"Size of the file in bytes. For pdf and docx (Word) output only."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: 48-hour download-link lifetime, per-format return behavior, link-stripping default, no truncation guarantee, and quota cost ('Counts as one document on the API key's plan'). These are the operational traits an agent must know before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then behavior, then the sibling pointer and quota note. Dense and mostly waste-free, though the format-behavior and link sentences could be tightened slightly.

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

Completeness5/5

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

A rich output schema exists, so return values need no explanation, and the description still covers exclusivity, format behavior, TTL and quota. Nothing an agent needs to invoke this correctly is missing.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds real value: the exactly-one-of url/html/markdown constraint (not expressed by the schema) and per-enum output semantics. It stops short of covering page_size or the full interaction of include_links beyond the default.

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 ('Make a document from a web page, HTML or Markdown and return it') and immediately differentiates itself from the sibling read_page. An agent can tell what it produces and how it differs from the alternative without opening a schema.

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

Usage Guidelines5/5

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

Explicitly names the trigger ('when the user wants to save, share, print or download something') and the alternative with its condition ('To read a page for your own use, call read_page instead'). Also states the input exclusivity rule ('Give exactly one of url, html or markdown').

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.