Skip to main content
Glama
pdf4me
by pdf4me

crop_image

Crop an image by removing outer edges with Border mode (set left, right, top, bottom) or by isolating a Rectangle region using upper-left x/y, width, and height.

Instructions

Crop an image via PDF4me CropImage (/api/v2/CropImage). Choose crop_type Border or Rectangle. Border: set left/right/top/bottom border in pixels. Rectangle: set upper_left_x/y and width/height.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNo
heightNo
doc_nameNo
crop_typeNoBorder
output_dirNo
top_borderNo
left_borderNo
right_borderNo
upper_left_xNo
upper_left_yNo
bottom_borderNo
image_file_pathYes
output_file_nameNo
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It explains parameter meanings but does not state whether the operation mutates the original file, where output is saved, or what the response contains. The lack of output schema and side-effect information is a notable gap.

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 concise and well-structured: it opens with the core action, then explains the two modes and their respective parameters in a compact format. Every sentence adds value 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?

Given the tool's complexity (13 parameters, no output schema, no annotations), the description covers the essential crop logic but leaves several parameters undocumented (image_file_path, doc_name, output_dir, output_file_name). It is adequate for understanding the main functionality but incomplete for a fully autonomous agent.

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 0%, but the description adds significant meaning by grouping parameters according to crop_type: border-related params (left/right/top/bottom_border) and rectangle-related params (upper_left_x/y, width, height). It also clarifies units (pixels). However, it does not explain required params like image_file_path or output options, so it falls short of full compensation.

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 'Crop an image' with a specific verb and resource, and goes on to distinguish the two crop modes (Border vs Rectangle). This differentiates it from sibling image tools like resize_image, rotate_image, and flip_image.

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 implies when to use this tool (when cropping is needed) and provides explicit guidance on which parameters apply to each crop_type. However, it does not explicitly exclude alternatives or mention when not to use this tool.

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