Skip to main content
Glama

resize_image_preserve_aspect

Calculate image dimensions while preserving aspect ratio and clamping to integer boundaries. Use for resizing with exact dimension constraints.

Instructions

In-memory image dimension calculator with aspect ratio preservation and integer boundary clamping. (0.01 USDC on Base L2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesInput parameters or JSON string payload for the tool execution
paymentSignatureNoBase L2 USDC micropayment signature or transaction hash for x402 settlement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It adds useful context such as 'in-memory', 'integer boundary clamping', and a stated cost, which suggests a side-effect-light computation. However, it does not disclose return behavior, error handling, whether paymentSignature is actually required, or what happens on invalid input.

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 one concise, front-loaded sentence with no filler, and the pricing parenthetical is genuinely useful supplementary context. It is efficient and every part of the sentence contributes meaning.

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

Completeness2/5

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

Despite being a simple two-parameter tool, the generic payload schema and absence of an output schema leave major gaps: the required JSON format, expected input values, and return structure are unspecified. An agent cannot reliably construct a correct call from this description alone.

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 100%, so the baseline is 3; the schema descriptions for payload and paymentSignature are generic placeholders. The tool description adds the semantic clue that the payload concerns image dimensions, but it does not specify expected fields, JSON shape, or payment handling.

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 clearly identifies the resource and function: it computes image dimensions while preserving aspect ratio and clamping to integer boundaries. This distinguishes it from sibling image tools like compress_image_webp and convert_svg_to_png, though it uses the noun 'calculator' rather than an explicit verb.

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?

No guidance is provided about when to use this tool versus alternatives, and no exclusions or sibling comparisons are mentioned. The 'calculator' wording weakly implies a pure dimension-calculation use case, but the agent is left to infer the intended context.

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