@mondaydotcomorg/agent-toolkit 0.1.1 → 0.1.4
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/CHANGELOG.md +0 -0
- package/README.md +20 -144
- package/dist/cjs/core/index.d.ts +39 -0
- package/dist/cjs/core/index.js +2 -0
- package/dist/cjs/core/index.js.map +1 -0
- package/dist/cjs/mcp/index.d.ts +22 -0
- package/dist/cjs/mcp/index.js +345 -0
- package/dist/cjs/mcp/index.js.map +1 -0
- package/dist/cjs/openai/index.d.ts +60 -0
- package/dist/cjs/openai/index.js +345 -0
- package/dist/cjs/openai/index.js.map +1 -0
- package/dist/cjs/tools/index.d.ts +334 -0
- package/dist/cjs/tools/index.js +345 -0
- package/dist/cjs/tools/index.js.map +1 -0
- package/dist/esm/core/index.d.ts +39 -0
- package/dist/esm/core/index.js +2 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/mcp/index.d.ts +22 -0
- package/dist/esm/mcp/index.js +345 -0
- package/dist/esm/mcp/index.js.map +1 -0
- package/dist/esm/openai/index.d.ts +60 -0
- package/dist/esm/openai/index.js +345 -0
- package/dist/esm/openai/index.js.map +1 -0
- package/dist/esm/tools/index.d.ts +334 -0
- package/dist/esm/tools/index.js +345 -0
- package/dist/esm/tools/index.js.map +1 -0
- package/package.json +9 -14
package/CHANGELOG.md
ADDED
|
File without changes
|
package/README.md
CHANGED
|
@@ -8,14 +8,6 @@ A powerful toolkit for building AI agents that interact with the Monday.com API.
|
|
|
8
8
|
npm install @mondaydotcomorg/agent-toolkit
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- OpenAI integration support
|
|
14
|
-
- Model Context Protocol (MCP) support
|
|
15
|
-
- Pre-built Monday.com API tools
|
|
16
|
-
- TypeScript support with full type definitions
|
|
17
|
-
- Modular architecture with subpath exports
|
|
18
|
-
|
|
19
11
|
## Subpath Exports
|
|
20
12
|
|
|
21
13
|
The package provides several modular components that can be imported separately:
|
|
@@ -27,144 +19,28 @@ The package provides several modular components that can be imported separately:
|
|
|
27
19
|
|
|
28
20
|
## Available Tools
|
|
29
21
|
|
|
30
|
-
The toolkit includes several pre-built tools for common Monday.com operations:
|
|
31
|
-
|
|
32
|
-
- Delete Item Tool
|
|
33
|
-
- Get Board Items Tool
|
|
34
|
-
- Create Item Tool
|
|
35
|
-
- Create Update Tool
|
|
36
|
-
- Get Board Schema Tool
|
|
37
|
-
|
|
38
|
-
## Usage
|
|
39
|
-
|
|
40
|
-
### OpenAI Integration
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
import { MondayAgentToolkit } from '@mondaydotcomorg/agent-toolkit/openai';
|
|
44
|
-
import OpenAI from 'openai';
|
|
45
|
-
|
|
46
|
-
// Initialize the Monday.com Agent Toolkit
|
|
47
|
-
const mondayToolkit = new MondayAgentToolkit({
|
|
48
|
-
mondayApiToken: 'your-monday-api-token',
|
|
49
|
-
mondayApiVersion: '2025-01',
|
|
50
|
-
mondayApiRequestConfig: {},
|
|
51
|
-
toolsConfiguration: {
|
|
52
|
-
// Optional: Configure available tools
|
|
53
|
-
include: ['deleteItem', 'getBoardItems'],
|
|
54
|
-
// OR exclude specific tools
|
|
55
|
-
// exclude: ['createItem'],
|
|
56
|
-
// Disable all mutation operations
|
|
57
|
-
// disableMutations: true,
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### MCP Integration
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
import { MondayAgentToolkit } from '@mondaydotcomorg/agent-toolkit/mcp';
|
|
66
|
-
|
|
67
|
-
// Initialize with all tools
|
|
68
|
-
const toolkit = new MondayAgentToolkit({
|
|
69
|
-
mondayApiToken: 'your-monday-api-token',
|
|
70
|
-
mondayApiVersion: 'your-api-version',
|
|
71
|
-
mondayApiRequestConfig: {} // Optional request config
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// Or initialize with specific tools / disable mutations
|
|
75
|
-
const toolkitWithSpecificTools = new MondayAgentToolkit({
|
|
76
|
-
mondayApiToken: 'your-monday-api-token',
|
|
77
|
-
mondayApiVersion: 'your-api-version',
|
|
78
|
-
mondayApiRequestConfig: {},
|
|
79
|
-
tools: {
|
|
80
|
-
include: ['mcp_monday_api_mcp_delete_item', 'create monday item'], // Only include these tools
|
|
81
|
-
readOnlyMode: true, // Disable all mutation tools (create, update, delete operations)
|
|
82
|
-
// OR
|
|
83
|
-
// exclude: ['tool_name_to_exclude'] // Include all tools except these
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// The toolkit extends McpServer and automatically registers all available tools
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Types
|
|
91
|
-
|
|
92
|
-
The toolkit categorizes tools into two types:
|
|
93
|
-
|
|
94
|
-
- **Query Tools**: Read-only operations that fetch data (e.g., get board items, get board schema)
|
|
95
|
-
- **Mutation Tools**: Write operations that modify data (e.g., create item, delete item, create update)
|
|
96
|
-
|
|
97
|
-
You can disable all mutation tools using the `readOnlyMode` option in the configuration. This is useful when you want to ensure that your agent can only read data and cannot make any modifications.
|
|
98
|
-
|
|
99
|
-
### Using Individual Tools
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
import { CreateItemTool } from '@mondaydotcomorg/agent-toolkit/tools';
|
|
103
|
-
import { ApiClient } from '@mondaydotcomorg/api';
|
|
22
|
+
The toolkit includes several pre-built tools for common Monday.com operations, organized by functionality:
|
|
104
23
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
24
|
+
### Item Operations
|
|
25
|
+
- `CreateItemTool` - Create a new item in a monday.com board
|
|
26
|
+
- `DeleteItemTool` - Delete an item from a board
|
|
27
|
+
- `GetBoardItemsTool` - Get items by board id and term
|
|
28
|
+
- `CreateUpdateTool` - Create a new update on a specific item
|
|
29
|
+
- `ChangeItemColumnValuesTool` - Change the column values of an item in a monday.com board
|
|
30
|
+
- `MoveItemToGroupTool` - Move an item to a group in a monday.com board
|
|
109
31
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Node.js >= 16.20.0
|
|
117
|
-
- Monday.com API token
|
|
118
|
-
- OpenAI API key (if using OpenAI integration)
|
|
119
|
-
|
|
120
|
-
## Development
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Install dependencies
|
|
124
|
-
npm install
|
|
125
|
-
|
|
126
|
-
# Build the package
|
|
127
|
-
npm run build
|
|
128
|
-
|
|
129
|
-
# Run tests
|
|
130
|
-
npm test
|
|
131
|
-
|
|
132
|
-
# Format code
|
|
133
|
-
npm run prettier
|
|
134
|
-
|
|
135
|
-
# Lint code
|
|
136
|
-
npm run lint
|
|
137
|
-
|
|
138
|
-
# Watch mode during development
|
|
139
|
-
npm run watch
|
|
32
|
+
### Board Operations
|
|
33
|
+
- `CreateBoardTool` - Create a monday.com board
|
|
34
|
+
- `GetBoardSchemaTool` - Get board schema (columns and groups) by board id
|
|
35
|
+
- `CreateColumnTool` - Create a new column in a monday.com board
|
|
36
|
+
- `DeleteColumnTool` - Delete a column from a monday.com board
|
|
140
37
|
|
|
141
|
-
|
|
142
|
-
|
|
38
|
+
### Account Operations
|
|
39
|
+
- `GetUsersTool` - Get users, can be filtered by name or partial name
|
|
143
40
|
|
|
144
|
-
|
|
145
|
-
|
|
41
|
+
### Dynamic API Tools
|
|
42
|
+
- `AllMondayApiTool` - Execute any Monday.com API operation by generating GraphQL queries and mutations dynamically
|
|
43
|
+
- `GetGraphQLSchemaTool` - Fetch the Monday.com GraphQL schema structure including query and mutation definitions
|
|
44
|
+
- `GetTypeDetailsTool` - Get detailed information about a specific GraphQL type from the Monday.com API schema
|
|
146
45
|
|
|
147
|
-
|
|
148
|
-
npm run fetch:generate
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## License
|
|
152
|
-
|
|
153
|
-
MIT
|
|
154
|
-
|
|
155
|
-
## Author
|
|
156
|
-
|
|
157
|
-
monday.com API Team
|
|
158
|
-
|
|
159
|
-
## Repository
|
|
160
|
-
|
|
161
|
-
[GitHub Repository](https://github.com/mondaycom/monday-graphql-api/tree/main/packages/agent-toolkit)
|
|
162
|
-
|
|
163
|
-
## Keywords
|
|
164
|
-
|
|
165
|
-
- monday
|
|
166
|
-
- api
|
|
167
|
-
- agent-toolkit
|
|
168
|
-
- openai
|
|
169
|
-
- mcp
|
|
170
|
-
- ai-agents
|
|
46
|
+
## Usage
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ZodRawShape, z, ZodTypeAny } from 'zod';
|
|
2
|
+
import { ApiClient } from '@mondaydotcomorg/api';
|
|
3
|
+
|
|
4
|
+
interface Executable<Input, Output> {
|
|
5
|
+
execute: (input?: Input) => Promise<Output>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type ToolInputType<Input extends ZodRawShape | undefined> = Input extends ZodRawShape ? z.objectOutputType<Input, ZodTypeAny> : undefined;
|
|
9
|
+
type ToolOutputType<T extends Record<string, unknown>> = {
|
|
10
|
+
content: string;
|
|
11
|
+
metadata?: T;
|
|
12
|
+
};
|
|
13
|
+
declare enum ToolType {
|
|
14
|
+
QUERY = "query",
|
|
15
|
+
MUTATION = "mutation",
|
|
16
|
+
ALL_API = "all_api"
|
|
17
|
+
}
|
|
18
|
+
interface Tool<Input extends ZodRawShape | undefined, Output extends Record<string, unknown> = never> extends Executable<ToolInputType<Input>, ToolOutputType<Output>> {
|
|
19
|
+
name: string;
|
|
20
|
+
type: ToolType;
|
|
21
|
+
getDescription(): string;
|
|
22
|
+
getInputSchema(): Input;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type MondayApiToolContext = {
|
|
26
|
+
boardId?: number;
|
|
27
|
+
};
|
|
28
|
+
declare abstract class BaseMondayApiTool<Input extends ZodRawShape | undefined, Output extends Record<string, unknown> = never> implements Tool<Input, Output> {
|
|
29
|
+
protected readonly mondayApi: ApiClient;
|
|
30
|
+
protected readonly context?: MondayApiToolContext | undefined;
|
|
31
|
+
abstract name: string;
|
|
32
|
+
abstract type: ToolType;
|
|
33
|
+
constructor(mondayApi: ApiClient, context?: MondayApiToolContext | undefined);
|
|
34
|
+
abstract getDescription(): string;
|
|
35
|
+
abstract getInputSchema(): Input;
|
|
36
|
+
abstract execute(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { BaseMondayApiTool, Executable, MondayApiToolContext, Tool, ToolInputType, ToolOutputType, ToolType };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ToolType=void 0,(o=exports.ToolType||(exports.ToolType={})).QUERY="query",o.MUTATION="mutation",o.ALL_API="all_api";exports.BaseMondayApiTool=class{constructor(o,e){this.mondayApi=o,this.context=e}};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../lib/core/tool.ts","../../../lib/core/base-monday-api-tool.ts"],"sourcesContent":[null,null],"names":["ToolType","constructor","mondayApi","context","this"],"mappings":"aAYA,IAAYA,yDAAAA,QAIXA,cAAA,GAJWA,EAAAA,QAAQA,WAARA,iBAIX,CAAA,IAHC,MAAA,QACAA,EAAA,SAAA,WACAA,EAAA,QAAA,0CCCA,WAAAC,CACqBC,EACAC,GADAC,KAASF,UAATA,EACAE,KAAOD,QAAPA,CACjB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ApiClientConfig } from '@mondaydotcomorg/api';
|
|
3
|
+
|
|
4
|
+
type ToolsConfiguration = {
|
|
5
|
+
include?: string[];
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
readOnlyMode?: boolean;
|
|
8
|
+
enableDynamicApiTools?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type MondayAgentToolkitConfig = {
|
|
12
|
+
mondayApiToken: ApiClientConfig['token'];
|
|
13
|
+
mondayApiVersion: ApiClientConfig['apiVersion'];
|
|
14
|
+
mondayApiRequestConfig: ApiClientConfig['requestConfig'];
|
|
15
|
+
toolsConfiguration?: ToolsConfiguration;
|
|
16
|
+
};
|
|
17
|
+
declare class MondayAgentToolkit extends McpServer {
|
|
18
|
+
private readonly mondayApiClient;
|
|
19
|
+
constructor(config: MondayAgentToolkitConfig);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MondayAgentToolkit, MondayAgentToolkitConfig };
|