Skip to main content
Glama

zoom_to_object

Crops an image to a specified object's bounding box for close analysis. Uses zero-shot object detection to find the best match.

Instructions

Zoom into an object in the image, allowing you to analyze it more closely. Crop image to the object bounding box and return the cropped image. If many objects are present in the image, will return the 'best' one as represented by object score.

Args:
    image_path: path to the image
    label: object label to find and crop to
    hf_model (optional): huggingface zero-shot object detection model (default = "google/owlvit-large-patch14")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYes
hf_modelNo
image_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses that this is a crop operation, returns the cropped image, uses zero-shot detection with a default model, and picks the highest-scoring object. It does not cover failure modes, but the core behavior is transparent.

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?

The main action is front-loaded and the Args section is cleanly organized. The first sentence is slightly redundant with the second, but there is little wasted text and no irrelevant detail.

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 a simple crop tool with no annotations and no output schema, it covers inputs, optional configuration, selection behavior, and the return type. The main missing piece is edge-case behavior, such as what happens when the requested label is not found.

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

Parameters5/5

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

Schema description coverage is 0%, but the Args block fully compensates: image_path is defined, label is described as the object label to find and crop to, and hf_model is documented as optional with its default model. This is exactly the information an agent needs to call the tool.

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 is specific: it zooms into an object, crops to its bounding box, and returns the cropped image. Although it does not name locate_objects, the crop-and-return behavior clearly differentiates it from a tool that would locate objects and return coordinates.

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?

It gives a clear intended use case ('allowing you to analyze it more closely') and clarifies selection behavior when multiple objects are present. It does not explicitly contrast with locate_objects or state when not to use it, but the context is clear enough for selection.

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