Skip to main content
Glama
pzfreo

build123d-mcp

suggest_view_layout

Read-only

Calculate safe positions for front, plan, side, and iso views on a drawing sheet, preventing overlaps and title-block collisions. Returns coordinates, camera vectors, and layout warnings.

Instructions

DEPRECATED (#465) — moved to draftwright; off by default in 0.4.0, removed in 0.5.0. Calling it explains the replacement. Auto-calculate safe VIEW_X / VIEW_Y positions for a multi-view engineering drawing.

Measures the named shape's bounding box and returns per-view page positions
(VIEW_X, VIEW_Y), look_at values, and camera/up vectors for a standard
third-angle layout:

    [plan ]  [      ]
    [front]  [ side ] [ iso ]
                      [ title block (bottom-right) ]

Returns JSON with:
  views: {name: {VIEW_X, VIEW_Y, half_w, half_h, look_at, camera, up}}
  free_space: {name: {above/below: {x, y, h}, left/right: {x, y, w}}} — the
    empty rectangle outside each view edge, bounded by neighbouring views,
    the title block, and the margins; budget dimension tiers (n × tier
    pitch must fit in h/w) before placing annotations
  warnings: list of layout problems (out-of-bounds, title-block overlap)
  suggestion: recommended page_w/page_h/scale if the layout does not fit

object_name: name from show() — use "" to measure the current shape
page_w/page_h: sheet size in mm (default A4 landscape 297×210)
scale: drawing scale factor (default 1.0; use 2.0 for 2:1)
views: subset of ["front","plan","side","iso"] to place
title_block_w/h: reserved bottom-right area (default 150×30 mm)
margin: page margin in mm (default 10)
extents: [x, y, z] part sizes in mm — lays out from these numbers instead
    of a session object (use when the part isn't loaded, e.g. import failed)
centroid: [x, y, z] look_at origin when using extents (default [0, 0, 0])

Accuracy: front/plan/side positions are exact for orthographic projection.
Iso position is approximate (75% of 3-D diagonal as half-extent) — verify
with render_view() and adjust manually if the iso overlaps a neighbour.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNo
viewsNo
marginNo
page_hNo
page_wNo
extentsNo
centroidNo
object_nameNo
title_block_hNo
title_block_wNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.43
    • addedInput schema / properties / centroid
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Centroid"
      +}
    • addedInput schema / properties / extents
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Extents"
      +}
    • addedInput schema / properties / object_name / default
      Added value: +""
    • removedInput schema / required
      Removed value: -[
      -  "object_name"
      -]
  2. Addedv0.3.42

TDQS

A4.9/5.0
Behavior5/5

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

The annotations only declare readOnlyHint=true, so the description carries the behavioral disclosure burden. It adds substantial detail: the tool measures the named shape's bounding box, returns exact orthographic positions, approximates the iso position at 75% of the 3-D diagonal, and reports warnings/suggestions. It also discloses the deprecated runtime behavior ('Calling it explains the replacement'), which is useful for an agent deciding whether to invoke it.

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 description is long but well-structured with a deprecation banner, an ASCII layout diagram, output-shape explanation, parameter bullets, and an accuracy caveat. It front-loads the most important decision signal (deprecation) and each section earns its place, though it is denser than strictly necessary for a deprecated tool.

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?

Given 10 parameters, no schema-level parameter descriptions, and an output schema, the description nonetheless explains the return JSON structure, all parameter defaults, the layout algorithm, limitations, and follow-up verification. The only minor gap is that the replacement tool ('draftwright') is not itself a sibling in the current list, but the deprecation context is still sufficient.

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%, and the description compensates thoroughly by explaining every parameter: object_name, page_w/page_h, scale, views, title_block_w/h, margin, extents, and centroid. It adds meaning beyond the schema by giving defaults, valid view subsets, and the extents fallback use case.

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 states a clear verb and resource: 'Auto-calculate safe VIEW_X / VIEW_Y positions for a multi-view engineering drawing.' It also leads with deprecation and the replacement path ('moved to draftwright'), which prevents an agent from mistaking it for a current layout tool. This is distinct from sibling rendering/measurement tools because it is specifically about calculating page positions and layout data.

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?

The deprecation notice ('DEPRECATED (#465) — moved to draftwright; off by default in 0.4.0, removed in 0.5.0') is an explicit when-not-to-use signal with a named alternative. It also provides a concrete conditional for the extents parameter ('use when the part isn't loaded, e.g. import failed') and advises verifying the approximate iso placement with render_view().

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