Skip to main content
Glama
Karylcode
by Karylcode

run_python

Execute Python code inside Cascadeur’s GUI thread to access csc, app, scene, view_scene, and ui; returns stdout and the value of an expression or result variable.

Instructions

Run Python inside Cascadeur on the GUI thread with csc, app, scene (domain scene), view_scene and ui in scope. Returns stdout and the value of a lone expression or of a variable named result. scene.modify*/edit return False when their callback failed; check it.

Input Schema

NameRequiredDescriptionDefault
codeYes
timeoutNoSeconds to wait (default 60, max 600).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 burden and discloses important behavior: execution on the GUI thread, available scope objects, return of stdout and an expression/result variable, and the caveat that scene.modify*/edit return False on callback failure. It omits broader side-effect or permission considerations, but the runtime and failure semantics are unusually well covered.

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?

Two tightly packed sentences with no filler. The execution environment and scope are front-loaded, followed by return and failure behavior, so every clause earns its place.

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 a two-parameter tool with no output schema and no annotations, the description covers execution context, scope, return values, and a key failure mode. The main remaining gap is usage routing versus siblings, but the core invocation semantics are adequately 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 coverage is 50%; the timeout parameter is documented in the schema, while the required code parameter has no schema description. The description compensates by explaining what is in scope for the code and how results are returned, but it does not explicitly discuss timeout behavior or parameter-level semantics.

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?

States a specific verb and environment: 'Run Python inside Cascadeur on the GUI thread.' It also names the variables in scope, making the tool's purpose unambiguous. However, it does not explicitly differentiate itself from siblings like call_action or the ui_* tools, so it falls short of a 5.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no guidance on when to choose it over call_action, ui_invoke, or other siblings. There are no when-not conditions or alternative routing hints, leaving usage selection entirely to inference.

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