Skip to main content
Glama

Inspect And Cutout

inspect_and_cutout

Inspect a source photo for resolution, blur, edge cropping, and product size, then write a transparent PNG cutout using a local ONNX model.

Instructions

Inspect a source photo and write an RGBA cutout using a local ONNX model.

Requires the studio extra: pip install 'amazon-listing-kit[studio]'. model is isnet (default, Apache-2.0, ~180 MB, downloaded on first use), birefnet (MIT, ~220 MB), or fused (both). The inspection flags low resolution, blur, a product cut off at the edge, or a product that is too small in the frame. The cutout is written as a transparent 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>"
    },
    "name": "inspect_and_cutout"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoisnet
image_pathYes
output_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the dependency install, per-model download sizes and licenses, first-use download, what the inspection checks (resolution, blur, edge cutoff, product too small), and that the result is a transparent PNG written to disk. It omits whether an existing file at the destination is overwritten and where output lands when no path is given.

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?

Front-loaded with the action, then requirement, then model options, then inspection criteria, then output artifact. Parenthetical download details are dense but each earns its place; only the unlabeled model list reads slightly telegraphic.

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?

An output schema exists, so return values need no prose, and the inspection criteria are covered. The remaining gap is material for a tool that writes a file: the behavior of `output_path=null` and overwrite semantics are undocumented, which an agent needs before invoking it.

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 0%, and the description adds real meaning only for `model`, enumerating isnet/birefnet/fused with default, size, and license. `image_path` and `output_path` get no explanation, and the null default for `output_path` (i.e., where the PNG is written by default) is left entirely undefined.

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?

Specific verb pair and resource: 'Inspect a source photo and write an RGBA cutout using a local ONNX model.' An agent immediately knows it produces a transparent PNG from a photo. It does not, however, distinguish itself from siblings like check_main_image or fix_main_image, so an agent must infer the routing.

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?

Gives prerequisites ('Requires the studio extra: pip install ...') and model choices, which implies this is the heavier local-model path, but never states when to pick it over the sibling inspect/fix tools or when not to use it. Usage is implied rather than prescribed.

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