Skip to main content
Glama

Moltline Vision Maths

Resize Plan

resize_plan
Read-onlyIdempotent

Work out the exact scale, padding and crop for a model input size. FREE.

Returns the numbers you need to transform boxes alongside the image, which is the step that usually gets skipped. Typical input {"width": 1920, "height": 1080, "target": "yolo_640"} returns {"scale": 0.3333, "resized": [640, 360], "pad": {"left": 0, "top": 140, "right": 0, "bottom": 140}, "box_transform": "x_new = x * 0.3333 + 0; y_new = y * 0.3333 + 140"}.

Use before feeding an image to a fixed-input model. Not for finding out the image's size in the first place - that is image_probe. Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "unknown target ; use one of or set"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

NameRequiredDescriptionDefault
modeNo"letterbox" scales to fit and pads the remainder, preserving aspect; "cover" scales to fill and crops the overflow; "stretch" distorts to fit exactly. Default "letterbox".letterbox
widthYesSource image width in pixels.
heightYesSource image height in pixels.
targetNoA named preset: "clip_224", "vit_384", "yolo_640", "sam_1024", "sd_512", "sd_768" or "detr_800". Ignored when target_size is set.yolo_640
target_sizeNoA square side length in pixels, overriding target. Use this for a size the presets do not cover.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, yet the description adds a genuinely non-obvious contract: invalid input never raises a protocol error but returns an {"error": ...} object, and retry after correction is always safe. The retry sentence partly restates the idempotentHint, which keeps this from a 5, but the error-shape disclosure is real added value.

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 purpose, then usage, then error behavior - a sensible order with no filler paragraphs. The standalone "FREE." token and the verbose rendered example are the only parts that cost space without adding decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is non-trivial (5 params, presets, three modes) and the description covers when to call it, what the output means for downstream box transforms, and the exact error contract. An output schema exists, so return values need not be explained, yet the example still orients the 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 100%, so per-tool baseline is 3, but the worked example ({"width": 1920, "height": 1080, "target": "yolo_640"} -> scale/resized/pad/box_transform) concretizes what width, height and target actually produce and shows the default target in action. It does not add anything about mode or target_size beyond the schema, so it stays below 5.

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?

States a specific verb and resource: compute the exact scale, padding and crop for a model input size. It also names what it is not (image_probe) so an agent can separate it from the closest sibling without opening either schema.

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

Usage Guidelines5/5

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

"Use before feeding an image to a fixed-input model" gives the trigger condition, and "Not for finding out the image's size in the first place - that is image_probe" gives an explicit exclusion plus the alternative tool by name.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.