Skip to main content
Glama

execute_python

Execute raw Painter Python scripts for custom Substance 3D Painter automation, available only when SP_MCP_ALLOW_EXECUTE_PYTHON=1 is enabled.

Instructions

Execute raw Painter Python only when SP_MCP_ALLOW_EXECUTE_PYTHON=1.

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": "execute_python"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden for arbitrary code execution. It hints at danger via 'raw' and the opt-in environment flag, but says nothing about sandboxing, what APIs are available, whether execution mutates the open project, timeouts, or failure behavior. For a code-execution tool that is a substantial gap, though the env-var gate is a real behavioral disclosure worth credit.

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?

A single short sentence with the gating constraint front-loaded and no filler. It is efficient rather than padded, though the brevity comes at the cost of the missing context noted elsewhere.

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

Completeness2/5

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

An output schema exists, so return values needn't be explained, but everything else about executing arbitrary code in a painting application is absent: what the execution context offers, what side effects occur on the current project, and whether failures are recoverable. Given the complexity and total absence of annotations, the definition is too thin.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single required parameter is documented only implicitly: 'raw Painter Python' tells the agent the language dialect of the code string. Nothing is said about script structure, entry points, available modules, or how results are surfaced. The description barely compensates for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ('Execute') and a specific resource ('raw Painter Python'), so it is immediately distinguishable from the layer, fill, bake, and export siblings. It stops short of naming what makes it different beyond the code dialect, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

It does state a gate: use it 'only when SP_MCP_ALLOW_EXECUTE_PYTHON=1'. That is a precondition rather than routing guidance — it never says to prefer dedicated tools over raw scripting, nor what to do when the flag is unset. An agent knows the constraint but not the alternatives.

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