Skip to main content
Glama
Hardik-Singh

Invariance MCP

Official
by Hardik-Singh

invariance_node_write

Append a node to an Invariance run to record tool calls, LLM calls, logs, context attachments, or handoffs as they happen.

Instructions

Append a single node (one unit of work) to an open Invariance run. Use this to record tool calls, LLM calls, logs, context attachments, or handoffs as they happen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoDeclared custom node type registered via invariance_node_type_register / defineNodeType. Narrows the shape of custom_fields and is selectable by monitors via on.node({type}).
errorNoError payload as a JSON-encoded string. Example: {"type":"TimeoutError","message":"upstream took >30s"}
inputNoNode input payload as a JSON-encoded string (any JSON value: object, array, string, number).
outputNoNode output payload as a JSON-encoded string (any JSON value).
run_idYes
metadataNoFree-form metadata as a JSON object string. Example: {"model":"claude-opus-4-7","temperature":0.2}
action_typeYesFree-form verb describing what happened. Conventional values used by the SDK helpers: "tool_call" (a tool/function invocation; pair with type:"tool_call" and custom_fields.tool_name/status), "llm_call" (a model inference call), "log" (human-legible breadcrumb; input.message holds the text), "context" (structured state attached to the run, e.g. user_id), "handoff" (delegation to another agent; set handoff_from/to/reason). Custom verbs are allowed; monitors can select on this field.
custom_fieldsNoTyped custom fields as a JSON object string. For type="tool_call": {"tool_name":"search","status":"success","tool_input":{...},"tool_output":{...},"latency_ms":120}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description adds the prerequisite that the run must be open, which is useful behavioral context. However, it does not disclose potential side effects like whether appending to a finished run fails, rate limits, or ordering guarantees. The description provides some additional value but not rich behavioral detail beyond the annotations.

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?

The description is two sentences with zero fluff: the first states the core action and target, the second lists concrete use cases. Information is front-loaded and every word earns its place.

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

Completeness4/5

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

Given the complexity (8 params, no output schema) the description plus schema are adequate. It correctly identifies the open-run prerequisite and typical event categories, but does not mention what the return value might be (though no output schema exists) or highlight the distinguishing subtlety that custom verbs are allowed (though that is captured in the schema).

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

Parameters3/5

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

The schema description coverage is 88%, so most parameters already have detailed descriptions (e.g., action_type conventions, custom_fields example). The tool description itself does not add any parameter-specific meaning, staying at the baseline expected given the high schema coverage.

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?

The description states a specific verb ('Append'), the exact resource ('a single node ... to an open Invariance run'), and enumerates the kinds of events it records (tool calls, LLM calls, logs, context attachments, handoffs). This clearly distinguishes it from sibling tools like invariance_run_start or invariance_node_list.

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

Usage Guidelines4/5

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

The description gives clear when-to-use guidance ('record ... as they happen', 'to an open run'), which contrasts with run-level operations. It does not name alternatives or explicitly exclude cases, but the context is strong enough for an agent to infer appropriate use.

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

Deploy Server

Other Tools