@mondaydotcomorg/atp-client 0.19.20 → 0.20.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/dist/index.cjs CHANGED
@@ -1314,41 +1314,56 @@ function createExecuteCodeTool(client) {
1314
1314
  }
1315
1315
  __name(createExecuteCodeTool, "createExecuteCodeTool");
1316
1316
  var exploreApiInputSchema = zod.z.object({
1317
- path: zod.z.string().describe('Path to explore (e.g., "/", "/openapi/github", "/mcp/filesystem/read_file")')
1317
+ paths: zod.z.union([
1318
+ zod.z.string(),
1319
+ zod.z.array(zod.z.string()).min(1)
1320
+ ]).describe('Path(s) to explore. Can be a single string like "/" or an array like ["/openapi/github", "/mcp/filesystem"]')
1318
1321
  });
1322
+ function normalizePaths(paths) {
1323
+ return Array.isArray(paths) ? paths : [
1324
+ paths
1325
+ ];
1326
+ }
1327
+ __name(normalizePaths, "normalizePaths");
1319
1328
  function createExploreApiTool(client) {
1320
1329
  return {
1321
1330
  name: ToolNames.EXPLORE_API,
1322
- description: 'Explore APIs using filesystem-like navigation. Navigate through directories to discover available functions. Provide path as string like "/", "/openapi", "/openapi/github", or "/openapi/github/repos/createRepo" to see functions.',
1331
+ description: 'Explore APIs using filesystem-like navigation. Navigate through directories to discover available functions. Provide path as a string like "/" or paths as an array like ["/openapi", "/mcp"] to explore multiple at once.',
1323
1332
  inputSchema: zodToJsonSchema.zodToJsonSchema(exploreApiInputSchema),
1324
1333
  zodSchema: exploreApiInputSchema,
1325
1334
  func: /* @__PURE__ */ __name(async (input) => {
1326
- try {
1327
- const result = await client.exploreAPI(input.path);
1328
- if (result.type === "directory") {
1329
- return JSON.stringify({
1330
- success: true,
1331
- type: "directory",
1332
- path: result.path,
1333
- items: result.items
1334
- }, null, 2);
1335
- } else {
1336
- return JSON.stringify({
1337
- success: true,
1338
- type: "function",
1339
- name: result.name,
1340
- description: result.description,
1341
- definition: result.definition,
1342
- group: result.group,
1343
- path: result.path
1344
- }, null, 2);
1335
+ const pathsToExplore = normalizePaths(input.paths);
1336
+ const results = await Promise.all(pathsToExplore.map(async (path) => {
1337
+ try {
1338
+ const result = await client.exploreAPI(path);
1339
+ if (result.type === "directory") {
1340
+ return {
1341
+ success: true,
1342
+ type: "directory",
1343
+ path: result.path,
1344
+ items: result.items
1345
+ };
1346
+ } else {
1347
+ return {
1348
+ success: true,
1349
+ type: "function",
1350
+ name: result.name,
1351
+ description: result.description,
1352
+ definition: result.definition,
1353
+ group: result.group,
1354
+ path: result.path
1355
+ };
1356
+ }
1357
+ } catch (error) {
1358
+ const message = error instanceof Error ? error.message : String(error);
1359
+ return {
1360
+ success: false,
1361
+ path,
1362
+ error: message
1363
+ };
1345
1364
  }
1346
- } catch (error) {
1347
- return JSON.stringify({
1348
- success: false,
1349
- error: error.message
1350
- }, null, 2);
1351
- }
1365
+ }));
1366
+ return JSON.stringify(results, null, 2);
1352
1367
  }, "func")
1353
1368
  };
1354
1369
  }
@@ -1617,6 +1632,10 @@ exports.ClientCallbackError = ClientCallbackError;
1617
1632
  exports.CodeGenerator = CodeGenerator;
1618
1633
  exports.InProcessSession = InProcessSession;
1619
1634
  exports.ToolNames = ToolNames;
1635
+ exports.createExecuteCodeTool = createExecuteCodeTool;
1636
+ exports.createExploreApiTool = createExploreApiTool;
1637
+ exports.createFetchAllApisTool = createFetchAllApisTool;
1638
+ exports.createSearchApiTool = createSearchApiTool;
1620
1639
  exports.createToolsFromATPClient = createToolsFromATPClient;
1621
1640
  exports.executeCodeInputSchema = executeCodeInputSchema;
1622
1641
  exports.exploreApiInputSchema = exploreApiInputSchema;