@mondaydotcomorg/agent-toolkit 2.36.1 → 2.36.2
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/README.md +3 -0
- package/dist/cjs/core/index.js +118 -118
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.js +27 -27
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +33 -33
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +118 -118
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.js +27 -27
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +27 -27
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/mcp/index.js
CHANGED
|
@@ -1170,14 +1170,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
`;const GA=[["is_pending","Pending"],["is_verified","Verified"],["is_view_only","View Only"],["join_date","Join Date"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["photo_thumb","Photo Thumb"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function zA(e,t=""){return GA.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const WA=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...zA(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...zA(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},YA=500,KA=500,QA=1e3,JA={userIds:e.array(e.string()).max(YA).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:e.array(e.string()).max(KA).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:e.string().optional().describe("Name-based USER search ONLY. STANDALONE parameter - cannot be combined with others. PREFERRED method for finding users when you know names. Performs fuzzy matching.\n CRITICAL: This parameter searches for USERS ONLY, NOT teams. To search for teams, use teamIds parameter instead."),getMe:e.boolean().optional().describe('[TOP PRIORITY] Use ALWAYS when requesting current user information. Examples of when it should be used: ["get my user" or "get my teams"].\n This parameter CONFLICTS with all others. '),includeTeams:e.boolean().optional().describe("[AVOID] This fetches all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get their team memberships."),teamsOnly:e.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:e.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const XA={itemId:e.number().describe("The id of the item to which the update will be added"),groupId:e.string().describe("The id of the group to which the item will be moved")};const ZA={type:e.enum(["ids","object_ids","workspace_ids"]).describe("Query type of ids parameter that is used query by: ids, object_ids, or workspace_ids"),ids:e.array(e.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:e.number().optional().describe("Number of docs per page (default: 25). Affects pagination - if you get exactly this many results, there may be more pages."),order_by:e.nativeEnum(ME).optional().describe("The order in which to retrieve your docs. The default shows created_at with the newest docs listed first. This argument will not be applied if you query docs by specific ids."),page:e.number().optional().describe("The page number to return (starts at 1). Use this to paginate through large result sets. Check response for has_more_pages indicator.")};const eD={workspace_id:e.number().describe("The ID of the workspace to get information for")};const tD=qI`
|
|
1173
|
-
query listWorkspaces($limit: Int!, $page: Int!) {
|
|
1174
|
-
workspaces(limit: $limit, page: $page) {
|
|
1173
|
+
query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
|
|
1174
|
+
workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
|
|
1175
1175
|
id
|
|
1176
1176
|
name
|
|
1177
1177
|
description
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
`,aD=100,iD=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"")
|
|
1180
|
+
`,aD=100,iD=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function nD(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function oD(e){return Array.isArray(e)&&e.length>0}const rD={searchTerm:e.string().optional().describe("Optional search term used to filter workspaces. [IMPORANT] Only alphanumeric characters are supported."),limit:e.number().min(1).max(aD).default(aD).describe("Number of workspaces to return. Set to max (100) lower for smaller response size"),page:e.number().min(1).default(1).describe("Page number to return. Default is 1.")};const sD=qI`
|
|
1181
1181
|
query getItemBoard($itemId: ID!) {
|
|
1182
1182
|
items(ids: [$itemId]) {
|
|
1183
1183
|
id
|
|
@@ -1190,7 +1190,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
-
`,
|
|
1193
|
+
`,pD=qI`
|
|
1194
1194
|
mutation createDoc($location: CreateDocInput!) {
|
|
1195
1195
|
create_doc(location: $location) {
|
|
1196
1196
|
id
|
|
@@ -1198,7 +1198,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1198
1198
|
name
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
|
-
`,
|
|
1201
|
+
`,dD=qI`
|
|
1202
1202
|
mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
|
|
1203
1203
|
add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
|
|
1204
1204
|
success
|
|
@@ -1206,11 +1206,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1206
1206
|
error
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
`,
|
|
1209
|
+
`,lD=qI`
|
|
1210
1210
|
mutation updateDocName($docId: ID!, $name: String!) {
|
|
1211
1211
|
update_doc_name(docId: $docId, name: $name)
|
|
1212
1212
|
}
|
|
1213
|
-
`,
|
|
1213
|
+
`,cD=e.enum(["workspace","item"]),uD=e.discriminatedUnion("type",[e.object({type:e.literal(cD.enum.workspace).describe("Create document in workspace"),workspace_id:e.number().describe("Workspace ID under which to create the new document"),doc_kind:e.nativeEnum(fE).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:e.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),e.object({type:e.literal(cD.enum.item).describe("Create document attached to item"),item_id:e.number().describe("Item ID to attach the new document to"),column_id:e.string().optional().describe("ID of an existing 'doc' column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.")})]),mD={doc_name:e.string().describe("Name for the new document."),markdown:e.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:e.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:e.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:e.nativeEnum(fE).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:e.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:e.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:e.string().optional().describe('[OPTIONAL - use only when location="item"] ID of an existing "doc" column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.')};const hD=qI`
|
|
1214
1214
|
mutation CreateDashboard(
|
|
1215
1215
|
$name: String!
|
|
1216
1216
|
$workspace_id: ID!
|
|
@@ -1232,14 +1232,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1232
1232
|
board_folder_id
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
`,
|
|
1235
|
+
`,fD=qI`
|
|
1236
1236
|
query GetAllWidgetsSchema {
|
|
1237
1237
|
all_widgets_schema {
|
|
1238
1238
|
widget_type
|
|
1239
1239
|
schema
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
`,
|
|
1242
|
+
`,vD=qI`
|
|
1243
1243
|
mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
|
|
1244
1244
|
create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
|
|
1245
1245
|
id
|
|
@@ -1251,13 +1251,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
|
-
`,
|
|
1254
|
+
`,gD={name:e.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:e.string().describe("ID of the workspace that will own the dashboard"),board_ids:e.array(e.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:e.nativeEnum(PE).default(PE.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:e.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const yD={parent_container_id:e.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.nativeEnum(gx).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.nativeEnum(GE).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:e.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:e.record(e.unknown()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type."),settingsStringified:e.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The settings object. Send this as a stringified JSON of "settings" field. Read "settings" field description for details how to use it.')};const bD=qI`
|
|
1255
1255
|
mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
|
|
1256
1256
|
update_workspace(id: $id, attributes: $attributes) {
|
|
1257
1257
|
id
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
-
`,
|
|
1260
|
+
`,_D={id:e.string().describe("The ID of the workspace to update"),attributeAccountProductId:e.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:e.string().optional().describe("The description of the workspace to update"),attributeKind:e.nativeEnum(wx).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:e.string().optional().describe("The name of the workspace to update")};const wD=qI`
|
|
1261
1261
|
mutation updateFolder(
|
|
1262
1262
|
$folderId: ID!
|
|
1263
1263
|
$name: String
|
|
@@ -1283,7 +1283,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1283
1283
|
id
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
|
-
`,
|
|
1286
|
+
`,ED={folderId:e.string().describe("The ID of the folder to update"),name:e.string().optional().describe("The new name of the folder"),color:e.nativeEnum(JE).optional().describe("The new color of the folder"),fontWeight:e.nativeEnum(ZE).optional().describe("The new font weight of the folder"),customIcon:e.nativeEnum(XE).optional().describe("The new custom icon of the folder"),parentFolderId:e.string().optional().describe("The ID of the new parent folder"),workspaceId:e.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:e.string().optional().describe("The account product ID associated with the folder"),position_object_id:e.string().optional().describe("The ID of the object to position the folder relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:e.nativeEnum(AT).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:e.boolean().optional().describe("Whether to position the folder after the object")};const TD=qI`
|
|
1287
1287
|
mutation createWorkspace(
|
|
1288
1288
|
$name: String!
|
|
1289
1289
|
$workspaceKind: WorkspaceKind!
|
|
@@ -1299,7 +1299,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1299
1299
|
id
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
|
-
`,
|
|
1302
|
+
`,xD={name:e.string().describe("The name of the new workspace to be created"),workspaceKind:e.nativeEnum(wx).describe("The kind of workspace to create"),description:e.string().optional().describe("The description of the new workspace"),accountProductId:e.string().optional().describe("The account product ID associated with the workspace")};const ID=qI`
|
|
1303
1303
|
mutation createFolder(
|
|
1304
1304
|
$workspaceId: ID!
|
|
1305
1305
|
$name: String!
|
|
@@ -1319,7 +1319,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1319
1319
|
id
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
|
-
`,
|
|
1322
|
+
`,SD={workspaceId:e.string().describe("The ID of the workspace where the folder will be created"),name:e.string().describe("The name of the folder to be created"),color:e.nativeEnum(JE).optional().describe("The color of the folder"),fontWeight:e.nativeEnum(ZE).optional().describe("The font weight of the folder"),customIcon:e.nativeEnum(XE).optional().describe("The custom icon of the folder"),parentFolderId:e.string().optional().describe("The ID of the parent folder")};const ND=qI`
|
|
1323
1323
|
mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
|
|
1324
1324
|
update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
|
|
1325
1325
|
success
|
|
@@ -1329,7 +1329,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
|
-
`,
|
|
1332
|
+
`,AD=qI`
|
|
1333
1333
|
mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
|
|
1334
1334
|
update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
|
|
1335
1335
|
success
|
|
@@ -1339,7 +1339,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
`,
|
|
1342
|
+
`,DD={objectType:e.nativeEnum(AT).describe("The type of object to move"),id:e.string().describe("The ID of the object to move"),position_object_id:e.string().optional().describe("The ID of the object to position the object relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:e.nativeEnum(AT).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:e.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:e.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:e.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:e.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const OD=qI`
|
|
1343
1343
|
query aggregateBoardInsights($query: AggregateQueryInput!) {
|
|
1344
1344
|
aggregate(query: $query) {
|
|
1345
1345
|
results {
|
|
@@ -1357,7 +1357,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
|
-
`,
|
|
1360
|
+
`,RD=new Set([Xw.Case,Xw.Between,Xw.Left,Xw.Raw,Xw.None,Xw.CountKeys]),CD=Object.values(Xw).filter((e=>!RD.has(e))),kD=new Set([Xw.Left,Xw.Trim,Xw.Upper,Xw.Lower,Xw.DateTruncDay,Xw.DateTruncWeek,Xw.DateTruncMonth,Xw.DateTruncQuarter,Xw.DateTruncYear,Xw.Color,Xw.Label,Xw.EndDate,Xw.StartDate,Xw.Hour,Xw.PhoneCountryShortName,Xw.Person,Xw.Upper,Xw.Lower,Xw.Order,Xw.Length,Xw.Flatten,Xw.IsDone]);function PD(e){return{column_id:e}}new Set([Xw.Count,Xw.CountDistinct,Xw.CountSubitems,Xw.CountItems,Xw.First,Xw.Sum,Xw.Average,Xw.Median,Xw.Min,Xw.Max,Xw.MinMax]);const $D={boardId:e.number().describe("The id of the board to get insights for"),aggregationsStringified:e.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The aggregations to get. Send this as a stringified JSON array of "aggregations" field. Read "aggregations" field description for details how to use it.'),aggregations:e.array(e.object({function:e.enum(CD).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:e.string().describe("The id of the column to aggregate")})).describe('The aggregations to get. Before sending the aggregations, use get_board_info tool to check "aggregationGuidelines" key for information. Transformative functions and plain columns (no function) must be in group by. [REQUIRED PRECONDITION]: Either send this field or the stringified version of it.').optional(),groupBy:e.array(e.string()).describe("The columns to group by. All columns in the group by must be in the aggregations as well without a function.").optional(),limit:e.number().describe("The limit of the results").max(1e3).optional().default(1e3),filtersStringified:e.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. Send this as a stringified JSON array of "filters" field. Read "filters" field description for details how to use it.'),filters:pA,filtersOperator:dA,orderByStringified:e.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. Send this as a stringified JSON array of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(fT).optional().default(fT.Asc).describe("The direction to order by")})).optional().describe("The columns to order by, will control the order of the items in the response")};const LD=qI`
|
|
1361
1361
|
query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1362
1362
|
boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1363
1363
|
id
|
|
@@ -1365,7 +1365,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1365
1365
|
url
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
|
-
|
|
1368
|
+
`,FD=qI`
|
|
1369
1369
|
query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1370
1370
|
docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1371
1371
|
id
|
|
@@ -1373,14 +1373,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1373
1373
|
url
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
`,
|
|
1376
|
+
`,jD=qI`
|
|
1377
1377
|
query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1378
1378
|
folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1379
1379
|
id
|
|
1380
1380
|
name
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
`,
|
|
1383
|
+
`,UD=qI`
|
|
1384
1384
|
query SearchDev($query: String!, $size: Int!, $entityTypes: [SearchableEntity!], $workspaceIds: [ID!]) {
|
|
1385
1385
|
search(query: $query, size: $size, entity_types: $entityTypes, workspace_ids: $workspaceIds) {
|
|
1386
1386
|
__typename
|
|
@@ -1401,7 +1401,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
}
|
|
1404
|
-
`;var jD,UD,VD,BD,MD,qD,HD,GD,zD,WD,YD,KD,QD,JD,XD,ZD,eO,tO,aO,iO,nO,oO,rO,sO,pO,dO,lO,cO,uO,mO,hO,fO,vO,gO,yO,bO,_O,wO,EO,TO,xO,IO,SO,NO,AO,DO,OO,RO,CO,kO,PO,$O,LO,FO,jO,UO,VO,BO,MO,qO,HO,GO,zO,WO,YO,KO,QO,JO,XO,ZO,eR,tR,aR,iR,nR,oR,rR,sR,pR,dR,lR,cR,uR,mR,hR,fR,vR,gR,yR,bR,_R,wR,ER,TR,xR,IR,SR,NR,AR,DR,OR,RR,CR,kR,PR,$R,LR,FR,jR,UR,VR,BR,MR,qR,HR,GR,zR,WR,YR,KR,QR,JR,XR,ZR,eC,tC,aC,iC,nC,oC,rC,sC,pC,dC,lC,cC,uC,mC,hC,fC,vC,gC,yC,bC,_C,wC;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(jD||(jD={})),function(e){e.Table="TABLE"}(UD||(UD={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsTerms="CONTAINS_TERMS",e.ContainsText="CONTAINS_TEXT",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.StartsWith="STARTS_WITH",e.WithinTheLast="WITHIN_THE_LAST",e.WithinTheNext="WITHIN_THE_NEXT"}(VD||(VD={})),function(e){e.TableHistory="TABLE_HISTORY"}(BD||(BD={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(MD||(MD={})),function(e){e.And="AND",e.Or="OR"}(qD||(qD={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(HD||(HD={})),function(e){e.Asc="ASC",e.Desc="DESC"}(GD||(GD={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(zD||(zD={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(WD||(WD={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(YD||(YD={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(KD||(KD={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(QD||(QD={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(JD||(JD={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(XD||(XD={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(ZD||(ZD={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(eO||(eO={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(tO||(tO={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(aO||(aO={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(iO||(iO={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(nO||(nO={})),function(e){e.Edit="edit",e.View="view"}(oO||(oO={})),function(e){e.Communication="communication",e.Description="description",e.Name="name"}(rO||(rO={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(sO||(sO={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(pO||(pO={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(dO||(dO={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(lO||(lO={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(cO||(cO={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(uO||(uO={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(mO||(mO={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(hO||(hO={})),function(e){e.Edit="edit",e.View="view"}(fO||(fO={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(vO||(vO={})),function(e){e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(gO||(gO={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(yO||(yO={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(bO||(bO={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(_O||(_O={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(wO||(wO={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(EO||(EO={})),function(e){e.Description="description",e.Title="title"}(TO||(TO={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(xO||(xO={})),function(e){e.Account="ACCOUNT",e.User="USER"}(IO||(IO={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(SO||(SO={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(NO||(NO={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(AO||(AO={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(DO||(DO={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(OO||(OO={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(RO||(RO={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(CO||(CO={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(kO||(kO={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(PO||(PO={})),function(e){e.Private="private",e.Public="public",e.Share="share"}($O||($O={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(LO||(LO={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(FO||(FO={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(jO||(jO={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(UO||(UO={})),function(e){e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.Gantt="GANTT",e.Number="NUMBER",e.Table="TABLE"}(VO||(VO={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(BO||(BO={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(MO||(MO={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(qO||(qO={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(HO||(HO={})),function(e){e.Monday="monday",e.Sunday="sunday"}(GO||(GO={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(zO||(zO={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(WO||(WO={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(YO||(YO={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(KO||(KO={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(QO||(QO={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(JO||(JO={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(XO||(XO={})),function(e){e.Classic="Classic",e.OneByOne="OneByOne"}(ZO||(ZO={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(eR||(eR={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(tR||(tR={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(aR||(aR={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(iR||(iR={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(nR||(nR={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(oR||(oR={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(rR||(rR={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(sR||(sR={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(pR||(pR={})),function(e){e.Error="ERROR"}(dR||(dR={})),function(e){e.Asc="asc",e.Desc="desc"}(lR||(lR={})),function(e){e.And="and",e.Or="or"}(cR||(cR={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(uR||(uR={})),function(e){e.Person="person",e.Team="team"}(mR||(mR={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(hR||(hR={})),function(e){e.Board="BOARD",e.Document="DOCUMENT"}(fR||(fR={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(vR||(vR={})),function(e){e.Dropdown="dropdown",e.Status="status"}(gR||(gR={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(yR||(yR={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(bR||(bR={})),function(e){e.Post="Post",e.Project="Project"}(_R||(_R={})),function(e){e.Left="left",e.Right="right"}(wR||(wR={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(ER||(ER={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(TR||(TR={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(xR||(xR={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(IR||(IR={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(SR||(SR={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(NR||(NR={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(AR||(AR={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(DR||(DR={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(OR||(OR={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(RR||(RR={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(CR||(CR={})),function(e){e.CrossEncoder="CROSS_ENCODER"}(kR||(kR={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(PR||(PR={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}($R||($R={})),function(e){e.Hybrid="HYBRID",e.Lexical="LEXICAL",e.Semantic="SEMANTIC"}(LR||(LR={})),function(e){e.Board="BOARD",e.Document="DOCUMENT",e.Item="ITEM"}(FR||(FR={})),function(e){e.Board="BOARD"}(jR||(jR={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(UR||(UR={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(VR||(VR={})),function(e){e.Asc="ASC",e.Desc="DESC"}(BR||(BR={})),function(e){e.Complete="COMPLETE",e.Start="START"}(MR||(MR={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(qR||(qR={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(HR||(HR={})),function(e){e.CountKeys="COUNT_KEYS"}(GR||(GR={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(zR||(zR={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(WR||(WR={})),function(e){e.Nominal="nominal",e.Percent="percent"}(YR||(YR={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(KR||(KR={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(QR||(QR={})),function(e){e.Active="active",e.Inactive="inactive"}(JR||(JR={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(XR||(XR={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(ZR||(ZR={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(eC||(eC={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(tC||(tC={})),function(e){e.InvalidField="INVALID_FIELD"}(aC||(aC={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(iC||(iC={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(nC||(nC={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(oC||(oC={})),function(e){e.Board="board"}(rC||(rC={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(sC||(sC={})),function(e){e.Board="BOARD",e.Item="ITEM"}(pC||(pC={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(dC||(dC={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(lC||(lC={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(cC||(cC={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(uC||(uC={})),function(e){e.Wait="WAIT"}(mC||(mC={})),function(e){e.LiteBuilder="LITE_BUILDER"}(hC||(hC={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(fC||(fC={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(vC||(vC={})),function(e){e.All="all",e.Member="member"}(gC||(gC={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(yC||(yC={})),function(e){e.CreatedAt="created_at"}(bC||(bC={})),function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(_C||(_C={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(wC||(wC={}));const EC=100,TC={searchTerm:e.string().optional().describe("The search term to use for the search."),searchType:e.nativeEnum(wC).describe("The type of search to perform."),limit:e.number().max(EC).optional().default(EC).describe("The number of items to get. The max and default value is 100."),page:e.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:e.array(e.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const xC=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(TT).describe("The type of mention: User, Team, Board, or Project")}),IC=e.array(xC),SC={itemId:e.number().describe("The id of the item to which the update will be added"),body:e.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:e.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project')};const NC=qI`
|
|
1404
|
+
`;var VD,BD,MD,qD,HD,GD,zD,WD,YD,KD,QD,JD,XD,ZD,eO,tO,aO,iO,nO,oO,rO,sO,pO,dO,lO,cO,uO,mO,hO,fO,vO,gO,yO,bO,_O,wO,EO,TO,xO,IO,SO,NO,AO,DO,OO,RO,CO,kO,PO,$O,LO,FO,jO,UO,VO,BO,MO,qO,HO,GO,zO,WO,YO,KO,QO,JO,XO,ZO,eR,tR,aR,iR,nR,oR,rR,sR,pR,dR,lR,cR,uR,mR,hR,fR,vR,gR,yR,bR,_R,wR,ER,TR,xR,IR,SR,NR,AR,DR,OR,RR,CR,kR,PR,$R,LR,FR,jR,UR,VR,BR,MR,qR,HR,GR,zR,WR,YR,KR,QR,JR,XR,ZR,eC,tC,aC,iC,nC,oC,rC,sC,pC,dC,lC,cC,uC,mC,hC,fC,vC,gC,yC,bC,_C,wC,EC,TC;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(VD||(VD={})),function(e){e.Table="TABLE"}(BD||(BD={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsTerms="CONTAINS_TERMS",e.ContainsText="CONTAINS_TEXT",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.StartsWith="STARTS_WITH",e.WithinTheLast="WITHIN_THE_LAST",e.WithinTheNext="WITHIN_THE_NEXT"}(MD||(MD={})),function(e){e.TableHistory="TABLE_HISTORY"}(qD||(qD={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(HD||(HD={})),function(e){e.And="AND",e.Or="OR"}(GD||(GD={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(zD||(zD={})),function(e){e.Asc="ASC",e.Desc="DESC"}(WD||(WD={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(YD||(YD={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(KD||(KD={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(QD||(QD={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(JD||(JD={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(XD||(XD={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(ZD||(ZD={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(eO||(eO={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(tO||(tO={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(aO||(aO={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(iO||(iO={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(nO||(nO={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(oO||(oO={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(rO||(rO={})),function(e){e.Edit="edit",e.View="view"}(sO||(sO={})),function(e){e.Communication="communication",e.Description="description",e.Name="name"}(pO||(pO={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(dO||(dO={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(lO||(lO={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(cO||(cO={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(uO||(uO={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(mO||(mO={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(hO||(hO={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(fO||(fO={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(vO||(vO={})),function(e){e.Edit="edit",e.View="view"}(gO||(gO={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(yO||(yO={})),function(e){e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(bO||(bO={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(_O||(_O={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(wO||(wO={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(EO||(EO={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(TO||(TO={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(xO||(xO={})),function(e){e.Description="description",e.Title="title"}(IO||(IO={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(SO||(SO={})),function(e){e.Account="ACCOUNT",e.User="USER"}(NO||(NO={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(AO||(AO={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(DO||(DO={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(OO||(OO={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(RO||(RO={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(CO||(CO={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(kO||(kO={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(PO||(PO={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}($O||($O={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(LO||(LO={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(FO||(FO={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(jO||(jO={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(UO||(UO={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(VO||(VO={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(BO||(BO={})),function(e){e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.Gantt="GANTT",e.Number="NUMBER",e.Table="TABLE"}(MO||(MO={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(qO||(qO={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(HO||(HO={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(GO||(GO={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(zO||(zO={})),function(e){e.Monday="monday",e.Sunday="sunday"}(WO||(WO={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(YO||(YO={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(KO||(KO={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(QO||(QO={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(JO||(JO={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(XO||(XO={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(ZO||(ZO={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(eR||(eR={})),function(e){e.Classic="Classic",e.OneByOne="OneByOne"}(tR||(tR={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(aR||(aR={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(iR||(iR={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(nR||(nR={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(oR||(oR={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(rR||(rR={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(sR||(sR={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(pR||(pR={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(dR||(dR={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(lR||(lR={})),function(e){e.Error="ERROR"}(cR||(cR={})),function(e){e.Asc="asc",e.Desc="desc"}(uR||(uR={})),function(e){e.And="and",e.Or="or"}(mR||(mR={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(hR||(hR={})),function(e){e.Person="person",e.Team="team"}(fR||(fR={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(vR||(vR={})),function(e){e.Board="BOARD",e.Document="DOCUMENT"}(gR||(gR={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(yR||(yR={})),function(e){e.Dropdown="dropdown",e.Status="status"}(bR||(bR={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(_R||(_R={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(wR||(wR={})),function(e){e.Post="Post",e.Project="Project"}(ER||(ER={})),function(e){e.Left="left",e.Right="right"}(TR||(TR={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(xR||(xR={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(IR||(IR={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(SR||(SR={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(NR||(NR={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(AR||(AR={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(DR||(DR={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(OR||(OR={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(RR||(RR={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(CR||(CR={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(kR||(kR={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(PR||(PR={})),function(e){e.CrossEncoder="CROSS_ENCODER"}($R||($R={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(LR||(LR={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(FR||(FR={})),function(e){e.Hybrid="HYBRID",e.Lexical="LEXICAL",e.Semantic="SEMANTIC"}(jR||(jR={})),function(e){e.Board="BOARD",e.Document="DOCUMENT",e.Item="ITEM"}(UR||(UR={})),function(e){e.Board="BOARD"}(VR||(VR={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(BR||(BR={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(MR||(MR={})),function(e){e.Asc="ASC",e.Desc="DESC"}(qR||(qR={})),function(e){e.Complete="COMPLETE",e.Start="START"}(HR||(HR={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(GR||(GR={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(zR||(zR={})),function(e){e.CountKeys="COUNT_KEYS"}(WR||(WR={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(YR||(YR={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(KR||(KR={})),function(e){e.Nominal="nominal",e.Percent="percent"}(QR||(QR={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(JR||(JR={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(XR||(XR={})),function(e){e.Active="active",e.Inactive="inactive"}(ZR||(ZR={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(eC||(eC={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(tC||(tC={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(aC||(aC={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(iC||(iC={})),function(e){e.InvalidField="INVALID_FIELD"}(nC||(nC={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(oC||(oC={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(rC||(rC={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(sC||(sC={})),function(e){e.Board="board"}(pC||(pC={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(dC||(dC={})),function(e){e.Board="BOARD",e.Item="ITEM"}(lC||(lC={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(cC||(cC={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(uC||(uC={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(mC||(mC={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(hC||(hC={})),function(e){e.Wait="WAIT"}(fC||(fC={})),function(e){e.LiteBuilder="LITE_BUILDER"}(vC||(vC={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(gC||(gC={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(yC||(yC={})),function(e){e.All="all",e.Member="member"}(bC||(bC={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(_C||(_C={})),function(e){e.CreatedAt="created_at"}(wC||(wC={})),function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(EC||(EC={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(TC||(TC={}));const xC=100,IC={searchTerm:e.string().optional().describe("The search term to use for the search."),searchType:e.nativeEnum(TC).describe("The type of search to perform."),limit:e.number().max(xC).optional().default(xC).describe("The number of items to get. The max and default value is 100."),page:e.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:e.array(e.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const SC=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(TT).describe("The type of mention: User, Team, Board, or Project")}),NC=e.array(SC),AC={itemId:e.number().describe("The id of the item to which the update will be added"),body:e.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:e.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project')};const DC=qI`
|
|
1405
1405
|
query getUserContext {
|
|
1406
1406
|
me {
|
|
1407
1407
|
id
|
|
@@ -1423,7 +1423,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
`,
|
|
1426
|
+
`,OC=qI`
|
|
1427
1427
|
query getFavoriteDetails(
|
|
1428
1428
|
$boardIds: [ID!]
|
|
1429
1429
|
$folderIds: [ID!]
|
|
@@ -1447,7 +1447,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1447
1447
|
name
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
|
-
`,
|
|
1450
|
+
`,RC={[cT.Board]:"boardIds",[cT.Folder]:"folderIds",[cT.Workspace]:"workspaceIds",[cT.Dashboard]:"dashboardIds"},CC={[cT.Board]:"boards",[cT.Folder]:"folders",[cT.Workspace]:"workspaces",[cT.Dashboard]:"dashboards"};const kC={action:e.enum(["enable","disable","status","list","detailed","reset"]).describe('Action to perform: "list" or "detailed" to discover available tools, "status" to check current states, "enable" to activate needed tools, "disable" to deactivate tools, "reset" to restore defaults'),toolName:e.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)")};class PC{constructor(){this.name="manage_tools",this.type=Mi.READ,this.enabledByDefault=!0,this.annotations={title:"Discover & Manage monday.com Tools",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1}}setToolkitManager(e){this.toolkitManager=e}getDescription(){return"Discover and manage available monday.com tools. Use this tool first to see what tools are available, check which ones are active/inactive, and enable any tools you need for your tasks. When enabling a tool, you will be asked for confirmation first. Essential for understanding your monday.com toolkit capabilities."}getInputSchema(){return kC}async execute(e){if(!this.toolkitManager)throw new Error("Toolkit manager not initialized");if(!e)throw new Error("Input parameters are required");const{action:t,toolName:a}=e;switch(t){case"enable":if(!a)throw new Error("Tool name is required for enable action");if(this.toolkitManager.isToolEnabled(a))return{content:`Tool '${a}' is already enabled`};return{content:this.toolkitManager.enableTool(a)?`✅ Tool '${a}' has been enabled and is now available for use`:`❌ Failed to enable tool '${a}' (tool not found)`};case"disable":if(!a)throw new Error("Tool name is required for disable action");return{content:this.toolkitManager.disableTool(a)?`Tool '${a}' has been disabled`:`Failed to disable tool '${a}' (tool not found)`};case"status":if(a){return{content:`Tool '${a}' is ${this.toolkitManager.isToolEnabled(a)?"enabled":"disabled"}`}}{const e=this.toolkitManager.getToolsStatus();return{content:`All tools status:\n${Object.entries(e).map((([e,t])=>`${e}: ${t?"enabled":"disabled"}`)).join("\n")}`}}case"detailed":{const e=this.toolkitManager.getDetailedToolsStatus(),t=Object.entries(e).filter((([,e])=>e.enabled)),a=Object.entries(e).filter((([,e])=>!e.enabled));let i="monday.com Tools Discovery:\n\n";return t.length>0&&(i+="✅ ACTIVE TOOLS (ready to use):\n",i+=t.map((([e,t])=>` • ${e} (default: ${t.enabledByDefault?"enabled":"disabled"})`)).join("\n")),a.length>0&&(i+="\n\n⚠️ INACTIVE TOOLS (need activation):\n",i+=a.map((([e,t])=>` • ${e} (default: ${t.enabledByDefault?"enabled":"disabled"}) - use {"action": "enable", "toolName": "${e}"} to activate`)).join("\n")),{content:i}}case"reset":{if(!a)throw new Error("Tool name is required for reset action");const e=this.toolkitManager.resetToolToDefault(a),t=this.toolkitManager.isToolEnabledByDefault(a);return{content:e?`Tool '${a}' has been reset to its default state (${t?"enabled":"disabled"})`:`Failed to reset tool '${a}' (tool not found)`}}case"list":{const e=this.toolkitManager.getToolsStatus();return{content:`Available tools: ${Object.entries(e).map((([e,t])=>`${e} (${t?"enabled":"disabled"})`)).join(", ")}`}}default:throw new Error("Invalid action. Use: enable, disable, status, list, detailed, or reset")}}}const $C=qI`
|
|
1451
1451
|
query getSprintsByIds($ids: [ID!]) {
|
|
1452
1452
|
items(ids: $ids) {
|
|
1453
1453
|
id
|
|
@@ -1482,7 +1482,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
`,
|
|
1485
|
+
`,LC={SPRINT_TASKS:"sprint_tasks",SPRINT_TIMELINE:"sprint_timeline",SPRINT_COMPLETION:"sprint_completion",SPRINT_START_DATE:"sprint_start_date",SPRINT_END_DATE:"sprint_end_date",SPRINT_ACTIVATION:"sprint_activation"},FC={...LC,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},jC="BOARD_NOT_FOUND:",UC="SPRINT_NOT_FOUND:",VC="DOCUMENT_NOT_FOUND:",BC="DOCUMENT_INVALID:",MC="DOCUMENT_EMPTY:",qC="EXPORT_FAILED:",HC="INTERNAL_ERROR:",GC="VALIDATION_ERROR:",zC="task_sprint",WC={[FC.SPRINT_TASKS]:"Sprint Tasks",[FC.SPRINT_TIMELINE]:"Sprint Timeline",[FC.SPRINT_COMPLETION]:"Sprint Completion",[FC.SPRINT_START_DATE]:"Sprint Start Date",[FC.SPRINT_END_DATE]:"Sprint End Date",[FC.SPRINT_ACTIVATION]:"Sprint Activation",[FC.SPRINT_SUMMARY]:"Sprint Summary",[FC.SPRINT_CAPACITY]:"Sprint Capacity"},YC=YT,KC={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},QC=(e,t)=>e.column_values?.find((e=>e.id===t)),JC=(e,t)=>{const a=QC(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},XC=(e,t)=>{const a=QC(e,t);return"DateValue"===a?.__typename?a.date??null:null},ZC=(e,t)=>{const a=QC(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},ek=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},tk=(e,t)=>{if(!e.columns)return!1;const a=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return t.every((e=>a.has(e)))},ak=e=>tk(e,Object.values(LC)),ik=e=>tk(e,Object.values(KC)),nk=e=>{if(!e?.settings)return null;const t=e.settings;return t.boardIds&&Array.isArray(t.boardIds)&&t.boardIds[0]?.toString()||t.boardId?.toString()||null},ok=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===PN.BoardRelation))||null,rk={sprintId:e.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const sk=qI`
|
|
1486
1486
|
query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
|
|
1487
1487
|
boards(ids: [$boardId]) {
|
|
1488
1488
|
items_page(limit: $limit) {
|
|
@@ -1518,7 +1518,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
`,
|
|
1521
|
+
`,pk={sprintsBoardId:e.number().describe("The ID of the monday-dev board containing the sprints"),limit:e.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const dk=qI`
|
|
1522
1522
|
query GetRecentBoards($limit: Int) {
|
|
1523
1523
|
boards(limit: $limit, order_by: used_at, state: active) {
|
|
1524
1524
|
id
|
|
@@ -1534,7 +1534,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
1537
|
-
`,pk={};const dk=[class extends Ug{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=Mi.READ,this.annotations=jg({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return pk}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(sk,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${LC} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);if(0===a.length)return{content:this.generateNotFoundMessage(t.length)};return{content:this.generateReport(a)}}catch(e){return{content:`${MC} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}generateMultiplePairsWarning(e){return`## ⚠️ Multiple SprintsBoard Detected\n**${e}** different board pairs found. Each pair is isolated and workspace-specific.\n**AI Agent - REQUIRED:** Before ANY operation, confirm with user which pair and workspace to use.\n---\n`}generatePairDetails(e,t){return`### Pair ${t+1}\n**Sprints Board:**\n- ID: \`${e.sprintsBoard.id}\`\n- Name: ${e.sprintsBoard.name}\n- Workspace: ${e.sprintsBoard.workspaceName} (ID: ${e.sprintsBoard.workspaceId})\n\n**Tasks Board:**\n- ID: \`${e.tasksBoard.id}\`\n- Name: ${e.tasksBoard.name}\n- Workspace: ${e.tasksBoard.workspaceName} (ID: ${e.tasksBoard.workspaceId})\n---\n\n`}generateTechnicalReference(){return"## 📋 Technical Reference\n\n**Sprint Operations** (all require correct board pair):\n• Add to Sprint: Update `task_sprint` column with sprint item ID\n• Remove from Sprint: Clear `task_sprint` column (set to null)\n• Search in Sprint: Filter where `task_sprint` equals sprint item ID\n• Move Between Sprints: Update `task_sprint` with new sprint item ID\n• Backlog Tasks: `task_sprint` is empty/null\n\n**Critical:** `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}generateReport(e){const t=e.length>1?this.generateMultiplePairsWarning(e.length):"",a=e.map(((e,t)=>this.generatePairDetails(e,t))).join(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${t}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${a}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=ik(e,PC.SPRINT_TASKS);if(!i)return;const n=ak(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=ik(e,HC);if(!i)return;const n=ak(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(ek(i)&&this.processSprintsBoard(i,a,t),tk(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Ug{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=Mi.READ,this.annotations=jg({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return rk}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(ok,a),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${MC} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(zI,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${LC} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${qC} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${MC} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(PC),i=XC(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>GC[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let t="# Sprints Metadata Report\n\n";return t+=`**Total Sprints:** ${e.length}\n\n`,t+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",t+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const a=e.name||"Unknown",i=e.id,n=KC(e,$C.SPRINT_ACTIVATION),o=KC(e,$C.SPRINT_COMPLETION),r=QC(e,$C.SPRINT_START_DATE),s=QC(e,$C.SPRINT_END_DATE),p=((e,t)=>{const a=YC(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,$C.SPRINT_TIMELINE),d=JC(e,$C.SPRINT_SUMMARY);let l=zC.Planned;o?l=zC.Completed:(n||r)&&(l=zC.Active);const c=p?`${p.from} to ${p.to}`:"Not set";t+=`| ${a} | ${i} | ${l} | ${c} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),t+="\n## Status Definitions:\n",t+=`- **${zC.Planned}**: Sprint not yet started (no activation, no start date)\n`,t+=`- **${zC.Active}**: Sprint is active (activated but not completed)\n`,t+=`- **${zC.Completed}**: Sprint is finished\n\n`,t}},class extends Ug{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=Mi.READ,this.annotations=jg({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return nk}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${MC} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:a.content}:{content:a.error||`${MC} Unknown error occurred while reading document content`}}catch(e){return{content:`${MC} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(kC,t)).items||[];if(0===a.length)return{success:!1,error:`${FC} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${FC} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(PC),...t];return XC(a,i)})(i,[$C.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${qC} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=JC(i,$C.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${jC} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${MC} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(iS,t)).docs||[];if(0===a.length)return{success:!1,error:`${jC} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${UC} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(nS,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${BC} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${VC} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${MC} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],lk=[class extends Ug{constructor(){super(...arguments),this.name="delete_item",this.type=Mi.WRITE,this.annotations=jg({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return nA}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(HI,t);return{content:`Item ${a.delete_item?.id} successfully deleted`}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_items_page",this.type=Mi.READ,this.annotations=jg({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available."}getInputSchema(){return TA}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){YN(t),pN(e,"filters",TA.filters),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems};pN(e,"filters",TA.filters),pN(e,"orderBy",TA.orderBy),t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(wA,a),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:gT.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case PN.BoardRelation:return e.linked_items;case PN.Formula:return e.display_value;case PN.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={board_ids:[e.boardId.toString()],searchTerm:e.searchTerm},a=await this.mondayApi.request(EA,t,{versionOverride:"dev",timeout:zN}),i=a.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Ug{constructor(){super(...arguments),this.name="create_item",this.type=Mi.WRITE,this.annotations=jg({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?KN:QN}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(BN,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new lS(this.mondayApi,this.apiToken,{boardId:t}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){WN(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(MN,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${a.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){WN(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(GI,a);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){WN(e,"create item")}}},class extends Ug{constructor(){super(...arguments),this.name="create_update",this.type=Mi.WRITE,this.annotations=jg({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update."}getInputSchema(){return tA}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=eA.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(XN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){WN(e,"create update")}}},class extends Ug{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=Mi.WRITE,this.annotations=jg({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return SC}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=IC.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(XN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){WN(e,"create update")}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_schema",this.type=Mi.READ,this.annotations=jg({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id"}getInputSchema(){if(!this.context?.boardId)return xA}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(zI,a);return{content:`The current schema of the board ${t} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_activity",this.type=Mi.READ,this.annotations=jg({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return uA}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-GN.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},r=await this.mondayApi.request(cA,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${p}`}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_info",this.type=Mi.READ,this.annotations=jg({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return _A}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(mA,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(fA(i,n),null,2)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===PN.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(hA,{boardId:a});return i.boards?.[0]??null}},class extends Ug{constructor(){super(...arguments),this.name="get_full_board_data",this.type=Mi.READ,this.annotations=jg({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return lA}async executeInternal(e){try{const t={boardId:e.boardId.toString(),itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(rA,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));let o=[];if(n.size>0){const e={userIds:Array.from(n)},t=await this.mondayApi.request(sA,e);o=t.users?.filter((e=>null!==e))||[]}const r=new Map(o.map((e=>[e.id,e]))),s={board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:o.length}};return{content:JSON.stringify(s,null,2)}}catch(e){WN(e,"get full board data")}}},class extends Ug{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=Mi.READ,this.annotations=jg({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return JA}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(HA);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:WA(s)}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(qA,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>YA)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>KA)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(MA,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(BA,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:QA};s=await this.mondayApi.request(VA,t)}else if(t){const t={userIds:e.userIds,limit:QA};s=await this.mondayApi.request(jA,t)}else{const e={userIds:void 0,limit:QA};s=await this.mondayApi.request(UA,e)}return{content:WA(s)}}},lS,class extends Ug{constructor(){super(...arguments),this.name="move_item_to_group",this.type=Mi.WRITE,this.annotations=jg({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to a group in a monday.com board"}getInputSchema(){return XA}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(YI,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Ug{constructor(){super(...arguments),this.name="create_board",this.type=Mi.WRITE,this.annotations=jg({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return cS}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(KI,t);return{content:`Board ${a.create_board?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_form",this.type=Mi.WRITE,this.annotations=jg({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return MS}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(_S,t);return{content:`Form created successfully. Board ID: ${a.create_form?.boardId}, Token: ${a.create_form?.token}`}}},class extends Ug{constructor(){super(...arguments),this.name="update_form",this.type=Mi.WRITE,this.annotations=jg({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new CN(this.mondayApi),this.actionHandlers=new Map([[dN.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[dN.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[dN.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[dN.activate,this.helpers.activateForm.bind(this.helpers)],[dN.createTag,this.helpers.createTag.bind(this.helpers)],[dN.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[dN.updateTag,this.helpers.updateTag.bind(this.helpers)],[dN.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[dN.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[dN.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[dN.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[dN.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return'Update a monday.com form. Handles the following form update actions that can only be done one at a time using the correct "action" input: \n - update form\'s feature settings with the action "updateFeatures",\n - update form\'s appearance settings with the action "updateAppearance",\n - update form\'s accessibility settings with the action "updateAccessibility",\n - update form\'s title with the action "updateFormHeader",\n - update form\'s description with the action "updateFormHeader",\n - update form\'s question order with the action "updateQuestionOrder",\n - create a new form tag with the action "createTag",\n - delete a form tag with the action "deleteTag",\n - update a form tag with the action "updateTag",\n - set or update the form\'s password with the action "setFormPassword"\n - shorten form\'s url with the action "shortenFormUrl"\n - deactivate form with the action "deactivateForm"\n - reactivate form with the action "activateForm"'}getInputSchema(){return RN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?(pN(e,"tag",RN.tag),pN(e,"form",RN.form),await t(e)):{content:"Received an invalid action for the update form tool."}}},class extends Ug{constructor(){super(...arguments),this.name="get_form",this.type=Mi.READ,this.annotations=jg({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return kN}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(wS,t);return a.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(a.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Ug{constructor(){super(...arguments),this.name="form_questions_editor",this.type=Mi.WRITE,this.annotations=jg({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new sN(this.mondayApi),this.actionHandlers=new Map([[nN.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[nN.Update,this.helpers.updateQuestion.bind(this.helpers)],[nN.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return rN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?(pN(e,"question",rN.question),await t(e)):{content:`Unknown action: ${e.action}`}}},class extends Ug{constructor(){super(...arguments),this.name="create_column",this.type=Mi.WRITE,this.annotations=jg({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new column in a monday.com board"}getInputSchema(){return this.context?.boardId?$N:LN}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(QI,a);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_group",this.type=Mi.WRITE,this.annotations=jg({title:"Create Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new group in a monday.com board. Groups are sections that organize related items. Use when users want to add structure, categorize items, or create workflow phases. Groups can be positioned relative to existing groups and assigned predefined colors. Items will always be created in the top group and so the top group should be the most relevant one for new item creation"}getInputSchema(){return VN}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(jN,t);return{content:`Group "${a.create_group?.title}" (ID: ${a.create_group?.id}) successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="delete_column",this.type=Mi.WRITE,this.annotations=jg({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?aA:iA}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(JI,t);return{content:`Column ${a.delete_column?.id} successfully deleted`}}},sS,class extends Ug{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=Mi.ALL_API,this.annotations=jg({title:"Get GraphQL Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch the monday.com GraphQL schema structure including query and mutation definitions. This tool returns available query fields, mutation fields, and a list of GraphQL types in the schema. You can filter results by operation type (read/write) to focus on either queries or mutations."}getInputSchema(){return NA}async executeInternal(e){try{const t=await this.mondayApi.request(XI),a=e?.operationType,i=t.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=t.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=t.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return a&&"read"!==a||(s+=`- Query Type: ${t.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),a&&"write"!==a||(s+=`- Mutation Type: ${t.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Ug{constructor(){super(...arguments),this.name="get_column_type_info",this.type=Mi.READ,this.annotations=jg({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return SA}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(IA,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="get_type_details",this.type=Mi.ALL_API,this.annotations=jg({title:"Get Type Details",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get detailed information about a specific GraphQL type from the monday.com API schema"}getInputSchema(){return AA}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,qI`
|
|
1537
|
+
`,lk={};const ck=[class extends Ug{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=Mi.READ,this.annotations=jg({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return lk}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(dk,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${jC} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);if(0===a.length)return{content:this.generateNotFoundMessage(t.length)};return{content:this.generateReport(a)}}catch(e){return{content:`${HC} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}generateMultiplePairsWarning(e){return`## ⚠️ Multiple SprintsBoard Detected\n**${e}** different board pairs found. Each pair is isolated and workspace-specific.\n**AI Agent - REQUIRED:** Before ANY operation, confirm with user which pair and workspace to use.\n---\n`}generatePairDetails(e,t){return`### Pair ${t+1}\n**Sprints Board:**\n- ID: \`${e.sprintsBoard.id}\`\n- Name: ${e.sprintsBoard.name}\n- Workspace: ${e.sprintsBoard.workspaceName} (ID: ${e.sprintsBoard.workspaceId})\n\n**Tasks Board:**\n- ID: \`${e.tasksBoard.id}\`\n- Name: ${e.tasksBoard.name}\n- Workspace: ${e.tasksBoard.workspaceName} (ID: ${e.tasksBoard.workspaceId})\n---\n\n`}generateTechnicalReference(){return"## 📋 Technical Reference\n\n**Sprint Operations** (all require correct board pair):\n• Add to Sprint: Update `task_sprint` column with sprint item ID\n• Remove from Sprint: Clear `task_sprint` column (set to null)\n• Search in Sprint: Filter where `task_sprint` equals sprint item ID\n• Move Between Sprints: Update `task_sprint` with new sprint item ID\n• Backlog Tasks: `task_sprint` is empty/null\n\n**Critical:** `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}generateReport(e){const t=e.length>1?this.generateMultiplePairsWarning(e.length):"",a=e.map(((e,t)=>this.generatePairDetails(e,t))).join(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${t}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${a}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=ok(e,LC.SPRINT_TASKS);if(!i)return;const n=nk(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=ok(e,zC);if(!i)return;const n=nk(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(ak(i)&&this.processSprintsBoard(i,a,t),ik(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Ug{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=Mi.READ,this.annotations=jg({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return pk}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(sk,a),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${HC} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(zI,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${jC} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${GC} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${HC} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(LC),i=ek(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>WC[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let t="# Sprints Metadata Report\n\n";return t+=`**Total Sprints:** ${e.length}\n\n`,t+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",t+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const a=e.name||"Unknown",i=e.id,n=JC(e,FC.SPRINT_ACTIVATION),o=JC(e,FC.SPRINT_COMPLETION),r=XC(e,FC.SPRINT_START_DATE),s=XC(e,FC.SPRINT_END_DATE),p=((e,t)=>{const a=QC(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,FC.SPRINT_TIMELINE),d=ZC(e,FC.SPRINT_SUMMARY);let l=YC.Planned;o?l=YC.Completed:(n||r)&&(l=YC.Active);const c=p?`${p.from} to ${p.to}`:"Not set";t+=`| ${a} | ${i} | ${l} | ${c} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),t+="\n## Status Definitions:\n",t+=`- **${YC.Planned}**: Sprint not yet started (no activation, no start date)\n`,t+=`- **${YC.Active}**: Sprint is active (activated but not completed)\n`,t+=`- **${YC.Completed}**: Sprint is finished\n\n`,t}},class extends Ug{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=Mi.READ,this.annotations=jg({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return rk}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${HC} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:a.content}:{content:a.error||`${HC} Unknown error occurred while reading document content`}}catch(e){return{content:`${HC} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request($C,t)).items||[];if(0===a.length)return{success:!1,error:`${UC} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${UC} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(LC),...t];return ek(a,i)})(i,[FC.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${GC} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=ZC(i,FC.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${VC} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${HC} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(iS,t)).docs||[];if(0===a.length)return{success:!1,error:`${VC} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${BC} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(nS,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${qC} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${MC} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${HC} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],uk=[class extends Ug{constructor(){super(...arguments),this.name="delete_item",this.type=Mi.WRITE,this.annotations=jg({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return nA}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(HI,t);return{content:`Item ${a.delete_item?.id} successfully deleted`}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_items_page",this.type=Mi.READ,this.annotations=jg({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available."}getInputSchema(){return TA}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){YN(t),pN(e,"filters",TA.filters),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems};pN(e,"filters",TA.filters),pN(e,"orderBy",TA.orderBy),t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(wA,a),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:gT.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case PN.BoardRelation:return e.linked_items;case PN.Formula:return e.display_value;case PN.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={board_ids:[e.boardId.toString()],searchTerm:e.searchTerm},a=await this.mondayApi.request(EA,t,{versionOverride:"dev",timeout:zN}),i=a.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Ug{constructor(){super(...arguments),this.name="create_item",this.type=Mi.WRITE,this.annotations=jg({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?KN:QN}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(BN,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new lS(this.mondayApi,this.apiToken,{boardId:t}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){WN(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(MN,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${a.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){WN(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(GI,a);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){WN(e,"create item")}}},class extends Ug{constructor(){super(...arguments),this.name="create_update",this.type=Mi.WRITE,this.annotations=jg({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update."}getInputSchema(){return tA}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=eA.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(XN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){WN(e,"create update")}}},class extends Ug{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=Mi.WRITE,this.annotations=jg({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return AC}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=NC.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(XN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){WN(e,"create update")}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_schema",this.type=Mi.READ,this.annotations=jg({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id"}getInputSchema(){if(!this.context?.boardId)return xA}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(zI,a);return{content:`The current schema of the board ${t} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_activity",this.type=Mi.READ,this.annotations=jg({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return uA}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-GN.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},r=await this.mondayApi.request(cA,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${p}`}}},class extends Ug{constructor(){super(...arguments),this.name="get_board_info",this.type=Mi.READ,this.annotations=jg({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return _A}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(mA,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(fA(i,n),null,2)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===PN.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(hA,{boardId:a});return i.boards?.[0]??null}},class extends Ug{constructor(){super(...arguments),this.name="get_full_board_data",this.type=Mi.READ,this.annotations=jg({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return lA}async executeInternal(e){try{const t={boardId:e.boardId.toString(),itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(rA,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));let o=[];if(n.size>0){const e={userIds:Array.from(n)},t=await this.mondayApi.request(sA,e);o=t.users?.filter((e=>null!==e))||[]}const r=new Map(o.map((e=>[e.id,e]))),s={board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:o.length}};return{content:JSON.stringify(s,null,2)}}catch(e){WN(e,"get full board data")}}},class extends Ug{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=Mi.READ,this.annotations=jg({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return JA}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(HA);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:WA(s)}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(qA,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>YA)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>KA)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(MA,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(BA,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:QA};s=await this.mondayApi.request(VA,t)}else if(t){const t={userIds:e.userIds,limit:QA};s=await this.mondayApi.request(jA,t)}else{const e={userIds:void 0,limit:QA};s=await this.mondayApi.request(UA,e)}return{content:WA(s)}}},lS,class extends Ug{constructor(){super(...arguments),this.name="move_item_to_group",this.type=Mi.WRITE,this.annotations=jg({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to a group in a monday.com board"}getInputSchema(){return XA}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(YI,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Ug{constructor(){super(...arguments),this.name="create_board",this.type=Mi.WRITE,this.annotations=jg({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return cS}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(KI,t);return{content:`Board ${a.create_board?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_form",this.type=Mi.WRITE,this.annotations=jg({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return MS}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(_S,t);return{content:`Form created successfully. Board ID: ${a.create_form?.boardId}, Token: ${a.create_form?.token}`}}},class extends Ug{constructor(){super(...arguments),this.name="update_form",this.type=Mi.WRITE,this.annotations=jg({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new CN(this.mondayApi),this.actionHandlers=new Map([[dN.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[dN.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[dN.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[dN.activate,this.helpers.activateForm.bind(this.helpers)],[dN.createTag,this.helpers.createTag.bind(this.helpers)],[dN.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[dN.updateTag,this.helpers.updateTag.bind(this.helpers)],[dN.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[dN.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[dN.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[dN.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[dN.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return'Update a monday.com form. Handles the following form update actions that can only be done one at a time using the correct "action" input: \n - update form\'s feature settings with the action "updateFeatures",\n - update form\'s appearance settings with the action "updateAppearance",\n - update form\'s accessibility settings with the action "updateAccessibility",\n - update form\'s title with the action "updateFormHeader",\n - update form\'s description with the action "updateFormHeader",\n - update form\'s question order with the action "updateQuestionOrder",\n - create a new form tag with the action "createTag",\n - delete a form tag with the action "deleteTag",\n - update a form tag with the action "updateTag",\n - set or update the form\'s password with the action "setFormPassword"\n - shorten form\'s url with the action "shortenFormUrl"\n - deactivate form with the action "deactivateForm"\n - reactivate form with the action "activateForm"'}getInputSchema(){return RN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?(pN(e,"tag",RN.tag),pN(e,"form",RN.form),await t(e)):{content:"Received an invalid action for the update form tool."}}},class extends Ug{constructor(){super(...arguments),this.name="get_form",this.type=Mi.READ,this.annotations=jg({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return kN}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(wS,t);return a.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(a.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Ug{constructor(){super(...arguments),this.name="form_questions_editor",this.type=Mi.WRITE,this.annotations=jg({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new sN(this.mondayApi),this.actionHandlers=new Map([[nN.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[nN.Update,this.helpers.updateQuestion.bind(this.helpers)],[nN.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return rN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?(pN(e,"question",rN.question),await t(e)):{content:`Unknown action: ${e.action}`}}},class extends Ug{constructor(){super(...arguments),this.name="create_column",this.type=Mi.WRITE,this.annotations=jg({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new column in a monday.com board"}getInputSchema(){return this.context?.boardId?$N:LN}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(QI,a);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_group",this.type=Mi.WRITE,this.annotations=jg({title:"Create Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new group in a monday.com board. Groups are sections that organize related items. Use when users want to add structure, categorize items, or create workflow phases. Groups can be positioned relative to existing groups and assigned predefined colors. Items will always be created in the top group and so the top group should be the most relevant one for new item creation"}getInputSchema(){return VN}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(jN,t);return{content:`Group "${a.create_group?.title}" (ID: ${a.create_group?.id}) successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="delete_column",this.type=Mi.WRITE,this.annotations=jg({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?aA:iA}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(JI,t);return{content:`Column ${a.delete_column?.id} successfully deleted`}}},sS,class extends Ug{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=Mi.ALL_API,this.annotations=jg({title:"Get GraphQL Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch the monday.com GraphQL schema structure including query and mutation definitions. This tool returns available query fields, mutation fields, and a list of GraphQL types in the schema. You can filter results by operation type (read/write) to focus on either queries or mutations."}getInputSchema(){return NA}async executeInternal(e){try{const t=await this.mondayApi.request(XI),a=e?.operationType,i=t.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=t.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=t.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return a&&"read"!==a||(s+=`- Query Type: ${t.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),a&&"write"!==a||(s+=`- Mutation Type: ${t.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Ug{constructor(){super(...arguments),this.name="get_column_type_info",this.type=Mi.READ,this.annotations=jg({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return SA}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(IA,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="get_type_details",this.type=Mi.ALL_API,this.annotations=jg({title:"Get Type Details",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get detailed information about a specific GraphQL type from the monday.com API schema"}getInputSchema(){return AA}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,qI`
|
|
1538
1538
|
query getTypeDetails {
|
|
1539
1539
|
__type(name: "${t}") {
|
|
1540
1540
|
name
|
|
@@ -1622,5 +1622,5 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
`),i=await this.mondayApi.request(a);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const t=DA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const t=DA(e.type);n+=` - ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const t=DA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends Ug{constructor(){super(...arguments),this.name="create_custom_activity",this.type=Mi.WRITE,this.annotations=jg({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return FN}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(eS,t),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_timeline_item",this.type=Mi.WRITE,this.annotations=jg({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return JN}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(tS,t);return{content:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Ug{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=Mi.READ,this.annotations=jg({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return oA}async executeInternal(e){const t=await this.mondayApi.request(aS);if(!t.custom_activity||0===t.custom_activity.length)return{content:"No custom activities found"};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${a.length} custom activities: ${JSON.stringify(a,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="read_docs",this.type=Mi.READ,this.annotations=jg({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get a collection of monday.com documents with their content as markdown. \n\nPAGINATION: \n- Default limit is 25 documents per page\n- Use 'page' parameter to get additional pages (starts at 1)\n- Check response for 'has_more_pages' to know if you should continue paginating\n- If user asks for \"all documents\" and you get exactly 25 results, continue with page 2, 3, etc.\n\nFILTERING: Provide a type value and array of ids:\n- type: 'ids' for specific document IDs\n- type: 'object_ids' for specific document object IDs \n- type: 'workspace_ids' for all docs in specific workspaces\n- ids: array of ID strings (at least 1 required)\n\nExamples:\n- { type: 'ids', ids: ['123', '456'] }\n- { type: 'object_ids', ids: ['123'] }\n- { type: 'workspace_ids', ids: ['ws_101'] }\n\nUSAGE PATTERNS:\n- For specific documents: use type 'ids' or 'object_ids' (A monday doc has two unique identifiers)\n- For workspace exploration: use type 'workspace_ids' with pagination\n- For large searches: start with page 1, then paginate if has_more_pages=true"}getInputSchema(){return ZA}async executeInternal(e){try{let t,a,i;switch(e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(iS,n);if((!o.docs||0===o.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request(iS,a)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,t,a){return e===t?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${t} documents, which suggests there may be more. Consider calling this tool again with page: ${a+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,t){const a=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t="";try{const a={docId:e.id},i=await this.mondayApi.request(nS,a);t=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){t=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:t}}))),i=t.page||1,n=t.limit||25,o=a.length,r=o===n;return{content:`Successfully retrieved ${a.length} document${1===a.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(a,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="workspace_info",this.type=Mi.READ,this.annotations=jg({title:"Get Workspace Information",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool returns the boards, docs and folders in a workspace and which folder they are in. It returns up to 100 of each object type, if you receive 100 assume there are additional objects of that type in the workspace."}getInputSchema(){return eD}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(oS,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:t,boards:a,docs:i,folders:n}=e,o=t?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(a||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(r.values()),root_items:{boards:s,docs:p}}}(a);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,t)=>e+t.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,t)=>e+t.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="list_workspaces",this.type=Mi.READ,this.annotations=jg({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return nD}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=iD(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n={limit:t,page:a},o=await this.mondayApi.request(tD,n),r=o.workspaces?.filter((e=>e));if(!r||0===r.length)return{content:"No workspaces found."};const s=i&&r.length<=aD,p=this.filterWorkspacesIfNeeded(i,r,e);if(0===p.length)return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const d=p.length===e.limit,l=p.map((e=>{const t=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${t}`})).join("\n");return{content:`\n${s?"IMPORTANT: Search term was not applied. Returning all workspaces. Please perform the filtering manually.":""}\n${l}\n${d?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}filterWorkspacesIfNeeded(e,t,a){if(!e||t.length<=aD)return t;const i=(a.page-1)*a.limit,n=i+a.limit;return t.filter((t=>iD(t.name).includes(e))).slice(i,n)}},class extends Ug{constructor(){super(...arguments),this.name="create_doc",this.type=Mi.WRITE,this.annotations=jg({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return cD}async executeInternal(e){const t=lD.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i;if(a.type===dD.enum.workspace){const n={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||fE.Public,folder_id:a.folder_id?.toString()}}},o=await this.mondayApi.request(rD,n);t=o?.create_doc?.id??void 0,i=o?.create_doc?.url??void 0}else if(a.type===dD.enum.item){const n={itemId:a.item_id.toString()},o=await this.mondayApi.request(oD,n),r=o.items?.[0];if(!r)return{content:`Error: Item with id ${a.item_id} not found.`};const s=r.board?.id,p=r.board?.columns?.find((e=>e&&e.type===PN.Doc));let d=a.column_id;if(!d)if(p)d=p.id;else{const e={boardId:s.toString(),columnType:PN.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(QI,e);if(d=t?.create_column?.id,!d)return{content:"Error: Failed to create doc column."}}const l={location:{board:{item_id:a.item_id.toString(),column_id:d}}},c=await this.mondayApi.request(rD,l);if(t=c.create_doc?.id??void 0,i=c.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(pD,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const n={docId:t,markdown:e.markdown},o=await this.mondayApi.request(sD,n),r=o?.add_content_to_doc_from_markdown?.success,s=o?.add_content_to_doc_from_markdown?.error;return r?{content:`✅ Document successfully created (id: ${t}). ${i?`\n\nURL: ${i}`:""}`}:{content:`Document ${t} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Ug{constructor(){super(...arguments),this.name="update_workspace",this.type=Mi.WRITE,this.annotations=jg({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return yD}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(gD,t);return{content:`Workspace ${a.update_workspace?.id} successfully updated`}}},class extends Ug{constructor(){super(...arguments),this.name="update_folder",this.type=Mi.WRITE,this.annotations=jg({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return _D}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(bD,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Ug{constructor(){super(...arguments),this.name="create_workspace",this.type=Mi.WRITE,this.annotations=jg({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return ED}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(wD,t);return{content:`Workspace ${a.create_workspace?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_folder",this.type=Mi.WRITE,this.annotations=jg({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return xD}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(TD,t);return{content:`Folder ${a.create_folder?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="move_object",this.type=Mi.WRITE,this.annotations=jg({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use `position` for relative placement based on another object, `parentFolderId` for folder changes, `workspaceId` for workspace moves, and `accountProductId` for account product changes."}getInputSchema(){return ND}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(bD,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(ID,p);return d.update_board_hierarchy?.success?{content:`Board ${d.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${d.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(SD,p);return d.update_overview_hierarchy?.success?{content:`Overview ${d.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${d.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case AT.Folder:return this.executeUpdateFolder(e);case AT.Board:return this.executeUpdateBoardHierarchy(e);case AT.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Ug{constructor(){super(...arguments),this.name="create_dashboard",this.type=Mi.WRITE,this.annotations=jg({title:"Create Dashboard",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Use this tool to create a new monday.com dashboard that aggregates data from one or more boards. \n Dashboards provide visual representations of board data through widgets and charts.\n \n Use this tool when users want to:\n - Create a dashboard to visualize board data\n - Aggregate information from multiple boards\n - Set up a data visualization container for widgets"}getInputSchema(){return fD}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(uD,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===PE.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Ug{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=Mi.READ,this.annotations=jg({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(mD,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(a,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Ug{constructor(){super(...arguments),this.name="create_widget",this.type=Mi.WRITE,this.annotations=jg({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return vD}async executeInternal(e){if(pN(e,"settings",vD.settings),!e.settings)throw new Error("You must pass either settings or settingsStringified parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(hD,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget,n=i.parent?.kind===gx.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Ug{constructor(){super(...arguments),this.name="board_insights",this.type=Mi.READ,this.annotations=jg({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return kD}async executeInternal(e){if(!e.aggregations&&!e.aggregationsStringified)return{content:'Input must contain either the "aggregations" field or the "aggregationsStringified" field.'};pN(e,"aggregations",kD.aggregations),pN(e,"filters",kD.filters),pN(e,"orderBy",kD.orderBy);const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===Xw.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Xw.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return RD.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Jw.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Xw.CountItems?[]:[{type:Jw.Column,column:CD(n),as:n}]}),as:s}}var i,n;const o={type:Jw.Column,column:CD(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:Jw.Column,column:CD(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:Hw.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit}},r=await this.mondayApi.request(AD,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Ug{constructor(){super(...arguments),this.name="search",this.type=Mi.READ,this.annotations=jg({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor users and teams, use list_users_and_teams tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return TC}async executeInternal(e){if(e.searchType!==wC.FOLDERS&&e.searchTerm)try{const t={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(t,null,2)}}catch(e){YN(e)}const t={[wC.BOARD]:this.searchBoardsAsync.bind(this),[wC.DOCUMENTS]:this.searchDocsAsync.bind(this),[wC.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e),i={disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:a.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const t={[wC.BOARD]:FR.Board,[wC.DOCUMENTS]:FR.Document,[wC.FOLDERS]:void 0}[e.searchType];if(!t)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const a={query:e.searchTerm,size:e.limit,entityTypes:[t],workspaceIds:e.workspaceIds?.map((e=>e.toString()))},i=(await this.mondayApi.request(FD,a,{versionOverride:"dev",timeout:zN})).search||[],n=[];for(const e of i)"CrossEntityBoardResult"===e.__typename?n.push({id:_C.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"CrossEntityDocResult"===e.__typename&&n.push({id:_C.DOCUMENT+e.data.id,title:e.data.name});return{items:n,wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(LD,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:_C.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request($D,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:_C.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(PD,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:_C.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?1e4:e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=EC)return{items:t,wasFiltered:!1};const i=iD(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>iD(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends Ug{constructor(){super(...arguments),this.name="get_user_context",this.type=Mi.READ,this.annotations=jg({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(NC,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(t||[]),relevantBoards:this.extractRelevantBoards(a)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[DC[e]]=t[e];const n=await this.mondayApi.request(AC,i),o=[];for(const e of a){const t=OC[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}}];var ck;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(ck||(ck={}));const uk=(e,t)=>{let a=[];t?.mode===ck.APPS?a=[...Fg]:t?.mode!==ck.API&&t?.mode||(a=[...lk,...dk]);const i=a.map((t=>((e,t)=>e.prototype instanceof Ug?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof fg?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==Mi.ALL_API;if(t.mode===ck.API&&"only"===t.enableDynamicApiTools)return e.type===Mi.ALL_API;let a=!1;return t.mode===ck.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===Mi.ALL_API),t.readOnlyMode&&(a=a||e.type!==Mi.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))};class mk{constructor(){this.dynamicTools=new Map}registerTool(e,t){const a=e.enabledByDefault??!0,i=a;this.dynamicTools.set(e.name,{instance:e,mcpTool:t,enabled:i,enabledByDefault:a}),a||t.disable()}enableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled||(t.mcpTool.enable(),t.enabled=!0),!0)}disableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled&&(t.mcpTool.disable(),t.enabled=!1),!0)}isToolEnabled(e){const t=this.dynamicTools.get(e);return!!t&&t.enabled}isToolEnabledByDefault(e){const t=this.dynamicTools.get(e);return!t||t.enabledByDefault}getToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]=t.enabled})),e}getDynamicToolNames(){return Array.from(this.dynamicTools.keys())}getDetailedToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]={enabled:t.enabled,enabledByDefault:t.enabledByDefault}})),e}resetToolToDefault(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabledByDefault&&!t.enabled?(t.mcpTool.enable(),t.enabled=!0,!0):!(!t.enabledByDefault&&t.enabled)||(t.mcpTool.disable(),t.enabled=!1,!0))}getAllDynamicTools(){return this.dynamicTools}clear(){this.dynamicTools.clear()}}class hk extends Li{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new mk,this.toolInstances=[],this.managementTool=null,this.mondayApiClient=this.createApiClient(e),this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??mg},this.registerTools(e)}createApiClient(e){return new i({token:e.mondayApiToken,apiVersion:e.mondayApiVersion??mg,endpoint:e.mondayApiEndpoint,requestConfig:{...e.mondayApiRequestConfig,headers:{...e.mondayApiRequestConfig?.headers||{},"user-agent":"monday-api-mcp"}}})}registerTools(e){try{this.toolInstances=this.initializeTools(e),this.toolInstances.forEach((e=>this.registerSingleTool(e))),!0===e.toolsConfiguration?.enableToolManager&&this.registerManagementTool()}catch(e){throw new Error(`Failed to initialize Monday Agent Toolkit: ${e instanceof Error?e.message:String(e)}`)}}registerManagementTool(){const e=new CC;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return uk(t,e.toolsConfiguration)}registerSingleTool(t){const a=t.getInputSchema(),i=this.registerTool(t.name,{...t,title:t.annotations?.title,description:t.getDescription(),inputSchema:a,annotations:t.annotations},(async(i,n)=>{try{let n;if(a){const o=e.object(a).safeParse(i);if(!o.success)throw new Error(`Invalid arguments: ${o.error.message}`);n=await t.execute(o.data)}else n=await t.execute();return this.formatToolResult(n.content)}catch(e){return this.handleToolError(e,t.name)}}));this.dynamicToolManager.registerTool(t,i)}enableTool(e){return this.dynamicToolManager.enableTool(e)}disableTool(e){return this.dynamicToolManager.disableTool(e)}isToolEnabled(e){return this.dynamicToolManager.isToolEnabled(e)}getToolsStatus(){return this.dynamicToolManager.getToolsStatus()}getDynamicToolNames(){return this.dynamicToolManager.getDynamicToolNames()}getServer(){return this}getTools(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createToolHandler(t)})))}getToolsForMcp(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createMcpToolHandler(t)})))}createToolHandler(t){return async a=>{const i=t.getInputSchema();if(i){const n=e.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);return(await t.execute(n.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const i=t.getInputSchema();if(i){const n=e.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data);return{content:[{type:"text",text:String(o.content)}]}}{const e=await t.execute();return{content:[{type:"text",text:String(e.content)}]}}}catch(e){return{content:[{type:"text",text:`Error: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}}getSchemaForTool(t,i){const n=t.getInputSchema();if(n)return"json"===i?.schemaFormat?a(e.object(n)):n}formatToolResult(e){return{content:[{type:"text",text:e}]}}handleToolError(e,t){return{content:[{type:"text",text:`Failed to execute tool ${t}: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}export{mk as DynamicToolManager,hk as MondayAgentToolkit};
|
|
1625
|
+
`),i=await this.mondayApi.request(a);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const t=DA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const t=DA(e.type);n+=` - ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const t=DA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends Ug{constructor(){super(...arguments),this.name="create_custom_activity",this.type=Mi.WRITE,this.annotations=jg({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return FN}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(eS,t),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_timeline_item",this.type=Mi.WRITE,this.annotations=jg({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return JN}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(tS,t);return{content:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Ug{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=Mi.READ,this.annotations=jg({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return oA}async executeInternal(e){const t=await this.mondayApi.request(aS);if(!t.custom_activity||0===t.custom_activity.length)return{content:"No custom activities found"};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${a.length} custom activities: ${JSON.stringify(a,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="read_docs",this.type=Mi.READ,this.annotations=jg({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get a collection of monday.com documents with their content as markdown. \n\nPAGINATION: \n- Default limit is 25 documents per page\n- Use 'page' parameter to get additional pages (starts at 1)\n- Check response for 'has_more_pages' to know if you should continue paginating\n- If user asks for \"all documents\" and you get exactly 25 results, continue with page 2, 3, etc.\n\nFILTERING: Provide a type value and array of ids:\n- type: 'ids' for specific document IDs\n- type: 'object_ids' for specific document object IDs \n- type: 'workspace_ids' for all docs in specific workspaces\n- ids: array of ID strings (at least 1 required)\n\nExamples:\n- { type: 'ids', ids: ['123', '456'] }\n- { type: 'object_ids', ids: ['123'] }\n- { type: 'workspace_ids', ids: ['ws_101'] }\n\nUSAGE PATTERNS:\n- For specific documents: use type 'ids' or 'object_ids' (A monday doc has two unique identifiers)\n- For workspace exploration: use type 'workspace_ids' with pagination\n- For large searches: start with page 1, then paginate if has_more_pages=true"}getInputSchema(){return ZA}async executeInternal(e){try{let t,a,i;switch(e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(iS,n);if((!o.docs||0===o.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request(iS,a)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,t,a){return e===t?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${t} documents, which suggests there may be more. Consider calling this tool again with page: ${a+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,t){const a=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t="";try{const a={docId:e.id},i=await this.mondayApi.request(nS,a);t=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){t=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:t}}))),i=t.page||1,n=t.limit||25,o=a.length,r=o===n;return{content:`Successfully retrieved ${a.length} document${1===a.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(a,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="workspace_info",this.type=Mi.READ,this.annotations=jg({title:"Get Workspace Information",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool returns the boards, docs and folders in a workspace and which folder they are in. It returns up to 100 of each object type, if you receive 100 assume there are additional objects of that type in the workspace."}getInputSchema(){return eD}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(oS,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:t,boards:a,docs:i,folders:n}=e,o=t?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(a||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(r.values()),root_items:{boards:s,docs:p}}}(a);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,t)=>e+t.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,t)=>e+t.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Ug{constructor(){super(...arguments),this.name="list_workspaces",this.type=Mi.READ,this.annotations=jg({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return rD}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=iD(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=nD(await this.mondayApi.request(tD,n(Ex.Member))),r=!oD(o)||i&&!function(e,t){return t.some((t=>iD(t.name).includes(e)))}(i,o);let s=o;if(r){s=nD(await this.mondayApi.request(tD,n(Ex.All)))}if(!oD(s))return{content:"No workspaces found."};const p=i&&s?.length<=aD,d=function(e,t,a,i){if(!e||t.length<=aD)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>iD(t.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!oD(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const l=d.length===e.limit,c=function(e){return e.map((e=>{const t=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${t}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${c}\n${l?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends Ug{constructor(){super(...arguments),this.name="create_doc",this.type=Mi.WRITE,this.annotations=jg({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return mD}async executeInternal(e){const t=uD.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i;if(a.type===cD.enum.workspace){const n={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||fE.Public,folder_id:a.folder_id?.toString()}}},o=await this.mondayApi.request(pD,n);t=o?.create_doc?.id??void 0,i=o?.create_doc?.url??void 0}else if(a.type===cD.enum.item){const n={itemId:a.item_id.toString()},o=await this.mondayApi.request(sD,n),r=o.items?.[0];if(!r)return{content:`Error: Item with id ${a.item_id} not found.`};const s=r.board?.id,p=r.board?.columns?.find((e=>e&&e.type===PN.Doc));let d=a.column_id;if(!d)if(p)d=p.id;else{const e={boardId:s.toString(),columnType:PN.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(QI,e);if(d=t?.create_column?.id,!d)return{content:"Error: Failed to create doc column."}}const l={location:{board:{item_id:a.item_id.toString(),column_id:d}}},c=await this.mondayApi.request(pD,l);if(t=c.create_doc?.id??void 0,i=c.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(lD,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const n={docId:t,markdown:e.markdown},o=await this.mondayApi.request(dD,n),r=o?.add_content_to_doc_from_markdown?.success,s=o?.add_content_to_doc_from_markdown?.error;return r?{content:`✅ Document successfully created (id: ${t}). ${i?`\n\nURL: ${i}`:""}`}:{content:`Document ${t} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Ug{constructor(){super(...arguments),this.name="update_workspace",this.type=Mi.WRITE,this.annotations=jg({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return _D}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(bD,t);return{content:`Workspace ${a.update_workspace?.id} successfully updated`}}},class extends Ug{constructor(){super(...arguments),this.name="update_folder",this.type=Mi.WRITE,this.annotations=jg({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return ED}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(wD,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Ug{constructor(){super(...arguments),this.name="create_workspace",this.type=Mi.WRITE,this.annotations=jg({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return xD}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(TD,t);return{content:`Workspace ${a.create_workspace?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="create_folder",this.type=Mi.WRITE,this.annotations=jg({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return SD}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(ID,t);return{content:`Folder ${a.create_folder?.id} successfully created`}}},class extends Ug{constructor(){super(...arguments),this.name="move_object",this.type=Mi.WRITE,this.annotations=jg({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use `position` for relative placement based on another object, `parentFolderId` for folder changes, `workspaceId` for workspace moves, and `accountProductId` for account product changes."}getInputSchema(){return DD}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(wD,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(ND,p);return d.update_board_hierarchy?.success?{content:`Board ${d.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${d.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(AD,p);return d.update_overview_hierarchy?.success?{content:`Overview ${d.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${d.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case AT.Folder:return this.executeUpdateFolder(e);case AT.Board:return this.executeUpdateBoardHierarchy(e);case AT.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Ug{constructor(){super(...arguments),this.name="create_dashboard",this.type=Mi.WRITE,this.annotations=jg({title:"Create Dashboard",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Use this tool to create a new monday.com dashboard that aggregates data from one or more boards. \n Dashboards provide visual representations of board data through widgets and charts.\n \n Use this tool when users want to:\n - Create a dashboard to visualize board data\n - Aggregate information from multiple boards\n - Set up a data visualization container for widgets"}getInputSchema(){return gD}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(hD,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===PE.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Ug{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=Mi.READ,this.annotations=jg({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(fD,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(a,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Ug{constructor(){super(...arguments),this.name="create_widget",this.type=Mi.WRITE,this.annotations=jg({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return yD}async executeInternal(e){if(pN(e,"settings",yD.settings),!e.settings)throw new Error("You must pass either settings or settingsStringified parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(vD,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget,n=i.parent?.kind===gx.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Ug{constructor(){super(...arguments),this.name="board_insights",this.type=Mi.READ,this.annotations=jg({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return $D}async executeInternal(e){if(!e.aggregations&&!e.aggregationsStringified)return{content:'Input must contain either the "aggregations" field or the "aggregationsStringified" field.'};pN(e,"aggregations",$D.aggregations),pN(e,"filters",$D.filters),pN(e,"orderBy",$D.orderBy);const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===Xw.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Xw.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return kD.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Jw.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Xw.CountItems?[]:[{type:Jw.Column,column:PD(n),as:n}]}),as:s}}var i,n;const o={type:Jw.Column,column:PD(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:Jw.Column,column:PD(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:Hw.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit}},r=await this.mondayApi.request(OD,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Ug{constructor(){super(...arguments),this.name="search",this.type=Mi.READ,this.annotations=jg({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor users and teams, use list_users_and_teams tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return IC}async executeInternal(e){if(e.searchType!==TC.FOLDERS&&e.searchTerm)try{const t={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(t,null,2)}}catch(e){YN(e)}const t={[TC.BOARD]:this.searchBoardsAsync.bind(this),[TC.DOCUMENTS]:this.searchDocsAsync.bind(this),[TC.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e),i={disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:a.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const t={[TC.BOARD]:UR.Board,[TC.DOCUMENTS]:UR.Document,[TC.FOLDERS]:void 0}[e.searchType];if(!t)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const a={query:e.searchTerm,size:e.limit,entityTypes:[t],workspaceIds:e.workspaceIds?.map((e=>e.toString()))},i=(await this.mondayApi.request(UD,a,{versionOverride:"dev",timeout:zN})).search||[],n=[];for(const e of i)"CrossEntityBoardResult"===e.__typename?n.push({id:EC.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"CrossEntityDocResult"===e.__typename&&n.push({id:EC.DOCUMENT+e.data.id,title:e.data.name});return{items:n,wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(jD,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:EC.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(FD,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:EC.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(LD,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:EC.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?1e4:e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=xC)return{items:t,wasFiltered:!1};const i=iD(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>iD(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends Ug{constructor(){super(...arguments),this.name="get_user_context",this.type=Mi.READ,this.annotations=jg({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(DC,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(t||[]),relevantBoards:this.extractRelevantBoards(a)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[RC[e]]=t[e];const n=await this.mondayApi.request(OC,i),o=[];for(const e of a){const t=CC[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}}];var mk;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(mk||(mk={}));const hk=(e,t)=>{let a=[];t?.mode===mk.APPS?a=[...Fg]:t?.mode!==mk.API&&t?.mode||(a=[...uk,...ck]);const i=a.map((t=>((e,t)=>e.prototype instanceof Ug?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof fg?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==Mi.ALL_API;if(t.mode===mk.API&&"only"===t.enableDynamicApiTools)return e.type===Mi.ALL_API;let a=!1;return t.mode===mk.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===Mi.ALL_API),t.readOnlyMode&&(a=a||e.type!==Mi.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))};class fk{constructor(){this.dynamicTools=new Map}registerTool(e,t){const a=e.enabledByDefault??!0,i=a;this.dynamicTools.set(e.name,{instance:e,mcpTool:t,enabled:i,enabledByDefault:a}),a||t.disable()}enableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled||(t.mcpTool.enable(),t.enabled=!0),!0)}disableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled&&(t.mcpTool.disable(),t.enabled=!1),!0)}isToolEnabled(e){const t=this.dynamicTools.get(e);return!!t&&t.enabled}isToolEnabledByDefault(e){const t=this.dynamicTools.get(e);return!t||t.enabledByDefault}getToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]=t.enabled})),e}getDynamicToolNames(){return Array.from(this.dynamicTools.keys())}getDetailedToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]={enabled:t.enabled,enabledByDefault:t.enabledByDefault}})),e}resetToolToDefault(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabledByDefault&&!t.enabled?(t.mcpTool.enable(),t.enabled=!0,!0):!(!t.enabledByDefault&&t.enabled)||(t.mcpTool.disable(),t.enabled=!1,!0))}getAllDynamicTools(){return this.dynamicTools}clear(){this.dynamicTools.clear()}}class vk extends Li{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new fk,this.toolInstances=[],this.managementTool=null,this.mondayApiClient=this.createApiClient(e),this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??mg},this.registerTools(e)}createApiClient(e){return new i({token:e.mondayApiToken,apiVersion:e.mondayApiVersion??mg,endpoint:e.mondayApiEndpoint,requestConfig:{...e.mondayApiRequestConfig,headers:{...e.mondayApiRequestConfig?.headers||{},"user-agent":"monday-api-mcp"}}})}registerTools(e){try{this.toolInstances=this.initializeTools(e),this.toolInstances.forEach((e=>this.registerSingleTool(e))),!0===e.toolsConfiguration?.enableToolManager&&this.registerManagementTool()}catch(e){throw new Error(`Failed to initialize Monday Agent Toolkit: ${e instanceof Error?e.message:String(e)}`)}}registerManagementTool(){const e=new PC;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return hk(t,e.toolsConfiguration)}registerSingleTool(t){const a=t.getInputSchema(),i=this.registerTool(t.name,{...t,title:t.annotations?.title,description:t.getDescription(),inputSchema:a,annotations:t.annotations},(async(i,n)=>{try{let n;if(a){const o=e.object(a).safeParse(i);if(!o.success)throw new Error(`Invalid arguments: ${o.error.message}`);n=await t.execute(o.data)}else n=await t.execute();return this.formatToolResult(n.content)}catch(e){return this.handleToolError(e,t.name)}}));this.dynamicToolManager.registerTool(t,i)}enableTool(e){return this.dynamicToolManager.enableTool(e)}disableTool(e){return this.dynamicToolManager.disableTool(e)}isToolEnabled(e){return this.dynamicToolManager.isToolEnabled(e)}getToolsStatus(){return this.dynamicToolManager.getToolsStatus()}getDynamicToolNames(){return this.dynamicToolManager.getDynamicToolNames()}getServer(){return this}getTools(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createToolHandler(t)})))}getToolsForMcp(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createMcpToolHandler(t)})))}createToolHandler(t){return async a=>{const i=t.getInputSchema();if(i){const n=e.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);return(await t.execute(n.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const i=t.getInputSchema();if(i){const n=e.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data);return{content:[{type:"text",text:String(o.content)}]}}{const e=await t.execute();return{content:[{type:"text",text:String(e.content)}]}}}catch(e){return{content:[{type:"text",text:`Error: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}}getSchemaForTool(t,i){const n=t.getInputSchema();if(n)return"json"===i?.schemaFormat?a(e.object(n)):n}formatToolResult(e){return{content:[{type:"text",text:e}]}}handleToolError(e,t){return{content:[{type:"text",text:`Failed to execute tool ${t}: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}export{fk as DynamicToolManager,vk as MondayAgentToolkit};
|
|
1626
1626
|
//# sourceMappingURL=index.js.map
|