Skip to content

MCP Tools Reference

Nexus Attest exposes 11 tools via the Model Context Protocol. This page documents each tool with its purpose, parameters, and usage patterns.

ToolCategoryDescription
nexus-attest.requestGovernanceCreate an execution request
nexus-attest.approveGovernanceApprove a request (N-of-M)
nexus-attest.executeGovernanceExecute an approved request
nexus-attest.statusInspectionGet request state and run status
nexus-attest.inspectInspectionRead-only introspection
nexus-attest.template.createTemplatesCreate a policy template
nexus-attest.template.getTemplatesRetrieve a template by name
nexus-attest.template.listTemplatesList templates with filtering
nexus-attest.export_bundlePortabilityExport a decision bundle
nexus-attest.import_bundlePortabilityImport a decision bundle
nexus-attest.export_audit_packageAttestationExport a cryptographic audit package

Creates a new execution request with a goal, policy constraints, and approval requirements.

Parameters:

ParameterTypeRequiredDescription
goalstringYesHuman-readable description of what will be executed
actorActorYesThe requesting entity (type + id)
modestringNo"dry_run" (default) or "apply"
planstringNoOptional pre-defined execution plan
template_namestringNoNamed policy template to apply
min_approvalsintegerNoDistinct approvals required (default: 1). Overrides template value when both are provided.
allowed_modesstring[]NoPermitted execution modes. Overrides template value when both are provided.
require_adapter_capabilitiesstring[]NoRequired adapter capabilities. Overrides template value when both are provided.
max_stepsintegerNoMaximum execution steps. Overrides template value when both are provided.
labelsstring[]NoTags for filtering and policy matching. Overrides (replaces) template value when both are provided.

Returns: { request_id, state, min_approvals, current_approvals } --- plus template_name, template_digest, and overrides_applied when a template is used.

A new decision is created in the event store with DECISION_CREATED and POLICY_ATTACHED events. If a template is specified, its policy constraints are used as defaults and any explicit parameters override them.

Approves a pending request. Approvals are counted by distinct actor.id.

Parameters:

ParameterTypeRequiredDescription
request_idstringYesThe decision to approve
actorActorYesThe approving entity
commentstringNoApproval rationale
expires_atstringNoISO 8601 expiry timestamp

Returns: { request_id, state, current_approvals, required_approvals, is_approved }

An APPROVAL_GRANTED event is appended to the decision log. The same actor cannot approve the same decision twice. Duplicate approval attempts return an error.

Approvals can also be revoked before execution begins via the revoke_approval method, which appends an APPROVAL_REVOKED event to the log.

Executes an approved request through nexus-router. The request must have enough valid approvals to satisfy its policy at execution time.

Parameters:

ParameterTypeRequiredDescription
request_idstringYesThe decision to execute
adapter_idstringYesRouter adapter identifier
actorActorYesThe entity triggering execution
routerRouterProtocolYesRouter implementation
dry_runbooleanNoOverride the decision’s requested mode (must be allowed by policy)

Returns: { request_id, run_id, mode, steps_executed, request_digest, response_digest }

Execution proceeds through three events: EXECUTION_REQUESTED, EXECUTION_STARTED, and either EXECUTION_COMPLETED or EXECUTION_FAILED. The run_id and digests are recorded for audit binding.


Returns the current state of a decision, including approval status and linked execution results.

Parameters:

ParameterTypeRequiredDescription
request_idstringYesThe decision to query
include_eventsbooleanNoInclude full event timeline (default: false)

Returns: Decision state including status, approval count, blocking reasons, and linked run information (if executed). When include_events is true, the complete event log is included.

Read-only introspection with human-readable output. Provides a formatted view of a decision’s complete state, including lifecycle data, blocking reasons, policy details, and timeline.

Parameters:

ParameterTypeRequiredDescription
decision_idstringYesThe decision to inspect
renderbooleanNoInclude markdown rendering (default: true)
include_eventsbooleanNoInclude full event list (default: false)
include_compiled_router_requestbooleanNoShow compiled router request (default: true)

Returns: Structured data with decision status, lifecycle (blocking reasons + progress), approval section, policy section, template section, execution section, and timeline. When render is true, a human-readable markdown rendering is included.


Creates a named, immutable policy template. Once created, templates cannot be modified --- create a new one with a different name instead.

Parameters:

ParameterTypeRequiredDescription
namestringYesUnique template name
actorActorYesTemplate creator
descriptionstringNoHuman-readable description of the template’s purpose
min_approvalsintegerNoDefault approval threshold (default: 1)
allowed_modesstring[]NoPermitted execution modes (default: ["dry_run"])
require_adapter_capabilitiesstring[]NoRequired adapter capabilities
max_stepsintegerNoMaximum router steps
labelsstring[]NoDefault labels for filtering

Returns: { template_name, description, digest, created_at }

Retrieves a template by its exact name.

Parameters:

ParameterTypeRequiredDescription
namestringYesTemplate name to retrieve
include_eventsbooleanNoInclude template event history (default: false)

Returns: Full template definition including all policy fields, digest, and snapshot.

Lists all templates, with optional label-based filtering.

Parameters:

ParameterTypeRequiredDescription
limitintegerNoMaximum results to return (default: 100)
offsetintegerNoNumber to skip for pagination (default: 0)
label_filterstringNoFilter templates by label

Returns: { templates, count, offset, limit } --- array of template summaries with name, description, min_approvals, allowed_modes, labels, and created_at.


Exports a decision as a portable, integrity-verified JSON bundle for cross-system transfer.

Parameters:

ParameterTypeRequiredDescription
decision_idstringYesThe decision to export
include_template_snapshotbooleanNoInclude template snapshot data (default: true)
include_router_linkbooleanNoInclude router execution link (default: true)
renderbooleanNoInclude human-readable summary (default: true)

Returns: { bundle, digest, rendered } --- the bundle includes the decision header, all events, policy, and a digest for integrity verification. The JSON is serialized in canonical form for deterministic output.

Imports a decision bundle with conflict handling and optional replay validation.

Parameters:

ParameterTypeRequiredDescription
bundleobjectYesBundle dict from export
verify_digestbooleanNoVerify bundle integrity before import (default: true)
conflict_modestringNo"reject_on_conflict" (default), "new_decision_id", or "overwrite"
replay_after_importbooleanNoRe-derive state from events after import (default: true)

Returns: Import result including the decision ID (which may be new if conflict_mode is "new_decision_id").


Exports a cryptographic audit package that binds the governance decision to the execution outcome. The decision must have been executed (has a router link).

Parameters:

ParameterTypeRequiredDescription
decision_idstringYesThe executed decision
embed_router_bundlebooleanNoEmbed full router bundle vs. reference (default: false)
router_bundleobjectNoRouter bundle dict (required when embedding)
router_bundle_digeststringNoOptional router digest override for reference mode
verify_router_bundle_digestbooleanNoVerify router digest matches (default: true)
renderbooleanNoInclude human-readable summary (default: true)

Returns: { package, digest, rendered } --- audit package containing the control bundle, router section, control-router link, and binding_digest (SHA-256).

The package includes all the data needed for independent verification. See the Attestation page for details on verification and XRPL anchoring.