Skip to main content
Glama
mcp-web-print-pdf

mcp-web-print-pdf

by weixiaoyi

printPdfByBase64

Prints Base64-encoded PDF files to a local printer; set dry_run to true to preview rendering without producing paper.

Instructions

把 Base64 编码的 PDF 打印。默认出纸;dry_run: true 只预览

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": {
      "base64": "<base64>"
    },
    "name": "printPdfByBase64"
  }
}

Input Schema

NameRequiredDescriptionDefault
base64YesPDF 的 base64,可带 data:application/pdf;base64, 前缀
copiesNo便捷参数:份数
dry_runNofalse(默认)= 真正出纸;true = 只渲染预览。显式 extra_options.action 优先于本项
pdf_optionsNoPDF 排版选项(字段与客户端 pdfOptions 白名单一致,未知字段会报错)
paper_formatNo便捷参数:纸张名。标准纸名会同时写入 pdf_options.paperFormat 与 print_options.paperFormat;其它纸名只写后者
printer_nameNo便捷参数:打印机名,留空用系统默认打印机
extra_optionsNo额外选项:action/requestTimeout/cookies/httpHeaders/localStorages/sessionStorages,以及任意自定义键(会原样返回)
print_optionsNo打印机选项(字段与客户端 printOptions 白名单一致,未知字段会报错)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.4

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the single most important behavior: the default is a physical, irreversible print, not a preview. However, it says nothing about what dry_run returns (a preview address), what happens on printer errors, or that printer_name defaults to the system printer — all of which matter for a side-effecting tool.

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 clauses with the action and the safety-relevant default front-loaded; nothing is redundant or padded. Appropriate for a name that already encodes the input source.

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

Completeness3/5

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

The schema is very rich (8 top-level params, nested option objects, 100% description coverage), so the description needn't re-document fields. But with no annotations and no output schema, it should still say what a dry_run call returns and that previews are the safe way to verify before printing; that gap leaves it only minimally viable for a tool that consumes paper.

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% and every parameter, including the deeply nested pdf_options/print_options/extra_options, is documented in the schema. The description's only parameter mention ('dry_run: true 只预览') restates the schema, and the schema already documents the override rule that extra_options.action takes precedence. Baseline 3 is correct.

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 and resource ('把 Base64 编码的 PDF 打印' = print a Base64-encoded PDF), and the qualifier 'Base64 编码的' implicitly separates it from printPdfByUrl. It never names the sibling or states the URL alternative, so the differentiation is inferable rather than explicit.

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?

It gives one useful usage signal — that the default is a real paper output and dry_run: true previews instead — which functions as mode guidance rather than when-to-use guidance. There is no statement about when to pick this over printPdfByUrl or printFile, and no prerequisite (e.g., printer availability) is mentioned.

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