Bind
INPUT CONTRACT
target(required):$variable, resource ID, or named resourceout(required): Destination$variable
REQUIREMENTS:
- Target must reference an existing resource
outmust be a$variable
BEHAVIOR
Aliases an existing Note/Collection/Relation to a new variable. Bind does not mutate resources — it creates a new name pointing to the same underlying resource.
Use cases:
- Rename a variable for clarity (e.g.,
$draft→$final_report) - Create a stable reference before a variable is rebound
- Reference a resource by ID when you don't have it in a variable
EXAMPLES
{"type": "bind", "target": "$draft", "out": "$final_report"}
{"type": "bind", "target": "Note_42", "out": "$summary"}
OUTPUT
Returns success. The out variable now points to the same resource as target.
FAILURE SEMANTICS
- Target resource not found
- Missing
targetoroutparameter
ANTI-PATTERNS
- Using
bindto copy content — bind creates an alias, not a copy. Both variables point to the same resource. - Using
bindwhenloadis needed — bind doesn't return content to the planner context, it only creates a variable alias.