Skip to main content
Glama

存为 PDF

browser_pdf

Render the active page to an A4 PDF with backgrounds, save it to an allowed export path, and return the file path.

Instructions

Render the active page to a PDF (A4, print background on) and save it. Returns the file path.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOutput file path inside the browser export dirs (~/.aabrowser/downloads, har, screenshots or AA_BROWSER_EXPORT_DIR; default ~/.aabrowser/downloads/aa-page-<ts>.pdf). Symlinks and paths outside those dirs are rejected.
tabIdNoTab id (default: active tab)
landscapeNoLandscape orientation (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true, so the safety profile is largely covered. The description adds useful behavior beyond that: it writes a file to disk and returns the resulting path, plus the fixed A4/background-printing settings are stated. Nothing is said about overwriting an existing target file or about how the page render relates to the live tab state, and since there is no output schema the one-line return value note carries the whole burden.

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?

Two short sentences, front-loaded with the action and format, followed by the return value. Every clause carries information and nothing is padded.

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 three-parameter, zero-required tool with full schema coverage and no output schema, the description covers what it does, its fixed settings, and its return value. It could say more about file overwrite behavior and what the PDF contains relative to the live page, but nothing essential for correct invocation is absent.

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%, with the 'path' property fully documenting the export directory constraint, symlink rejection and default filename, and 'tabId'/'landscape' both described. The description adds no parameter meaning of its own; 'active page' only loosely reinforces the tabId default already stated in the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Render... to a PDF') and resource ('the active page'), plus the concrete output format (A4, print background on) and the return value (file path). An agent knows exactly what this produces. It stops short of 5 only because no sibling (e.g. browser_screenshots or browser_evidence) is named to disambiguate the choice of output format.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is mentioned for capturing page output. The choice between producing a PDF versus a screenshot or an evidence bundle is left entirely to inference.

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