harness_execute
Run, retry, or interrupt pipelines; toggle feature flags; test connectors; sync GitOps apps; run chaos experiments on Harness. Auto-extracts identifiers from a URL and can wait for pipeline completion.
Instructions
Execute an action on a Harness resource: run/retry/interrupt pipelines, kill/restore FME feature flags, test connectors, sync GitOps apps, run chaos experiments. You can pass a Harness URL to auto-extract identifiers. Pass wait: true for pipeline run/retry to block until the execution reaches a terminal status — single tool call instead of an LLM polling loop. For HQL batch operations pass queries with resource_type='hql_query' and action='validate' or 'run'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Harness UI URL — auto-extracts org, project, type, and ID | |
| body | No | Additional body payload for the action | |
| wait | No | For pipeline run/retry actions: block until the execution reaches a terminal status (Success/Failed/Aborted/Errored/Expired). Server-side polling — a single tool call gives the agent the final outcome instead of an LLM polling loop. Ignored for other actions. | |
| action | Yes | Action to execute (e.g. run, retry, interrupt, toggle, test_connection, sync) | |
| inputs | No | Pipeline runtime inputs: key-value pairs like {branch: 'main'} (auto-resolved), or full YAML string. Check runtime_input_template first via harness_get. | |
| org_id | No | Organization identifier (overrides default) | |
| params | No | Action-specific parameters. Call harness_describe for available fields per resource_type. | |
| confirm | No | Set to true to confirm the operation. Only required when the action's risk is medium_write or above (e.g. pipeline.run is high_write; hql_query.run/validate are read and need no confirmation) AND the client cannot surface a confirmation prompt — e.g. managed MCP that does not advertise elicitation, or an elicitation that fails at runtime. Has no effect for low-risk actions. Does NOT override an explicit decline from a client that completed an elicitation prompt — a user's decline is authoritative. | |
| queries | No | Batch HQL queries — use with resource_type='hql_query' and action='validate' or 'run'. Fans out in parallel, returns per-query results. | |
| project_id | No | Project identifier (overrides default) | |
| resource_id | No | Primary resource identifier | |
| input_set_ids | No | Input set IDs for complex pipelines. List available: harness_list(resource_type='input_set', filters={pipeline_id: '...'}). | |
| resource_type | No | Resource type with executable actions. Auto-detected from url. | |
| resource_scope | No | Scope for the operation. account: omit org/project (e.g. /v1/templates). org: org only. project: org+project. Auto-detected from url when present. | |
| wait_timeout_seconds | No | Max seconds to wait when wait=true. Default 600 (10 min). Max 7200 (2 h). When the timeout fires, returns execution_timed_out=true with the last observed status. | |
| wait_poll_interval_seconds | No | Initial poll interval when wait=true (seconds). Default 3. Backoff multiplier 1.5x, capped at 30s. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||