harness_create
Create any Harness resource by specifying resource type and a YAML or JSON definition body. Supports pipelines with inline or remote Git configurations.
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 (overrides default) | |
| 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 (overrides default) | |
| resource_type | Yes | The type of resource to create | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||