Skip to main content
Glama
Nizoka

pdfnative-mcp

Embed image in PDF

embed_image
Idempotent

Embed a base64-encoded JPEG or PNG image into a PDF document. Optionally add a caption, set custom dimensions, and apply PDF/A conformance for archival.

Instructions

Generate a PDF document with an embedded JPEG or PNG image. The image is accepted as a base64-encoded string and can include an optional caption and custom render dimensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesDocument title rendered at the top and used as PDF metadata title.
imageBase64YesBase64-encoded image bytes. Supports JPEG and PNG formats.
mimeTypeYesMIME type of the image. Must match the actual encoding of imageBase64.
captionNoOptional caption rendered below the image.
widthNoRender width in points. If omitted, the image is auto-sized to fit the page.
heightNoRender height in points. If omitted, aspect ratio is preserved.
pdfANoOptional PDF/A conformance level (powered by pdfnative v1.2). Use 'pdfa1b' for archival of simple text+images, 'pdfa2b'/'pdfa2u' for richer content (2u guarantees Unicode mapping), 'pdfa3b' when embedding source attachments (Factur-X / ZUGFeRD). Mutually exclusive with PDF encryption. See docs/guides/PDFA.md.
outputModeNoEither 'base64' (returns the PDF inline) or 'file' (writes to a sandboxed path inside PDFNATIVE_MCP_OUTPUT_DIR).base64
outputPathNoRequired when outputMode='file'. Relative path inside the sandbox; must end with .pdf.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
sizeBytesYes
filePathNoAbsolute sandboxed file path (when mode='file').
base64NoBase64-encoded PDF bytes (when mode='base64').
Behavior3/5

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

Annotations already indicate idempotentHint=true, so the description's statement about generating a PDF does not contradict. The description adds some behavioral context (accepts base64, supports options) but does not disclose potential side effects, authorization needs, or limitations like file size. It is adequate but not rich.

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?

The description is two sentences totaling 32 words, front-loaded with the core purpose. Every word earns its place; there is no redundancy or fluff. It is highly concise and well-structured.

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?

Given the tool's complexity (9 parameters, 3 required, output schema exists), the description covers the main input format, optional features, and basic behavior. It could mention output format or PDF/A compatibility explicitly, but the schema and annotations fill some gaps. It is complete enough for an AI agent to understand the tool's purpose and basic usage.

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?

With 100% schema description coverage, the input schema fully documents all 9 parameters. The description only mentions 'optional caption and custom render dimensions,' which adds minimal value beyond the schema's detailed parameter descriptions. Baseline of 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 clearly states the verb ('generate'), resource ('PDF document with embedded image'), and scope ('JPEG or PNG, base64-encoded, optional caption and custom render dimensions'). It effectively distinguishes from sibling tools like add_attachment or add_barcode by focusing on embedding an image directly into the PDF.

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?

The description implies when to use this tool (embedding an image as part of a PDF), but it does not provide explicit guidance on when not to use it or direct comparisons to alternatives like add_attachment. The context is clear, but lacks exclusionary or alternative recommendations.

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/Nizoka/pdfnative-mcp'

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