@avallon-labs/mcp 27.7.0-staging.781 → 27.8.0-staging.783

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/dist/index.js CHANGED
@@ -54,5 +54,5 @@ function setupFetch() {
54
54
 
55
55
  // src/index.ts
56
56
  setupFetch();
57
- await import("./server-EBZUU63J.js");
57
+ await import("./server-VWVO263K.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -2163,15 +2163,13 @@ var listTools = async (params, options) => {
2163
2163
  headers: res.headers
2164
2164
  };
2165
2165
  };
2166
- var getExecuteCodeUrl = (id) => {
2167
- return `/v1/tools/${id}/execute`;
2166
+ var getDeleteToolUrl = (id) => {
2167
+ return `/v1/tools/${id}`;
2168
2168
  };
2169
- var executeCode = async (id, executeCodeBody, options) => {
2170
- const res = await fetch(getExecuteCodeUrl(id), {
2169
+ var deleteTool = async (id, options) => {
2170
+ const res = await fetch(getDeleteToolUrl(id), {
2171
2171
  ...options,
2172
- method: "POST",
2173
- headers: { "Content-Type": "application/json", ...options?.headers },
2174
- body: JSON.stringify(executeCodeBody)
2172
+ method: "DELETE"
2175
2173
  });
2176
2174
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2177
2175
  const data = body ? JSON.parse(body) : {};
@@ -2211,6 +2209,24 @@ var updateTool = async (id, updateToolBody, options) => {
2211
2209
  headers: res.headers
2212
2210
  };
2213
2211
  };
2212
+ var getExecuteCodeUrl = (id) => {
2213
+ return `/v1/tools/${id}/execute`;
2214
+ };
2215
+ var executeCode = async (id, executeCodeBody, options) => {
2216
+ const res = await fetch(getExecuteCodeUrl(id), {
2217
+ ...options,
2218
+ method: "POST",
2219
+ headers: { "Content-Type": "application/json", ...options?.headers },
2220
+ body: JSON.stringify(executeCodeBody)
2221
+ });
2222
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2223
+ const data = body ? JSON.parse(body) : {};
2224
+ return {
2225
+ data,
2226
+ status: res.status,
2227
+ headers: res.headers
2228
+ };
2229
+ };
2214
2230
  var getWorkerListToolsUrl = () => {
2215
2231
  return `/worker/v1/tools`;
2216
2232
  };
@@ -3677,8 +3693,8 @@ var listToolsHandler = async (args) => {
3677
3693
  ]
3678
3694
  };
3679
3695
  };
3680
- var executeCodeHandler = async (args) => {
3681
- const res = await executeCode(args.pathParams.id, args.bodyParams);
3696
+ var deleteToolHandler = async (args) => {
3697
+ const res = await deleteTool(args.pathParams.id);
3682
3698
  return {
3683
3699
  content: [
3684
3700
  {
@@ -3710,6 +3726,17 @@ var updateToolHandler = async (args) => {
3710
3726
  ]
3711
3727
  };
3712
3728
  };
3729
+ var executeCodeHandler = async (args) => {
3730
+ const res = await executeCode(args.pathParams.id, args.bodyParams);
3731
+ return {
3732
+ content: [
3733
+ {
3734
+ type: "text",
3735
+ text: JSON.stringify(res)
3736
+ }
3737
+ ]
3738
+ };
3739
+ };
3713
3740
  var workerListToolsHandler = async () => {
3714
3741
  const res = await workerListTools();
3715
3742
  return {
@@ -6826,26 +6853,10 @@ var ListToolsResponse = zod.object({
6826
6853
  })
6827
6854
  )
6828
6855
  });
6829
- var ExecuteCodeParams = zod.object({
6856
+ var DeleteToolParams = zod.object({
6830
6857
  id: zod.string().uuid()
6831
6858
  });
6832
- var executeCodeBodyParamsDefault = {};
6833
- var ExecuteCodeBody = zod.object({
6834
- params: zod.record(zod.string(), zod.unknown()).default(executeCodeBodyParamsDefault)
6835
- });
6836
- var ExecuteCodeResponse = zod.object({
6837
- result: zod.string().optional(),
6838
- error: zod.object({
6839
- name: zod.string(),
6840
- message: zod.string()
6841
- }).optional(),
6842
- traces: zod.array(
6843
- zod.object({
6844
- text: zod.string(),
6845
- timestamp: zod.string()
6846
- })
6847
- )
6848
- });
6859
+ var DeleteToolResponse = zod.object({});
6849
6860
  var GetToolParams = zod.object({
6850
6861
  id: zod.string().uuid()
6851
6862
  });
@@ -6878,6 +6889,26 @@ var UpdateToolResponse = zod.object({
6878
6889
  has_api_key: zod.boolean()
6879
6890
  })
6880
6891
  });
6892
+ var ExecuteCodeParams = zod.object({
6893
+ id: zod.string().uuid()
6894
+ });
6895
+ var executeCodeBodyParamsDefault = {};
6896
+ var ExecuteCodeBody = zod.object({
6897
+ params: zod.record(zod.string(), zod.unknown()).default(executeCodeBodyParamsDefault)
6898
+ });
6899
+ var ExecuteCodeResponse = zod.object({
6900
+ result: zod.string().optional(),
6901
+ error: zod.object({
6902
+ name: zod.string(),
6903
+ message: zod.string()
6904
+ }).optional(),
6905
+ traces: zod.array(
6906
+ zod.object({
6907
+ text: zod.string(),
6908
+ timestamp: zod.string()
6909
+ })
6910
+ )
6911
+ });
6881
6912
  var WorkerListToolsResponse = zod.object({
6882
6913
  tools: zod.array(
6883
6914
  zod.object({
@@ -8078,13 +8109,12 @@ server.tool(
8078
8109
  listToolsHandler
8079
8110
  );
8080
8111
  server.tool(
8081
- "executeCode",
8082
- "Execute tool",
8112
+ "deleteTool",
8113
+ "Delete tool",
8083
8114
  {
8084
- pathParams: ExecuteCodeParams,
8085
- bodyParams: ExecuteCodeBody
8115
+ pathParams: DeleteToolParams
8086
8116
  },
8087
- executeCodeHandler
8117
+ deleteToolHandler
8088
8118
  );
8089
8119
  server.tool(
8090
8120
  "getTool",
@@ -8103,6 +8133,15 @@ server.tool(
8103
8133
  },
8104
8134
  updateToolHandler
8105
8135
  );
8136
+ server.tool(
8137
+ "executeCode",
8138
+ "Execute tool",
8139
+ {
8140
+ pathParams: ExecuteCodeParams,
8141
+ bodyParams: ExecuteCodeBody
8142
+ },
8143
+ executeCodeHandler
8144
+ );
8106
8145
  server.tool("workerListTools", "List worker tools", workerListToolsHandler);
8107
8146
  server.tool(
8108
8147
  "workerGetTool",
@@ -8217,4 +8256,4 @@ var transport = new StdioServerTransport();
8217
8256
  server.connect(transport).then(() => {
8218
8257
  console.error("MCP server running on stdio");
8219
8258
  }).catch(console.error);
8220
- //# sourceMappingURL=server-EBZUU63J.js.map
8259
+ //# sourceMappingURL=server-VWVO263K.js.map