Skip to main content
Glama
bitterdev

pdf-letter-mcp

by bitterdev

Prepare signature image

prepare_signature

Turns a scanned signature into a clean transparent PNG by cropping white borders and removing the background, optionally recolouring the ink for use in print-ready PDF letters.

Instructions

Cleans up a scanned signature: crops white borders, turns the paper background transparent and optionally recolours the ink. Writes a PNG that can be passed to create_letter as signature.path. Needs the optional sharp dependency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the scan (PNG, JPEG, and with sharp also WebP/TIFF/HEIC).
trimNoCrop uniform borders, default true.
base64NoImage data as base64 or data URL, alternative to path.
inkColorNoRecolour the ink, e.g. "#1a1a1a".
overwriteNo
outputPathNoTarget PNG path. Default: output directory plus "signature.png".
removeBackgroundNoTurn the white background transparent, default true.
backgroundThresholdNoLuminance cutoff, default 0.85.
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses the external sharp dependency requirement, describes the transformation behavior (cropping, transparency, recolouring), and names the output file. It doesn't disclose potential destructive overwrite behavior of the output path beyond implying output, though a boolean 'overwrite' parameter is present. Slightly incomplete but reasonable disclosure for the context.

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?

Three tight sentences: what the tool does, what it outputs and how it plugs into the pipeline, and the one external prerequisite (sharp). Zero filler, every sentence earns its place, and the most important information (purpose+output) is front-loaded.

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?

For an 8-parameter tool with no output schema, the description explains the core workflow (scan → clean PNG → create_letter). The sharp dependency note, output path default, and pipeline integration collectively give adequate context. It could mention default behaviors of trim/removeBackground (true) more explicitly, but the schema documents those. Reasonably complete for this complexity.

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 high at 88%, with most parameters having descriptive text. The description itself adds the key linking insight that the output PNG is intended for create_letter. It doesn't elaborate on parameter interplay (e.g., path vs base64 alternatives), but the schema already documents most parameter meanings well, so the high coverage makes an above-description contribution unnecessary.

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 (clean up/prepare), the resource (scanned signature), the specific operations (crops white borders, turns background transparent, recolours ink), and the output format (PNG). It also explicitly differentiates from siblings by noting the output 'can be passed to create_letter as signature.path', establishing its role in the pipeline.

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

Usage Guidelines4/5

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

The description provides clear operational context: it processes a scanned signature and produces a PNG for use with create_letter. It mentions the sharp dependency as a prerequisite for additional formats. However, it does not explicitly state when NOT to use it or name direct alternatives among siblings (create_letter consumes the output rather than competing).

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/bitterdev/pdf-letter-mcp'

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