harness_execute
Execute Harness resource actions—run/retry pipelines, toggle feature flags, test connectors, sync GitOps apps, run chaos experiments—using URLs or identifiers, with optional wait for terminal status.
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. Required for org- and project-scoped resources unless a Harness URL is passed. This session has no configured default (common in hosted/multi-user HTTP) — pass the current org_id on the first call. Do not omit it. | |
| 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. Required for project-scoped resources unless a Harness URL is passed. This session has no configured default (common in hosted/multi-user HTTP) — pass the current project_id on the first call. Do not omit it. | |
| 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: account-level resources only — do not use account to skip a known org/project. org: org-level (org_id). project: org+project. Omit to use the resource's default scope. 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 | |||