Skip to main content
Glama
Shapr3D Native MCP

Shapr3D Native MCP

by 21Suspect

native_run_script

Runs a Python-subset modeling script to execute parametric 3D modeling, editing, import/export, and scene operations in Shapr3D via MCP.

Instructions

Run a modeling script: a Python subset with variables, for/if, lists, arithmetic and f-strings. No imports, attributes or def.

Functions are most native_* tools without the prefix (not restore, approve/revoke, look, cancel_tool or run_script itself), e.g. scene(), import_profile(name, entities, z_mm), extrude_profile(x_mm, y_mm, distance_mm), items(), rename_body(body_id, name), find_parts(body, kind, where), fillet_edges(radius_mm, body, where), create_variable(name, expression). Helpers: rectangle(x,y,width,height), circle(x,y,radius), polygon(points) return entity lists; range, len, min, max, abs, round, sqrt, sin/cos (degrees), print. A restore point named "script" is saved first. Stops at the first error.

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": {
      "code": "<code>"
    },
    "name": "native_run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
check_onlyNo
restore_on_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose key traits: a restore point named "script" is saved first and execution stops at the first error. The language sandbox restrictions (no imports, attributes or def) are a meaningful capability boundary an agent could not infer otherwise. It stops short of explaining whether failures surface as tool errors or text output, and says nothing about permissions or side-effect scope beyond the restore point.

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?

Front-loaded with the core action and its constraints, then the function catalog. The long parenthetical list of signatures is dense but earns its place as reference material. Minor waste in the double negative framing ('not restore, approve/revoke, look, ... or run_script itself').

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?

For a complex scripting tool with no annotations and no output schema, the description covers the language, available functions, state checkpointing and failure behavior reasonably well. Missing pieces are how script results/output are returned to the caller and what the two boolean flags do, both of which leave an agent guessing at invocation details.

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 description coverage is 0% across three parameters, so the description must compensate. It does well for `code`, describing the accepted language subset and available functions/signatures. However, `check_only` and `restore_on_error` are never mentioned — notably, the 'restore point named script is saved first' sentence hints at restore semantics without clarifying what `restore_on_error` actually does.

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 ('Run a modeling script') and immediately bounds it ('a Python subset with variables, for/if, lists, arithmetic and f-strings. No imports, attributes or def'). It even names which sibling tools are unreachable from the script (not restore, approve/revoke, look, cancel_tool or run_script itself), so an agent can distinguish this from native_command or native_execute_steps without opening a 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?

The description gives concrete callable-function signatures (scene(), extrude_profile(...), fillet_edges(...)) and helper geometry constructors, which tells the agent what it can accomplish in-script. It also lists explicit exclusions from the callable set. The gap is that it never says when to choose a script over calling those native_* tools directly, or when to prefer native_command.

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