Skip to main content
Glama

Capture a visual document

capture_document
Read-only

Create a document with embedded step-by-step captures of terminal output, code, diffs, files, or web pages, exported as markdown, HTML, PDF, PPTX, or DOCX with optional captions.

Instructions

Create a document with embedded step-by-step captures. Each capture is rendered as an image and embedded in the document with optional captions. Output formats: markdown (with image references), html (self-contained with base64 images), pdf (print-quality), pptx (editable PowerPoint deck), or docx (editable Word document). Maximum 30 captures per document; 25 MB per embedded image and 75 MB total.

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": {
      "title": "<title>",
      "captures": "<captures>"
    },
    "name": "capture_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesDocument title
formatNoOutput document format: markdown (image refs), html (self-contained), pdf (print-quality), pptx (editable PowerPoint), docx (editable Word)markdown
outputNoOutput filename (default: auto-generated as 'document-<timestamp>.md/.html/.pdf/.pptx/.docx'). Extension should match format.
capturesYesArray of captures to embed. Each specifies capture type, type-specific parameters, and optional caption.
includeTimestampsNoInclude capture timestamps in the document

Output Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the saved document
bytesYesSize of the saved file in bytes
formatYesFormat of the saved document
captureCountNoNumber of captures embedded in the document

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.3.11
    • changedInput schema / properties / format / description
      Previous value: -"Output document format: markdown (image refs), html (self-contained), pdf (print-quality)"New value: +"Output document format: markdown (image refs), html (self-contained), pdf (print-quality), pptx (editable PowerPoint), docx (editable Word)"
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "markdown",
      -  "html",
      -  "pdf"
      -]New value: +[
      +  "markdown",
      +  "html",
      +  "pdf",
      +  "pptx",
      +  "docx"
      +]
    • changedInput schema / properties / output / description
      Previous value: -"Output filename (default: auto-generated as 'document-<timestamp>.md/.html/.pdf'). Extension should match format."New value: +"Output filename (default: auto-generated as 'document-<timestamp>.md/.html/.pdf/.pptx/.docx'). Extension should match format."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "bytes": {
      +      "description": "Size of the saved file in bytes",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "captureCount": {
      +      "description": "Number of captures embedded in the document",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "format": {
      +      "description": "Format of the saved document",
      +      "enum": [
      +        "markdown",
      +        "html",
      +        "pdf",
      +        "pptx",
      +        "docx"
      +      ],
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "Absolute path of the saved document",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "path",
      +    "format",
      +    "bytes"
      +  ],
      +  "type": "object"
      +}
  2. Addedv2.3.6

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true and idempotentHint=false, so the safety profile is mostly covered. The description adds real value beyond them: rendering each capture as an image, format-specific behaviors (html self-contained base64, markdown image references), and hard limits of 30 captures, 25 MB per image, 75 MB total. It omits what happens on limit breach (error vs truncation) and that browser captures touch the network under SSRF protection, which the schema mentions but the description does not.

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 sentences, front-loaded with the core purpose, then format enumeration, then hard limits. No filler, and the offsets and format asides are compactly parenthesized rather than expanded into prose.

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?

For a complex composite tool with a rich nested capture schema and an output schema that covers the return value, the description supplies the essential framing: it embeds images, supports five formats, and enforces size/count caps. What's missing is failure behavior at the caps and whether capture types are mixed freely in one document, a minor gap given the exhaustive schema.

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 every parameter, including each capture variant's type-specific fields, is already documented in the schema. The description's format-output summary echoes the format enum's own description and the size limits add constraint context the schema lacks on the captures array. It adds little beyond the schema for title/output/includeTimestamps, 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 ('Create a document with embedded step-by-step captures'), then enumerates exactly what the document contains and in what formats. An agent can distinguish this aggregate/composite tool from the singular sibling captures (capture_terminal, capture_browser, capture_code) because the description makes clear it assembles many captures into one document.

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 this is the tool for multi-step documents that embed several captures and lists the output formats, but it never states when to prefer it over the single-capture siblings (e.g., use capture_terminal for one image, capture_document to bundle many). Usage is inferable from 'step-by-step captures' and the 30-item cap, not stated explicitly.

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