node_upsert
Create or update a node in Infrahub on the active session branch. Omit ID and HFID to create a new node, or provide either to update an existing one.
Instructions
Create or update a node in Infrahub on the active session branch.
The session branch is auto-created on the first write of the session
(mcp/session-YYYYMMDD-<hex>). Use propose_changes to open a
review once your changes are ready.
To discover available kinds and attributes, read the infrahub://schema
resource. If your client does not support MCP resources, call the
get_schema tool instead.
Create: omit both
idandhfid.Update: supply either
idorhfidto identify the target node.
Only scalar attribute fields are accepted in data. To set relationship
fields, use mutate_graphql with an appropriate GraphQL mutation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Kind of the node to create or update. Check infrahub://schema. | |
| data | Yes | Flat {attribute: value} map. See infrahub://schema/{kind} for valid names. Scalar attributes only; use mutate_graphql for relationships. | |
| id | No | UUID of an existing node to update. Omit to create a new node. | |
| hfid | No | Human-friendly ID of an existing node to update, as a list of string segments. Omit to create a new node. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||