Skip to main content
Get structured source information for a project workflow

Tool details

FieldValue
Nameget_workflow_source
GroupJobs

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug"
    },
    "workflow_id": {
      "type": "string",
      "description": "Workflow ID from list_workflows"
    },
    "runtime_target_kind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "production",
            "environment",
            "preview_branch"
          ],
          "description": "Provide the runtime target kind."
        },
        {
          "type": "null",
          "description": "Provide the runtime target kind."
        }
      ],
      "description": "Provide the runtime target kind."
    },
    "target_environment_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "description": "Provide the target environment id."
        },
        {
          "type": "null",
          "description": "Provide the target environment id."
        }
      ],
      "description": "Provide the target environment id."
    },
    "target_branch_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "description": "Provide the target branch id."
        },
        {
          "type": "null",
          "description": "Provide the target branch id."
        }
      ],
      "description": "Provide the target branch id."
    },
    "source_target_kind": {
      "type": "string",
      "enum": [
        "project",
        "production",
        "environment",
        "preview_branch"
      ],
      "description": "Provide the source target kind."
    }
  },
  "required": [
    "project_reference",
    "workflow_id"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Input schema for the get_workflow_source tool."
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow identifier."
    },
    "name": {
      "type": "string",
      "description": "Human-readable workflow name."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Short description of the workflow purpose."
    },
    "target": {
      "type": "string",
      "description": "Execution target that implements the workflow."
    },
    "source_path": {
      "type": "string",
      "description": "Source file path where the workflow definition lives."
    },
    "source": {
      "type": "string",
      "description": "Workflow source code or structured document content."
    },
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "Version string for the workflow definition, when tracked."
    },
    "schedulable": {
      "type": "boolean",
      "description": "Whether the workflow can be triggered by schedulers."
    },
    "edit_mode": {
      "type": "string",
      "enum": [
        "structured",
        "source_only"
      ],
      "description": "Editing mode supported for the workflow definition."
    },
    "source_only_reasons": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "One source only reason item associated with this record."
      },
      "description": "Reasons why the workflow can only be edited as raw source, when applicable."
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "target",
    "source_path",
    "source",
    "version",
    "schedulable",
    "edit_mode",
    "source_only_reasons"
  ],
  "additionalProperties": false,
  "description": "Workflow definition including editable source content.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}