Execute Plan
chaoscore_executeExecute plans or inline steps with per-step policy enforcement, dry-run validation, and approval confirmations, returning evaluation results.
Instructions
Run a plan (or inline steps) through the remaining stages of the Cognitive Core loop: policy check -> capability selection -> execution -> evaluation. This is the only tool in this server that can have side effects, and only insofar as the capabilities it invokes do.
Each step is policy-checked individually before it runs (ALLOW / DENY / REQUIRE_APPROVAL — see chaoscore_inspect target="policy"). Steps that are DENY, or REQUIRE_APPROVAL and not yet confirmed, are reported as failed/skipped rather than silently dropped — read each step's error field. Every policy decision and capability call is recorded to the audit trail (chaoscore_inspect target="audit"). This is identical over stdio and over remote HTTP: there is no transport that can reach a capability without passing the policy engine.
Args:
plan_id (string, optional): id from a prior chaoscore_plan call in this session
steps (array, optional): inline steps [{description, capability, input, rationale}], alternative to plan_id
confirmed (boolean): set true to also run steps that resolve to REQUIRE_APPROVAL (default: false)
dry_run (boolean): if true, validates policy + input schema per step without calling any handler (default: false)
response_format ('markdown' | 'json'): Output format (default: 'markdown')
Returns: For JSON format: { "planId": string, "objective": string, "steps": [ { "stepId": string, "capability": string, "success": boolean, "output"?: any, "error"?: string, "policyDecision": { "decision": "allow"|"deny"|"require_approval", "allowed": boolean, "requiresConfirmation": boolean, "reason": string }, "durationMs": number } ], "evaluation": { "success": boolean, "summary": string, "notes": string[] }, "completedAt": string }
Examples:
Use when: You have a plan_id from chaoscore_plan and are ready to run it -> chaoscore_execute(plan_id="...")
Use when: A step came back REQUIRE_APPROVAL and you've now confirmed with the user -> re-run with confirmed=true
Don't use when: You just want to see what a plan would do without side effects -> use dry_run=true
Error Handling:
Returns "Error: plan_id not found in this session" if the plan wasn't created in the current MCP session
Individual step failures do NOT throw — they appear in the steps array with success=false
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Inline steps to execute directly, as an alternative to plan_id | |
| dry_run | No | If true, validate policy + input schema for every step but never call any capability handler | |
| plan_id | No | id of a plan previously returned by chaoscore_plan in this MCP session | |
| confirmed | No | Set true to also run steps whose capability policy resolves to REQUIRE_APPROVAL | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |