Skip to main content
Glama

hydra_crossfade

Fade live visuals from current code to new code over a set number of seconds, using spare outputs to blend and switch without a hard cut.

Instructions

Like hydra_block, but fade from what is on screen to the new code over seconds (0.5–30) instead of cutting — the move for a big change mid-set.

How: the new code is dry-run, then a copy runs into a spare output while the old chain keeps playing; a third output blends old into new and is shown; at the end the visible output switches to the new code and both borrowed outputs are blanked.

Needs: one visible output (not the 4-up grid), and two outputs that no other block draws into or reads — otherwise it refuses with no_spare_outputs and says which are in use. The new code should draw into the visible output (.out() / .out(o0) when o0 is shown). The call returns when the fade has finished; mirrors cut instead of fading.

Example (o0 on screen, o2 and o3 free): hydra_crossfade("base", "voronoi(8, 0.3, 0.2).color(1, 0.4, 0.8).out(o0)", seconds=6)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
nameYes
takeNo
secondsNo
validateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses the full internal flow: dry-run of new code, copy into a spare output, old chain continuing, a third output blending old and new, and finally switching the visible output and blanking borrowed outputs. It also explains blocking behavior ('The call returns when the fade has finished') and the refusal behavior with `no_spare_outputs`. This goes far beyond the annotations and gives the agent a precise mental model of side effects and safety.

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 well-structured with labeled sections: a one-sentence purpose, a 'How' paragraph, a 'Needs' paragraph, and an example. Every sentence adds useful information, and the example is compact but illustrative. It is longer than average, but the complexity of the operation justifies the length; nothing feels redundant.

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 covers the tool's purpose, mechanics, prerequisites, error behavior, return behavior, and gives a working example, which is impressive for a complex operation. The only notable gap is that `take` and `validate` are not explained, leaving an agent uncertain about two parameters. Since an output schema exists, the lack of return-value detail is acceptable, but the missing parameter context keeps this from a perfect score.

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 description coverage is 0%, so the description must compensate. It does add meaning for `seconds` by giving the allowed range '0.5–30' and demonstrates `name`, `code`, and `seconds` through the example. However, `take` and `validate` are never explained, leaving two of the five parameters semantically opaque. The description partially compensates for the empty schema but is not complete.

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 opens by comparing itself to hydra_block: 'Like hydra_block, but fade from what is on screen to the new code over seconds instead of cutting', which clearly states the verb, resource, and behavior. It also names the intended context, 'the move for a big change mid-set,' and differentiates from the sibling tool by contrasting fade vs. cut. An agent can confidently distinguish hydra_crossfade from hydra_block and other siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly frames when to use it: for a 'big change mid-set' when you want to fade rather than cut, and later notes that 'mirrors cut instead of fading.' It also provides concrete prerequisites: 'one visible output (not the 4-up grid), and two outputs that no other block draws into or reads,' plus the failure mode if those conditions are not met. This is clear, actionable guidance beyond anything in the schema or title.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.