Skip to main content
An ActionSchema describes a single action that NSP’s probe has discovered on a running application. You receive these objects as values inside the actions map of a SubstrateState response, and you can also retrieve the full schema for a given application directly via GET /schema. Each schema tells you exactly what arguments the action expects, whether calling it will cause irreversible side effects, and how confident NSP is in the discovered mapping — before you attempt to invoke it.
signature
string
required
A human-readable typed function signature string representing the action’s calling convention as NSP discovered it. The format follows a lightweight function-notation style:
A ? suffix on a parameter name marks it as optional. The return type after -> reflects the runtime’s actual return value. Use this field to understand what types to pass and what to expect back in result.
reversibility
enum
required
The reversibility tier classifies the action’s side-effect profile. NSP enforces this as a safety contract — it is not advisory. The tier determines both the minimum confidence required on the SubstrateState before you can invoke the action, and whether a verify_expression is mandatory.For details on how reversibility interacts with request gating, see Action Safety.
description
string
required
A plain-English description of what the action does, generated from the probe’s semantic labeling. For example: "Send a reply to an email thread" or "Permanently delete a message — cannot be undone". Use this when surfacing available actions to an agent or user.
confidence
float
required
A per-action quality score from 0.0 to 1.0 representing how certain NSP is that the internal runtime target it discovered actually implements this action correctly. This is distinct from the top-level SubstrateState.confidence, which reflects overall probe coverage. An action with confidence: 0.75 may exist in a state snapshot with confidence: 0.97 — it means NSP is less certain about that specific action’s mapping.
parameters
array
required
An ordered list of parameter descriptors for the action. You must supply all required parameters when calling POST /action; optional parameters may be omitted.

Full JSON Example

The following shows an ActionSchema for an irreversible send action and a reversible archive action, as they appear inside SubstrateState.actions:

Reversibility and Action Gating

The reversibility value is the foundation of NSP’s safety model. When you attempt to invoke an action, NSP checks the reversibility tier against the current SubstrateState.confidence before dispatching:
  • read — No gate. Safe to call even during probe warm-up.
  • reversible_write — Requires confidence >= 0.80. NSP rejects the request if confidence is below this threshold.
  • irreversible_write — Requires confidence >= 0.95 and a verify_expression in the ActionRequest. Submitting an irreversible action without a verify_expression raises NSPIrreversibleNotConfirmedError.
For a full explanation of how these gates are enforced and how to configure per-action overrides, see Action Safety.