Set-Metadata
INPUT CONTRACT
target(required):$variable, Note/Collection ID, or namevalue(required): Metadata text (string, may be JSON)out(optional):$variable— bound to the metadata Note ID
REQUIREMENTS:
- Target resource must exist
- Value must be provided
BEHAVIOR
Associates a metadata text string with the target Note or Collection. Idempotent: updates existing metadata if already present. If out is provided, the variable is bound to the metadata Note ID.
EXAMPLES
{"type": "set-metadata", "target": "$report", "value": "{\"source\": \"weather.gov\", \"retrieved\": \"2026-02-21\"}"}
{"type": "set-metadata", "target": "$report", "value": "$meta_text", "out": "$meta_note"}
OUTPUT
Returns success with the metadata Note ID.
FAILURE SEMANTICS
- Target resource not found
- Missing
targetorvalueparameter