Skip to main content
Create an enabled project webhook. Returns the webhook secret once, matching REST.

Tool details

FieldValue
Namecreate_project_webhook
GroupProjects

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Human-readable name for the record."
    },
    "target": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "agent",
            "job",
            "workflow"
          ],
          "description": "Target kind invoked by the webhook."
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Target identifier: agent id, job target, or workflow id."
        },
        "conversation_mode": {
          "type": "string",
          "enum": [
            "create_new",
            "existing",
            "none"
          ],
          "description": "Agent-only conversation mode. Defaults to none."
        },
        "conversation_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "description": "Conversation identifier associated with the record."
            },
            {
              "type": "null",
              "description": "Conversation identifier that scopes the request."
            }
          ],
          "description": "Agent-only existing conversation id. Required when conversation_mode is existing."
        }
      },
      "required": [
        "kind",
        "id"
      ],
      "additionalProperties": false,
      "description": "Target invoked by a webhook definition."
    },
    "prompt_template": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000,
      "description": "The prompt template associated with this record."
    },
    "event_filter": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "all",
                "any"
              ],
              "description": "Whether all or any filter conditions must match."
            },
            "conditions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Dot path in the incoming payload, for example action or pull_request.state."
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "equals",
                      "not_equals",
                      "in",
                      "exists",
                      "contains"
                    ],
                    "description": "Comparison operator."
                  },
                  "value": {
                    "description": "Comparison value for operators that require one."
                  }
                },
                "required": [
                  "path",
                  "operator"
                ],
                "additionalProperties": false,
                "description": "One condition item associated with this record."
              },
              "maxItems": 50,
              "description": "Filter conditions applied before webhook work is created."
            }
          },
          "required": [
            "mode",
            "conditions"
          ],
          "additionalProperties": false,
          "description": "Optional incoming event filter. Missing, null, or empty conditions accept every event."
        },
        {
          "type": "null",
          "description": "Provide the event filter."
        }
      ],
      "description": "Optional incoming event filter. Missing, null, or empty conditions accept every event."
    }
  },
  "required": [
    "project_reference",
    "name",
    "target",
    "prompt_template"
  ],
  "additionalProperties": false,
  "description": "Structured create webhook input schema for MCP tools.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "webhook": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for the record."
        },
        "project_id": {
          "type": "string",
          "format": "uuid",
          "description": "Project identifier associated with the record."
        },
        "name": {
          "type": "string",
          "description": "Human-readable name for the record."
        },
        "source": {
          "type": "string",
          "const": "webhook",
          "description": "The source associated with this record."
        },
        "target": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "agent",
                "job",
                "workflow"
              ],
              "description": "Target kind invoked by the webhook."
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "Target identifier: agent id, job target, or workflow id."
            },
            "conversation_mode": {
              "type": "string",
              "enum": [
                "create_new",
                "existing",
                "none"
              ],
              "description": "Agent-only conversation mode. Defaults to none."
            },
            "conversation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "description": "Conversation identifier associated with the record."
                },
                {
                  "type": "null",
                  "description": "Conversation identifier associated with this result."
                }
              ],
              "description": "Agent-only existing conversation id. Required when conversation_mode is existing."
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false,
          "description": "Target invoked by a webhook definition."
        },
        "prompt_template": {
          "type": "string",
          "description": "The prompt template associated with this record."
        },
        "event_filter": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "all",
                    "any"
                  ],
                  "description": "Whether all or any filter conditions must match."
                },
                "conditions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "Dot path in the incoming payload, for example action or pull_request.state."
                      },
                      "operator": {
                        "type": "string",
                        "enum": [
                          "equals",
                          "not_equals",
                          "in",
                          "exists",
                          "contains"
                        ],
                        "description": "Comparison operator."
                      },
                      "value": {
                        "description": "Comparison value for operators that require one."
                      }
                    },
                    "required": [
                      "path",
                      "operator"
                    ],
                    "additionalProperties": false,
                    "description": "One condition item associated with this record."
                  },
                  "maxItems": 50,
                  "description": "Filter conditions applied before webhook work is created."
                }
              },
              "required": [
                "mode",
                "conditions"
              ],
              "additionalProperties": false,
              "description": "Optional incoming event filter. Missing, null, or empty conditions accept every event."
            },
            {
              "type": "null",
              "description": "The event filter returned by the tool."
            }
          ],
          "description": "Optional incoming event filter. Missing, null, or empty conditions accept every event."
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "enabled",
            "disabled"
          ],
          "description": "Lifecycle status for the record."
        },
        "webhook_id": {
          "type": "string",
          "description": "The webhook id associated with this record."
        },
        "webhook_url": {
          "type": "string",
          "description": "The webhook url associated with this record."
        },
        "created_by_user_id": {
          "type": "string",
          "format": "uuid",
          "description": "The created by user id associated with this record."
        },
        "enabled_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "The enabled at associated with this record."
        },
        "disabled_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "The disabled at associated with this record."
        },
        "created_at": {
          "type": "string",
          "description": "Creation timestamp in ISO 8601 format."
        },
        "updated_at": {
          "type": "string",
          "description": "Last update timestamp in ISO 8601 format."
        }
      },
      "required": [
        "id",
        "project_id",
        "name",
        "source",
        "target",
        "prompt_template",
        "event_filter",
        "status",
        "webhook_id",
        "webhook_url",
        "created_by_user_id",
        "enabled_at",
        "disabled_at",
        "created_at",
        "updated_at"
      ],
      "additionalProperties": false,
      "description": "Project webhook definition using the same public shape as REST."
    },
    "webhook_secret": {
      "type": "string",
      "description": "The webhook secret associated with this record."
    }
  },
  "required": [
    "webhook",
    "webhook_secret"
  ],
  "additionalProperties": false,
  "description": "Structured create webhook output schema for MCP tools.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}