jetty-mcp-server 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -3
- package/dist/api-client.d.ts +71 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +201 -0
- package/dist/api-client.js.map +1 -0
- package/dist/client.d.ts +12 -28
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +47 -127
- package/dist/client.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib.d.ts +14 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +11 -0
- package/dist/lib.js.map +1 -0
- package/dist/tool-definitions.d.ts +49 -0
- package/dist/tool-definitions.d.ts.map +1 -0
- package/dist/tool-definitions.js +428 -0
- package/dist/tool-definitions.js.map +1 -0
- package/dist/tools.d.ts +8 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +10 -111
- package/dist/tools.js.map +1 -1
- package/dist/webmcp.d.ts +61 -0
- package/dist/webmcp.d.ts.map +1 -0
- package/dist/webmcp.js +98 -0
- package/dist/webmcp.js.map +1 -0
- package/package.json +51 -6
- package/src/client.ts +0 -206
- package/src/index.ts +0 -17
- package/src/tools.ts +0 -222
- package/tsconfig.json +0 -18
package/dist/index.js
CHANGED
package/dist/lib.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library entry (`import ... from "jetty-mcp-server"`). Side-effect free;
|
|
3
|
+
* the stdio server lives in index.ts and is what the `jetty-mcp-server`
|
|
4
|
+
* binary runs.
|
|
5
|
+
*/
|
|
6
|
+
export { JettyClient, resolveToken } from "./client.js";
|
|
7
|
+
export { JettyApiClient, DEFAULT_API_URL } from "./api-client.js";
|
|
8
|
+
export type { JettyApiClientOptions, TokenSource } from "./api-client.js";
|
|
9
|
+
export { registerTools } from "./tools.js";
|
|
10
|
+
export { JETTY_TOOLS, JETTY_WEBMCP_TOOLS, getJettyTool, jsonResult } from "./tool-definitions.js";
|
|
11
|
+
export type { JettyToolDefinition, ToolAnnotations, ToolResult } from "./tool-definitions.js";
|
|
12
|
+
export { findModelContext, jettyWebMcpTools, registerJettyWebMcpTools, toWebMcpTool, toolInputJsonSchema, } from "./webmcp.js";
|
|
13
|
+
export type { JettyWebMcpOptions, ModelContextLike, RegisterJettyWebMcpResult, WebMcpTool, } from "./webmcp.js";
|
|
14
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClG,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,yBAAyB,EACzB,UAAU,GACX,MAAM,aAAa,CAAC"}
|
package/dist/lib.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library entry (`import ... from "jetty-mcp-server"`). Side-effect free;
|
|
3
|
+
* the stdio server lives in index.ts and is what the `jetty-mcp-server`
|
|
4
|
+
* binary runs.
|
|
5
|
+
*/
|
|
6
|
+
export { JettyClient, resolveToken } from "./client.js";
|
|
7
|
+
export { JettyApiClient, DEFAULT_API_URL } from "./api-client.js";
|
|
8
|
+
export { registerTools } from "./tools.js";
|
|
9
|
+
export { JETTY_TOOLS, JETTY_WEBMCP_TOOLS, getJettyTool, jsonResult } from "./tool-definitions.js";
|
|
10
|
+
export { findModelContext, jettyWebMcpTools, registerJettyWebMcpTools, toWebMcpTool, toolInputJsonSchema, } from "./webmcp.js";
|
|
11
|
+
//# sourceMappingURL=lib.js.map
|
package/dist/lib.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,mBAAmB,GACpB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Jetty tool catalog, declared once as data. Both surfaces consume it:
|
|
3
|
+
*
|
|
4
|
+
* - tools.ts registers every definition on an MCP server (stdio, npx).
|
|
5
|
+
* - webmcp.ts registers the same definitions on a page's
|
|
6
|
+
* `navigator.modelContext` (WebMCP), deriving JSON Schema from the zod
|
|
7
|
+
* shape and executing through a browser-side JettyApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Browser-safe: imports zod and the client type only.
|
|
10
|
+
*/
|
|
11
|
+
import { z, type ZodRawShape, type ZodTypeAny } from "zod";
|
|
12
|
+
import type { JettyApiClient } from "./api-client.js";
|
|
13
|
+
/** MCP tool annotations (a subset of the spec's ToolAnnotations). */
|
|
14
|
+
export interface ToolAnnotations {
|
|
15
|
+
readOnlyHint: boolean;
|
|
16
|
+
destructiveHint?: boolean;
|
|
17
|
+
idempotentHint?: boolean;
|
|
18
|
+
openWorldHint?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface JettyToolDefinition<Shape extends ZodRawShape = ZodRawShape> {
|
|
21
|
+
name: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
/** zod raw shape — the MCP SDK's native input form. */
|
|
25
|
+
inputSchema: Shape;
|
|
26
|
+
annotations: ToolAnnotations;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the WebMCP adapter may expose the tool. Defaults to true; the
|
|
29
|
+
* MCP server registers every tool regardless. Set false for account-level
|
|
30
|
+
* actions a page should not hand to an in-browser agent.
|
|
31
|
+
*/
|
|
32
|
+
webmcp?: boolean;
|
|
33
|
+
handler: (client: JettyApiClient, args: z.objectOutputType<Shape, ZodTypeAny>) => Promise<unknown>;
|
|
34
|
+
}
|
|
35
|
+
/** The MCP/WebMCP result envelope both surfaces return. */
|
|
36
|
+
export interface ToolResult {
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
content: {
|
|
39
|
+
type: "text";
|
|
40
|
+
text: string;
|
|
41
|
+
}[];
|
|
42
|
+
isError?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare function jsonResult(data: unknown): ToolResult;
|
|
45
|
+
export declare const JETTY_TOOLS: readonly JettyToolDefinition[];
|
|
46
|
+
/** The subset of the catalog the WebMCP adapter may expose. */
|
|
47
|
+
export declare const JETTY_WEBMCP_TOOLS: readonly JettyToolDefinition[];
|
|
48
|
+
export declare function getJettyTool(name: string): JettyToolDefinition | undefined;
|
|
49
|
+
//# sourceMappingURL=tool-definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.d.ts","sourceRoot":"","sources":["../src/tool-definitions.ts"],"names":[],"m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IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE1E"}
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Jetty tool catalog, declared once as data. Both surfaces consume it:
|
|
3
|
+
*
|
|
4
|
+
* - tools.ts registers every definition on an MCP server (stdio, npx).
|
|
5
|
+
* - webmcp.ts registers the same definitions on a page's
|
|
6
|
+
* `navigator.modelContext` (WebMCP), deriving JSON Schema from the zod
|
|
7
|
+
* shape and executing through a browser-side JettyApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Browser-safe: imports zod and the client type only.
|
|
10
|
+
*/
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
export function jsonResult(data) {
|
|
13
|
+
return {
|
|
14
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const READ = { readOnlyHint: true, idempotentHint: true };
|
|
18
|
+
const WRITE = { readOnlyHint: false, destructiveHint: false };
|
|
19
|
+
const DESTRUCTIVE = { readOnlyHint: false, destructiveHint: true };
|
|
20
|
+
function define(def) {
|
|
21
|
+
return def;
|
|
22
|
+
}
|
|
23
|
+
const collection = () => z.string().describe("Collection name");
|
|
24
|
+
const task = () => z.string().describe("Task name");
|
|
25
|
+
const routineName = () => z.string().describe("Routine name");
|
|
26
|
+
const cadenceSchema = z
|
|
27
|
+
.object({
|
|
28
|
+
type: z
|
|
29
|
+
.enum(["manual", "hourly", "daily", "weekdays", "weekly"])
|
|
30
|
+
.describe("Cadence type. 'manual' creates a saved invocation preset (no schedule); the others register a Temporal schedule."),
|
|
31
|
+
hour_utc: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(0)
|
|
35
|
+
.max(23)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Hour of day in UTC (0-23). Required for daily/weekdays/weekly."),
|
|
38
|
+
minute_utc: z
|
|
39
|
+
.number()
|
|
40
|
+
.int()
|
|
41
|
+
.min(0)
|
|
42
|
+
.max(59)
|
|
43
|
+
.optional()
|
|
44
|
+
.describe("Minute of the hour in UTC (0-59). Defaults to 0."),
|
|
45
|
+
day_of_week: z
|
|
46
|
+
.enum(["mon", "tue", "wed", "thu", "fri", "sat", "sun"])
|
|
47
|
+
.optional()
|
|
48
|
+
.describe("Day of week. Required for weekly cadence."),
|
|
49
|
+
})
|
|
50
|
+
.describe("Cadence config. Examples: {type:'hourly', minute_utc:15}, {type:'daily', hour_utc:9}, {type:'weekly', day_of_week:'mon', hour_utc:9}.");
|
|
51
|
+
export const JETTY_TOOLS = [
|
|
52
|
+
// ── Collections ──────────────────────────────────────────────
|
|
53
|
+
define({
|
|
54
|
+
name: "list-collections",
|
|
55
|
+
title: "List collections",
|
|
56
|
+
description: "List all collections",
|
|
57
|
+
inputSchema: {},
|
|
58
|
+
annotations: READ,
|
|
59
|
+
handler: (client) => client.listCollections(),
|
|
60
|
+
}),
|
|
61
|
+
define({
|
|
62
|
+
name: "get-collection",
|
|
63
|
+
title: "Get collection",
|
|
64
|
+
description: "Get collection details including environment variable keys",
|
|
65
|
+
inputSchema: { collection: collection() },
|
|
66
|
+
annotations: READ,
|
|
67
|
+
handler: (client, { collection }) => client.getCollection(collection),
|
|
68
|
+
}),
|
|
69
|
+
// ── Tasks ────────────────────────────────────────────────────
|
|
70
|
+
define({
|
|
71
|
+
name: "list-tasks",
|
|
72
|
+
title: "List tasks",
|
|
73
|
+
description: "List tasks in a collection",
|
|
74
|
+
inputSchema: { collection: collection() },
|
|
75
|
+
annotations: READ,
|
|
76
|
+
handler: (client, { collection }) => client.listTasks(collection),
|
|
77
|
+
}),
|
|
78
|
+
define({
|
|
79
|
+
name: "get-task",
|
|
80
|
+
title: "Get task",
|
|
81
|
+
description: "Get task details including workflow definition",
|
|
82
|
+
inputSchema: { collection: collection(), task: task() },
|
|
83
|
+
annotations: READ,
|
|
84
|
+
handler: (client, { collection, task }) => client.getTask(collection, task),
|
|
85
|
+
}),
|
|
86
|
+
define({
|
|
87
|
+
name: "create-task",
|
|
88
|
+
title: "Create task",
|
|
89
|
+
description: "Create a new task with a workflow definition",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
collection: collection(),
|
|
92
|
+
name: z.string().describe("Task name"),
|
|
93
|
+
description: z.string().optional().describe("Task description"),
|
|
94
|
+
workflow: z
|
|
95
|
+
.record(z.unknown())
|
|
96
|
+
.describe("Workflow JSON with init_params, step_configs, and steps"),
|
|
97
|
+
},
|
|
98
|
+
annotations: WRITE,
|
|
99
|
+
handler: (client, { collection, name, description, workflow }) => client.createTask(collection, name, workflow, description),
|
|
100
|
+
}),
|
|
101
|
+
define({
|
|
102
|
+
name: "update-task",
|
|
103
|
+
title: "Update task",
|
|
104
|
+
description: "Update a task's workflow or description",
|
|
105
|
+
inputSchema: {
|
|
106
|
+
collection: collection(),
|
|
107
|
+
task: task(),
|
|
108
|
+
workflow: z.record(z.unknown()).optional().describe("Updated workflow JSON"),
|
|
109
|
+
description: z.string().optional().describe("Updated description"),
|
|
110
|
+
},
|
|
111
|
+
annotations: WRITE,
|
|
112
|
+
handler: (client, { collection, task, workflow, description }) => {
|
|
113
|
+
const updates = {};
|
|
114
|
+
if (workflow)
|
|
115
|
+
updates.workflow = workflow;
|
|
116
|
+
if (description)
|
|
117
|
+
updates.description = description;
|
|
118
|
+
return client.updateTask(collection, task, updates);
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
// ── Trial keys ───────────────────────────────────────────────
|
|
122
|
+
// MCP only: trial keys are an account-level concern for the local agent
|
|
123
|
+
// that set the workspace up, not something a page hands to a browser agent.
|
|
124
|
+
define({
|
|
125
|
+
name: "get-trial-status",
|
|
126
|
+
title: "Get trial status",
|
|
127
|
+
description: "Get trial key status for a collection",
|
|
128
|
+
inputSchema: { collection: collection() },
|
|
129
|
+
annotations: READ,
|
|
130
|
+
webmcp: false,
|
|
131
|
+
handler: (client, { collection }) => client.getTrialStatus(collection),
|
|
132
|
+
}),
|
|
133
|
+
define({
|
|
134
|
+
name: "activate-trial",
|
|
135
|
+
title: "Activate trial",
|
|
136
|
+
description: "Activate trial keys for a collection",
|
|
137
|
+
inputSchema: { collection: collection() },
|
|
138
|
+
annotations: WRITE,
|
|
139
|
+
webmcp: false,
|
|
140
|
+
handler: (client, { collection }) => client.activateTrial(collection),
|
|
141
|
+
}),
|
|
142
|
+
// ── Run workflows ────────────────────────────────────────────
|
|
143
|
+
define({
|
|
144
|
+
name: "run-workflow",
|
|
145
|
+
title: "Run workflow",
|
|
146
|
+
description: "Run a workflow asynchronously (returns immediately with workflow_id). Trial keys are applied automatically server-side when the collection is eligible.",
|
|
147
|
+
inputSchema: {
|
|
148
|
+
collection: collection(),
|
|
149
|
+
task: task(),
|
|
150
|
+
init_params: z
|
|
151
|
+
.record(z.unknown())
|
|
152
|
+
.optional()
|
|
153
|
+
.describe("Input parameters for the workflow"),
|
|
154
|
+
},
|
|
155
|
+
annotations: WRITE,
|
|
156
|
+
handler: (client, { collection, task, init_params }) => client.runWorkflow(collection, task, init_params),
|
|
157
|
+
}),
|
|
158
|
+
define({
|
|
159
|
+
name: "run-workflow-sync",
|
|
160
|
+
title: "Run workflow (sync)",
|
|
161
|
+
description: "Run a workflow synchronously (blocks until completion, may take 30-60s). Trial keys are applied automatically server-side when the collection is eligible.",
|
|
162
|
+
inputSchema: {
|
|
163
|
+
collection: collection(),
|
|
164
|
+
task: task(),
|
|
165
|
+
init_params: z
|
|
166
|
+
.record(z.unknown())
|
|
167
|
+
.optional()
|
|
168
|
+
.describe("Input parameters for the workflow"),
|
|
169
|
+
},
|
|
170
|
+
annotations: WRITE,
|
|
171
|
+
handler: (client, { collection, task, init_params }) => client.runWorkflowSync(collection, task, init_params),
|
|
172
|
+
}),
|
|
173
|
+
// ── Trajectories ─────────────────────────────────────────────
|
|
174
|
+
define({
|
|
175
|
+
name: "list-trajectories",
|
|
176
|
+
title: "List runs",
|
|
177
|
+
description: "List recent workflow runs (trajectories) for a task",
|
|
178
|
+
inputSchema: {
|
|
179
|
+
collection: collection(),
|
|
180
|
+
task: task(),
|
|
181
|
+
limit: z.number().optional().default(10).describe("Max results"),
|
|
182
|
+
page: z.number().optional().default(1).describe("Page number"),
|
|
183
|
+
},
|
|
184
|
+
annotations: READ,
|
|
185
|
+
handler: (client, { collection, task, limit, page }) => client.listTrajectories(collection, task, limit, page),
|
|
186
|
+
}),
|
|
187
|
+
define({
|
|
188
|
+
name: "get-trajectory",
|
|
189
|
+
title: "Get run",
|
|
190
|
+
description: "Get full details of a specific workflow run",
|
|
191
|
+
inputSchema: {
|
|
192
|
+
collection: collection(),
|
|
193
|
+
task: task(),
|
|
194
|
+
trajectory_id: z.string().describe("Trajectory ID"),
|
|
195
|
+
},
|
|
196
|
+
annotations: READ,
|
|
197
|
+
handler: (client, { collection, task, trajectory_id }) => client.getTrajectory(collection, task, trajectory_id),
|
|
198
|
+
}),
|
|
199
|
+
// ── Stats ────────────────────────────────────────────────────
|
|
200
|
+
define({
|
|
201
|
+
name: "get-stats",
|
|
202
|
+
title: "Get stats",
|
|
203
|
+
description: "Get execution statistics for a task",
|
|
204
|
+
inputSchema: { collection: collection(), task: task() },
|
|
205
|
+
annotations: READ,
|
|
206
|
+
handler: (client, { collection, task }) => client.getStats(collection, task),
|
|
207
|
+
}),
|
|
208
|
+
// ── Labels ───────────────────────────────────────────────────
|
|
209
|
+
define({
|
|
210
|
+
name: "add-label",
|
|
211
|
+
title: "Add label",
|
|
212
|
+
description: "Add a label to a trajectory (e.g., quality=high)",
|
|
213
|
+
inputSchema: {
|
|
214
|
+
collection: collection(),
|
|
215
|
+
task: task(),
|
|
216
|
+
trajectory_id: z.string().describe("Trajectory ID"),
|
|
217
|
+
key: z.string().describe("Label key (e.g., 'quality', 'status')"),
|
|
218
|
+
value: z.string().describe("Label value (e.g., 'high', 'approved')"),
|
|
219
|
+
author: z.string().describe("Author email"),
|
|
220
|
+
},
|
|
221
|
+
annotations: WRITE,
|
|
222
|
+
handler: (client, { collection, task, trajectory_id, key, value, author }) => client.addLabel(collection, task, trajectory_id, key, value, author),
|
|
223
|
+
}),
|
|
224
|
+
// ── Step templates ───────────────────────────────────────────
|
|
225
|
+
define({
|
|
226
|
+
name: "list-step-templates",
|
|
227
|
+
title: "List step templates",
|
|
228
|
+
description: "List all available workflow step templates",
|
|
229
|
+
inputSchema: {},
|
|
230
|
+
annotations: READ,
|
|
231
|
+
handler: (client) => client.listStepTemplates(),
|
|
232
|
+
}),
|
|
233
|
+
define({
|
|
234
|
+
name: "get-step-template",
|
|
235
|
+
title: "Get step template",
|
|
236
|
+
description: "Get details and schema for a step template",
|
|
237
|
+
inputSchema: { name: z.string().describe("Step template activity name") },
|
|
238
|
+
annotations: READ,
|
|
239
|
+
handler: (client, { name }) => client.getStepTemplate(name),
|
|
240
|
+
}),
|
|
241
|
+
// ── Environment variables ────────────────────────────────────
|
|
242
|
+
define({
|
|
243
|
+
name: "check-secrets",
|
|
244
|
+
title: "Check secrets",
|
|
245
|
+
description: "Check which environment variables a collection has configured vs. what a runbook needs",
|
|
246
|
+
inputSchema: {
|
|
247
|
+
collection: collection(),
|
|
248
|
+
required_keys: z
|
|
249
|
+
.array(z.string())
|
|
250
|
+
.describe("Environment variable names the runbook requires"),
|
|
251
|
+
},
|
|
252
|
+
annotations: READ,
|
|
253
|
+
handler: async (client, { collection, required_keys }) => {
|
|
254
|
+
const col = (await client.getCollectionEnvironment(collection));
|
|
255
|
+
const envVars = (col.environment_variables || {});
|
|
256
|
+
const configured = Object.keys(envVars);
|
|
257
|
+
const missing = required_keys.filter((k) => !configured.includes(k));
|
|
258
|
+
return { configured, missing, ready: missing.length === 0 };
|
|
259
|
+
},
|
|
260
|
+
}),
|
|
261
|
+
define({
|
|
262
|
+
name: "set-environment-vars",
|
|
263
|
+
title: "Set environment variables",
|
|
264
|
+
description: "Set environment variables on a collection (merge semantics, pass null to delete a key)",
|
|
265
|
+
inputSchema: {
|
|
266
|
+
collection: collection(),
|
|
267
|
+
variables: z
|
|
268
|
+
.record(z.string().nullable())
|
|
269
|
+
.describe("Key-value pairs to set (null to delete)"),
|
|
270
|
+
},
|
|
271
|
+
annotations: WRITE,
|
|
272
|
+
handler: (client, { collection, variables }) => client.setEnvironmentVars(collection, variables),
|
|
273
|
+
}),
|
|
274
|
+
// ── Routines (scheduled runs) ────────────────────────────────
|
|
275
|
+
define({
|
|
276
|
+
name: "list-routines",
|
|
277
|
+
title: "List routines",
|
|
278
|
+
description: "List scheduled routines for a collection (optionally scoped to a task)",
|
|
279
|
+
inputSchema: {
|
|
280
|
+
collection: collection(),
|
|
281
|
+
task: z
|
|
282
|
+
.string()
|
|
283
|
+
.optional()
|
|
284
|
+
.describe("Task name (omit to list all routines in the collection)"),
|
|
285
|
+
},
|
|
286
|
+
annotations: READ,
|
|
287
|
+
handler: (client, { collection, task }) => client.listRoutines(collection, task),
|
|
288
|
+
}),
|
|
289
|
+
define({
|
|
290
|
+
name: "get-routine",
|
|
291
|
+
title: "Get routine",
|
|
292
|
+
description: "Get a single routine including resolved next_run_at from Temporal",
|
|
293
|
+
inputSchema: {
|
|
294
|
+
collection: collection(),
|
|
295
|
+
task: task(),
|
|
296
|
+
name: z.string().describe("Routine name (unique per collection+task)"),
|
|
297
|
+
},
|
|
298
|
+
annotations: READ,
|
|
299
|
+
handler: (client, { collection, task, name }) => client.getRoutine(collection, task, name),
|
|
300
|
+
}),
|
|
301
|
+
define({
|
|
302
|
+
name: "create-routine",
|
|
303
|
+
title: "Create routine",
|
|
304
|
+
description: "Create a scheduled routine for an existing task. init_params_overrides keys must be a subset of task.workflow.init_params.",
|
|
305
|
+
inputSchema: {
|
|
306
|
+
collection: collection(),
|
|
307
|
+
task: task(),
|
|
308
|
+
name: z.string().describe("Routine name (slug, unique per task)"),
|
|
309
|
+
cadence: cadenceSchema,
|
|
310
|
+
init_params_overrides: z
|
|
311
|
+
.record(z.unknown())
|
|
312
|
+
.optional()
|
|
313
|
+
.describe("Init param overrides. Keys must be a subset of task.workflow.init_params; unknown keys return 400."),
|
|
314
|
+
secret_params: z
|
|
315
|
+
.record(z.unknown())
|
|
316
|
+
.optional()
|
|
317
|
+
.describe("Secrets injected at fire time (encrypted at rest, never logged)."),
|
|
318
|
+
paused: z.boolean().optional().describe("Create the routine in paused state"),
|
|
319
|
+
webhook_url: z.string().optional().describe("Optional webhook to notify on each run"),
|
|
320
|
+
webhook_secret: z
|
|
321
|
+
.string()
|
|
322
|
+
.optional()
|
|
323
|
+
.describe("Optional shared secret for webhook signing"),
|
|
324
|
+
},
|
|
325
|
+
annotations: WRITE,
|
|
326
|
+
handler: (client, { collection, task, name, cadence, init_params_overrides, secret_params, paused, webhook_url, webhook_secret }) => {
|
|
327
|
+
const body = { name, cadence };
|
|
328
|
+
if (init_params_overrides !== undefined)
|
|
329
|
+
body.init_params_overrides = init_params_overrides;
|
|
330
|
+
if (secret_params !== undefined)
|
|
331
|
+
body.secret_params = secret_params;
|
|
332
|
+
if (paused !== undefined)
|
|
333
|
+
body.paused = paused;
|
|
334
|
+
if (webhook_url !== undefined)
|
|
335
|
+
body.webhook_url = webhook_url;
|
|
336
|
+
if (webhook_secret !== undefined)
|
|
337
|
+
body.webhook_secret = webhook_secret;
|
|
338
|
+
return client.createRoutine(collection, task, body);
|
|
339
|
+
},
|
|
340
|
+
}),
|
|
341
|
+
define({
|
|
342
|
+
name: "update-routine",
|
|
343
|
+
title: "Update routine",
|
|
344
|
+
description: "Patch a routine — provide any subset of cadence/overrides/secrets/paused/webhook fields",
|
|
345
|
+
inputSchema: {
|
|
346
|
+
collection: collection(),
|
|
347
|
+
task: task(),
|
|
348
|
+
name: routineName(),
|
|
349
|
+
cadence: cadenceSchema.optional(),
|
|
350
|
+
init_params_overrides: z
|
|
351
|
+
.record(z.unknown())
|
|
352
|
+
.optional()
|
|
353
|
+
.describe("Replace init param overrides"),
|
|
354
|
+
secret_params: z.record(z.unknown()).optional().describe("Replace secret params"),
|
|
355
|
+
paused: z.boolean().optional().describe("Pause/resume the routine"),
|
|
356
|
+
webhook_url: z.string().optional().describe("Update webhook URL"),
|
|
357
|
+
webhook_secret: z.string().optional().describe("Update webhook signing secret"),
|
|
358
|
+
},
|
|
359
|
+
annotations: WRITE,
|
|
360
|
+
handler: (client, { collection, task, name, cadence, init_params_overrides, secret_params, paused, webhook_url, webhook_secret }) => {
|
|
361
|
+
const patch = {};
|
|
362
|
+
if (cadence !== undefined)
|
|
363
|
+
patch.cadence = cadence;
|
|
364
|
+
if (init_params_overrides !== undefined)
|
|
365
|
+
patch.init_params_overrides = init_params_overrides;
|
|
366
|
+
if (secret_params !== undefined)
|
|
367
|
+
patch.secret_params = secret_params;
|
|
368
|
+
if (paused !== undefined)
|
|
369
|
+
patch.paused = paused;
|
|
370
|
+
if (webhook_url !== undefined)
|
|
371
|
+
patch.webhook_url = webhook_url;
|
|
372
|
+
if (webhook_secret !== undefined)
|
|
373
|
+
patch.webhook_secret = webhook_secret;
|
|
374
|
+
return client.updateRoutine(collection, task, name, patch);
|
|
375
|
+
},
|
|
376
|
+
}),
|
|
377
|
+
define({
|
|
378
|
+
name: "delete-routine",
|
|
379
|
+
title: "Delete routine",
|
|
380
|
+
description: "Delete a routine and unregister its Temporal schedule",
|
|
381
|
+
inputSchema: { collection: collection(), task: task(), name: routineName() },
|
|
382
|
+
annotations: DESTRUCTIVE,
|
|
383
|
+
handler: (client, { collection, task, name }) => client.deleteRoutine(collection, task, name),
|
|
384
|
+
}),
|
|
385
|
+
define({
|
|
386
|
+
name: "pause-routine",
|
|
387
|
+
title: "Pause routine",
|
|
388
|
+
description: "Pause a routine (stops future fires until resumed)",
|
|
389
|
+
inputSchema: { collection: collection(), task: task(), name: routineName() },
|
|
390
|
+
annotations: WRITE,
|
|
391
|
+
handler: (client, { collection, task, name }) => client.pauseRoutine(collection, task, name),
|
|
392
|
+
}),
|
|
393
|
+
define({
|
|
394
|
+
name: "resume-routine",
|
|
395
|
+
title: "Resume routine",
|
|
396
|
+
description: "Resume a paused routine",
|
|
397
|
+
inputSchema: { collection: collection(), task: task(), name: routineName() },
|
|
398
|
+
annotations: WRITE,
|
|
399
|
+
handler: (client, { collection, task, name }) => client.resumeRoutine(collection, task, name),
|
|
400
|
+
}),
|
|
401
|
+
define({
|
|
402
|
+
name: "run-routine-now",
|
|
403
|
+
title: "Run routine now",
|
|
404
|
+
description: "Fire a routine immediately, bypassing the schedule. Returns workflow_id (parity with run-workflow).",
|
|
405
|
+
inputSchema: { collection: collection(), task: task(), name: routineName() },
|
|
406
|
+
annotations: WRITE,
|
|
407
|
+
handler: (client, { collection, task, name }) => client.runRoutineNow(collection, task, name),
|
|
408
|
+
}),
|
|
409
|
+
define({
|
|
410
|
+
name: "list-routine-runs",
|
|
411
|
+
title: "List routine runs",
|
|
412
|
+
description: "List recent trajectories triggered by this routine (filtered by triggered_by_routine_id)",
|
|
413
|
+
inputSchema: {
|
|
414
|
+
collection: collection(),
|
|
415
|
+
task: task(),
|
|
416
|
+
name: routineName(),
|
|
417
|
+
limit: z.number().optional().describe("Max results"),
|
|
418
|
+
},
|
|
419
|
+
annotations: READ,
|
|
420
|
+
handler: (client, { collection, task, name, limit }) => client.listRoutineRuns(collection, task, name, limit),
|
|
421
|
+
}),
|
|
422
|
+
];
|
|
423
|
+
/** The subset of the catalog the WebMCP adapter may expose. */
|
|
424
|
+
export const JETTY_WEBMCP_TOOLS = JETTY_TOOLS.filter((tool) => tool.webmcp !== false);
|
|
425
|
+
export function getJettyTool(name) {
|
|
426
|
+
return JETTY_TOOLS.find((tool) => tool.name === name);
|
|
427
|
+
}
|
|
428
|
+
//# sourceMappingURL=tool-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.js","sourceRoot":"","sources":["../src/tool-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAqC,MAAM,KAAK,CAAC;AAqC3D,MAAM,UAAU,UAAU,CAAC,IAAa;IACtC,OAAO;QACL,OAAO,EAAE,CAAC,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,EAAE,EAAE,EAAE,CACrD,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;KACxD,CAAC;CACH,CAAC;AAEF,+DAA+D;AAC/D,MAAM,CAAC,MAAM,kBAAkB,GAAmC,WAAW,CAAC,MAAM,CAClF,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAChC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACxD,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the Jetty tool catalog (tool-definitions.ts) on an MCP server.
|
|
3
|
+
* Node/SDK side; the same catalog reaches the browser through webmcp.ts.
|
|
4
|
+
*/
|
|
1
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
6
|
+
import type { JettyApiClient } from "./api-client.js";
|
|
7
|
+
export { JETTY_TOOLS, JETTY_WEBMCP_TOOLS, getJettyTool, jsonResult } from "./tool-definitions.js";
|
|
8
|
+
export type { JettyToolDefinition, ToolAnnotations, ToolResult } from "./tool-definitions.js";
|
|
9
|
+
export declare function registerTools(server: McpServer, client: JettyApiClient): void;
|
|
4
10
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClG,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE9F,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,QAatE"}
|