Skip to main content
Glama

Set up selfie segmentation

setup_segmentation

Configures MediaPipe selfie segmentation in TouchDesigner, generating an alpha mask (invertible/featherable) and pre-keyed person-on-transparent output for keyers or compositors.

Instructions

One-shot selfie segmentation via the MediaPipe TouchDesigner engine (install with tdmcp install mediapipe-touchdesigner). Loads the engine, enables Selfie Segmentation, and builds an adapter COMP with a clean alpha-mask Null TOP (optionally inverted and/or feathered) plus an optional pre-keyed RGBA Null TOP (person on transparent). Wire the mask into create_keyer, create_depth_silhouette, or any matte-consuming tool. The engine reuses an existing MediaPipe op if already loaded (idempotent). Keep the TD timeline PLAYING so the embedded browser captures the webcam; click Allow if macOS prompts for camera permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAdapter COMP name under parent_path. Defaults to 'mp_segmentation'.
modelNoSelfie-segmentation model variant. 'general' works at any orientation; 'landscape' is tuned for wide-angle scenes.general
smoothNoEnable the engine's mask temporal smoothing parameter if present.
tox_pathNoPath to the MediaPipe ENGINE .tox (MediaPipe.tox). Defaults to the package staged by `tdmcp install mediapipe-touchdesigner`, falling back to the legacy ~/tdmcp-packages path.
feather_pxNoSoft-edge blur radius on the mask before publishing (Blur TOP). 0 = hard mask.
invert_maskNoOutput 1 − mask (useful for background-only effects). Applied via a Level TOP on the mask branch.
parent_pathNoCOMP to load the engine into. Reuses the existing engine if MediaPipe already exists./project1
publish_prekeyedNoAlso build a person_rgba Null TOP (camera × mask) so you can drop 'person on transparent' straight into a comp.
Behavior5/5

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

The description reveals behavioral details beyond annotations: it loads an engine, creates a COMP with Null TOPs, is idempotent, and requires the timeline playing and camera permission. These specifics about side effects and runtime conditions are not present in the annotations.

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 a single concise paragraph that front-loads the purpose, immediately states the install prerequisite, and details the workflow in four sentences. Every sentence adds operational value without redundancy.

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?

The description explains the setup workflow, outputs (mask and RGBA Null TOPs), integration with other tools, idempotency, and runtime requirements. However, it does not explicitly state what the function returns (e.g., the COMP path), which would be valuable since there is no output schema.

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?

Schema descriptions cover 100% of the 8 parameters, providing thorough explanations such as feather_px's blur radius and invert_mask's Level TOP application. The tool description adds no additional parameter-level semantics beyond these, so it does not exceed the baseline score.

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 'One-shot selfie segmentation via the MediaPipe TouchDesigner engine' and details the build steps, distinguishing it from sibling tracking setup tools. It specifies the resource (selfie segmentation) and the output (adapter COMP with alpha-mask Null TOP), making its 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 advises 'Wire the mask into create_keyer, create_depth_silhouette, or any matte-consuming tool', establishing a clear usage context. However, it does not explicitly exclude alternatives like setup_hand_tracking or setup_face_tracking, relying on the name and sibling list for differentiation.

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/lucasmaher-hash/touch-designer-mcp'

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