Skip to main content
Glama

capture_batch

Capture multiple documentation items in one call, such as terminal output, code files, and browser screenshots. Process up to 10 captures sequentially for batch documentation generation.

Instructions

Capture multiple items in a single call. Each capture is processed sequentially with its own parameters. Use for batch documentation generation (e.g., capture terminal output, code file, and browser screenshot together). Maximum 10 captures per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputNoOutput directory (default: SNAPMCP_DIR). Captures saved as individual files.
capturesYesArray of captures to process. Each capture specifies its type and type-specific parameters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.3.4
    • addedInput schema / properties / captures / description
      Added value: +"Array of captures to process. Each capture specifies its type and type-specific parameters."
    • addedInput schema / properties / captures / items / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "lines": {
      +        "description": "Lines to render. Prefix with '$ ' for prompts.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "title": {
      +        "description": "Window title (default: 'terminal')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "terminal",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "lines",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "code": {
      +        "description": "Source code to render",
      +        "maxLength": 200000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "endLine": {
      +        "description": "Last line number (1-indexed, inclusive)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "language": {
      +        "default": "text",
      +        "description": "Programming language (typescript, python, rust, go, etc.)",
      +        "type": "string"
      +      },
      +      "startLine": {
      +        "description": "First line number (1-indexed)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "title": {
      +        "description": "Window title (default: 'code')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "code",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "endLine": {
      +        "description": "Last line number (1-indexed, inclusive)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "filePath": {
      +        "description": "Absolute path to file (must be in SNAPMCP_ALLOWED_PATHS)",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "startLine": {
      +        "description": "First line number (1-indexed)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "type": {
      +        "const": "file",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filePath",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "fullPage": {
      +        "default": false,
      +        "description": "Capture full scrollable page",
      +        "type": "boolean"
      +      },
      +      "height": {
      +        "default": 800,
      +        "description": "Viewport height (px)",
      +        "maximum": 4096,
      +        "minimum": 240,
      +        "type": "integer"
      +      },
      +      "type": {
      +        "const": "browser",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "URL to capture (http/https, SSRF protected)",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "width": {
      +        "default": 1280,
      +        "description": "Viewport width (px)",
      +        "maximum": 3840,
      +        "minimum": 320,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "url",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "markdown": {
      +        "description": "Markdown content (GFM supported)",
      +        "maxLength": 200000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Document title (default: 'document')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "markdown",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "markdown",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "html": {
      +        "description": "HTML content (external resources blocked)",
      +        "maxLength": 200000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Description for logging (default: 'html')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "html",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "html",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "diff": {
      +        "description": "Unified diff content (git diff format)",
      +        "maxLength": 500000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "diff",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "diff",
      +      "type"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / captures / items / properties
      Removed value: -{
      -  "caption": {
      -    "description": "Optional caption/label for the capture",
      -    "type": "string"
      -  },
      -  "params": {
      -    "additionalProperties": {},
      -    "description": "Parameters for the capture type",
      -    "propertyNames": {
      -      "type": "string"
      -    },
      -    "type": "object"
      -  },
      -  "type": {
      -    "enum": [
      -      "terminal",
      -      "code",
      -      "file",
      -      "browser",
      -      "markdown",
      -      "html",
      -      "diff"
      -    ],
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / captures / items / required
      Removed value: -[
      -  "type",
      -  "params"
      -]
    • removedInput schema / properties / captures / items / type
      Removed value: -"object"
    • changedInput schema / properties / output / description
      Previous value: -"Output directory (default: SNAPMCP_DIR)"New value: +"Output directory (default: SNAPMCP_DIR). Captures saved as individual files."
  2. First observedv2.3.2

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It adds useful behavioral context: 'Each capture is processed sequentially with its own parameters' and 'Maximum 10 captures per call.' However, the max limit is already in the schema, and the description does not cover failure behavior, what happens if one capture fails, or file-output side effects beyond what the schema's output parameter implies.

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?

The description is compact: three sentences covering purpose, batch use case, and the key 10-capture limit. The limit repeats schema maxItems, but restating it in the description is helpful for quick scanning. The example earns its place by making the batch intent concrete.

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 batch wrapper tool with a rich schema and many sibling tools, the description clarifies why an agent would choose capture_batch over single-capture tools. It does not explain output structure or error handling, but the schema covers per-capture parameters and the output directory, so the description is largely sufficient for selection and invocation.

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 the schema already documents the captures array and its per-type properties in detail. The description's mention that 'Each capture is processed sequentially with its own parameters' adds little semantic value beyond the schema, which fully specifies the oneOf structure. Baseline 3 is appropriate.

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?

The description states a clear verb and resource: 'Capture multiple items in a single call.' It is immediately distinguishable from single-capture siblings like capture_terminal and capture_browser because it frames itself as a batch operation. The example ('capture terminal output, code file, and browser screenshot together') further clarifies the intended resource scope.

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

Usage Guidelines4/5

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

The description gives explicit usage context: 'Use for batch documentation generation' and provides a concrete example of mixed capture types. It does not explicitly say when to avoid this tool in favor of single-capture siblings, but the batch versus single distinction is strongly implied by the wording and sibling names.

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