Skip to main content
Glama

execute_python

Destructive

Runs Python code inside KeyShot with the lux module when no dedicated tool fits, used as a last resort and disabled by default unless enabled in pont-config.json.

Instructions

Exécute du Python dans KeyShot (module lux disponible). Désactivé par défaut sur les postes : le pont le refuse sauf {"execute_python": true} dans pont-config.json. Dernier recours, quand aucun outil dédié ne convient.

Input Schema

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnly=false, so the description does not need to restate that writing Python mutates the scene. It adds genuinely new behavioral facts: the tool is disabled by default at the bridge level and requires a specific config opt-in, which the annotations do not convey. It stops short of describing execution scope, timeout, or what a refusal looks like, so it is strong but not exhaustive.

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?

Three short sentences ordered by importance: what it does, how it is gated, when to prefer alternatives. The inline JSON literal for the config key is slightly noisy but is the precise, actionable form an agent would need.

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

Completeness4/5

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

For an arbitrary-code-execution tool with an output schema (so return values need no prose), the description covers purpose, safety posture via annotations, enablement gate, and sibling routing. The remaining gap is the execution environment itself — scope, available modules beyond 'lux', and failure behavior — which matters for a tool this powerful.

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% for the single 'code' parameter, so the description must compensate. It adds one useful hint — the 'lux' module is available in the execution context — but says nothing about what namespace the code runs against, whether it must return a value, or size limits. Partial compensation only.

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 concrete verb and resource ('Exécute du Python dans KeyShot') and immediately scopes it against the whole sibling set with 'Dernier recours, quand aucun outil dédié ne convient.' An agent can tell this apart from render_image, assign_material, etc. without opening any schema.

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 an explicit when-to-use rule (last resort, only when no dedicated tool fits) and an explicit precondition that would otherwise cause a hard failure (bridge refuses unless pont-config.json has execute_python: true). This is exactly the routing and gating information an agent needs before calling.

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