Skip to main content
Glama
aliphi

touchdesigner-mcp

by aliphi

td_set_parameter

Set a parameter on any TouchDesigner operator using its path, parameter name, and value. Supports strings, numbers, and booleans for TOPs, SOPs, CHOPs, and general parameters.

Instructions

Set a parameter on a TouchDesigner operator. Common parameter names:

  • TOPs: colorr, colorg, colorb, colora, resolutionw, resolutionh, brightness, contrast, opacity

  • SOPs: radx, rady, radz (radius), tx, ty, tz (translate), rows, cols

  • CHOPs: roughness, amp, freq, period

  • General: display, render, bypass

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
op_pathYesFull path to the operator, e.g. /project1/noise1
param_nameYesParameter name, e.g. colorr, resolutionw
valueYesValue to set

Implementation Reference

  • server.js:101-128 (registration)
    Registers the 'td_set_parameter' tool on the MCP server with name, description, and schema.
    server.tool(
      "td_set_parameter",
      `Set a parameter on a TouchDesigner operator.
    Common parameter names:
      - TOPs: colorr, colorg, colorb, colora, resolutionw, resolutionh, brightness, contrast, opacity
      - SOPs: radx, rady, radz (radius), tx, ty, tz (translate), rows, cols
      - CHOPs: roughness, amp, freq, period
      - General: display, render, bypass`,
      {
        op_path: z.string().describe("Full path to the operator, e.g. /project1/noise1"),
        param_name: z.string().describe("Parameter name, e.g. colorr, resolutionw"),
        value: z
          .union([z.string(), z.number(), z.boolean()])
          .describe("Value to set"),
      },
      async ({ op_path, param_name, value }) => {
        const pyValue =
          typeof value === "string" ? `'${value}'` : String(value);
        const code = `
    op('${op_path}').par.${param_name} = ${pyValue}
    f"Set {op('${op_path}').path}.par.${param_name} = ${pyValue}"
    `.trim();
        const result = await tdExecute(code);
        return {
          content: [{ type: "text", text: result }],
        };
      }
    );
  • Defines the input schema: op_path (string), param_name (string), value (union of string/number/boolean).
    {
      op_path: z.string().describe("Full path to the operator, e.g. /project1/noise1"),
      param_name: z.string().describe("Parameter name, e.g. colorr, resolutionw"),
      value: z
        .union([z.string(), z.number(), z.boolean()])
        .describe("Value to set"),
    },
  • Handler function that takes op_path, param_name, value, formats a Python expression, sends it to TouchDesigner via tdExecute, and returns the result text.
      async ({ op_path, param_name, value }) => {
        const pyValue =
          typeof value === "string" ? `'${value}'` : String(value);
        const code = `
    op('${op_path}').par.${param_name} = ${pyValue}
    f"Set {op('${op_path}').path}.par.${param_name} = ${pyValue}"
    `.trim();
        const result = await tdExecute(code);
        return {
          content: [{ type: "text", text: result }],
        };
      }
  • tdExecute helper function that sends Python code to TouchDesigner's Web Server DAT via HTTP POST.
    async function tdExecute(code) {
      try {
        const res = await fetch(`${TD_HOST}:${TD_PORT}`, {
          method: "POST",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify({ script: code }),
        });
        const text = await res.text();
        return text;
      } catch (err) {
        return `Error connecting to TouchDesigner: ${err.message}. Is TD running with the Web Server DAT on port ${TD_PORT}?`;
      }
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It indicates mutation ('set') but lacks details on side effects, permissions, or recomputation behavior. The list of common parameter names adds context but not behavioral depth.

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 brief and front-loaded with the core action. The subsequent list of examples is structured and concise, with no extraneous information.

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 tool's simplicity and lack of output schema, the description covers the primary usage well. Minor gaps exist: no mention of error behavior or return value, but the tool's purpose is sufficiently conveyed for typical use.

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 100% with descriptions for all parameters. The description adds value by providing categorized common parameter examples (TOPs, SOPs, CHOPs, General), which aids the agent in selecting valid param_name values 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 explicitly states 'Set a parameter on a TouchDesigner operator' which is a clear verb+resource. Sibling tools like td_create_operator and td_run_python are distinct, so the purpose is well differentiated.

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?

No explicit guidance on when to use this tool versus alternatives. The sibling names hint at different tasks, but the description does not specify conditions or exclusions, leaving the agent to infer usage context.

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/aliphi/touchdesigner-mcp'

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