Skip to main content
Glama
pdf4me
by pdf4me

resize_image

Resize local images by percentage or specific pixel dimensions, with optional aspect ratio maintenance, and save the output to disk.

Instructions

Resize a local image using the PDF4me ResizeImage API (Percentage or Specific dimensions). Provide the image path, resize mode, and options (percentage or width/height, aspect ratio). Optional output directory and file name; saves the resized image to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoTarget width in pixels when using Specific mode.
heightNoTarget height in pixels when using Specific mode.
file_pathYesLocal path to the source image.
output_dirNo
output_file_nameNo
image_resize_typeNoPercentage (ResizePercentage) or Specific (Width/Height in pixels).Percentage
resize_percentageNoUsed when image_resize_type is Percentage (decimal string, e.g. "50.0").50.0
maintain_aspect_ratioNoPassed through to the API.
Behavior3/5

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

The description discloses that the tool saves the resized image to disk, which is an important side effect. However, it does not mention whether it overwrites existing files, what happens if the output directory doesn't exist, supported image formats, or error behavior. With no annotations, these gaps leave behavioral transparency partially incomplete.

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 and about 35 words, front-loaded with the core purpose. Every sentence contributes essential information without redundancy.

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 description covers the main workflow (path, mode, options, output) but lacks any mention of return values, error handling, or limitations like supported file types or overwrite behavior. Since there is no output schema and no annotations, the description should carry more of this burden to be fully complete.

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?

The description adds meaning beyond the schema by explaining that the 'image path' maps to file_path, 'resize mode' to image_resize_type, and 'percentage or width/height' to resize_percentage or width/height. It also clarifies that output directory and file name are optional, which is especially helpful since the schema does not describe those two parameters. This compensates for the 75% schema coverage.

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 says 'Resize a local image' with a specific verb and resource, and distinguishes from sibling tools like compress_image or crop_image. It also mentions the API and the two modes (Percentage or Specific), making the purpose unambiguous.

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 gives clear usage context: provide image path, resize mode, and options. It explains the two modes and optional output settings, but it does not explicitly mention when to use this tool versus alternatives (e.g., compress vs resize) or when not to use it.

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/pdf4me/pdf4me-mcp'

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