MCP Tools
Nexus Control exposes 11 tools via the Model Context Protocol. Each tool is namespaced under nexus-control.* and follows structured input/output schemas defined in the schemas/ directory.
Tool reference
Section titled “Tool reference”nexus-control.request
Section titled “nexus-control.request”Create an execution request with a goal, policy, and approvers.
This is the entry point for every governed execution. The request captures what needs to happen (the goal), how it should happen (the mode), and what constraints must be satisfied (the policy).
Key parameters:
goal— human-readable description of what the execution should accomplishactor— the person or system creating the request ({type, id})mode— execution mode (e.g.,"dry_run","apply")min_approvals— number of distinct approvers requiredlabels— optional tags for filtering and organizationtemplate_name— optional reference to a policy templateplan— optional pre-defined execution planallowed_modes— which modes are allowed by policyrequire_adapter_capabilities— capabilities the router adapter must declaremax_steps— maximum execution steps
When template_name is provided, explicit policy parameters (min_approvals, allowed_modes, etc.) act as overrides on top of the template defaults.
nexus-control.approve
Section titled “nexus-control.approve”Approve a request. Supports N-of-M approval workflows.
Approvals are counted by distinct actor.id. Duplicate approvals from the same actor are deduplicated. Approvals can include a comment, an expiration timestamp, and can be revoked before execution.
Key parameters:
request_id— the decision to approveactor— the approver ({type, id})comment— optional human-readable reasonexpires_at— optional ISO 8601 expiration
nexus-control.execute
Section titled “nexus-control.execute”Execute an approved request via nexus-router.
This tool enforces the policy at execution time: it verifies that the approval count meets the threshold, that the mode is allowed, and that the adapter satisfies any required capabilities. On success, it records the run_id linking to the router execution.
Key parameters:
request_id— the approved decision to executeadapter_id— identifies which router adapter to useactor— the actor triggering executionrouter— aRouterProtocolimplementation
nexus-control.status
Section titled “nexus-control.status”Get the current state of a request and its linked run status.
Returns the decision header, current state (pending, approved, executing, completed, failed), approval count, and any linked router execution status.
Key parameters:
request_id— the decision to inspect
nexus-control.inspect
Section titled “nexus-control.inspect”Read-only introspection with human-readable output.
Similar to status but formatted for human consumption. Includes the full approval trail, policy details, and execution timeline in a readable format.
Key parameters:
request_id— the decision to inspect
nexus-control.template.create
Section titled “nexus-control.template.create”Create a named, immutable policy template.
Templates define reusable policy bundles: approval thresholds, allowed modes, required adapter capabilities, step limits, and labels. Once created, a template cannot be modified — this ensures that decisions referencing a template have stable semantics.
Key parameters:
name— unique template identifieractor— the creatormin_approvals— default approval thresholdallowed_modes— list of permitted execution modesrequire_adapter_capabilities— capabilities the router adapter must declaremax_steps— optional step limit for the executionlabels— optional tags
nexus-control.template.get
Section titled “nexus-control.template.get”Retrieve a template by name.
Returns the full template definition including all policy fields, creation metadata, and labels.
Key parameters:
name— the template to retrieve
nexus-control.template.list
Section titled “nexus-control.template.list”List all templates with optional label filtering.
Returns all templates, optionally filtered to those matching specific labels. Useful for discovering available policy bundles.
Key parameters:
labels— optional list of labels to filter by
nexus-control.export_bundle
Section titled “nexus-control.export_bundle”Export a decision as a portable, integrity-verified bundle.
The bundle contains the decision header, all events, the policy, approvals, and a SHA-256 digest. Bundles can be imported into another Nexus Control instance for verification or replay.
Key parameters:
decision_id— the decision to export
nexus-control.import_bundle
Section titled “nexus-control.import_bundle”Import a bundle with conflict modes and replay validation.
When importing, you choose how to handle conflicts with existing decisions:
| Conflict mode | Behavior |
|---|---|
reject_on_conflict | Fail if the decision ID already exists |
new_decision_id | Import under a fresh ID, preserving history |
overwrite | Replace the existing decision (use with caution) |
The replay_after_import option re-derives state from the imported events to verify consistency.
Key parameters:
bundle_json— the exported bundle dataconflict_mode— how to handle ID conflictsreplay_after_import— whether to verify by replaying events
nexus-control.export_audit_package
Section titled “nexus-control.export_audit_package”Export an audit package binding governance to execution.
An audit package is a single JSON artifact that cryptographically binds three things:
- What was allowed — the control bundle (decision + policy + approvals)
- What actually ran — the router execution result
- Why it was allowed — the control-router link
The result is a binding_digest that can be verified independently.
Router modes:
| Mode | Description | Use case |
|---|---|---|
| Reference | run_id + router_digest | CI pipelines, internal systems |
| Embedded | Full router bundle included | Regulators, long-term archival |
Key parameters:
request_id— the executed decision to package
Verification
Section titled “Verification”Audit packages can be verified programmatically:
from nexus_control import export_audit_package, verify_audit_package
# Exportresult = export_audit_package(store, decision_id)package = result.package
# Verify (6 independent checks, no short-circuiting)verification = verify_audit_package(package)assert verification.okThe verification runs 6 independent checks and never short-circuits, ensuring that all integrity properties are evaluated regardless of earlier failures.