Skip to main content
Glama

ai_modeling_image_crop

Crop images locally to a specified region with an optional aspect ratio and fixed output size, then save the result as a PNG.

Instructions

crop an image locally with an optional aspect ratio and fixed output size, saving PNG

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": {
      "image_path": "<image_path>",
      "destination_path": "<destination_path>",
      "left": "<left>",
      "top": "<top>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "ai_modeling_image_crop"
  }
}

Input Schema

NameRequiredDescriptionDefault
topYes
leftYes
widthYes
heightYes
image_pathYes
aspect_ratioNoOptional crop ratio constraint (width / height); one source pixel of rounding is allowed.
output_widthNoResize the cropped area to this width, matching the browser fixed-output crop.
output_heightNo
destination_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the description's added value is modest but real: it states the operation is local and that output is a PNG written to a destination. It omits important behavior for a file-writing tool, such as whether an existing destination file is overwritten, whether parent directories are created, and what is returned. Note a mild tension: the description says 'locally' while openWorldHint=true is set, though this is not a direct contradiction of the declared semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact sentence with the core action front-loaded and no filler. It is somewhat run-on, folding output format and optional modifiers into a single clause, but nothing is wasted.

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?

For a 9-parameter, 6-required file-mutating tool with no output schema, the definition should say more about coordinate semantics, overwrite behavior, and the returned value. The PNG output and local-execution facts are the key omissions it does cover, but the gap around the geometry parameters and side effects leaves it short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 22%, so the description must carry the load, and it explains only the aspect-ratio and fixed-output-size concepts. The six required parameters (image_path, destination_path, left, top, width, height) receive no semantic elaboration — notably whether coordinates are in source pixels and whether width/height are relative to the source or the crop box.

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?

The description gives a specific verb and resource ('crop an image') plus distinguishing scope ('locally', 'saving PNG'), which separates it from remote image operations. It does not name or contrast any sibling such as ai_modeling_image_process, so the reader must infer the boundary themselves.

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

Usage Guidelines2/5

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

'Locally' hints that this is client-side processing rather than a server round-trip, but there is no explicit statement of when to choose this over ai_modeling_image_process or the generation/template tools. No prerequisites, no exclusions, no alternatives are named.

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

Deploy Server

Other Tools