Apply structure
apply_structureAdd parent → child relations between names. Idempotent: existing links stay; new ones are added. With createMissing=true (default) names are auto-created if not found. Returns: applied, alreadyLinked, namesCreated (the names that didn't exist before), namesResolved (every child in input order with its resolved id — use to chain into edit_name_attributes).
═══ PROVENANCE — required on every write ═══ source: origin reference (file/URL/document/short note). Lands in the audit trail. agent: your AI agent name (e.g. "Claude"). Lands in the audit trail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | Yes | AI agent name (e.g. "Claude"). REQUIRED. | |
| source | Yes | Origin reference — file, URL, document, or short note. REQUIRED. | |
| business | No | Optional. The business this call is for, by name, e.g. "azquo" - it then runs there whatever business the session is in. Worth giving on writes when you work in more than one business: a new MCP session starts in the login's own business. list_businesses shows the names. | |
| database | Yes | Database name | |
| relations | Yes | Non-empty array of {parent, child} pairs | |
| createMissing | No | Auto-create names that don't exist (default: true) |