@mondaydotcomorg/agent-toolkit 2.3.0 → 2.4.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.
@@ -20,6 +20,8 @@ interface Tool<Input extends ZodRawShape | undefined, Output extends Record<stri
20
20
  name: string;
21
21
  type: ToolType;
22
22
  annotations: ToolAnnotations;
23
+ /** Whether the tool is enabled by default. Defaults to true if not specified. */
24
+ enabledByDefault?: boolean;
23
25
  getDescription(): string;
24
26
  getInputSchema(): Input;
25
27
  }
@@ -27,17 +29,34 @@ interface Tool<Input extends ZodRawShape | undefined, Output extends Record<stri
27
29
  type MondayApiToolContext = {
28
30
  boardId?: number;
29
31
  };
30
- type BaseMondayApiToolConstructor = new (api: ApiClient) => BaseMondayApiTool<any>;
32
+ type BaseMondayApiToolConstructor = new (api: ApiClient, token?: string) => BaseMondayApiTool<any>;
31
33
  declare abstract class BaseMondayApiTool<Input extends ZodRawShape | undefined, Output extends Record<string, unknown> = never> implements Tool<Input, Output> {
32
34
  protected readonly mondayApi: ApiClient;
35
+ protected readonly apiToken?: string | undefined;
33
36
  protected readonly context?: MondayApiToolContext | undefined;
34
37
  abstract name: string;
35
38
  abstract type: ToolType;
36
39
  abstract annotations: ToolAnnotations;
37
- constructor(mondayApi: ApiClient, context?: MondayApiToolContext | undefined);
40
+ enabledByDefault?: boolean;
41
+ constructor(mondayApi: ApiClient, apiToken?: string | undefined, context?: MondayApiToolContext | undefined);
38
42
  abstract getDescription(): string;
39
43
  abstract getInputSchema(): Input;
40
- abstract execute(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
44
+ /**
45
+ * Public execute method that automatically tracks execution
46
+ */
47
+ execute(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
48
+ /**
49
+ * Abstract method that subclasses should implement for their actual logic
50
+ */
51
+ protected abstract executeInternal(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
52
+ /**
53
+ * Tracks tool execution with timing and error information
54
+ * @param toolName - The name of the tool being executed
55
+ * @param executionTimeInMs - The time taken to execute the tool in milliseconds
56
+ * @param isError - Whether the execution resulted in an error
57
+ * @param params - The parameters passed to the tool
58
+ */
59
+ private trackToolExecution;
41
60
  }
42
61
 
43
62
  declare const allMondayAppsTools: (new (...args: any[]) => Tool<any, any>)[];
@@ -56,6 +75,7 @@ type ToolsConfiguration = {
56
75
  readOnlyMode?: boolean;
57
76
  mode?: ToolMode;
58
77
  enableDynamicApiTools?: boolean | 'only';
78
+ enableToolManager?: boolean;
59
79
  };
60
80
  type MondayAgentToolkitConfig = {
61
81
  mondayApiToken: ApiClientConfig['token'];