Skip to main content
Glama

add_parameter_wire

Creates an expression-driven wire that binds a source scene parameter or layer property to a target, applying whitelisted math expressions such as map, clamp, or lerp to transform values.

Instructions

Add an expression-driven wire. The source value is bound as source (alias s) in a whitelist expression — map/clamp/lerp/min/max/abs/round/floor/ceil/sin/cos/tan/sqrt/pow/smoothstep — e.g. "map(source,0,1,0,360)". Source/target are scene params (propertyPath = param id, no layerId) or layer properties (layerId + dot-path).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sourceProperty": "<sourceProperty>",
      "targetProperty": "<targetProperty>",
      "expression": "<expression>"
    },
    "name": "add_parameter_wire"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoOptional wire id
nameNoOptional wire name
enabledNoEnabled (default true)
clampMaxNoOptional output clamp max
clampMinNoOptional output clamp min
blendModeNoDefault override
requestIdNo
sessionIdNo
expressionYese.g. "map(source,0,1,0,360)"
sourceLayerIdNoSource layer id (omit for a scene parameter)
targetLayerIdNoTarget layer id (omit for a scene parameter)
sourcePropertyYesSource dot-path, or param id for a scene param
targetPropertyYesTarget dot-path, or param id for a scene param
sourceValueTypeNoSource value type (default number)
targetValueTypeNoTarget value type (default number)
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=false, and the description is consistent with a closed-world mutation. It adds real behavioral value by stating the expression whitelist, which tells the agent that arbitrary JS is rejected. It is silent, however, on what failure looks like for a non-whitelisted function, on expectedRevision conflict behavior, and on requestId idempotency.

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?

Three tight sentences, front-loaded with the action, then the binding contract, then the addressing forms. The inline function whitelist is long but earns its place as a hard constraint; nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter mutation with no output schema, the description covers the core binding semantics well but omits several consequential fields: expectedRevision (optimistic concurrency), clampMin/clampMax, blendMode, and whether the call returns a new wire id. Those gaps matter 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 coverage is 81%, so the baseline is 3, but the description goes beyond it by explaining that the expression binds the source as `source`/`s` and by clarifying the two addressing modes (param id with no layerId, versus layerId plus dot-path). That combination rule is not obvious from the individual field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It gives a specific verb+resource ('Add an expression-driven wire') and immediately explains the source/target model so the agent knows this creates a value link, not a keyframe or a static binding. It never contrasts itself with the sibling add_binding, which is the nearest lookalike, so an agent must infer the difference.

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

Usage Guidelines3/5

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

Usage context is implied by the source/target explanation (scene param vs layer property forms), but there is no explicit when-to-use or when-not statement and no routing to add_binding or add_keyframes. The agent is left to infer the choice from the parameter shapes.

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