@avallon-labs/mcp 45.0.0-staging.1053 → 46.1.0-staging.1056

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
@@ -46,5 +46,5 @@ function setupFetch() {
46
46
 
47
47
  // src/index.ts
48
48
  setupFetch();
49
- await import("./server-6YKIVVSA.js");
49
+ await import("./server-MZWYBAX7.js");
50
50
  //# sourceMappingURL=index.js.map
@@ -2785,11 +2785,24 @@ var executeCode = async (id, executeCodeBody, options) => {
2785
2785
  headers: res.headers
2786
2786
  };
2787
2787
  };
2788
- var getWorkerListToolsUrl = () => {
2789
- return `/worker/v1/tools`;
2788
+ var getWorkerListToolsUrl = (params) => {
2789
+ const normalizedParams = new URLSearchParams();
2790
+ Object.entries(params || {}).forEach(([key, value]) => {
2791
+ if (value !== void 0) {
2792
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
2793
+ for (const [sk, sv] of Object.entries(value)) {
2794
+ if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
2795
+ }
2796
+ } else {
2797
+ normalizedParams.append(key, value === null ? "null" : String(value));
2798
+ }
2799
+ }
2800
+ });
2801
+ const stringifiedParams = normalizedParams.toString();
2802
+ return stringifiedParams.length > 0 ? `/worker/v1/tools?${stringifiedParams}` : `/worker/v1/tools`;
2790
2803
  };
2791
- var workerListTools = async (options) => {
2792
- const res = await fetch(getWorkerListToolsUrl(), {
2804
+ var workerListTools = async (params, options) => {
2805
+ const res = await fetch(getWorkerListToolsUrl(params), {
2793
2806
  ...options,
2794
2807
  method: "GET"
2795
2808
  });
@@ -4693,8 +4706,8 @@ var executeCodeHandler = async (args) => {
4693
4706
  ]
4694
4707
  };
4695
4708
  };
4696
- var workerListToolsHandler = async () => {
4697
- const res = await workerListTools();
4709
+ var workerListToolsHandler = async (args) => {
4710
+ const res = await workerListTools(args.queryParams);
4698
4711
  return {
4699
4712
  content: [
4700
4713
  {
@@ -9628,7 +9641,7 @@ var ListToolsResponse = zod.object({
9628
9641
  zod.object({
9629
9642
  id: zod.string(),
9630
9643
  name: zod.string(),
9631
- description: zod.string()
9644
+ description: zod.string().optional()
9632
9645
  })
9633
9646
  )
9634
9647
  }),
@@ -9649,7 +9662,7 @@ var GetToolResponse = zod.object({
9649
9662
  tool: zod.object({
9650
9663
  id: zod.string(),
9651
9664
  name: zod.string(),
9652
- description: zod.string(),
9665
+ description: zod.string().optional(),
9653
9666
  code: zod.string(),
9654
9667
  schema: zod.record(zod.string(), zod.unknown()),
9655
9668
  secret_ids: zod.array(zod.string()).describe(
@@ -9675,7 +9688,7 @@ var UpdateToolResponse = zod.object({
9675
9688
  tool: zod.object({
9676
9689
  id: zod.string(),
9677
9690
  name: zod.string(),
9678
- description: zod.string(),
9691
+ description: zod.string().optional(),
9679
9692
  code: zod.string(),
9680
9693
  schema: zod.record(zod.string(), zod.unknown()),
9681
9694
  secret_ids: zod.array(zod.string()).describe(
@@ -9708,13 +9721,20 @@ var ExecuteCodeResponse = zod.object({
9708
9721
  }),
9709
9722
  message: zod.string()
9710
9723
  });
9724
+ var workerListToolsQuerySortByDefault = `created_at`;
9725
+ var workerListToolsQuerySortOrderDefault = `desc`;
9726
+ var WorkerListToolsQueryParams = zod.object({
9727
+ sort_by: zod.enum(["created_at", "updated_at", "name"]).default(workerListToolsQuerySortByDefault),
9728
+ sort_order: zod.enum(["asc", "desc"]).default(workerListToolsQuerySortOrderDefault),
9729
+ call_agent_id: zod.string().uuid().optional()
9730
+ });
9711
9731
  var WorkerListToolsResponse = zod.object({
9712
9732
  data: zod.object({
9713
9733
  tools: zod.array(
9714
9734
  zod.object({
9715
9735
  id: zod.string(),
9716
9736
  name: zod.string(),
9717
- description: zod.string()
9737
+ description: zod.string().optional()
9718
9738
  })
9719
9739
  )
9720
9740
  }),
@@ -9728,8 +9748,12 @@ var WorkerGetToolResponse = zod.object({
9728
9748
  tool: zod.object({
9729
9749
  id: zod.string(),
9730
9750
  name: zod.string(),
9731
- description: zod.string(),
9732
- schema: zod.record(zod.string(), zod.unknown())
9751
+ description: zod.string().optional(),
9752
+ code: zod.string(),
9753
+ schema: zod.record(zod.string(), zod.unknown()),
9754
+ secret_ids: zod.array(zod.string()).describe(
9755
+ "Secrets attached to the tool. A tool with attached secrets takes its execution environment exclusively from the secret store, each secret arriving under its own env key."
9756
+ )
9733
9757
  })
9734
9758
  }),
9735
9759
  message: zod.string()
@@ -9747,7 +9771,13 @@ var WorkerExecuteToolResponse = zod.object({
9747
9771
  error: zod.object({
9748
9772
  name: zod.string(),
9749
9773
  message: zod.string()
9750
- }).optional()
9774
+ }).optional(),
9775
+ traces: zod.array(
9776
+ zod.object({
9777
+ text: zod.string(),
9778
+ timestamp: zod.string()
9779
+ })
9780
+ )
9751
9781
  }),
9752
9782
  message: zod.string()
9753
9783
  });
@@ -11284,10 +11314,17 @@ server.tool(
11284
11314
  },
11285
11315
  executeCodeHandler
11286
11316
  );
11287
- server.tool("workerListTools", "List worker tools", workerListToolsHandler);
11317
+ server.tool(
11318
+ "workerListTools",
11319
+ "List tools",
11320
+ {
11321
+ queryParams: WorkerListToolsQueryParams
11322
+ },
11323
+ workerListToolsHandler
11324
+ );
11288
11325
  server.tool(
11289
11326
  "workerGetTool",
11290
- "Get worker tool",
11327
+ "Get tool",
11291
11328
  {
11292
11329
  pathParams: WorkerGetToolParams
11293
11330
  },
@@ -11295,7 +11332,7 @@ server.tool(
11295
11332
  );
11296
11333
  server.tool(
11297
11334
  "workerExecuteTool",
11298
- "Execute a worker-attached tool",
11335
+ "Execute tool",
11299
11336
  {
11300
11337
  pathParams: WorkerExecuteToolParams,
11301
11338
  bodyParams: WorkerExecuteToolBody
@@ -11419,4 +11456,4 @@ var transport = new StdioServerTransport();
11419
11456
  server.connect(transport).then(() => {
11420
11457
  console.error("MCP server running on stdio");
11421
11458
  }).catch(console.error);
11422
- //# sourceMappingURL=server-6YKIVVSA.js.map
11459
+ //# sourceMappingURL=server-MZWYBAX7.js.map