Skip to main content
Glama

Trace Outline from Image

trace_from_image

Use this when you need to trace features from a reference photo into waypoints. Trace pixel-space features from a reference photo into normalized [0..1] waypoints the agent can map to mm via a known scale anchor and feed to path().spline / path().nurbsSegment. Three backends are dispatched behind the scenes: opencv (deterministic; uniform-bg silhouette only), vision-llm (vision model; named points/cluttered backgrounds; needs ANTHROPIC_API_KEY or an OpenAI-compatible vision endpoint configured on the server), and hybrid (opencv silhouette + LLM-labeled named points). Default backend is auto — the tool picks based on the image's corner-color stddev. Accuracy honesty: opencv contour is geometrically exact; vision-LLM is typically 5–10% off on dense landmarks. Per-feature confidence is reported. Vision-LLM spend is billed to whoever configured the vision model. Pair with the kernelcad-trace-from-image skill for the conversion-to-mm pipeline. Hosted: give the file as an https:// URL, a data: URI (base64, max 25 MB) or "asset:" from request_upload (when the file is on the user's device).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNoOptional free-text hint forwarded to vision-LLM backends (e.g. "a pair of eyewear; trace the upper brow only").
intentNoThe user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
priorsNoCaller-supplied category-norm defaults (e.g. wall thickness) recorded verbatim as `assumed` ledger facts.
backendNoForce a specific backend; default `auto` routes by corner-color stddev.
featuresNoFeatures to trace. Defaults to a single { label: "silhouette", kind: "silhouette" } when omitted.
imageUrlYesURL or path to the reference image. Supports file://, http(s)://, data:image/...;base64,..., or a bare filesystem path. Hosted server: pass an https:// URL, a data: URI, or "asset:<id>" from request_upload — not a path on your machine.
validateNoAssumption-ledger strictness. `warn` (default) never blocks. `error` fails the call when any `missing` ledger fact (e.g. scale) is still open.
scaleAnchorNoPixel-to-real-world scale anchor: two measured points on the image. Absent -> the returned ledger's `scale` fact is `missing`.
maxWaypointsPerFeatureNoCap on waypoints per feature. Defaults to 12 (suitable for medium-inflection outlines).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties
      Removed value: -{
      -  "diagnostics": {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "features": {
      -    "description": "Traced features with normalized [0..1] waypoints + confidence.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "imageDims": {
      -    "description": "Pixel dimensions [width, height] of the source image.",
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  "ledger": {
      -    "additionalProperties": true,
      -    "description": "Assumption ledger: { facts, scale?, unresolvedCount } classifying every fact as visible/inferred/assumed/missing.",
      -    "type": "object"
      -  },
      -  "ok": {
      -    "type": "boolean"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok",
      -  "features",
      -  "imageDims",
      -  "diagnostics",
      -  "ledger"
      -]
  2. Changed2 schema fields changed
    • changedInput schema / properties / imageUrl / description
      Previous value: -"URL or path to the reference image. Supports file://, http(s)://, data:image/...;base64,..., or a bare filesystem path."New value: +"URL or path to the reference image. Supports file://, http(s)://, data:image/...;base64,..., or a bare filesystem path. Hosted server: pass an https:// URL, a data: URI, or \"asset:<id>\" from request_upload — not a path on your machine."
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.",
      +  "maxLength": 2000,
      +  "type": "string"
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / priors
      Added value: +{
      +  "description": "Caller-supplied category-norm defaults (e.g. wall thickness) recorded verbatim as `assumed` ledger facts.",
      +  "items": {
      +    "properties": {
      +      "confidence": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "statement": {
      +        "type": "string"
      +      },
      +      "value": {}
      +    },
      +    "required": [
      +      "id",
      +      "statement",
      +      "value",
      +      "confidence"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / scaleAnchor
      Added value: +{
      +  "description": "Pixel-to-real-world scale anchor: two measured points on the image. Absent -> the returned ledger's `scale` fact is `missing`.",
      +  "properties": {
      +    "pixelDistance": {
      +      "description": "Distance in pixels between the two measured points.",
      +      "type": "number"
      +    },
      +    "realDistance": {
      +      "description": "The same distance in real-world units.",
      +      "type": "number"
      +    },
      +    "unit": {
      +      "enum": [
      +        "mm",
      +        "cm",
      +        "in"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "pixelDistance",
      +    "realDistance",
      +    "unit"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / validate
      Added value: +{
      +  "description": "Assumption-ledger strictness. `warn` (default) never blocks. `error` fails the call when any `missing` ledger fact (e.g. scale) is still open.",
      +  "enum": [
      +    "warn",
      +    "error"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / ledger
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Assumption ledger: { facts, scale?, unresolvedCount } classifying every fact as visible/inferred/assumed/missing.",
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "ok",
      -  "features",
      -  "imageDims",
      -  "diagnostics"
      -]New value: +[
      +  "ok",
      +  "features",
      +  "imageDims",
      +  "diagnostics",
      +  "ledger"
      +]
  4. Added
  5. Removed
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "diagnostics": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "features": {
      +      "description": "Traced features with normalized [0..1] waypoints + confidence.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "imageDims": {
      +      "description": "Pixel dimensions [width, height] of the source image.",
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "features",
      +    "imageDims",
      +    "diagnostics"
      +  ],
      +  "type": "object"
      +}
  7. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.