MCP Tools
Workflows

get_workflow_runs

Inspect workflow run history. Two modes: list mode (paginated runs for a workflow) or single mode (one run with step logs and tool call logs) controlled by run_id presence.

Input Schema

{
  "type": "object",
  "required": [
    "workflow_id"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1
    },
    "run_id": {
      "type": "string",
      "format": "uuid",
      "description": "UUID of a specific run. Omit to list all runs for the workflow."
    },
    "status": {
      "enum": [
        "pending",
        "running",
        "succeeded",
        "failed",
        "skipped"
      ],
      "type": "string",
      "description": "Filter by run status (list mode only)."
    },
    "per_page": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1
    },
    "workflow_id": {
      "type": "string",
      "format": "uuid",
      "description": "UUID of the workflow template."
    }
  },
  "additionalProperties": false
}

Output Schema

{
  "oneOf": [
    {
      "type": "object",
      "title": "List mode (run_id omitted)",
      "required": [
        "items",
        "itemsTotal"
      ],
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Run UUID."
              },
              "status": {
                "type": "string"
              },
              "link_url": {
                "type": "string",
                "format": "uri",
                "description": "Direct link to this run in MarketCore."
              },
              "created_at": {
                "type": "integer"
              },
              "trigger_type": {
                "type": "string"
              },
              "workflow_template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        },
        "curPage": {
          "type": "integer"
        },
        "nextPage": {
          "type": [
            "integer",
            "null"
          ]
        },
        "prevPage": {
          "type": [
            "integer",
            "null"
          ]
        },
        "itemsTotal": {
          "type": "integer"
        }
      }
    },
    {
      "type": "object",
      "title": "Single run mode (run_id provided)",
      "required": [
        "id",
        "workflow_template_id",
        "status",
        "link_url"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Run UUID."
        },
        "status": {
          "enum": [
            "pending",
            "running",
            "succeeded",
            "failed",
            "skipped"
          ],
          "type": "string"
        },
        "link_url": {
          "type": "string",
          "format": "uri",
          "description": "Direct link to this run in MarketCore. Format: https://app.marketcore.ai/workflows/{workflow_id}/runs/{run_id}"
        },
        "_step_logs": {
          "type": "array",
          "description": "Per-step execution logs."
        },
        "created_at": {
          "type": "integer"
        },
        "error_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "trigger_type": {
          "type": "string"
        },
        "_tool_call_logs": {
          "type": "array",
          "description": "Tool calls made during this run."
        },
        "workflow_template_id": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  ]
}

Instructions

Inspect workflow run history. Two modes controlled by run_id presence:

Input roles:

  • workflow_id: integer id of the workflow.
  • run_id: integer. If present → single-run detail with step logs and tool call logs. If absent → paginated list of runs.
  • status: list-mode filter. Ignored in single mode.
  • page / per_page: list-mode pagination.

Usage patterns:

  • When the user asks "did my workflow run?": call with just workflow_id (list mode) and look at items[0].status + items[0].completed_at.
  • When the user asks "what did that run do?": call with workflow_id + run_id (single mode) and read _step_logs and _tool_call_logs.
  • When troubleshooting failures: filter list mode by status="failed", then pull each detail.
Scroll to Top