Skip to main content
Glama

generate_pdf_sync

Produce a PDF document using a design template. Provide design ID, version, and content parameters to receive a download URL or local file.

Instructions

デザインIDとパラメータを指定してPDFを生成します。応答にダウンロード URL が含まれるため、本ツール 1 回の呼び出しで結果提示が完結します (別途ダウンロード用ツールを呼ぶ必要はありません)。

  • stdio モード (Claude Desktop / Code): ローカルに保存し絶対パスも返します。outputDir で保存先を指定できます (未指定時はクライアントのワークスペース Roots または OS 一時ディレクトリ)。

  • HTTP モード (claude.ai / n8n 等): サーバー側には保存しません。includePreview=true を指定すると inline preview 用のバイナリも併せて返します (claude.ai が PDF preview をサポートしていない現状ではデフォルト false 推奨)。

【重要】呼び出し前に必ず get_design_parameters でデザインの必要パラメータ構造を確認し、ユーザーから必要な値を聞き出すこと。プレースホルダー値・架空の値を勝手に生成しないこと。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
designIdYesデザインID(UUID形式)
versionYesデザインバージョン番号
contentYesPDF生成コンテンツ
outputDirNo出力先ディレクトリ (相対/絶対)。未指定時はクライアントのワークスペース (Roots) または現在の作業ディレクトリに保存。ユーザーが場所を指定した場合のみセットすること。
includePreviewNotrue 指定時のみ EmbeddedResource (application/pdf, base64 blob) を応答に含める。claude.ai は現状 PDF resource を inline 表示しないため、通常は省略 (false) で fileUrl のみを利用するのが効率的。
Behavior5/5

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

Description adds significant behavioral context beyond annotations: synchronous generation, download URL in response, local save for stdio, no server save for HTTP, optional inline preview. No contradictions with annotations (readOnlyHint=false, destructiveHint=false).

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?

Well-structured with bullet points for modes and warnings. Front-loaded key info. Slightly verbose but each part adds value. Could be marginally shorter but still effective.

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

Completeness5/5

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

Covers all aspects: pre-condition (check parameters), post-condition (download URL, local save), mode-specific details, parameter constraints. No output schema, but response description is sufficient. Comprehensive for a complex tool with nested object.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds critical context: outputDir default behavior, includePreview only when needed, params must come from get_design_parameters, shareType codes mapping. Enhances understanding beyond schema.

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 clearly states the tool generates a PDF synchronously with a download URL. It distinguishes from async siblings and download tools, and explains mode-specific behavior (stdio vs HTTP). The purpose is unambiguous.

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

Usage Guidelines5/5

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

Explicitly instructs to call get_design_parameters first, ask user for values, and avoid placeholder/fake data. Also provides when to use includePreview and outputDir. Differentiates from async tools and download tools.

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/re-port-flow/reportflow-mcp'

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