Skip to main content
Glama

td_analyze_frame

Read-onlyIdempotent

Analyze pixel data of a TouchDesigner TOP node without transferring the full image. Run server-side numpy analysis for histograms, luminance, alpha coverage, dominant color, or region differences.

Instructions

Analyze pixel data of a TOP node without transferring full image data.

Runs server-side numpy analysis inside TouchDesigner and returns statistical results per requested mode. Supported modes:

  • histogram: per-channel (RGB) pixel value histograms

  • luminance: mean, min, max, std, p5, p95 of perceived luminance

  • alpha_coverage: alpha channel statistics (requires RGBA TOP)

  • color_dominant: most frequent quantized color in the frame

  • roi_diff: pixel-level diff between a region and a reference TOP

For roi_diff, also pass roi=[x, y, w, h] and reference_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roiNoRegion of interest [x, y, w, h] for roi_diff mode
pathYesPath to a TOP node to analyze
modesNoAnalysis modes: histogram, luminance, alpha_coverage, color_dominant, roi_diff. Defaults to ['histogram', 'luminance'] when omitted.
thresholdsNoOptional visual-quality threshold overrides.
sample_gridNoGrid size used by TD-side sample() fallback and normalized quality metrics.
quality_modeNoIf True, include normalized visual-quality metrics in the TD response.
reference_pathNoReference TOP path for roi_diff mode

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses that analysis runs server-side via numpy, returns statistical results per mode, and explains each mode's purpose. This adds valuable context beyond the annotations (readOnlyHint, etc.) and contains no contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is around 150 words, well-structured with bullet points and a note on 'roi_diff'. It is front-loaded with the main purpose. Slightly verbose in listing modes, but overall efficient.

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 complexity (7 parameters, 5 modes, output schema exists), the description covers the main purpose, modes, special requirements, and hints at behavior. It does not detail return format (but output schema exists) and omits some parameter interactions, yet it is sufficient for correct invocation.

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 description coverage is 100%, so the baseline is 3. The description adds extra meaning by explaining the 'roi_diff' usage pattern and default values for 'modes', going beyond the schema alone.

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 the tool analyzes pixel data of a TOP node without transferring full image data, and lists supported modes. This is a specific verb+resource that distinguishes it from siblings, none of which perform frame analysis.

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 each mode and mentions that for 'roi_diff', additional parameters like 'roi' and 'reference_path' are required. However, it does not explicitly state when not to use this tool or compare it to alternatives, though no direct alternatives exist among siblings.

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/dreamrec/TDPilot'

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