Skip to main content
Glama

Fit Drawing to Page

fit_page
Destructive

Auto-fits a drawing to a sheet, recentering views so the part and its dimensions stay within the printable border. Call after placing dimensions to slide everything inside.

Instructions

Auto-fit a drawing to its sheet: recentre the views so the part AND its placed dimensions sit inside the printable border (clear of the title block). The projection group's Automatic scale already sizes the part; its dimensions extend a fixed margin beyond it which can run off an edge — call this after placing dimensions to slide everything inside. margin mm is the border inset. Returns {scale, fits, envelope, border}; fits=False means the part + dims are too large even when centred (use a larger sheet).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "page": "<page>"
    },
    "name": "fit_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageYes
marginNo
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false; the description is consistent with that, making clear that views are moved ('recentre the views', 'slide everything inside') so the agent understands prior placements change. It also discloses the return shape {scale, fits, envelope, border} in the absence of an output schema. It stops short of saying whether the move is reversible or whether any dimension annotations are re-anchored.

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 action is front-loaded in the first clause, and each subsequent clause carries real information (scope of the fit, why margins overflow, the margin unit, the return keys). Slightly dense as a single block — the return-value and failure-mode notes could be separated — but there is no filler.

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?

With no output schema, the description usefully enumerates the returned fields and interprets fits=False, and it explains the failure mode and remedy. The remaining gap is the undocumented required `page` parameter, which an agent needs to supply correctly.

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 only 33%, so the description must compensate; it does for `margin` ('margin mm is the border inset') but the required `page` parameter is undocumented in both schema and description — the agent must guess whether it is a name, handle, or index. Partial compensation justifies a mid score.

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 ('Auto-fit a drawing to its sheet: recentre the views') and explains the mechanism (projection group's Automatic scale, dimensions extending a fixed margin). It is clearly distinguishable from siblings like add_projection_group or add_dimension, which create rather than reposition content.

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?

Explicitly prescribes timing — 'call this after placing dimensions to slide everything inside' — and gives a clear when-not/failure path: 'fits=False means the part + dims are too large even when centred (use a larger sheet).' The agent knows both the trigger and the escape hatch without inference.

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