Skip to main content
Glama

Open in Studio

open_in_studio

Save/publish the current kernelCAD model AND display it in one step: persists the project, returns the interactive Studio viewer (MCP Apps / ChatGPT outputTemplate), and includes a PNG preview in the SAME tool result (image content + previewUrl when available). Use this when the user wants to SEE or share the model — do NOT call get_latest_render afterwards for the happy path; the preview is already here when previewDelivered is true. Pass the full .kcad source as code (optional if you just called evaluate_script — omitting reuses that last evaluated source). Pass slug from a previous call to update the same project in place; omit slug only for a new separate model. Status fields: ok=true means publish succeeded (under CDN, meshStatus ready/building; ok=false + meshStatus=failed means hard mesh persist failure — do not claim the viewer is ready). previewDelivered=true means this result carries a displayable PNG — only then may you tell the user a preview was shown. meshStatus mirrors get_project (ready|building|failed|missing). Under CDN, heavy meshes may return meshStatus=building quickly while OCCT finishes; the embed retries meshUrl — do not wait or re-publish just for the mesh. Pass include_preview:false to skip the rasterizer (save + viewer URLs only). Trigger phrases: "open it in Studio", "let me see it", "show me the model"; also call after you finish a build and after each meaningful revision while iterating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoThe full .kcad source of the model to open in Studio (the script you have been editing). Optional: omit to reuse the source from your most recent evaluate_script call.
slugNoSlug returned by a previous open_in_studio call. When given, updates that existing project in place (live-updating the user's open Studio tab) instead of creating a new one.
titleNoOptional human-readable title for the model (shown in Studio). Defaults to "Model from Claude".
parametersNoOptional list of the model's editable parameters, so Studio can render parameter controls. Each item is one control derived from the .kcad params.
attachmentsNoComplementary project files referenced by relative path from the .kcad source.
include_previewNoDefault true: render an iso PNG preview into this same tool result (reuses the server render cache when this source was already rendered). Set false to skip rasterization and return save/viewer URLs only.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNoWhether publish succeeded. Under CDN mode, false when mesh persist hard-failed (meshStatus:failed) — never ok:true with meshUrl silently omitted.
urlNoThe /p/<slug> Studio link for the model.
slugNoThe project slug; pass it back to update this project in place.
meshUrlNoRevision-matched mesh artifact URL when available — prefer this over re-executing CAD in the embed. When meshStatus is building, this is the expected CDN URL (retry until ready).
updatedNoTrue when an existing project was updated; false when a new one was created.
versionNoImmutable Studio revision persisted by this call. Read it with get_project_revision using this slug and version.
embedUrlNoRead-only, chrome-free /embed/<slug> viewer URL — drop into an <iframe> to embed the live model in any site or widget (no login). Includes meshUrl when a revision mesh artifact is available.
meshErrorNoSanitized persist/repair error when meshStatus is failed.
meshStatusNoready | building | failed | missing — explicit CDN artifact state (never silently omit meshUrl under CDN mode).
previewUrlNoHTTPS URL of the PNG preview when storage signed successfully.
assetHashesNo
previewHintNo
previewViewNo
serverBuildNoDeploy identity so connector vs server mismatch is observable.
previewBytesNo
previewWidthNo
previewCachedNo
previewHeightNo
previewStatusNoincluded = PNG + URL; included_inline = PNG only; unavailable = save ok but no preview; skipped = include_preview:false.
attachmentCountNo
previewDeliveredNoTrue when this result includes a displayable PNG (image content and/or previewUrl). Only then may the agent claim a preview was shown to the user.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / meshError
      Added value: +{
      +  "description": "Sanitized persist/repair error when meshStatus is failed.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / meshPersistError
      Removed value: -{
      -  "description": "Set when the revision mesh could not be stored on the CDN. meshUrl is omitted in that case.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / meshStatus
      Added value: +{
      +  "description": "ready | building | failed | missing — explicit CDN artifact state (never silently omit meshUrl under CDN mode).",
      +  "enum": [
      +    "ready",
      +    "building",
      +    "failed",
      +    "missing"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / meshUrl / description
      Previous value: -"Revision-matched mesh artifact URL when available — prefer this over re-executing CAD in the embed."New value: +"Revision-matched mesh artifact URL when available — prefer this over re-executing CAD in the embed. When meshStatus is building, this is the expected CDN URL (retry until ready)."
    • changedOutput schema / properties / ok / description
      Previous value: -"Whether the model was persisted."New value: +"Whether publish succeeded. Under CDN mode, false when mesh persist hard-failed (meshStatus:failed) — never ok:true with meshUrl silently omitted."
  2. Changed1 schema field changed
    • addedOutput schema / properties / meshPersistError
      Added value: +{
      +  "description": "Set when the revision mesh could not be stored on the CDN. meshUrl is omitted in that case.",
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • changedOutput schema / properties / embedUrl / description
      Previous value: -"Read-only, chrome-free /embed/<slug> viewer URL — drop into an <iframe> to embed the live model in any site or widget (no login)."New value: +"Read-only, chrome-free /embed/<slug> viewer URL — drop into an <iframe> to embed the live model in any site or widget (no login). Includes meshUrl when a revision mesh artifact is available."
    • addedOutput schema / properties / meshUrl
      Added value: +{
      +  "description": "Revision-matched mesh artifact URL when available — prefer this over re-executing CAD in the embed.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / serverBuild
      Added value: +{
      +  "description": "Deploy identity so connector vs server mismatch is observable.",
      +  "type": "string"
      +}
  4. Changed10 schema fields changed
    • addedInput schema / properties / include_preview
      Added value: +{
      +  "description": "Default true: render an iso PNG preview into this same tool result (reuses the server render cache when this source was already rendered). Set false to skip rasterization and return save/viewer URLs only.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / previewBytes
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / previewCached
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / previewDelivered
      Added value: +{
      +  "description": "True when this result includes a displayable PNG (image content and/or previewUrl). Only then may the agent claim a preview was shown to the user.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / previewHeight
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / previewHint
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / previewStatus
      Added value: +{
      +  "description": "included = PNG + URL; included_inline = PNG only; unavailable = save ok but no preview; skipped = include_preview:false.",
      +  "enum": [
      +    "included",
      +    "included_inline",
      +    "unavailable",
      +    "skipped"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / previewUrl
      Added value: +{
      +  "description": "HTTPS URL of the PNG preview when storage signed successfully.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / previewView
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / previewWidth
      Added value: +{
      +  "type": "number"
      +}
  5. Changed3 schema fields changed
    • addedInput schema / properties / attachments
      Added value: +{
      +  "description": "Complementary project files referenced by relative path from the .kcad source.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "assetSha256": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "bytesBase64": {
      +        "type": "string"
      +      },
      +      "path": {
      +        "maxLength": 240,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 32,
      +  "type": "array"
      +}
    • addedOutput schema / properties / assetHashes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / attachmentCount
      Added value: +{
      +  "minimum": 0,
      +  "type": "integer"
      +}
  6. Changed1 schema field changed
    • addedOutput schema / properties / version
      Added value: +{
      +  "description": "Immutable Studio revision persisted by this call. Read it with get_project_revision using this slug and version.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  7. Changed4 schema fields changed
    • changedInput schema / properties / parameters / description
      Previous value: -"Optional list of the model's editable parameters, so Studio can show parameter controls."New value: +"Optional list of the model's editable parameters, so Studio can render parameter controls. Each item is one control derived from the .kcad params."
    • addedInput schema / properties / parameters / items / properties
      Added value: +{
      +  "defaultValue": {
      +    "description": "Current/default value of the parameter; type matches `kind`.",
      +    "oneOf": [
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "boolean"
      +      },
      +      {
      +        "type": "string"
      +      }
      +    ]
      +  },
      +  "description": {
      +    "description": "Optional human-readable explanation of the parameter.",
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  "kind": {
      +    "description": "Control type Studio should render for this parameter.",
      +    "enum": [
      +      "number",
      +      "integer",
      +      "boolean",
      +      "string"
      +    ],
      +    "type": "string"
      +  },
      +  "max": {
      +    "description": "Optional inclusive upper bound (numeric params).",
      +    "type": "number"
      +  },
      +  "min": {
      +    "description": "Optional inclusive lower bound (numeric params).",
      +    "type": "number"
      +  },
      +  "name": {
      +    "description": "Parameter identifier as used in the script (e.g. \"width\").",
      +    "maxLength": 40,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "step": {
      +    "description": "Optional slider/step increment (numeric params).",
      +    "type": "number"
      +  },
      +  "unit": {
      +    "description": "Optional unit label shown next to the control (e.g. \"mm\", \"deg\").",
      +    "maxLength": 8,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / parameters / items / required
      Added value: +[
      +  "name",
      +  "defaultValue",
      +  "kind"
      +]
    • addedInput schema / properties / parameters / items / type
      Added value: +"object"
  8. Changed1 schema field changed
    • addedOutput schema / properties / embedUrl
      Added value: +{
      +  "description": "Read-only, chrome-free /embed/<slug> viewer URL — drop into an <iframe> to embed the live model in any site or widget (no login).",
      +  "type": "string"
      +}
  9. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "ok": {
      +      "description": "Whether the model was persisted.",
      +      "type": "boolean"
      +    },
      +    "slug": {
      +      "description": "The project slug; pass it back to update this project in place.",
      +      "type": "string"
      +    },
      +    "updated": {
      +      "description": "True when an existing project was updated; false when a new one was created.",
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "description": "The /p/<slug> Studio link for the model.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  10. Changed2 schema fields changed
    • changedInput schema / properties / code / description
      Previous value: -"The full .kcad source of the model to open in Studio (the script you have been editing)."New value: +"The full .kcad source of the model to open in Studio (the script you have been editing). Optional: omit to reuse the source from your most recent evaluate_script call."
    • changedInput schema / required
      Previous value: -[
      -  "code"
      -]New value: +[]
  11. Changed1 schema field changed
    • addedInput schema / properties / slug
      Added value: +{
      +  "description": "Slug returned by a previous open_in_studio call. When given, updates that existing project in place (live-updating the user's open Studio tab) instead of creating a new one.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  12. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the annotations by disclosing status semantics (ok=true publish success; ok=false + meshStatus=failed as hard persist failure), async mesh behavior under CDN (meshStatus=building while OCCT finishes; the embed retries meshUrl), and agent behavioral constraints ('do not claim the viewer is ready', 'only then may you tell the user a preview was shown'). readOnlyHint=false is consistent with the described persist operation, so there is no contradiction. This is rich operational context annotations cannot convey.

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 (~270 words) but front-loaded with the core purpose in the first sentence and densely packed with actionable operational detail on status fields and async behavior. Minor redundancy exists between the early 'when the user wants to SEE or share' clause and the later trigger-phrase list, but given the tool's complexity, nearly every sentence earns its place.

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?

For a complex tool with six parameters, an output schema, status fields, and asynchronous mesh persistence, the description covers the happy path, the hard-failure path, the building/async state, when to call, and parameter flows. Since an output schema exists, prose explanation of return values is unnecessary. No critical gap remains for an agent to call this tool 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 100% and the schema's own parameter descriptions are already detailed (code's evaluate_script reuse, slug's in-place update semantics, include_preview's cache and rasterization behavior). The description largely restates this guidance ('omit slug only for a new separate model', 'Pass include_preview:false to skip the rasterizer') without adding genuinely new parameter meaning, so the baseline 3 applies.

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 first sentence states a compound but specific purpose — 'Save/publish the current kernelCAD model AND display it in one step' — naming the resource (kernelCAD model/project) and the three deliverables (persisted project, interactive viewer, PNG preview). It differentiates from siblings by explicitly excluding get_latest_render for the happy path and contrasting with evaluate_script, so an agent can tell this tool apart without opening schemas.

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?

Gives explicit when-to-use conditions ('when the user wants to SEE or share the model'), concrete trigger phrases ('open it in Studio', 'let me see it', 'show me the model'), and a routine call pattern ('after you finish a build and after each meaningful revision'). It names the alternative tool to avoid (get_latest_render) and the exclusion condition ('the preview is already here when previewDelivered is true'). Nothing is left to inference.

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.