-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathconfig.ts
More file actions
216 lines (214 loc) · 9.6 KB
/
config.ts
File metadata and controls
216 lines (214 loc) · 9.6 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
import { VERSION } from "../version.js";
export const serverMetadata = {
name: "trigger",
version: VERSION,
instructions: `Trigger.dev MCP server to automate your Trigger.dev projects and answer questions about Trigger.dev by searching the docs.
If you need help setting up Trigger.dev in your project please refer to https://trigger.dev/docs/manual-setup.
If the user asks for help with adding Trigger.dev to their project, please refer to https://trigger.dev/docs/manual-setup.
`,
};
export const toolsMetadata = {
search_docs: {
name: "search_docs",
title: "Search Docs",
description:
"Search across the Trigger.dev documentation to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about Trigger.dev, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to the documentation pages",
},
list_projects: {
name: "list_projects",
title: "List Projects",
description:
"List all projects for the current user, useful for when searching for a project and for looking up a projectRef",
},
list_orgs: {
name: "list_orgs",
title: "List Organizations",
description:
"List all organizations for the current user. Useful when looking up an org slug or ID.",
},
create_project_in_org: {
name: "create_project_in_org",
title: "Create Project in Organization",
description:
"Create a new project in an organization. Only do this if the user wants to add Trigger.dev to an existing project. If there is already a trigger.config.ts file present, then you should not create a new project.",
},
initialize_project: {
name: "initialize_project",
title: "Initialize Project",
description:
"Initialize Trigger.dev in your project. This will create a new project in the organization you select and add Trigger.dev to your project.",
},
get_tasks: {
name: "get_tasks",
title: "Get Tasks",
description:
"Get all tasks in the project. Useful when searching for a task and for looking up a task identifier/slug",
},
get_current_worker: {
name: "get_current_worker",
title: "Get Current Worker",
description:
"Get the current worker for the project, including version and registered task slugs. Use get_task_schema to get the payload schema for a specific task.",
},
get_task_schema: {
name: "get_task_schema",
title: "Get Task Schema",
description:
"Get the payload schema for a specific task. Use get_current_worker first to see available task slugs.",
},
trigger_task: {
name: "trigger_task",
title: "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.",
},
get_run_details: {
name: "get_run_details",
title: "Get Run Details",
description:
"Get the details and trace of a run. Trace events are paginated — the first call returns run details and the first page of trace lines. Pass the returned cursor to fetch subsequent pages without re-fetching the trace. The run ID starts with run_.",
},
get_span_details: {
name: "get_span_details",
title: "Get Span Details",
description:
"Get detailed information about a specific span within a run trace. Use get_run_details first to see the trace and find span IDs (shown as [spanId] in the trace output). Returns timing, properties/attributes, error info, and for AI spans: model, tokens, cost, and response data.",
},
wait_for_run_to_complete: {
name: "wait_for_run_to_complete",
title: "Wait for Run to Complete",
description:
"Wait for a run to complete. The run ID is the ID of the run that was triggered. It starts with run_. Has an optional timeoutInSeconds parameter (default 60s) - if the run doesn't complete within that time, the current state of the run will be returned.",
},
cancel_run: {
name: "cancel_run",
title: "Cancel Run",
description:
"Cancel a run. The run ID is the ID of the run that was triggered. It starts with run_",
},
list_runs: {
name: "list_runs",
title: "List Runs",
description:
"List all runs for a project. Use this tool when you need to search for a run or list all runs for a project.",
},
deploy: {
name: "deploy",
title: "Deploy",
description:
"Deploy a project. Use this tool when you need to deploy a project. This will trigger a deployment for the project. This is a long running operation and including a progress token will allow you to display the progress to the user.",
},
list_deploys: {
name: "list_deploys",
title: "List Deploys",
description:
"List all deploys for a project. Use this tool when you need to search for a deploy or list all deploys for a project.",
},
list_preview_branches: {
name: "list_preview_branches",
title: "List Preview Branches",
description:
"List all preview branches for a project. Use this tool when you need to search for a preview branch or list all preview branches for a project.",
},
query: {
name: "query",
title: "Query",
description:
"Execute a TRQL query against your Trigger.dev data. TRQL is a SQL-style query language for analyzing runs, metrics, and LLM usage. Call the get_query_schema tool first to discover available tables and columns before writing a query.",
},
get_query_schema: {
name: "get_query_schema",
title: "Get Query Schema",
description:
"Get the column schema for a specific TRQL table. Available tables: 'runs' (task execution data), 'metrics' (CPU, memory, custom metrics), 'llm_metrics' (LLM token usage, costs, latency). Returns columns, types, descriptions, and allowed values for the specified table.",
},
list_dashboards: {
name: "list_dashboards",
title: "List Dashboards",
description:
"List available built-in dashboards with their widgets. Each dashboard contains pre-built queries for common metrics like run success rates, costs, LLM usage, and more. Use run_dashboard to execute a dashboard's queries.",
},
run_dashboard_query: {
name: "run_dashboard_query",
title: "Run Dashboard Query",
description:
"Execute a single widget query from a built-in dashboard. Use list_dashboards first to see available dashboards, widget IDs, and their queries. Supports time period and scope options.",
},
whoami: {
name: "whoami",
title: "Who Am I",
description:
"Show the current authenticated user, active CLI profile, email, and API URL.",
},
list_profiles: {
name: "list_profiles",
title: "List Profiles",
description:
"List all configured CLI profiles. Shows which profile is currently active.",
},
switch_profile: {
name: "switch_profile",
title: "Switch Profile",
description:
"Switch the active CLI profile for this MCP session. This changes which Trigger.dev account and API URL are used for all subsequent tool calls.",
},
start_dev_server: {
name: "start_dev_server",
title: "Start Dev Server",
description:
"Start the Trigger.dev dev server (`trigger dev`) in the background. Waits up to 30 seconds for the worker to be ready. Use `dev_server_status` to check output and `stop_dev_server` to stop it.",
},
stop_dev_server: {
name: "stop_dev_server",
title: "Stop Dev Server",
description: "Stop the running Trigger.dev dev server.",
},
dev_server_status: {
name: "dev_server_status",
title: "Dev Server Status",
description:
"Check the status of the dev server and view recent output. Shows whether it is stopped, starting, ready, or has errors, along with recent log lines.",
},
list_prompts: {
name: "list_prompts",
title: "List Prompts",
description:
"List all managed prompts in the project environment. Shows slug, current version, override status, and version count.",
},
get_prompt_versions: {
name: "get_prompt_versions",
title: "Get Prompt Versions",
description:
"List all versions for a specific prompt. Shows version number, labels (current, override, latest), source (code or dashboard), model, and content.",
},
promote_prompt_version: {
name: "promote_prompt_version",
title: "Promote Prompt Version",
description:
"Promote a prompt version to be the current active version. Only code-sourced versions can be promoted — dashboard overrides must use the override tools instead.",
},
create_prompt_override: {
name: "create_prompt_override",
title: "Create Prompt Override",
description:
"Create a dashboard override for a prompt. The override takes precedence over the current code version when resolving the prompt. Provide the full text content for the override.",
},
update_prompt_override: {
name: "update_prompt_override",
title: "Update Prompt Override",
description:
"Update the active dashboard override for a prompt. Only works if an override is currently active.",
},
remove_prompt_override: {
name: "remove_prompt_override",
title: "Remove Prompt Override",
description:
"Remove the active dashboard override for a prompt, reverting to the current code version.",
},
reactivate_prompt_override: {
name: "reactivate_prompt_override",
title: "Reactivate Prompt Override",
description:
"Reactivate a previous dashboard-sourced version as the active override. Use get_prompt_versions to find dashboard versions that can be reactivated.",
},
};