Skip to main content
Glama

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 id and hfid.

  • Update: supply either id or hfid to 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

TableJSON Schema
NameRequiredDescriptionDefault
kindYesKind of the node to create or update. Check infrahub://schema.
dataYesFlat {attribute: value} map. See infrahub://schema/{kind} for valid names. Scalar attributes only; use mutate_graphql for relationships.
idNoUUID of an existing node to update. Omit to create a new node.
hfidNoHuman-friendly ID of an existing node to update, as a list of string segments. Omit to create a new node.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Disclosures beyond annotations: writes on active session branch, session branch auto-created, only scalar attributes in data, and recommends propose_changes for reviews. No contradiction with annotations (readOnlyHint=false, destructiveHint=false).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

First sentence states purpose, followed by clear bullet points for create/update distinction and constraint on data. No filler, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters, output schema present, and tool complexity, description covers create/update logic, data constraints, schema discovery, session workflow, and sibling delegation. Very complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds value by clarifying that kind should be checked via schema resource, data should be scalar-only, and id/hfid are mutually exclusive for updates. Slightly above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Create or update a node in Infrahub on the active session branch', specifying verbs and resource. Differentiates from siblings by directing relationship fields to mutate_graphql and session management to propose_changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidelines: omit id/hfid for creation, supply one for update; use discover schema via infrahub://schema or get_schema; use mutate_graphql for relationships; session branch and propose_changes are explained.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opsmill/infrahub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server