@mondaydotcomorg/agent-toolkit 2.21.1 → 2.22.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/cjs/core/index.js +109 -109
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.d.ts +37 -1
- package/dist/cjs/mcp/index.js +91 -91
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +20 -20
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +109 -109
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.d.ts +37 -1
- package/dist/esm/mcp/index.js +20 -20
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +20 -20
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +7 -7
package/dist/cjs/mcp/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { CallToolResult, ToolAnnotations } from '@modelcontextprotocol/sdk/types';
|
|
2
3
|
import { ApiClientConfig } from '@mondaydotcomorg/api';
|
|
3
4
|
import { ZodRawShape, z, ZodTypeAny } from 'zod';
|
|
4
|
-
import { ToolAnnotations } from '@modelcontextprotocol/sdk/types';
|
|
5
5
|
|
|
6
6
|
declare enum ToolMode {
|
|
7
7
|
API = "api",
|
|
@@ -29,6 +29,8 @@ declare class MondayAgentToolkit extends McpServer {
|
|
|
29
29
|
private readonly mondayApiClient;
|
|
30
30
|
private readonly mondayApiToken;
|
|
31
31
|
private readonly dynamicToolManager;
|
|
32
|
+
private toolInstances;
|
|
33
|
+
private managementTool;
|
|
32
34
|
/**
|
|
33
35
|
* Creates a new instance of the Monday Agent Toolkit
|
|
34
36
|
* @param config Configuration for the toolkit
|
|
@@ -75,6 +77,40 @@ declare class MondayAgentToolkit extends McpServer {
|
|
|
75
77
|
*/
|
|
76
78
|
getDynamicToolNames(): string[];
|
|
77
79
|
getServer(): McpServer;
|
|
80
|
+
/**
|
|
81
|
+
* Get all tools as an array of tool objects that can be registered individually
|
|
82
|
+
* Each tool includes name, description, schema, and handler for external registration
|
|
83
|
+
* @returns Array of tool objects ready for individual registration
|
|
84
|
+
*/
|
|
85
|
+
getTools(): Array<{
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
schema: any;
|
|
89
|
+
handler: (params: any) => Promise<any>;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Get all tools with MCP-formatted handlers for direct registration with MCP servers
|
|
93
|
+
* This method wraps the handlers to return the proper CallToolResult format
|
|
94
|
+
* @returns Array of tool objects with MCP-compatible handlers
|
|
95
|
+
*/
|
|
96
|
+
getToolsForMcp(): Array<{
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
schema: any;
|
|
100
|
+
handler: (params: any, extra?: any) => Promise<CallToolResult>;
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* Create a bound handler function for a tool that maintains access to toolkit state
|
|
104
|
+
* @param tool The tool instance to create a handler for
|
|
105
|
+
* @returns Async handler function that can be used externally
|
|
106
|
+
*/
|
|
107
|
+
private createToolHandler;
|
|
108
|
+
/**
|
|
109
|
+
* Create a bound handler function for a tool that returns MCP-formatted results
|
|
110
|
+
* @param tool The tool instance to create a handler for
|
|
111
|
+
* @returns Async handler function that returns CallToolResult format
|
|
112
|
+
*/
|
|
113
|
+
private createMcpToolHandler;
|
|
78
114
|
/**
|
|
79
115
|
* Format the tool result into the expected MCP format
|
|
80
116
|
*/
|