Skip to main content
Glama

execute_python

Destructive

Run custom Python against DaVinci Resolve when no dedicated tool fits, using exposed Resolve, project, media pool, timeline, and context helpers; assign a result or read captured output.

Instructions

Run arbitrary Python against Resolve when no tool fits. Pre-defined names: resolve, project (may be None), media_pool, timeline (current, may be None), ctx (lookup helpers: ctx.item(uid), ctx.clip(ref), ctx.folder(path), ctx.timeline(ref), ctx.graph(target)...). Assign to result to return a value (Resolve objects come back as references); stdout and stderr are captured. Full OS access: use with care.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description reinforces the risk with 'Full OS access: use with care.' It adds real substance beyond annotations: the injected namespace (resolve, project, media_pool, timeline, ctx helpers), the result-assignment return mechanism, and stdout/stderr capture. Minor tension: 'Full OS access' sits oddly with openWorldHint=false, though that flag refers to external-world interaction rather than local machine access, so it is not a true contradiction.

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?

Four sentences, no filler, and the selection condition is front-loaded before the namespace details. Dense but readable; each sentence contributes either routing, the execution environment, or the return mechanism.

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

Completeness5/5

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

For a single-parameter, no-output-schema escape-hatch tool, the description covers everything needed to invoke it correctly: when to use it, what names are in scope, how to return data, where output goes, and the risk profile. The absence of an output schema is compensated by explaining the `result` variable and reference semantics.

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

Parameters4/5

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

Schema coverage is 0% for the single `code` parameter, so the description must carry the load, and it does: it enumerates the pre-bound names, notes which may be None, lists the ctx lookup helpers with signatures, and explains that assigning to `result` produces a return value while objects come back as references. That is meaningful guidance an agent cannot get from the schema.

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 arbitrary Python against Resolve') and immediately scopes it as the fallback path ('when no tool fits'), which separates it from every specialized sibling in the catalog. An agent can decide to reach for this without opening the 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?

Gives an explicit selection condition: use only when no dedicated tool fits, plus an explicit caution about full OS access. It does not name specific alternative tools, but the 'no tool fits' rule is a clear, actionable gate rather than vague context.

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