Skip to main content
Glama

Sign a PDF with a PNG signature

sign_pdf
Read-onlyIdempotent

Stamp a PNG signature image onto one or more PDF pages at given positions (fractions of the page, x and y measured from the top-left, width as a fraction of page width). The signature keeps its aspect ratio. Returns the signed PDF as base64.

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": {
      "file": "<file>",
      "signature": "<signature>",
      "placements": "<placements>"
    },
    "name": "sign_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF to sign.
signatureYesThe signature as a PNG image, base64 or a public URL.
placementsYes

Output Schema

NameRequiredDescriptionDefault
dataYesSigned PDF as base64.
bytesYes
pageCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered; the description adds the real behavioral detail an agent needs — that the signature keeps its aspect ratio and that the result comes back as base64 rather than mutating a stored document. It does not mention the 20-placement cap or what happens when a placement falls outside page bounds, both of which affect correct invocation.

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 sentences with no filler: the operation and coordinate model come first, the return value last. Nothing is repeated and every clause carries information.

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?

With 3 required parameters, a nested placement array and an output schema, the description covers what is needed to call it correctly: the coordinate origin, fraction units, aspect-ratio behavior, and the base64 result. Edge behavior around out-of-range placements and page-content preservation is the remaining gap.

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 67%, and the description reinforces the placement coordinate system with its origin statement (x and y measured from the top-left, expressed as fractions). It adds genuine meaning with "The signature keeps its aspect ratio", which explains how the width value interacts with the unprovided height, but the rest largely restates what the placement schema already documents.

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?

"Stamp a PNG signature image onto one or more PDF pages at given positions" is a specific verb plus resource, and the closing sentence states the return form. It is clear on its own, but it never distinguishes itself from the adjacent fill_pdf_form sibling, which is the obvious alternative for placing a signature into a form field.

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?

No explicit when-to-use or when-not-to-use statement; the choice between this and fill_pdf_form (form-field signing vs. free-position image stamping) is left to inference. Usage is implied by the purpose, which meets the minimum-viable bar but no more.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.