MCP Tools
Workflows

create_workflow

Create a new workflow template. Workflows start as status="draft"; activate them via update_workflow once the user confirms.

Input Schema

{
  "type": "object",
  "required": [
    "name",
    "steps"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "description": "Human-readable workflow name."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "description"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "agent_hint": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "minItems": 1,
      "description": "Ordered step objects. The runner executes these sequentially."
    },
    "inputs": {
      "type": "object",
      "description": "Declared input schema. Keys are input names; values describe type/label/required (free-form).",
      "additionalProperties": true
    },
    "description": {
      "type": "string",
      "description": "One- or two-sentence description of what this workflow accomplishes."
    },
    "allowed_tools": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Narrow allowlist of MCP tool names the runner may call."
    },
    "schedule_config": {
      "type": "object",
      "description": "Optional. Creates an accompanying workflow_trigger with is_enabled=false. Shape: frequency (daily/weekly/hourly), interval_hours, timezone (UTC).",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "required": [
    "id",
    "name",
    "status",
    "team_id",
    "created_at",
    "link_url"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Workflow UUID."
    },
    "name": {
      "type": "string"
    },
    "tags": {
      "type": "array"
    },
    "steps": {
      "type": "array"
    },
    "inputs": {
      "type": "object"
    },
    "status": {
      "enum": [
        "draft",
        "active",
        "archived"
      ],
      "type": "string"
    },
    "team_id": {
      "type": "integer"
    },
    "link_url": {
      "type": "string",
      "format": "uri",
      "description": "Direct link to this workflow in MarketCore. Format: https://app.marketcore.ai/workflows/{workflow_id}"
    },
    "created_at": {
      "type": "integer"
    },
    "updated_at": {
      "type": "integer"
    },
    "description": {
      "type": "string"
    },
    "allowed_tools": {
      "type": "array"
    },
    "created_by_user_id": {
      "type": "integer"
    }
  }
}

Instructions

Create a new workflow template for the user's active team. Workflows start as status="draft"; activate them via update_workflow once the user confirms.

Input roles:

  • name: Human-readable name. Confirm with the user before creating.
  • description: One or two sentences. Becomes part of the runner's system prompt.
  • steps: Ordered list. Each step should be specific enough that a fresh agent can do it without follow-up questions.
  • inputs: Declare what the workflow needs (e.g., topic, date_range). For scheduled runs these are resolved from trigger bindings.
  • allowed_tools: Narrow allowlist. Prefer tight allowlists for scheduled runs.
  • tags: Optional.
  • schedule_config: Include ONLY if the user explicitly wants scheduling. Shape: {"frequency": "daily"|"weekly"|"hourly", "interval_hours": N, "timezone": "UTC"}.

Usage patterns:

  • Always create as draft.
  • Before creating, check list_workflows with a search: filter for duplicate names.
  • For scheduled workflows that process entities (e.g., "new content items since last run"), set up a since_last_run input binding via the trigger.
Scroll to Top