Skip to main content
Glama

CutOptim Engine

Validate a timber request

validate_wood
Read-onlyIdempotent

Free, no key needed: checks a timber request without solving it. Same arguments as optimize_wood (field descriptions there). Validate a wood request — free, no key, no quota, no solve. Schema-validate the SAME body /v1/optimize/wood takes, WITHOUT solving or spending a call. Warnings flag parts with no matching-section stock long enough. See /v1/validate/2d.

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": {
      "parts": "<parts>",
      "stock": "<stock>"
    },
    "name": "validate_wood"
  }
}

Input Schema

NameRequiredDescriptionDefault
asyncNoOpt in to answers that may arrive later. With `"auto"` a job that finishes within the synchronous time limit still answers 200 with the plan, exactly as without it; a job that would outgrow the limit answers **202** with a `jobId` instead, keeps solving, and its plan is read with `GET /v1/jobs/{id}` (the same poll as engine `max`). The call is billed once, when the plan is written; a solve that fails is not billed. Without this field such a job answers 504 `solve_timeout` with the `jobId` in `details` and is not charged. The official SDKs send it and wait for the job for you.
partsYesThe timber parts to cut, one row per part type: cross-section `sw` × `sh`, `length`, optional `qty`.
stockYesAt most 50 rows. Since every cross-section needs at least one stock row, this is also the practical ceiling on cross-sections in a single job; a wider catalogue should be split into several requests.
engineNoAs in 1D, `max` is not offered here (a **400** before a call is charged). `balanced` resolves to the same packer as `heuristic`: within a section a timber job is a length problem, and free nesting has nothing to offer it. The value is accepted, echoed back, and a warning states which packer actually ran.heuristic
includeNoThree kinds of token. NARROWING (`cutPlan`, `offcuts`): omit the field entirely to get both; a present array keeps only the narrowing tokens it lists (an empty array drops both). ADDITIVE EXPORT (`svg`, `csv`, `dxf`): each adds an inline export STRING to the response (`svg` a standalone 2D layout — 2D only, a warning is returned for 1D/wood; `dxf` an R12/AC1009 drawing; `csv` a cut list, RFC 4180 quoted (a part name with a comma or a quote stays one field) and formula-injection-guarded (a name beginning with `=`, `+`, `-`, `@`, TAB or CR is prefixed with an apostrophe so a spreadsheet reads it as text, not a formula — CWE-1236). 2D DATA (`labels`, `planHash`, `pdf`, `labelsPdf`): `labels` adds per-piece label data (`labels[]`, see `Label2D`), `planHash` a 64-hex fingerprint of the plan (the same plan always gives the same hash), `pdf` the cutting-plan PDF and `labelsPdf` the label PDF, both base64-encoded and drawn by the same code as the CutOptim app. These four are 2D only: a 1D or wood request returns a `warnings` entry instead. `pdf` renders at most 500 parts (total quantity); a larger 2D request with `pdf` is a 413 `too_large` with `details.path: "include"`. Export and data tokens do not affect narrowing, so `["svg"]` adds svg and — listing no narrowing token — drops cutPlan/offcuts; use `["cutPlan","offcuts","svg"]` to keep everything.
optionsNoIdentical to `Options1D` — a cross-section changes what fits, not how a bar is cut.

Output Schema

NameRequiredDescriptionDefault
modeYes
partsYes
stockYes
validYes
warningsYes
engineEnabledNo
contractVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / async
      Added value: +{
      +  "description": "Opt in to answers that may arrive later. With `\"auto\"` a job that finishes within the synchronous time limit still answers 200 with the plan, exactly as without it; a job that would outgrow the limit answers **202** with a `jobId` instead, keeps solving, and its plan is read with `GET /v1/jobs/{id}` (the same poll as engine `max`). The call is billed once, when the plan is written; a solve that fails is not billed. Without this field such a job answers 504 `solve_timeout` with the `jobId` in `details` and is not charged. The official SDKs send it and wait for the job for you.",
      +  "enum": [
      +    "auto"
      +  ],
      +  "type": "string"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / engine / description
      Added value: +"As in 1D, `max` is not offered here (a **400** before a call is charged). `balanced` resolves to the same packer as `heuristic`: within a section a timber job is a length problem, and free nesting has nothing to offer it. The value is accepted, echoed back, and a warning states which packer actually ran."
    • addedInput schema / properties / include / description
      Added value: +"Three kinds of token. NARROWING (`cutPlan`, `offcuts`): omit the field entirely to get both; a present array keeps only the narrowing tokens it lists (an empty array drops both). ADDITIVE EXPORT (`svg`, `csv`, `dxf`): each adds an inline export STRING to the response (`svg` a standalone 2D layout — 2D only, a warning is returned for 1D/wood; `dxf` an R12/AC1009 drawing; `csv` a cut list, RFC 4180 quoted (a part name with a comma or a quote stays one field) and formula-injection-guarded (a name beginning with `=`, `+`, `-`, `@`, TAB or CR is prefixed with an apostrophe so a spreadsheet reads it as text, not a formula — CWE-1236). 2D DATA (`labels`, `planHash`, `pdf`, `labelsPdf`): `labels` adds per-piece label data (`labels[]`, see `Label2D`), `planHash` a 64-hex fingerprint of the plan (the same plan always gives the same hash), `pdf` the cutting-plan PDF and `labelsPdf` the label PDF, both base64-encoded and drawn by the same code as the CutOptim app. These four are 2D only: a 1D or wood request returns a `warnings` entry instead. `pdf` renders at most 500 parts (total quantity); a larger 2D request with `pdf` is a 413 `too_large` with `details.path: \"include\"`. Export and data tokens do not affect narrowing, so `[\"svg\"]` adds svg and — listing no narrowing token — drops cutPlan/offcuts; use `[\"cutPlan\",\"offcuts\",\"svg\"]` to keep everything."
    • addedInput schema / properties / options / description
      Added value: +"Identical to `Options1D` — a cross-section changes what fits, not how a bar is cut."
    • addedInput schema / properties / parts / description
      Added value: +"The timber parts to cut, one row per part type: cross-section `sw` × `sh`, `length`, optional `qty`."
    • addedInput schema / properties / stock / description
      Added value: +"At most 50 rows. Since every cross-section needs at least one stock row, this is also the practical ceiling on cross-sections in a single job; a wider catalogue should be split into several requests."
  3. Changed3 schema fields changed
    • addedInput schema / properties / options / properties / mitrePairing
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / parts / items / properties / ends
      Added value: +{
      +  "properties": {
      +    "end": {
      +      "properties": {
      +        "angle": {
      +          "exclusiveMaximum": 90,
      +          "exclusiveMinimum": -90,
      +          "type": "number"
      +        },
      +        "bevel": {
      +          "default": 0,
      +          "exclusiveMaximum": 90,
      +          "exclusiveMinimum": -90,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "angle"
      +      ],
      +      "type": "object"
      +    },
      +    "start": {
      +      "properties": {
      +        "angle": {
      +          "exclusiveMaximum": 90,
      +          "exclusiveMinimum": -90,
      +          "type": "number"
      +        },
      +        "bevel": {
      +          "default": 0,
      +          "exclusiveMaximum": 90,
      +          "exclusiveMinimum": -90,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "angle"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / parts / items / properties / flip
      Added value: +{
      +  "default": "none",
      +  "enum": [
      +    "none",
      +    "face",
      +    "edge",
      +    "any"
      +  ],
      +  "type": "string"
      +}
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but they do not cover billing or quota, and the description adds that this costs nothing, needs no key, has no quota and does not consume a solve call. It also discloses a specific output behavior — warnings flag parts with no matching-section stock long enough — which is useful context for interpreting results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The same point is made three times in a row: 'Free, no key needed: checks a timber request without solving it', 'Validate a wood request — free, no key, no quota, no solve', and 'WITHOUT solving or spending a call'. 'Same arguments as optimize_wood' and 'Schema-validate the SAME body' repeat each other as well, so a large share of the text does not earn its place.

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

Completeness3/5

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

The output schema and annotations cover return shape and safety, and the warning behavior is described, but for a validation tool the description never says what happens on an invalid body — a 200 with warnings/errors versus a 4xx — which is the single most important behavioral question here. The trailing 'See /v1/validate/2d' is also an unexplained pointer that reads more like a docs path than guidance.

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% and the field descriptions are inline, so the schema carries the parameter burden; the description only redirects to optimize_wood for argument meaning and asserts the body is the same. That is a fair baseline, though it adds no wood-specific clarification for ambiguous fields such as `include` tokens that are documented as 2D-only.

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 specific verb and resource — 'checks a timber request without solving it', 'Schema-validate the SAME body /v1/optimize/wood takes' — which is unambiguous against the solving sibling optimize_wood and against validate_1d/validate_2d by resource. An agent can select it without opening the schema.

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

Usage Guidelines4/5

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

It gives a clear selection context: free, no key, no quota, no solving, so you use it when you want to check a wood body without spending a call; 'Same arguments as optimize_wood' also links it to the paid counterpart. It stops short of an explicit 'use optimize_wood when you want the actual plan' exclusion, but the contrast is inferable from 'WITHOUT solving'.

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.