# Set Metadata

> Attach or update metadata on a Note or Collection

- Skill: `bdambrosio/set-metadata` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add bdambrosio/set-metadata`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bdambrosio/set-metadata/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: bdambrosio (https://skillmd.com/u/bdambrosio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/bdambrosio/set-metadata

---


# Set-Metadata

## INPUT CONTRACT

- `target` (required): `$variable`, Note/Collection ID, or name
- `value` (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

```json
{"type": "set-metadata", "target": "$report", "value": "{\"source\": \"weather.gov\", \"retrieved\": \"2026-02-21\"}"}
```
```json
{"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 `target` or `value` parameter

