Skip to main content
Glama

pilot_pdf

Convert web pages to PDF files for saving or sharing content. Specify an output path to generate PDFs from browser automation.

Instructions

Save the current page as a PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_pathNoOutput file path

Implementation Reference

  • Registration and implementation of the 'pilot_pdf' tool.
    server.tool(
      'pilot_pdf',
      'Save the current page as a PDF.',
      { output_path: z.string().optional().describe('Output file path') },
      async ({ output_path }) => {
        await bm.ensureBrowser();
        try {
          const pdfPath = output_path || path.join(TEMP_DIR, 'pilot-page.pdf');
          await bm.getPage().pdf({ path: pdfPath, format: 'A4' });
          return { content: [{ type: 'text' as const, text: `PDF saved: ${pdfPath}` }] };
        } catch (err) {
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full disclosure burden. It fails to mention critical behavioral traits: file overwrite behavior, whether parent directories are created, if the operation blocks until completion, print settings (headers/footers), or return value format. For a filesystem mutation tool, this is inadequate.

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?

Extremely concise at 7 words with no redundant phrases. The sentence is front-loaded with the action verb. However, given the tool's behavioral complexity (file I/O with side effects), this extreme brevity contributes to under-specification in other dimensions.

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

Completeness2/5

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

With no output schema and no annotations, the description should compensate by explaining side effects and return behavior. It provides only the minimal action statement. For a file-writing operation, this leaves critical gaps in the agent's understanding of success/failure signals and filesystem impacts.

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 coverage is 100% for the single 'output_path' parameter. The description adds no additional parameter context (e.g., path format requirements, extension handling), meeting the baseline expectation when schemas are self-documenting.

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?

The description uses a specific verb ('Save') and clearly identifies the resource ('the current page') and output format ('PDF'). It implicitly distinguishes from sibling 'pilot_screenshot' by specifying PDF format, but does not explicitly discuss when to choose this tool over alternatives.

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?

No guidance provided on when to use this tool versus 'pilot_screenshot' or 'pilot_snapshot'. No prerequisites mentioned (e.g., requiring navigation to a page first), error conditions, or typical use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TacosyHorchata/Pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server