Skip to main content
Glama

Scaffold extension class

scaffold_extension

Creates a Python extension class for a COMP in TouchDesigner, adding optional method stubs, wiring to a slot, and enabling direct member calls through promotion.

Instructions

Give a COMP a Python extension class: create a Text DAT holding the class (with optional method stubs), wire it into an extension slot, optionally promote it (so members are callable directly on the COMP), and reinitialize. The other half of making a generated network reusable — pair with add_custom_parameters (knobs) and manage_component (save as .tox).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comp_pathYesThe COMP to give a Python extension class.
class_nameYesExtension class name, e.g. 'WidgetExt' (capitalized to a valid identifier; must already be identifier-safe).
methodsNoOptional method-name stubs to add to the class (each takes only `self`).
promoteNoPromote the extension so its members are callable directly on the COMP (op.Method()).
slotNoExtension slot (1–8) — a COMP can hold several extensions.
Behavior4/5

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

The description discloses that the tool creates a Text DAT, wires it into an extension slot, optionally promotes members, and reinitializes the COMP. This adds meaningful context beyond the annotation flags (readOnlyHint=false, destructiveHint=false) by detailing the specific actions and side effects, such as the creation and wiring process.

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 concise: two sentences that front-load the primary action and then provide contextual guidance about pairing with related tools. Every sentence adds value, no redundancy or filler.

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 has 5 parameters and no output schema, the description covers the process well—describing the optional method stubs, promotion, and slot. It also links to sibling tools for complementary tasks. However, it lacks mention of prerequisites (e.g., the COMP must exist) and potential errors, which would make it more 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?

With 100% schema description coverage, the description does not add significant new meaning beyond what the input schema already provides for each parameter. The baseline of 3 is appropriate, as the description contextualizes parameters within the workflow but does not elaborate on formats or constraints 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 states it gives a COMP a Python extension class, specifying the creation of a Text DAT, wiring into an extension slot, optional promotion, and reinitialization. It distinguishes this tool from siblings by mentioning pairing with `add_custom_parameters` and `manage_component`, and the context of making a generated network reusable.

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 suggests pairing with `add_custom_parameters` and `manage_component`, providing clear context for when to use this tool. However, it does not explicitly state when NOT to use it or list alternative tools for comparison, such as other scaffold_* tools, which would strengthen the guidelines.

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