harness_create
Create any Harness resource—pipelines, connectors, services, and more—by supplying the resource type and YAML or JSON definition. Supports remote Git and Harness Code pipelines with branch and file path details.
Instructions
Create a Harness resource. For pipelines/input sets: pass body as a YAML string directly (recommended for complex definitions), or use body.yamlPipeline (YAML string), or body.pipeline (JSON object). For remote pipelines, pass git details in params: external Git (store_type='REMOTE', connector_ref, repo_name, branch, file_path) or Harness Code (store_type='REMOTE', is_harness_code_repo=true, repo_name, branch, file_path). For others: call harness_describe for the body format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A Harness UI URL — org, project, and supported resource_scope are extracted automatically | |
| body | Yes | The resource definition body. For pipelines: pass a YAML string directly, or an object with yamlPipeline (YAML string) or pipeline (JSON object). For other resources: pass a JSON object | |
| 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 | Additional parameters. For external Git pipelines: store_type='REMOTE', connector_ref, repo_name, branch, file_path, commit_msg. For Harness Code pipelines: store_type='REMOTE', is_harness_code_repo=true, repo_name, branch, file_path. | |
| confirm | No | Set to true to confirm the operation. Only required when the operation risk is medium_write or above (most write resources) 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 creates. Does NOT override an explicit decline from a client that completed an elicitation prompt — a user's decline is authoritative. | |
| 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_type | Yes | The type of resource to create | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||