File size: 4,200 Bytes
cf3884b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
  "name": "trigger_task",
  "description": "Trigger a task in the project. Use the get_tasks tool to get a list of tasks and ask the user to select one if it's not clear which one to use. Use the wait_for_run_to_complete tool to wait for the run to complete.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "projectRef": {
        "type": "string",
        "description": "The trigger.dev project ref, starts with proj_. We will attempt to automatically detect the project ref if running inside a directory that includes a trigger.config.ts file, or if you pass the --project-ref option to the MCP server."
      },
      "configPath": {
        "type": "string",
        "description": "The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the root dir (like in a monorepo setup). If not provided, we will try to find the config file in the current working directory"
      },
      "environment": {
        "type": "string",
        "enum": [
          "dev",
          "staging",
          "prod",
          "preview"
        ],
        "description": "The environment to get tasks for",
        "default": "dev"
      },
      "branch": {
        "type": "string",
        "description": "The branch to get tasks for, only used for preview environments"
      },
      "taskId": {
        "type": "string",
        "description": "The ID/slug of the task to trigger. Use the get_tasks tool to get a list of tasks and ask the user to select one if it's not clear which one to use."
      },
      "payload": {
        "description": "The payload to trigger the task with. Should match the task's payload schema. Not a JSON string, but the actual payload object"
      },
      "options": {
        "type": "object",
        "properties": {
          "queue": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the queue to trigger the task in, by default will use the queue configured in the task"
              }
            },
            "required": [
              "name"
            ],
            "additionalProperties": false
          },
          "delay": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "description": "The delay before the task run is executed"
          },
          "idempotencyKey": {
            "type": "string",
            "description": "The idempotency key to use for the task run"
          },
          "machine": {
            "type": "string",
            "enum": [
              "micro",
              "small-1x",
              "small-2x",
              "medium-1x",
              "medium-2x",
              "large-1x",
              "large-2x"
            ],
            "description": "The machine preset to use for the task run"
          },
          "maxAttempts": {
            "type": "integer",
            "description": "The maximum number of attempts to retry the task run"
          },
          "maxDuration": {
            "type": "number",
            "description": "The maximum duration in seconds of the task run"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags to add to the task run. Must be less than 128 characters and cannot have more than 5"
          },
          "ttl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "minimum": 0
              }
            ],
            "description": "The time to live of the task run. If the run doesn't start executing within this time, it will be automatically cancelled.",
            "default": "10m"
          }
        },
        "additionalProperties": false
      }
    },
    "required": [
      "taskId"
    ],
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}