Skip to main content
Glama

Edit shader live loop

edit_shader_live_loop
Destructive

Edit GLSL/Text DAT in TouchDesigner, replace or set shader source, then check for errors and capture an inline preview for immediate shader feedback.

Instructions

Edit a GLSL/Text DAT and immediately run the practical shader feedback loop: write or surgically replace source text, inspect the shader/output node for errors, and optionally capture a compact inline preview. Uses set_dat_content/edit_dat_content under the hood so DAT write guardrails stay consistent, and requires TDMCP_RAW_PYTHON=on plus TDMCP_BRIDGE_ALLOW_EXEC=1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoset overwrites the shader DAT; replace performs a surgical text replacement.set
dat_pathYesAbsolute path to the GLSL/Text DAT to edit.
error_pathNoNode to inspect for errors after the edit. Defaults to preview_path, then dat_path.
new_stringNoReplacement text. Required when mode is replace.
old_stringNoSubstring to find. Required when mode is replace.
replace_allNoFor replace mode, replace all matches instead of requiring exactly one match.
shader_codeNoFull shader source. Required when mode is set.
jpeg_qualityNoJPEG quality.
parent_depthNoUpstream depth for inline-preview error inspection.
preview_pathNoTOP path to preview after the shader edit, usually the GLSL TOP output or Null TOP.
preview_widthNoPreview width.
preview_formatNoPreview encoding.jpeg
preview_heightNoPreview height.
include_previewNoCapture a compact inline preview after editing when preview_path is supplied.
recursive_errorsNoIf true, check errors recursively under error_path.
Behavior4/5

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

The description discloses that the tool performs write/surgical replace actions (consistent with destructiveHint=true) and describes the additional behaviors of error inspection and optional preview. It adds context about using set_dat_content/edit_dat_content under the hood and the required environment settings, which go beyond the annotations. No contradictions found.

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 two sentences, with the first sentence front-loading the core purpose and workflow (edit, inspect, preview). The second sentence adds necessary implementation and prerequisite details without verbosity. Every sentence earns its place, and the structure is clear.

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?

Given the high complexity (15 parameters) and no output schema, the description provides a comprehensive overview of the workflow, including the feedback loop, error inspection, and optional preview. It also mentions environment requirements. However, it does not explicitly describe the return format or what the response contains, which could be inferred from the parameters but would benefit from a brief mention.

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?

The input schema already provides 100% coverage with descriptions for all 15 parameters, so the description doesn't need to repeat them. The description does reinforce the two modes ('write or surgically replace') and the preview feature, which aligns with the 'mode' and 'include_preview' parameters, but it doesn't add per-parameter meaning beyond 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?

The description clearly specifies the verb (edit), the resource (GLSL/Text DAT), and the scope: it writes or surgically replaces source text, inspects errors, and optionally captures an inline preview. This distinguishes it from the sibling tools like set_dat_content/edit_dat_content by emphasizing the immediate feedback loop, making the purpose unambiguous.

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?

The description provides clear context on when to use the tool (for an immediate shader feedback loop) and mentions underlying tools (set_dat_content/edit_dat_content) implying alternatives for raw editing. It also lists required environment variables as prerequisites. However, it does not explicitly state when NOT to use it or compare with other preview-capture tools like get_inline_preview.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pantani/tdmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server