Find optimal distortion-free square grids for standard paper sizes
calculate_aspect_ratio_gridEvaluate standard paper or canvas sizes (A4, A3, A5, Letter, Legal, Tabloid, 8x10in, 9x12in, 11x14in, 16x20in, or custom) and return ranked distortion-free square-grid configurations with physical square sizes, margins, and aspect-ratio fit metrics.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calculate_aspect_ratio_grid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Physical unit ('cm', 'mm', or 'in') for output and custom/margin inputs. Defaults to 'cm' for ISO/custom sizes and 'in' for US presets. | |
| margin | No | Optional uniform margin on each of the four sides in unit. Defaults to 1 cm (10 mm) for metric units or 0.5 in for inches. | |
| paperSize | No | Standard paper or canvas preset ('A4', 'A3', 'A5', 'Letter', 'Legal', 'Tabloid', '8x10in', '9x12in', '11x14in', '16x20in') or 'custom'. Defaults to 'A4'. | A4 |
| maxColumns | No | Optional maximum column count to evaluate (2 to 50, >= minColumns). Defaults to 16. | |
| minColumns | No | Optional minimum column count to evaluate (2 to 50). Defaults to 4. | |
| customWidth | No | Custom paper/canvas width in unit. Required when paperSize is 'custom'. | |
| orientation | No | Sheet orientation: 'portrait', 'landscape', or 'auto' (matches image orientation when imageWidthPx/imageHeightPx are provided, otherwise portrait). | auto |
| customHeight | No | Custom paper/canvas height in unit. Required when paperSize is 'custom'. | |
| imageWidthPx | No | Optional reference image width in pixels to match aspect ratio and compute fitted drawing area on the sheet. | |
| imageHeightPx | No | Optional reference image height in pixels (provide together with imageWidthPx). |