Create a workspace node of any type
node_createCreate a workspace node of any type
If this job may already have a playbook, call playbooks search first. One call creates any of the 11 node types with its type-specific payload: fields for a Base, body for a Doc, files for a Skill/Drive/AirApp, assetId for a File. Review is permission-aware, decided server-side: this merges immediately when you already have write access on the parent node, and proposes a ChangeRequest for a human otherwise. Pass requireReview to always propose instead of merging. Before you finish: if the person will come back to this node to do the same job again, pass agentPrompts so the node opens with THEIR job on it instead of the node type's generic list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Doc body in Markdown (--type doc only). | |
| name | Yes | Human-readable node name. | |
| slug | Yes | URL-safe identifier, lowercase letters/digits/hyphens only. | |
| type | Yes | Node type to create. | |
| files | No | Seed files for a Skill/Drive/AirApp: [{"path":"SKILL.md","content":"..."}]. Layered over the default scaffold unless mergeMode is "replace" — a path you supply REPLACES the scaffold's file at that path. For --type airapp the project MUST be runnable by `npm run dev`: give package.json a "dev" script running a plain Node server (`node server.js`, Hono or node:http). A bundler dev server (Vite/webpack/Next) and any native-binary dependency CANNOT boot in the AirApp runtime, and browser files must need no build step. | |
| fields | No | Base fields (--type base only): [{"slug":"title","name":"Title","type":"text"}]. A Base needs at least one field. | |
| assetId | No | Backing Asset id (--type file only). Upload the Asset first. | |
| message | No | Explanation for the human reviewer. Conventional-commit style, e.g. "Add Products Base for the Q3 catalog". | |
| version | No | Skill/Drive/AirApp only. Defaults to 0.1.0. | |
| playbook | No | Optional. The playbook you are following, as `kind:nodeId[:key]` from playbooks_search (e.g. `prompt:nod_123:log-visit`). Recorded on the change request so the person can see which playbook produced it. | |
| autoMerge | No | Skip review and create immediately if you have write access. Default is permission-aware: merge when you can, otherwise propose. | |
| mergeMode | No | Skill/Drive/AirApp only. "merge" (default) layers files over the default scaffold; "replace" uses only the files given. | |
| visibility | No | Skill/Drive/AirApp only. Defaults to private. | |
| description | No | Optional node description. | |
| submittedBy | No | Producer label recorded on the change. | |
| agentPrompts | No | Scenario prompts shown when someone opens this node and asks an agent for something: [{"key":"log-visit","label":"Log a customer visit","body":"{target}\n\nAdd a visit record with today's date, the contact I name, and a one-line summary.","intent":"change"}]. Write what the PERSON wants in their own words ("Log a customer visit"), not the operation ("Create a record in Visits") — the node type already covers the operations. These REPLACE the node type's default scenario prompts, so 2-5 real recurring jobs help and a generic pair is worse than none: omit this when you cannot name one. `{target}` expands to a complete sentence naming the node and space, so give it its own line. Stored in a second call after the node exists, so they are skipped (and reported) when this call proposes a ChangeRequest instead of creating the node; add them afterwards with `nodes set-agent-prompts`. | |
| parentNodeId | No | Parent folder node id. Omit to create at the space root. | |
| requireReview | No | Always propose a pending ChangeRequest, even with write access. | |
| targetSpaceId | No | Busabase space id. Call auth_verify first and ask the user which space to use when more than one is returned. |