@mondaydotcomorg/agent-toolkit 5.1.1 → 5.1.3

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.
@@ -2,8 +2,11 @@ import { ZodRawShape, z, ZodTypeAny } from 'zod';
2
2
  import { ToolAnnotations } from '@modelcontextprotocol/sdk/types';
3
3
  import { ApiClient, ApiClientConfig } from '@mondaydotcomorg/api';
4
4
 
5
+ type SessionContext = {
6
+ metadata?: Record<string, unknown>;
7
+ };
5
8
  interface Executable<Input, Output> {
6
- execute: (input?: Input) => Promise<Output>;
9
+ execute: (input?: Input, sessionContext?: SessionContext) => Promise<Output>;
7
10
  }
8
11
 
9
12
  type ToolInputType<Input extends ZodRawShape | undefined> = Input extends ZodRawShape ? z.objectOutputType<Input, ZodTypeAny> : undefined;
@@ -41,13 +44,14 @@ declare abstract class BaseMondayApiTool<Input extends ZodRawShape | undefined,
41
44
  abstract type: ToolType;
42
45
  abstract annotations: ToolAnnotations;
43
46
  enabledByDefault?: boolean;
47
+ protected sessionContext: SessionContext;
44
48
  constructor(mondayApi: ApiClient, context?: MondayApiToolContext | undefined);
45
49
  abstract getDescription(): string;
46
50
  abstract getInputSchema(): Input;
47
51
  /**
48
52
  * Public execute method
49
53
  */
50
- execute(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
54
+ execute(input?: ToolInputType<Input>, sessionContext?: SessionContext): Promise<ToolOutputType<Output>>;
51
55
  /**
52
56
  * Abstract method that subclasses should implement for their actual logic
53
57
  */
@@ -136,4 +140,4 @@ type MondayAgentToolkitConfig = {
136
140
  context?: MondayApiToolContext;
137
141
  };
138
142
 
139
- export { Executable, MondayAgentToolkitConfig, Tool, ToolInputType, ToolMode, ToolOutputType, ToolType, ToolsConfiguration, allGraphqlApiTools, allMondayAppsTools, allMondayDevTools, allTools };
143
+ export { Executable, MondayAgentToolkitConfig, SessionContext, Tool, ToolInputType, ToolMode, ToolOutputType, ToolType, ToolsConfiguration, allGraphqlApiTools, allMondayAppsTools, allMondayDevTools, allTools };