Skip to main content
Glama

execute_python

Run raw Painter Python in an open Substance 3D Painter session when SP_MCP_ALLOW_EXECUTE_PYTHON=1; persist variables between calls and return results via result or printed output.

Instructions

Execute raw Painter Python only when SP_MCP_ALLOW_EXECUTE_PYTHON=1.

Variables survive between calls. Assign to result to return a value; printed text comes back as output.

Input Schema

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses state persistence between calls and how values are returned via `result` or printed `output`, but it omits key behavioral details such as side effects, security scope, failures, timeouts, and execution context.

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

Conciseness5/5

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

The description is short and front-loaded: the gating condition appears first, followed by only the essential persistence and return-value semantics. Every sentence adds useful information.

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?

An output schema exists, so the description need not fully explain return values, and it still helpfully notes `result` and `output`. For a raw code-execution tool with no annotations, however, it should say more about side effects, permissions, and failure modes to be complete.

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%, so the description must compensate for the undocumented `code` parameter. It explains the return conventions using `result` and `output`, but it does not describe what form the code parameter should take or any constraints on the supplied Python.

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 clearly states the action and resource: executing raw Painter Python. It distinguishes this as a low-level escape hatch through the environment-variable gate, but it does not explicitly contrast it with the many domain-specific sibling tools.

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 gives one important usage condition: only execute when SP_MCP_ALLOW_EXECUTE_PYTHON=1. However, it does not say when an agent should prefer this over dedicated siblings like create_project, configure_baking, or set_fill_parameters.

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