Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:8beeeaaat Touchdesigner mcp get nodes

From Leeroopedia
Knowledge Sources
Domains Node_Graph, Introspection
Last Updated 2026-10-28 22:13 GMT

Overview

Concrete tool for listing all child nodes under a TouchDesigner parent COMP, optionally filtered by name pattern, with a light-vs-full summary trade-off controlled by `include_properties`.

Description

The get_nodes method on `TouchDesignerApiService` resolves a parent node, enumerates its children via `findChildren` (with optional name glob or depth=1), and returns either light summaries (identity only, default) or full summaries (with evaluated parameters). It is the verification step in the node creation workflow and the bulk-listing counterpart to `get_node_detail`.

Usage

Call this method when you need to:

  • Verify a newly created node exists and reflects applied parameters.
  • List all nodes under a parent COMP, optionally filtered by name pattern.
  • Build a snapshot of the current node graph for display or audit.

This method is exposed as the `get_td_nodes` MCP tool.

Code Reference

Source Location

  • Repository: touchdesigner-mcp
  • File: td/modules/mcp/services/api_service.py
  • Lines: L313-349 (public method); helpers `_get_node_summary` at L691-707, `_get_node_summary_light` at L673-689

Signature

class TouchDesignerApiService:
    def get_nodes(
        self,
        parent_path: str,
        pattern: Optional[str] = None,
        include_properties: bool = False,
    ) -> Result:
        """Get nodes under the specified parent path.

        Args:
            parent_path: Path to the parent node.
            pattern: Pattern to filter nodes by name (e.g. "text*" for all
                    nodes starting with "text").
            include_properties: Whether to include full node properties
                               (default False for better performance).

        Returns:
            Result: Success with list of nodes or error.
        """

Import

from mcp.services.api_service import TouchDesignerApiService

I/O Contract

Inputs

Name Type Required Description
parent_path str Yes Path to the parent COMP
pattern Optional[str] No Name glob (e.g. `text*`); None lists all depth-1 children
include_properties bool No True = full summary with evaluated params; False (default) = light summary

Outputs

Name Type Description
nodes list[dict] Each entry: {id, name, path, opType, properties{}}; properties empty when include_properties=False

Usage Examples

Verify a Newly Created Node

from mcp.services.api_service import TouchDesignerApiService

service = TouchDesignerApiService()
# After creating a node, verify it exists with full properties
result = service.get_nodes("/project1", pattern="text*", include_properties=True)

if result["success"]:
    for node in result["data"]["nodes"]:
        print(f"  {node['path']} ({node['opType']})")
        if node["properties"]:
            print(f"    params: {node['properties']}")

Light Listing

# Fast listing — no parameter evaluation, identity only
result = service.get_nodes("/project1/container1")
if result["success"]:
    for node in result["data"]["nodes"]:
        print(f"  {node['name']} — {node['opType']}")

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment