@mondaydotcomorg/agent-toolkit 5.44.0 → 5.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1109,6 +1109,12 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1109
1109
  }
1110
1110
  }
1111
1111
  `,s_=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(Nl).describe("The type of mention: User, Team, Board, or Project")}),d_=e.array(s_),p_={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. use html tags to format the text, dont use markdown."),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'),parentId:e.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update")};const l_=zm`
1112
+ mutation DeleteUpdate($id: ID!) {
1113
+ delete_update(id: $id) {
1114
+ id
1115
+ }
1116
+ }
1117
+ `,c_={id:e.number().describe("The unique identifier of the update to delete")};const m_=zm`
1112
1118
  query GetItemUpdates($itemId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
1113
1119
  items(ids: [$itemId]) {
1114
1120
  id
@@ -1144,7 +1150,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1144
1150
  }
1145
1151
  }
1146
1152
  }
1147
- `,c_=zm`
1153
+ `,u_=zm`
1148
1154
  query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!, $fromDate: ISO8601DateTime, $toDate: ISO8601DateTime, $boardUpdatesOnly: Boolean) {
1149
1155
  boards(ids: [$boardId]) {
1150
1156
  id
@@ -1180,7 +1186,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1180
1186
  }
1181
1187
  }
1182
1188
  }
1183
- `;var m_;!function(e){e.Item="Item",e.Board="Board"}(m_||(m_={}));const u_={objectId:e.string().describe("The ID of the item or board to get updates from"),objectType:e.enum([m_.Item,m_.Board]).describe("Type of object for which objectId was provided"),limit:e.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:e.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:e.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:e.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:e.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:e.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:e.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function h_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const f_={columnId:e.string().describe("The id of the column to be deleted")},__={boardId:e.number().describe("The id of the board to which the new column will be added"),...f_};const g_={itemId:e.number()};const v_={};const y_=zm`
1189
+ `;var h_;!function(e){e.Item="Item",e.Board="Board"}(h_||(h_={}));const f_={objectId:e.string().describe("The ID of the item or board to get updates from"),objectType:e.enum([h_.Item,h_.Board]).describe("Type of object for which objectId was provided"),limit:e.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:e.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:e.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:e.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:e.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:e.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:e.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function __(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const g_={columnId:e.string().describe("The id of the column to be deleted")},v_={boardId:e.number().describe("The id of the board to which the new column will be added"),...g_};const y_={itemId:e.number()};const b_={};const w_=zm`
1184
1190
  query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
1185
1191
  boards(ids: [$boardId]) {
1186
1192
  id
@@ -1223,7 +1229,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1223
1229
  }
1224
1230
  }
1225
1231
  }
1226
- `,b_=zm`
1232
+ `,I_=zm`
1227
1233
  query getUsersByIds($userIds: [ID!]!) {
1228
1234
  users(ids: $userIds) {
1229
1235
  id
@@ -1233,7 +1239,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1233
1239
  }
1234
1240
  }
1235
1241
  }
1236
- `,w_=e.array(e.object({columnId:e.string().describe("The id of the column to filter by"),compareAttribute:e.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:e.union([e.string(),e.number(),e.boolean(),e.array(e.union([e.string(),e.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:e.nativeEnum(bl).optional().default(bl.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${Mu.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),I_=e.nativeEnum(yl).optional().default(yl.And).describe("The operator to use for the filters"),E_={boardId:e.string().describe("The ID of the board to fetch complete data for"),filters:w_,filtersOperator:I_};const T_=zm`
1242
+ `,E_=e.array(e.object({columnId:e.string().describe("The id of the column to filter by"),compareAttribute:e.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:e.union([e.string(),e.number(),e.boolean(),e.array(e.union([e.string(),e.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:e.nativeEnum(bl).optional().default(bl.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${Mu.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),T_=e.nativeEnum(yl).optional().default(yl.And).describe("The operator to use for the filters"),A_={boardId:e.string().describe("The ID of the board to fetch complete data for"),filters:E_,filtersOperator:T_};const S_=zm`
1237
1243
  query GetBoardActivity(
1238
1244
  $boardId: ID!
1239
1245
  $itemIds: [ID!]
@@ -1256,7 +1262,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1256
1262
  }
1257
1263
  }
1258
1264
  }
1259
- `,A_={boardId:e.number().describe("The id of the board to get activity for"),itemIds:e.array(e.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:e.array(e.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:e.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:e.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:e.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const S_=zm`
1265
+ `,D_={boardId:e.number().describe("The id of the board to get activity for"),itemIds:e.array(e.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:e.array(e.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:e.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:e.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:e.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const N_=zm`
1260
1266
  query GetBoardInfo($boardId: ID!) {
1261
1267
  boards(ids: [$boardId]) {
1262
1268
  # Basic Board Metadata
@@ -1344,7 +1350,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1344
1350
  }
1345
1351
  }
1346
1352
  }
1347
- `,D_=zm`
1353
+ `,O_=zm`
1348
1354
  query GetBoardInfoJustColumns($boardId: ID!) {
1349
1355
  boards(ids: [$boardId]) {
1350
1356
  columns {
@@ -1357,7 +1363,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1357
1363
  }
1358
1364
  }
1359
1365
  }
1360
- `,N_=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0}}),O_={boardId:e.number().describe("The id of the board to get information for")};const k_=zm`
1366
+ `,k_=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0}}),R_={boardId:e.number().describe("The id of the board to get information for")};const C_=zm`
1361
1367
  fragment ItemDataFragment on Item {
1362
1368
  id
1363
1369
  name
@@ -1420,7 +1426,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1420
1426
  }
1421
1427
  }
1422
1428
  }
1423
- `,R_=zm`
1429
+ `,P_=zm`
1424
1430
  query SearchItemsDev($query: String!, $limit: Int, $boardIds: [ID!]) {
1425
1431
  search {
1426
1432
  items(query: $query, limit: $limit, board_ids: $boardIds) {
@@ -1430,11 +1436,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1430
1436
  }
1431
1437
  }
1432
1438
  }
1433
- `,C_={boardId:e.number().describe("The id of the board to get items from"),itemIds:e.array(e.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:e.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:e.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:e.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:e.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeItemDescription:e.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:e.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:e.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:w_,filtersOperator:I_,columnIds:e.array(e.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(vl).optional().default(vl.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 P_={boardId:e.number().describe("The id of the board to get the schema of")};const $_=zm`
1439
+ `,$_={boardId:e.number().describe("The id of the board to get items from"),itemIds:e.array(e.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:e.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:e.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:e.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:e.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeItemDescription:e.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:e.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:e.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:E_,filtersOperator:T_,columnIds:e.array(e.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(vl).optional().default(vl.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 x_={boardId:e.number().describe("The id of the board to get the schema of")};const L_=zm`
1434
1440
  query GetColumnTypeSchema($type: ColumnType!) {
1435
1441
  get_column_type_schema(type: $type)
1436
1442
  }
1437
- `,x_="https://developer.monday.com/api-reference",L_={last_updated:'Supported operators: any_of, not_any_of. CompareValue should be either:\n - "TODAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "YESTERDAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\nEXAMPLES:\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // using TODAY with correct compareAttribute\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of"} // missing required compareAttribute\n ❌ Wrong: {"columnId": "last_updated", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator',date:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue should be either:\n - Date in "YYYY-MM-DD" format with "EXACT" e.g. compareValue:["EXACT", "2025-01-01"]\n - "TODAY" - Item with today\'s date\n - "TOMORROW" - Item with tomorrow\'s date\n - "THIS_WEEK" - Item with this week\'s date\n - "ONE_WEEK_AGO" - Item with one week ago\'s date\nEXAMPLES:\n ✅ Correct: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01"], "operator": "any_of"} // using exact date format with EXACT\n ✅ Correct: {"columnId": "date", "compareValue": "TODAY", "operator": "greater_than"} // using TODAY with greater_than\n ❌ Wrong: {"columnId": "date", "compareValue": "2025-01-01", "operator": "any_of"} // missing EXACT string for exact date\n ❌ Wrong: {"columnId": "date", "compareValue": ["TODAY"], "operator": "greater_than"} // using array with single value operator',email:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be:\n - empty string "" when searching for blank values\n - whole email address when searching for specific email\n - partial email when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "email", "compareValue": ["john@example.com"], "operator": "any_of"} // using array with any_of for specific email\n ✅ Correct: {"columnId": "email", "compareValue": "gmail", "operator": "contains_text"} // using partial email with contains_text\n ❌ Wrong: {"columnId": "email", "compareValue": "john@example.com", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "email", "compareValue": ["gmail"], "operator": "contains_text"} // using array with single value operator',long_text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "long_text", "compareValue": ["Complete project description"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "long_text", "compareValue": "urgent", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "long_text", "compareValue": "Complete project description", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "long_text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "text", "compareValue": ["Task Name"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "text", "compareValue": "bug", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "text", "compareValue": "Task Name", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',numbers:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue is a number or "$$$blank$$$" when searching for blank values\nEXAMPLES:\n ✅ Correct: {"columnId": "numbers", "compareValue": [100, 200], "operator": "any_of"} // using array with any_of for multiple numbers\n ✅ Correct: {"columnId": "numbers", "compareValue": 50, "operator": "greater_than"} // using single number with greater_than\n ❌ Wrong: {"columnId": "numbers", "compareValue": 100, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "numbers", "compareValue": ["50"], "operator": "greater_than"} // using array with single value operator',name:'Supported operators: "contains_text", "not_contains_text". CompareValue can be full or partial text\nEXAMPLES:\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "contains_text"} // using string with contains_text\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "not_contains_text"} // using string with not_contains_text',status:'Supported operators: any_of, not_any_of, contains_terms. CompareValue should be either:\n - id of label from column settings - when used with any_of, not_any_of operators\n - label\'s text - when use with contains_terms\nEXAMPLES:\n ✅ Correct: {"columnId": "status", "compareValue": [0, 1], "operator": "any_of"} // Using id values\n ✅ Correct: {"columnId": "status", "compareValue": "Done", "operator": "contains_terms"} // Using label text\n ❌ Wrong: {"columnId": "status", "compareValue": "Done", "operator": "any_of"} // Using label text with wrong operator\n ❌ Wrong: {"columnId": "status", "compareValue": [0, 1], "operator": "contains_terms"} // Using id with wrong operator',checkbox:'Supported operators: is_empty, is_not_empty. Compare value must be an empty array\nEXAMPLES:\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": null, "operator": "is_empty"} // not using empty array with is_empty operator',people:'Supported operators: any_of, not_any_of, is_empty, is_not_empty. **CRITICAL**: CompareValue MUST be in one of following:\n - "assigned_to_me" - when searching for current user\n - "person-123" - when searching for specific person with id 123\n - "team-456" - when searching for specific team with id 456\n - empty array when using is_empty, is_not_empty operators\nEXAMPLES: \n ❌ Wrong: {"columnId": "column_id", "compareValue": ["person—123"], "operator": "any_of"} // Using long hyphen \'—\' instead of short hyphen \'-\'\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ✅ Correct: {"columnId": "column_id", "compareValue": ["person-80120403"], "operator": "any_of"} // using person prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["team-9000"], "operator": "any_of"} // using team prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["assigned_to_me"], "operator": "any_of"} // using assigned_to_me value\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "is_empty"} // using id with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "any_of"} // not using person or team prefix'};function U_(e){const t=L_[e];return t?`# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type: ${e}\n${t}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n`:null}const F_={columnType:e.nativeEnum(Hf).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:e.nativeEnum(Mu).optional().default(Mu.Schema).describe(`fetchMode "${Mu.Schema}": JSON settings schema only (GraphQL). fetchMode "${Mu.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const M_={random_string:e.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:e.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const V_={typeName:e.string().describe("The name of the GraphQL type to get details for")};const j_=zm`
1443
+ `,U_="https://developer.monday.com/api-reference",F_={last_updated:'Supported operators: any_of, not_any_of. CompareValue should be either:\n - "TODAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "YESTERDAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\nEXAMPLES:\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // using TODAY with correct compareAttribute\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of"} // missing required compareAttribute\n ❌ Wrong: {"columnId": "last_updated", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator',date:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue should be either:\n - Date in "YYYY-MM-DD" format with "EXACT" e.g. compareValue:["EXACT", "2025-01-01"]\n - "TODAY" - Item with today\'s date\n - "TOMORROW" - Item with tomorrow\'s date\n - "THIS_WEEK" - Item with this week\'s date\n - "ONE_WEEK_AGO" - Item with one week ago\'s date\nEXAMPLES:\n ✅ Correct: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01"], "operator": "any_of"} // using exact date format with EXACT\n ✅ Correct: {"columnId": "date", "compareValue": "TODAY", "operator": "greater_than"} // using TODAY with greater_than\n ❌ Wrong: {"columnId": "date", "compareValue": "2025-01-01", "operator": "any_of"} // missing EXACT string for exact date\n ❌ Wrong: {"columnId": "date", "compareValue": ["TODAY"], "operator": "greater_than"} // using array with single value operator',email:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be:\n - empty string "" when searching for blank values\n - whole email address when searching for specific email\n - partial email when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "email", "compareValue": ["john@example.com"], "operator": "any_of"} // using array with any_of for specific email\n ✅ Correct: {"columnId": "email", "compareValue": "gmail", "operator": "contains_text"} // using partial email with contains_text\n ❌ Wrong: {"columnId": "email", "compareValue": "john@example.com", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "email", "compareValue": ["gmail"], "operator": "contains_text"} // using array with single value operator',long_text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "long_text", "compareValue": ["Complete project description"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "long_text", "compareValue": "urgent", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "long_text", "compareValue": "Complete project description", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "long_text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "text", "compareValue": ["Task Name"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "text", "compareValue": "bug", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "text", "compareValue": "Task Name", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',numbers:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue is a number or "$$$blank$$$" when searching for blank values\nEXAMPLES:\n ✅ Correct: {"columnId": "numbers", "compareValue": [100, 200], "operator": "any_of"} // using array with any_of for multiple numbers\n ✅ Correct: {"columnId": "numbers", "compareValue": 50, "operator": "greater_than"} // using single number with greater_than\n ❌ Wrong: {"columnId": "numbers", "compareValue": 100, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "numbers", "compareValue": ["50"], "operator": "greater_than"} // using array with single value operator',name:'Supported operators: "contains_text", "not_contains_text". CompareValue can be full or partial text\nEXAMPLES:\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "contains_text"} // using string with contains_text\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "not_contains_text"} // using string with not_contains_text',status:'Supported operators: any_of, not_any_of, contains_terms. CompareValue should be either:\n - id of label from column settings - when used with any_of, not_any_of operators\n - label\'s text - when use with contains_terms\nEXAMPLES:\n ✅ Correct: {"columnId": "status", "compareValue": [0, 1], "operator": "any_of"} // Using id values\n ✅ Correct: {"columnId": "status", "compareValue": "Done", "operator": "contains_terms"} // Using label text\n ❌ Wrong: {"columnId": "status", "compareValue": "Done", "operator": "any_of"} // Using label text with wrong operator\n ❌ Wrong: {"columnId": "status", "compareValue": [0, 1], "operator": "contains_terms"} // Using id with wrong operator',checkbox:'Supported operators: is_empty, is_not_empty. Compare value must be an empty array\nEXAMPLES:\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": null, "operator": "is_empty"} // not using empty array with is_empty operator',people:'Supported operators: any_of, not_any_of, is_empty, is_not_empty. **CRITICAL**: CompareValue MUST be in one of following:\n - "assigned_to_me" - when searching for current user\n - "person-123" - when searching for specific person with id 123\n - "team-456" - when searching for specific team with id 456\n - empty array when using is_empty, is_not_empty operators\nEXAMPLES: \n ❌ Wrong: {"columnId": "column_id", "compareValue": ["person—123"], "operator": "any_of"} // Using long hyphen \'—\' instead of short hyphen \'-\'\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ✅ Correct: {"columnId": "column_id", "compareValue": ["person-80120403"], "operator": "any_of"} // using person prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["team-9000"], "operator": "any_of"} // using team prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["assigned_to_me"], "operator": "any_of"} // using assigned_to_me value\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "is_empty"} // using id with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "any_of"} // not using person or team prefix'};function M_(e){const t=F_[e];return t?`# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type: ${e}\n${t}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n`:null}const V_={columnType:e.nativeEnum(Hf).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:e.nativeEnum(Mu).optional().default(Mu.Schema).describe(`fetchMode "${Mu.Schema}": JSON settings schema only (GraphQL). fetchMode "${Mu.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const j_={random_string:e.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:e.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const B_={typeName:e.string().describe("The name of the GraphQL type to get details for")};const q_=zm`
1438
1444
  fragment UserDetails on User {
1439
1445
  # Basic User Information
1440
1446
  id
@@ -1465,31 +1471,31 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1465
1471
  time_zone_identifier
1466
1472
  utc_hours_diff
1467
1473
  }
1468
- `,B_=zm`
1474
+ `,H_=zm`
1469
1475
  fragment UserTeamMembership on Team {
1470
1476
  id
1471
1477
  name
1472
1478
  is_guest
1473
1479
  picture_url
1474
1480
  }
1475
- `,q_=zm`
1481
+ `,G_=zm`
1476
1482
  fragment TeamBasicInfo on Team {
1477
1483
  id
1478
1484
  name
1479
1485
  }
1480
- `,H_=zm`
1486
+ `,W_=zm`
1481
1487
  fragment TeamExtendedInfo on Team {
1482
1488
  ...TeamBasicInfo
1483
1489
  is_guest
1484
1490
  picture_url
1485
1491
  }
1486
- `,G_=zm`
1492
+ `,Y_=zm`
1487
1493
  fragment TeamOwner on User {
1488
1494
  id
1489
1495
  name
1490
1496
  email
1491
1497
  }
1492
- `,W_=zm`
1498
+ `,Q_=zm`
1493
1499
  fragment TeamMember on User {
1494
1500
  id
1495
1501
  name
@@ -1509,7 +1515,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1509
1515
  time_zone_identifier
1510
1516
  utc_hours_diff
1511
1517
  }
1512
- `,Y_=zm`
1518
+ `,z_=zm`
1513
1519
  fragment TeamMemberSimplified on User {
1514
1520
  id
1515
1521
  name
@@ -1517,15 +1523,15 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1517
1523
  title
1518
1524
  kind
1519
1525
  }
1520
- `,Q_=zm`
1526
+ `,K_=zm`
1521
1527
  fragment UserTeamMembershipSimplified on Team {
1522
1528
  id
1523
1529
  name
1524
1530
  is_guest
1525
1531
  }
1526
- `,z_=zm`
1527
- ${j_}
1528
- ${B_}
1532
+ `,J_=zm`
1533
+ ${q_}
1534
+ ${H_}
1529
1535
 
1530
1536
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1531
1537
  users(ids: $userIds, limit: $limit) {
@@ -1537,21 +1543,21 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1537
1543
  }
1538
1544
  }
1539
1545
  }
1540
- `,K_=zm`
1541
- ${j_}
1546
+ `,X_=zm`
1547
+ ${q_}
1542
1548
 
1543
1549
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1544
1550
  users(ids: $userIds, limit: $limit) {
1545
1551
  ...UserDetails
1546
1552
  }
1547
1553
  }
1548
- `,J_=zm`
1549
- ${j_}
1550
- ${Q_}
1551
- ${H_}
1554
+ `,Z_=zm`
1552
1555
  ${q_}
1556
+ ${K_}
1557
+ ${W_}
1553
1558
  ${G_}
1554
1559
  ${Y_}
1560
+ ${z_}
1555
1561
 
1556
1562
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1557
1563
  users(ids: $userIds, limit: $limit) {
@@ -1577,19 +1583,19 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1577
1583
  }
1578
1584
  }
1579
1585
  }
1580
- `,X_=zm`
1581
- ${q_}
1586
+ `,eg=zm`
1587
+ ${G_}
1582
1588
 
1583
1589
  query listTeamsOnly($teamIds: [ID!]) {
1584
1590
  teams(ids: $teamIds) {
1585
1591
  ...TeamBasicInfo
1586
1592
  }
1587
1593
  }
1588
- `,Z_=zm`
1589
- ${H_}
1590
- ${q_}
1591
- ${G_}
1594
+ `,tg=zm`
1592
1595
  ${W_}
1596
+ ${G_}
1597
+ ${Y_}
1598
+ ${Q_}
1593
1599
 
1594
1600
  query listTeamsWithMembers($teamIds: [ID!]) {
1595
1601
  teams(ids: $teamIds) {
@@ -1606,9 +1612,9 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1606
1612
  }
1607
1613
  }
1608
1614
  }
1609
- `,eg=zm`
1610
- ${j_}
1611
- ${B_}
1615
+ `,ag=zm`
1616
+ ${q_}
1617
+ ${H_}
1612
1618
 
1613
1619
  query getUserByName($name: String) {
1614
1620
  users(name: $name) {
@@ -1620,7 +1626,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1620
1626
  }
1621
1627
  }
1622
1628
  }
1623
- `,tg=zm`
1629
+ `,ig=zm`
1624
1630
  query getCurrentUser {
1625
1631
  me {
1626
1632
  id
@@ -1633,7 +1639,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1633
1639
  }
1634
1640
  }
1635
1641
  }
1636
- `;const ag=[["is_email_confirmed","Email Confirmed"],["became_active_at","Became Active At"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function ig(e,t=""){const a=ag.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`)),i=e.photo_url?.thumb;return i&&a.push(`${t}Photo Thumb: ${i}`),a}const rg=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(` Status: ${e.status||"N/A"}`),t.push(` Kind: ${e.kind||"N/A"}`),t.push(...ig(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"}`,`Kind: ${e.kind||"N/A"}`,...ig(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},ng=500,og=500,sg=1e3,dg=zm`
1642
+ `;const rg=[["is_email_confirmed","Email Confirmed"],["became_active_at","Became Active At"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function ng(e,t=""){const a=rg.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`)),i=e.photo_url?.thumb;return i&&a.push(`${t}Photo Thumb: ${i}`),a}const og=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(` Status: ${e.status||"N/A"}`),t.push(` Kind: ${e.kind||"N/A"}`),t.push(...ng(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"}`,`Kind: ${e.kind||"N/A"}`,...ng(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},sg=500,dg=500,pg=1e3,lg=zm`
1637
1643
  query getAccountSlug {
1638
1644
  me {
1639
1645
  account {
@@ -1641,11 +1647,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1641
1647
  }
1642
1648
  }
1643
1649
  }
1644
- `;async function pg(e){const t=await e.request(dg);return t.me?.account?.slug??null}function lg(e,t){return`https://${e}.monday.com/workspaces/${t}`}const cg={userIds:e.array(e.string()).max(ng).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(og).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 mg={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 ug=zm`
1650
+ `;async function cg(e){const t=await e.request(lg);return t.me?.account?.slug??null}function mg(e,t){return`https://${e}.monday.com/workspaces/${t}`}const ug={userIds:e.array(e.string()).max(sg).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(dg).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 hg={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 fg=zm`
1645
1651
  mutation updateDocName($docId: ID!, $name: String!) {
1646
1652
  update_doc_name(docId: $docId, name: $name)
1647
1653
  }
1648
- `,hg=zm`
1654
+ `,_g=zm`
1649
1655
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1650
1656
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1651
1657
  success
@@ -1653,13 +1659,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1653
1659
  error
1654
1660
  }
1655
1661
  }
1656
- `,fg=zm`
1662
+ `,gg=zm`
1657
1663
  query getDocIdByObjectId($objectId: [ID!]) {
1658
1664
  docs(object_ids: $objectId) {
1659
1665
  id
1660
1666
  }
1661
1667
  }
1662
- `,_g=zm`
1668
+ `,vg=zm`
1663
1669
  mutation updateDocBlock($blockId: String!, $content: JSON!) {
1664
1670
  update_doc_block(block_id: $blockId, content: $content) {
1665
1671
  id
@@ -1667,20 +1673,20 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1667
1673
  created_at
1668
1674
  }
1669
1675
  }
1670
- `,gg=zm`
1676
+ `,yg=zm`
1671
1677
  mutation deleteDocBlock($blockId: String!) {
1672
1678
  delete_doc_block(block_id: $blockId) {
1673
1679
  id
1674
1680
  }
1675
1681
  }
1676
- `,vg=zm`
1682
+ `,bg=zm`
1677
1683
  query getDocObjectIdByDocId($docId: [ID!]) {
1678
1684
  docs(ids: $docId) {
1679
1685
  id
1680
1686
  object_id
1681
1687
  }
1682
1688
  }
1683
- `,yg=zm`
1689
+ `,wg=zm`
1684
1690
  query getDocBoardItem($boardId: ID!) {
1685
1691
  boards(ids: [$boardId]) {
1686
1692
  items_page(limit: 1) {
@@ -1690,7 +1696,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1690
1696
  }
1691
1697
  }
1692
1698
  }
1693
- `,bg=zm`
1699
+ `,Ig=zm`
1694
1700
  query getDocBlockContent($docId: [ID!]) {
1695
1701
  docs(ids: $docId) {
1696
1702
  blocks {
@@ -1700,7 +1706,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1700
1706
  }
1701
1707
  }
1702
1708
  }
1703
- `,wg=zm`
1709
+ `,Eg=zm`
1704
1710
  mutation createDocComment($itemId: ID!, $body: String!, $parentId: ID, $mentionsList: [UpdateMention]) {
1705
1711
  create_update(body: $body, item_id: $itemId, parent_id: $parentId, mentions_list: $mentionsList) {
1706
1712
  id
@@ -1708,7 +1714,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1708
1714
  created_at
1709
1715
  }
1710
1716
  }
1711
- `,Ig=zm`
1717
+ `,Tg=zm`
1712
1718
  mutation createDocBlocks($docId: ID!, $afterBlockId: String, $blocksInput: [CreateBlockInput!]!) {
1713
1719
  create_doc_blocks(docId: $docId, afterBlockId: $afterBlockId, blocksInput: $blocksInput) {
1714
1720
  id
@@ -1776,7 +1782,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1776
1782
  }
1777
1783
  }
1778
1784
  }
1779
- `,Eg="content",Tg="version_history",Ag=e.enum(["ids","object_ids","workspace_ids"]),Sg={mode:e.enum([Eg,Tg]).optional().default(Eg).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:Ag.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:e.array(e.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:e.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:e.nativeEnum(Wp).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:e.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:e.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),blocks_limit:e.number().optional().describe("Maximum number of blocks to return per document (default: 25). Only used in content mode when include_blocks is true."),blocks_page:e.number().optional().describe("Page number for block pagination, starting at 1. Omit to use the API default. Use with blocks_limit to page through documents with more than 25 blocks. Only used in content mode when include_blocks is true."),include_comments:e.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:e.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:e.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:e.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:e.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:e.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const Dg={workspace_id:e.number().describe("The ID of the workspace to get information for")};const Ng=zm`
1785
+ `,Ag="content",Sg="version_history",Dg=e.enum(["ids","object_ids","workspace_ids"]),Ng={mode:e.enum([Ag,Sg]).optional().default(Ag).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:Dg.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:e.array(e.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:e.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:e.nativeEnum(Wp).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:e.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:e.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),blocks_limit:e.number().optional().describe("Maximum number of blocks to return per document (default: 25). Only used in content mode when include_blocks is true."),blocks_page:e.number().optional().describe("Page number for block pagination, starting at 1. Omit to use the API default. Use with blocks_limit to page through documents with more than 25 blocks. Only used in content mode when include_blocks is true."),include_comments:e.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:e.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:e.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:e.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:e.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:e.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const Og={workspace_id:e.number().describe("The ID of the workspace to get information for")};const kg=zm`
1780
1786
  query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
1781
1787
  workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
1782
1788
  id
@@ -1784,7 +1790,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1784
1790
  description
1785
1791
  }
1786
1792
  }
1787
- `;function Og(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function kg(e){return Array.isArray(e)&&e.length>0}const Rg={limit:e.number().min(1).max(100).default(100).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:e.number().min(1).default(1).describe("Page number to return. Default is 1.")};const Cg=zm`
1793
+ `;function Rg(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function Cg(e){return Array.isArray(e)&&e.length>0}const Pg={limit:e.number().min(1).max(100).default(100).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:e.number().min(1).default(1).describe("Page number to return. Default is 1.")};const $g=zm`
1788
1794
  query getItemBoard($itemId: ID!) {
1789
1795
  items(ids: [$itemId]) {
1790
1796
  id
@@ -1797,7 +1803,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1797
1803
  }
1798
1804
  }
1799
1805
  }
1800
- `,Pg=zm`
1806
+ `,xg=zm`
1801
1807
  mutation createDoc($location: CreateDocInput!, $docOwnerIds: [ID!]) {
1802
1808
  create_doc(location: $location, doc_owner_ids: $docOwnerIds) {
1803
1809
  id
@@ -1806,7 +1812,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1806
1812
  name
1807
1813
  }
1808
1814
  }
1809
- `,$g=zm`
1815
+ `,Lg=zm`
1810
1816
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1811
1817
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1812
1818
  success
@@ -1814,11 +1820,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1814
1820
  error
1815
1821
  }
1816
1822
  }
1817
- `,xg=zm`
1823
+ `,Ug=zm`
1818
1824
  mutation updateDocName($docId: ID!, $name: String!) {
1819
1825
  update_doc_name(docId: $docId, name: $name)
1820
1826
  }
1821
- `,Lg=e.enum(["workspace","item"]),Ug=e.discriminatedUnion("type",[e.object({type:e.literal(Lg.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(op).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(Lg.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.")})]),Fg={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"),docOwnerIds:e.array(e.string()).min(1).optional().describe("Optional list of user IDs to set as document owners at creation time. Use this to add the agent owner so they retain access to the document. Ownership is set inside the creation mutation itself, bypassing the permission checks that would block a subsequent add_subscribers_to_object call."),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(op).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 Mg=zm`
1827
+ `,Fg=e.enum(["workspace","item"]),Mg=e.discriminatedUnion("type",[e.object({type:e.literal(Fg.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(op).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(Fg.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.")})]),Vg={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"),docOwnerIds:e.array(e.string()).min(1).optional().describe("Optional list of user IDs to set as document owners at creation time. Use this to add the agent owner so they retain access to the document. Ownership is set inside the creation mutation itself, bypassing the permission checks that would block a subsequent add_subscribers_to_object call."),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(op).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 jg=zm`
1822
1828
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1823
1829
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1824
1830
  success
@@ -1826,7 +1832,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1826
1832
  error
1827
1833
  }
1828
1834
  }
1829
- `,Vg=zm`
1835
+ `,Bg=zm`
1830
1836
  query getDocByObjectId($objectId: [ID!]) {
1831
1837
  docs(object_ids: $objectId) {
1832
1838
  id
@@ -1834,7 +1840,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1834
1840
  url
1835
1841
  }
1836
1842
  }
1837
- `,jg=zm`
1843
+ `,qg=zm`
1838
1844
  query getDocById($docId: [ID!]) {
1839
1845
  docs(ids: $docId) {
1840
1846
  id
@@ -1842,7 +1848,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1842
1848
  url
1843
1849
  }
1844
1850
  }
1845
- `,Bg={doc_id:e.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:e.string().describe("Markdown content to add to the document."),after_block_id:e.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};function qg(e){if(e)return e}function Hg(e){if(e)return e}function Gg(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Wg(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:Gg(e.attributes)}}))}function Yg(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:o(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Gg(e.attributes)}}))}function Qg(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function zg(e,t,a,i){const r=a+i;let n=0;const o=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${n}: op has no 'insert' field. Block content may be from an unsupported block type.`);const s=n,d=s+("string"==typeof e?e.length:1),p=Math.max(s,a),l=Math.min(d,r);p>=l?o.push(i):"string"!=typeof e?o.push(Qg(i,t)):(p>s&&o.push({...i,insert:e.slice(0,p-s)}),o.push(Qg({...i,insert:e.slice(p-s,l-s)},t)),l<d&&o.push({...i,insert:e.slice(l-s)})),n=d}return o}const Kg=e.object({bold:e.boolean().optional(),italic:e.boolean().optional(),underline:e.boolean().optional(),strike:e.boolean().optional(),code:e.boolean().optional(),link:e.string().optional(),color:e.string().optional(),background:e.string().optional()}).optional(),Jg=e.object({mention:e.object({id:e.union([e.string(),e.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:e.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),Xg=e.object({column_value:e.object({item_id:e.union([e.string(),e.number()]).describe("The board item ID."),column_id:e.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),Zg=e.object({insert:e.union([e.string().transform((e=>({text:e}))),e.object({text:e.string()}),Jg,Xg]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:Kg.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),ev=e.object({block_content_type:e.literal("text"),delta_format:e.array(Zg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),tv=e.object({block_content_type:e.literal("code"),delta_format:e.array(Zg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),av=e.object({block_content_type:e.literal("list_item"),delta_format:e.array(Zg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:e.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),iv=e.discriminatedUnion("block_content_type",[ev,tv,av]),rv=e.object({block_type:e.literal("text"),text_block_type:e.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:e.array(Zg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),nv=e.object({block_type:e.literal("list_item"),list_block_type:e.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:e.array(Zg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),ov=e.object({block_type:e.literal("code"),delta_format:e.array(Zg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),sv=e.object({block_type:e.literal("divider")}),dv=e.object({block_type:e.literal("page_break")}),pv=e.object({block_type:e.literal("image"),public_url:e.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:e.union([e.number().int(),e.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),lv=e.object({block_type:e.literal("video"),raw_url:e.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),cv=e.object({block_type:e.literal("notice_box"),theme:e.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),mv=e.object({block_type:e.literal("table"),row_count:e.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:e.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:e.number().int().optional().describe("Table width in pixels."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),uv=e.object({block_type:e.literal("layout"),column_count:e.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),hv=e.discriminatedUnion("block_type",[rv,nv,ov,sv,dv,pv,lv,cv,mv,uv]),fv=e.object({operation_type:e.literal("set_name"),name:e.string().min(1).describe("New document name.")}),_v=e.object({operation_type:e.literal("add_markdown_content"),markdown:e.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),gv=e.object({operation_type:e.literal("update_block"),block_id:e.string().describe("ID of the block to update. Get block IDs from read_docs."),content:iv.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),vv=e.object({operation_type:e.literal("create_block"),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:e.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:hv.describe("The block to create. Use block_type to select the block type.")}),yv=e.object({operation_type:e.literal("delete_block"),block_id:e.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),bv=e.object({operation_type:e.literal("replace_block"),block_id:e.string().describe("ID of the block to delete."),after_block_id:e.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:e.string().optional().describe("Parent block ID for the replacement block."),block:hv.describe("The new block to create in place of the deleted one.")}),wv=e.object({operation_type:e.literal("add_comment"),body:e.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:e.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:e.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:e.union([e.string(),e.array(e.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:e.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:e.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),Iv=e.discriminatedUnion("operation_type",[fv,_v,gv,vv,yv,bv,wv]),Ev={doc_id:e.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:e.array(Iv).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const Tv=zm`
1851
+ `,Hg={doc_id:e.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:e.string().describe("Markdown content to add to the document."),after_block_id:e.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};function Gg(e){if(e)return e}function Wg(e){if(e)return e}function Yg(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Qg(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:Yg(e.attributes)}}))}function zg(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:o(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Yg(e.attributes)}}))}function Kg(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function Jg(e,t,a,i){const r=a+i;let n=0;const o=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${n}: op has no 'insert' field. Block content may be from an unsupported block type.`);const s=n,d=s+("string"==typeof e?e.length:1),p=Math.max(s,a),l=Math.min(d,r);p>=l?o.push(i):"string"!=typeof e?o.push(Kg(i,t)):(p>s&&o.push({...i,insert:e.slice(0,p-s)}),o.push(Kg({...i,insert:e.slice(p-s,l-s)},t)),l<d&&o.push({...i,insert:e.slice(l-s)})),n=d}return o}const Xg=e.object({bold:e.boolean().optional(),italic:e.boolean().optional(),underline:e.boolean().optional(),strike:e.boolean().optional(),code:e.boolean().optional(),link:e.string().optional(),color:e.string().optional(),background:e.string().optional()}).optional(),Zg=e.object({mention:e.object({id:e.union([e.string(),e.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:e.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),ev=e.object({column_value:e.object({item_id:e.union([e.string(),e.number()]).describe("The board item ID."),column_id:e.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),tv=e.object({insert:e.union([e.string().transform((e=>({text:e}))),e.object({text:e.string()}),Zg,ev]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:Xg.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),av=e.object({block_content_type:e.literal("text"),delta_format:e.array(tv).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),iv=e.object({block_content_type:e.literal("code"),delta_format:e.array(tv).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),rv=e.object({block_content_type:e.literal("list_item"),delta_format:e.array(tv).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:e.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),nv=e.discriminatedUnion("block_content_type",[av,iv,rv]),ov=e.object({block_type:e.literal("text"),text_block_type:e.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:e.array(tv).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),sv=e.object({block_type:e.literal("list_item"),list_block_type:e.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:e.array(tv).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),dv=e.object({block_type:e.literal("code"),delta_format:e.array(tv).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),pv=e.object({block_type:e.literal("divider")}),lv=e.object({block_type:e.literal("page_break")}),cv=e.object({block_type:e.literal("image"),public_url:e.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:e.union([e.number().int(),e.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),mv=e.object({block_type:e.literal("video"),raw_url:e.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),uv=e.object({block_type:e.literal("notice_box"),theme:e.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),hv=e.object({block_type:e.literal("table"),row_count:e.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:e.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:e.number().int().optional().describe("Table width in pixels."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),fv=e.object({block_type:e.literal("layout"),column_count:e.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),_v=e.discriminatedUnion("block_type",[ov,sv,dv,pv,lv,cv,mv,uv,hv,fv]),gv=e.object({operation_type:e.literal("set_name"),name:e.string().min(1).describe("New document name.")}),vv=e.object({operation_type:e.literal("add_markdown_content"),markdown:e.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),yv=e.object({operation_type:e.literal("update_block"),block_id:e.string().describe("ID of the block to update. Get block IDs from read_docs."),content:nv.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),bv=e.object({operation_type:e.literal("create_block"),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:e.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:_v.describe("The block to create. Use block_type to select the block type.")}),wv=e.object({operation_type:e.literal("delete_block"),block_id:e.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Iv=e.object({operation_type:e.literal("replace_block"),block_id:e.string().describe("ID of the block to delete."),after_block_id:e.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:e.string().optional().describe("Parent block ID for the replacement block."),block:_v.describe("The new block to create in place of the deleted one.")}),Ev=e.object({operation_type:e.literal("add_comment"),body:e.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:e.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:e.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:e.union([e.string(),e.array(e.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:e.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:e.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),Tv=e.discriminatedUnion("operation_type",[gv,vv,yv,bv,wv,Iv,Ev]),Av={doc_id:e.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:e.array(Tv).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const Sv=zm`
1846
1852
  mutation CreateDashboard(
1847
1853
  $name: String!
1848
1854
  $workspace_id: ID!
@@ -1864,14 +1870,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1864
1870
  board_folder_id
1865
1871
  }
1866
1872
  }
1867
- `,Av=zm`
1873
+ `,Dv=zm`
1868
1874
  query GetAllWidgetsSchema {
1869
1875
  all_widgets_schema {
1870
1876
  widget_type
1871
1877
  schema
1872
1878
  }
1873
1879
  }
1874
- `,Sv=zm`
1880
+ `,Nv=zm`
1875
1881
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1876
1882
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1877
1883
  id
@@ -1883,14 +1889,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1883
1889
  }
1884
1890
  }
1885
1891
  }
1886
- `,Dv={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(Up).default(Up.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 Nv={parent_container_id:e.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.nativeEnum(Ac).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.nativeEnum(zp).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.")};const Ov=zm`
1892
+ `,Ov={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(Up).default(Up.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 kv={parent_container_id:e.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.nativeEnum(Ac).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.nativeEnum(zp).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.")};const Rv=zm`
1887
1893
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1888
1894
  update_workspace(id: $id, attributes: $attributes) {
1889
1895
  id
1890
1896
  name
1891
1897
  }
1892
1898
  }
1893
- `,kv={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(Sc).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 Rv=zm`
1899
+ `,Cv={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(Sc).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 Pv=zm`
1894
1900
  mutation updateFolder(
1895
1901
  $folderId: ID!
1896
1902
  $name: String
@@ -1917,7 +1923,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1917
1923
  name
1918
1924
  }
1919
1925
  }
1920
- `,Cv={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(Zp).optional().describe("The new color of the folder"),fontWeight:e.nativeEnum(tl).optional().describe("The new font weight of the folder"),customIcon:e.nativeEnum(el).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($l).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 Pv=zm`
1926
+ `,$v={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(Zp).optional().describe("The new color of the folder"),fontWeight:e.nativeEnum(tl).optional().describe("The new font weight of the folder"),customIcon:e.nativeEnum(el).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($l).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 xv=zm`
1921
1927
  mutation createWorkspace(
1922
1928
  $name: String!
1923
1929
  $workspaceKind: WorkspaceKind!
@@ -1934,7 +1940,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1934
1940
  name
1935
1941
  }
1936
1942
  }
1937
- `,$v={name:e.string().describe("The name of the new workspace to be created"),workspaceKind:e.nativeEnum(Sc).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 xv=zm`
1943
+ `,Lv={name:e.string().describe("The name of the new workspace to be created"),workspaceKind:e.nativeEnum(Sc).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 Uv=zm`
1938
1944
  mutation createFolder(
1939
1945
  $workspaceId: ID!
1940
1946
  $name: String!
@@ -1955,7 +1961,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1955
1961
  name
1956
1962
  }
1957
1963
  }
1958
- `,Lv={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(Zp).optional().describe("The color of the folder"),fontWeight:e.nativeEnum(tl).optional().describe("The font weight of the folder"),customIcon:e.nativeEnum(el).optional().describe("The custom icon of the folder"),parentFolderId:e.string().optional().describe("The ID of the parent folder")};const Uv=zm`
1964
+ `,Fv={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(Zp).optional().describe("The color of the folder"),fontWeight:e.nativeEnum(tl).optional().describe("The font weight of the folder"),customIcon:e.nativeEnum(el).optional().describe("The custom icon of the folder"),parentFolderId:e.string().optional().describe("The ID of the parent folder")};const Mv=zm`
1959
1965
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1960
1966
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1961
1967
  success
@@ -1965,7 +1971,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1965
1971
  }
1966
1972
  }
1967
1973
  }
1968
- `,Fv=zm`
1974
+ `,Vv=zm`
1969
1975
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
1970
1976
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
1971
1977
  success
@@ -1975,7 +1981,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1975
1981
  }
1976
1982
  }
1977
1983
  }
1978
- `,Mv={objectType:e.nativeEnum($l).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($l).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 Vv=zm`
1984
+ `,jv={objectType:e.nativeEnum($l).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($l).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 Bv=zm`
1979
1985
  query aggregateBoardInsights($query: AggregateQueryInput!, $boardId: ID!) {
1980
1986
  boards(ids: [$boardId]) {
1981
1987
  name
@@ -1997,7 +2003,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
1997
2003
  }
1998
2004
  }
1999
2005
  }
2000
- `,jv=new Set([$d.Case,$d.Between,$d.Left,$d.Raw,$d.None,$d.CountKeys]),Bv=Object.values($d).filter((e=>!jv.has(e))),qv=new Set([$d.Left,$d.Trim,$d.Upper,$d.Lower,$d.DateTruncDay,$d.DateTruncWeek,$d.DateTruncMonth,$d.DateTruncQuarter,$d.DateTruncYear,$d.Color,$d.Label,$d.EndDate,$d.StartDate,$d.Hour,$d.PhoneCountryShortName,$d.Person,$d.Upper,$d.Lower,$d.Order,$d.Length,$d.Flatten,$d.IsDone]);function Hv(e){return{column_id:e}}new Set([$d.Count,$d.CountDistinct,$d.CountSubitems,$d.CountItems,$d.First,$d.Sum,$d.Average,$d.Median,$d.Min,$d.Max,$d.MinMax]);const Gv={boardId:e.number().describe("The id of the board to get insights for"),aggregations:e.array(e.object({function:e.enum(Bv).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, read guidelines.aggregation from get_column_type_info with fetchMode "${Mu.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).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),filters:w_,filtersOperator:I_,orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(vl).optional().default(vl.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 Wv=zm`
2006
+ `,qv=new Set([$d.Case,$d.Between,$d.Left,$d.Raw,$d.None,$d.CountKeys]),Hv=Object.values($d).filter((e=>!qv.has(e))),Gv=new Set([$d.Left,$d.Trim,$d.Upper,$d.Lower,$d.DateTruncDay,$d.DateTruncWeek,$d.DateTruncMonth,$d.DateTruncQuarter,$d.DateTruncYear,$d.Color,$d.Label,$d.EndDate,$d.StartDate,$d.Hour,$d.PhoneCountryShortName,$d.Person,$d.Upper,$d.Lower,$d.Order,$d.Length,$d.Flatten,$d.IsDone]);function Wv(e){return{column_id:e}}new Set([$d.Count,$d.CountDistinct,$d.CountSubitems,$d.CountItems,$d.First,$d.Sum,$d.Average,$d.Median,$d.Min,$d.Max,$d.MinMax]);const Yv={boardId:e.number().describe("The id of the board to get insights for"),aggregations:e.array(e.object({function:e.enum(Hv).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, read guidelines.aggregation from get_column_type_info with fetchMode "${Mu.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).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),filters:E_,filtersOperator:T_,orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(vl).optional().default(vl.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 Qv=zm`
2001
2007
  query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
2002
2008
  boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
2003
2009
  id
@@ -2005,7 +2011,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2005
2011
  url
2006
2012
  }
2007
2013
  }
2008
- `,Yv=zm`
2014
+ `,zv=zm`
2009
2015
  query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
2010
2016
  docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
2011
2017
  id
@@ -2013,14 +2019,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2013
2019
  url
2014
2020
  }
2015
2021
  }
2016
- `,Qv=zm`
2022
+ `,Kv=zm`
2017
2023
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
2018
2024
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
2019
2025
  id
2020
2026
  name
2021
2027
  }
2022
2028
  }
2023
- `,zv=zm`
2029
+ `,Jv=zm`
2024
2030
  query SearchItems($query: String!, $limit: Int, $workspaceIds: [ID!]) {
2025
2031
  search {
2026
2032
  items(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -2035,7 +2041,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2035
2041
  }
2036
2042
  }
2037
2043
  }
2038
- `,Kv=zm`
2044
+ `,Xv=zm`
2039
2045
  query SearchWorkspaces($query: String!, $limit: Int) {
2040
2046
  search {
2041
2047
  workspaces(query: $query, limit: $limit) {
@@ -2050,7 +2056,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2050
2056
  }
2051
2057
  }
2052
2058
  }
2053
- `,Jv=zm`
2059
+ `,Zv=zm`
2054
2060
  query SearchUpdates($query: String!, $limit: Int, $boardIds: [ID!], $creatorIds: [ID!]) {
2055
2061
  search {
2056
2062
  updates(query: $query, limit: $limit, board_ids: $boardIds, creator_ids: $creatorIds) {
@@ -2067,7 +2073,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2067
2073
  }
2068
2074
  }
2069
2075
  }
2070
- `,Xv=zm`
2076
+ `,ey=zm`
2071
2077
  query SearchTimelineItems($query: String!, $limit: Int) {
2072
2078
  search {
2073
2079
  timeline_items(query: $query, limit: $limit) {
@@ -2083,7 +2089,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2083
2089
  }
2084
2090
  }
2085
2091
  }
2086
- `,Zv=zm`
2092
+ `,ty=zm`
2087
2093
  query SearchBoardsDev($query: String!, $limit: Int, $workspaceIds: [ID!]) {
2088
2094
  search {
2089
2095
  boards(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -2098,7 +2104,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2098
2104
  }
2099
2105
  }
2100
2106
  }
2101
- `,ey=zm`
2107
+ `,ay=zm`
2102
2108
  query SearchDocsDev($query: String!, $limit: Int, $workspaceIds: [ID!]) {
2103
2109
  search {
2104
2110
  docs(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -2112,14 +2118,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2112
2118
  }
2113
2119
  }
2114
2120
  }
2115
- `,ty=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");var ay,iy;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-",e.WORKSPACE="workspace-",e.UPDATE="update-",e.ITEM="item-",e.TIMELINE_ITEM="timeline-item-"}(ay||(ay={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.WORKSPACES="WORKSPACES",e.UPDATES="UPDATES",e.ITEMS="ITEMS",e.TIMELINE_ITEMS="TIMELINE_ITEMS"}(iy||(iy={}));const ry={searchTerm:e.string().optional().describe("The search term to use. Required for ITEMS, WORKSPACES, UPDATES, and TIMELINE_ITEMS searches. Optional for BOARD, DOCUMENTS, and FOLDERS (omitting it lists all results)."),searchType:e.nativeEnum(iy).describe("The type of search to perform. Valid values: BOARD, DOCUMENTS, FOLDERS, WORKSPACES, UPDATES, ITEMS, TIMELINE_ITEMS."),limit:e.number().max(20).optional().default(20).describe("The number of items to get. Maximum is 20 — do not exceed this value."),page:e.number().optional().default(1).describe("Page number for listing without a searchTerm (BOARD/DOCUMENTS only). Pagination is NOT supported when searchTerm is provided."),workspaceIds:e.array(e.number()).optional().describe("Array of workspace IDs (numbers) to search in. Required for FOLDERS search. For BOARD and DOCUMENTS search, only pass this if the user explicitly asked to search within specific workspaces. Example: [12345, 67890]."),boardIds:e.array(e.number()).optional().describe("Array of board IDs (numbers) to scope the search to. Only applies to UPDATES search, and only pass it if the user explicitly asked to search within specific boards. Example: [12345, 67890]."),creatorIds:e.array(e.number()).optional().describe("Array of user IDs (numbers) whose updates to search. Only applies to UPDATES search, and only pass it if the user explicitly asked to search updates by specific authors. Example: [12345, 67890].")};const ny=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(Nl).describe("The type of mention: User, Team, Board, or Project")}),oy=e.array(ny),sy={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 dy=zm`
2121
+ `,iy=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");var ry,ny;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-",e.WORKSPACE="workspace-",e.UPDATE="update-",e.ITEM="item-",e.TIMELINE_ITEM="timeline-item-"}(ry||(ry={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.WORKSPACES="WORKSPACES",e.UPDATES="UPDATES",e.ITEMS="ITEMS",e.TIMELINE_ITEMS="TIMELINE_ITEMS"}(ny||(ny={}));const oy={searchTerm:e.string().optional().describe("The search term to use. Required for ITEMS, WORKSPACES, UPDATES, and TIMELINE_ITEMS searches. Optional for BOARD, DOCUMENTS, and FOLDERS (omitting it lists all results)."),searchType:e.nativeEnum(ny).describe("The type of search to perform. Valid values: BOARD, DOCUMENTS, FOLDERS, WORKSPACES, UPDATES, ITEMS, TIMELINE_ITEMS."),limit:e.number().max(20).optional().default(20).describe("The number of items to get. Maximum is 20 — do not exceed this value."),page:e.number().optional().default(1).describe("Page number for listing without a searchTerm (BOARD/DOCUMENTS only). Pagination is NOT supported when searchTerm is provided."),workspaceIds:e.array(e.number()).optional().describe("Array of workspace IDs (numbers) to search in. Required for FOLDERS search. For BOARD and DOCUMENTS search, only pass this if the user explicitly asked to search within specific workspaces. Example: [12345, 67890]."),boardIds:e.array(e.number()).optional().describe("Array of board IDs (numbers) to scope the search to. Only applies to UPDATES search, and only pass it if the user explicitly asked to search within specific boards. Example: [12345, 67890]."),creatorIds:e.array(e.number()).optional().describe("Array of user IDs (numbers) whose updates to search. Only applies to UPDATES search, and only pass it if the user explicitly asked to search updates by specific authors. Example: [12345, 67890].")};const sy=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(Nl).describe("The type of mention: User, Team, Board, or Project")}),dy=e.array(sy),py={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 ly=zm`
2116
2122
  mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
2117
2123
  update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
2118
2124
  id
2119
2125
  name
2120
2126
  }
2121
2127
  }
2122
- `,py=e.object({fileType:e.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:e.string().describe("File display name"),linkToFile:e.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:e.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:e.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),ly={boardId:e.string().describe("The board's unique identifier"),itemId:e.string().describe("The item's unique identifier"),columnId:e.string().describe("The file or doc column's unique identifier"),files:e.array(py).describe("Array of file values to set on the column")};const cy=zm`
2128
+ `,cy=e.object({fileType:e.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:e.string().describe("File display name"),linkToFile:e.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:e.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:e.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),my={boardId:e.string().describe("The board's unique identifier"),itemId:e.string().describe("The item's unique identifier"),columnId:e.string().describe("The file or doc column's unique identifier"),files:e.array(cy).describe("Array of file values to set on the column")};const uy=zm`
2123
2129
  query getAssets($ids: [ID!]!) {
2124
2130
  assets(ids: $ids) {
2125
2131
  id
@@ -2137,7 +2143,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2137
2143
  }
2138
2144
  }
2139
2145
  }
2140
- `,my={ids:e.array(e.string()).min(1).describe("Array of asset IDs to fetch")};const uy=zm`
2146
+ `,hy={ids:e.array(e.string()).min(1).describe("Array of asset IDs to fetch")};const fy=zm`
2141
2147
  query getUserContext {
2142
2148
  me {
2143
2149
  id
@@ -2174,7 +2180,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2174
2180
  }
2175
2181
  }
2176
2182
  }
2177
- `,hy=zm`
2183
+ `,_y=zm`
2178
2184
  query getFavoriteDetails(
2179
2185
  $boardIds: [ID!]
2180
2186
  $folderIds: [ID!]
@@ -2198,7 +2204,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2198
2204
  name
2199
2205
  }
2200
2206
  }
2201
- `,fy={[ul.Board]:"boardIds",[ul.Folder]:"folderIds",[ul.Workspace]:"workspaceIds",[ul.Dashboard]:"dashboardIds"},_y={[ul.Board]:"boards",[ul.Folder]:"folders",[ul.Workspace]:"workspaces",[ul.Dashboard]:"dashboards"};const gy=zm`
2207
+ `,gy={[ul.Board]:"boardIds",[ul.Folder]:"folderIds",[ul.Workspace]:"workspaceIds",[ul.Dashboard]:"dashboardIds"},vy={[ul.Board]:"boards",[ul.Folder]:"folders",[ul.Workspace]:"workspaces",[ul.Dashboard]:"dashboards"};const yy=zm`
2202
2208
  query GetNotetakerMeetings(
2203
2209
  $limit: Int
2204
2210
  $cursor: String
@@ -2251,13 +2257,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2251
2257
  }
2252
2258
  }
2253
2259
  }
2254
- `,vy={ids:e.array(e.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:e.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:e.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:e.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:e.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:e.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:e.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:e.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:e.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const yy=zm`
2260
+ `,by={ids:e.array(e.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:e.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:e.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:e.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:e.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:e.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:e.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:e.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:e.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const wy=zm`
2255
2261
  mutation BatchUndo($boardId: ID!, $undoRecordId: ID!) {
2256
2262
  batch_undo(board_id: $boardId, undo_record_id: $undoRecordId) {
2257
2263
  success
2258
2264
  }
2259
2265
  }
2260
- `,by={boardId:e.number().describe("The id of the board where the action was performed"),undoRecordId:e.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const wy=zm`
2266
+ `,Iy={boardId:e.number().describe("The id of the board where the action was performed"),undoRecordId:e.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const Ey=zm`
2261
2267
  mutation CreateUpload($input: CreateUploadInput!) {
2262
2268
  create_upload(input: $input) {
2263
2269
  upload_id
@@ -2271,7 +2277,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2271
2277
  expires_at
2272
2278
  }
2273
2279
  }
2274
- `,Iy={fileName:e.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:e.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:e.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Ey=zm`
2280
+ `,Ty={fileName:e.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:e.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:e.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Ay=zm`
2275
2281
  mutation CompleteUpload($input: CompleteUploadInput!) {
2276
2282
  complete_upload(input: $input) {
2277
2283
  id
@@ -2283,13 +2289,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2283
2289
  filelink
2284
2290
  }
2285
2291
  }
2286
- `,Ty=zm`
2292
+ `,Sy=zm`
2287
2293
  mutation ChangeColumnValue($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {
2288
2294
  change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {
2289
2295
  id
2290
2296
  }
2291
2297
  }
2292
- `,Ay={uploadId:e.string().describe("The upload_id returned by get_asset_upload_url"),etag:e.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:e.string().describe("The board's unique identifier"),itemId:e.string().describe("The item's unique identifier"),columnId:e.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Sy="\n**Board-relation linking — do in order**\n\n1. **Fetch (target board, one query)**\n- **has_more: true** (and under **~500** items / **~5** pages for this pass) → your **only** next action is\n **get_board_items_page** with **cursor=nextCursor**; same **boardId** and the same **searchTerm** / **filters**\n / **itemIds** — **do not** change **filters** on a cursor call. **No** user turn until **has_more** is false\n or you stop at the cap. The first page alone is never “the whole board” while **has_more** is still true.\n- **Shrink the query first** when you can: **columnIds**;\n **filters**; **searchTerm**; or **itemIds** (max **100** per call, split big lists). Search **timeout** or\n error → **narrower** **searchTerm** or smaller **limit** / columns, then continue with **nextCursor** as\n in the first bullet.\n\n2. **Match (after the fetch for that pass is done)**\n- Apply a **clear** rule to names/values you already loaded (e.g. same name as source, or value user gave).\n- One unambiguous match → link without asking. **No** vague “best” pick without a rule.\n\n3. **If the user must be involved (only after step 1 is done for that query)**\n- If step 1 is incomplete, **no** questions (see step 1’s first bullet).\n- **True tie** (2+ items match the rule equally) → show **only those tied rows** (or a tiny shortlist),\n not the full result set and never all ~500.\n- **No way to name a target yet** (not a tie) → ask **once** for a **name** or **search phrase** to use in\n **searchTerm** / **filters**, not a menu of the board.\n\n4. **Write** — On the owning board’s board-relation column using change_item_column_values\n".trim(),Dy={};const Ny=zm`
2298
+ `,Dy={uploadId:e.string().describe("The upload_id returned by get_asset_upload_url"),etag:e.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:e.string().describe("The board's unique identifier"),itemId:e.string().describe("The item's unique identifier"),columnId:e.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Ny="\n**Board-relation linking — do in order**\n\n1. **Fetch (target board, one query)**\n- **has_more: true** (and under **~500** items / **~5** pages for this pass) → your **only** next action is\n **get_board_items_page** with **cursor=nextCursor**; same **boardId** and the same **searchTerm** / **filters**\n / **itemIds** — **do not** change **filters** on a cursor call. **No** user turn until **has_more** is false\n or you stop at the cap. The first page alone is never “the whole board” while **has_more** is still true.\n- **Shrink the query first** when you can: **columnIds**;\n **filters**; **searchTerm**; or **itemIds** (max **100** per call, split big lists). Search **timeout** or\n error → **narrower** **searchTerm** or smaller **limit** / columns, then continue with **nextCursor** as\n in the first bullet.\n\n2. **Match (after the fetch for that pass is done)**\n- Apply a **clear** rule to names/values you already loaded (e.g. same name as source, or value user gave).\n- One unambiguous match → link without asking. **No** vague “best” pick without a rule.\n\n3. **If the user must be involved (only after step 1 is done for that query)**\n- If step 1 is incomplete, **no** questions (see step 1’s first bullet).\n- **True tie** (2+ items match the rule equally) → show **only those tied rows** (or a tiny shortlist),\n not the full result set and never all ~500.\n- **No way to name a target yet** (not a tie) → ask **once** for a **name** or **search phrase** to use in\n **searchTerm** / **filters**, not a menu of the board.\n\n4. **Write** — On the owning board’s board-relation column using change_item_column_values\n".trim(),Oy={};const ky=zm`
2293
2299
  query GetItemAssets($itemId: [ID!]!, $columnId: [String!]!) {
2294
2300
  items(ids: $itemId) {
2295
2301
  assets(column_ids: $columnId) {
@@ -2299,7 +2305,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2299
2305
  }
2300
2306
  }
2301
2307
  }
2302
- `,Oy=10485760,ky=5e4,Ry=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Cy=new Set([".pdf"]),Py=new Set([".docx"]),$y=new Set([".xlsx"]),xy=new Set([".xls"]),Ly=new Set([".txt",".md",".csv",".json"]),Uy={item_id:e.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:e.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:e.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:e.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function Fy(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function My(e){if(null==e)return"";if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return String(e);if(e instanceof Date)return e.toISOString();if("object"==typeof e){if("result"in e)return My(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Vy(e,t,a){const i=function(e,t){if(t){const e=Fy(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Fy(e.name)}(e,a);try{if(Ry.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(xy.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>Oy)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),r=[];let n=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(n+=t.byteLength,n>Oy)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");r.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(r)}(e.public_url);let r,n;Cy.has(i)?(r=await async function(e){const t=await g(new Uint8Array(e)),{text:a}=await v(t,{mergePages:!0});return a}(a),n="pdf"):Py.has(i)?(r=await async function(e){return(await f.extractRawText({buffer:e})).value}(a),n="word"):$y.has(i)?(r=await async function(e){const t=new _.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(My).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),n="excel"):Ly.has(i)?(r=a.toString("utf-8"),n="text"):(r=a.toString("utf-8"),n="unknown");const o=r.slice(t,t+ky),s=r.length>t+ky;return{file_name:e.name,file_extension:i,content_type:n,text:o,total_length:r.length,...Cy.has(i)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+ky}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var jy,By,qy,Hy,Gy,Wy,Yy,Qy,zy,Ky,Jy,Xy,Zy,eb,tb,ab,ib,rb,nb,ob,sb,db,pb,lb,cb,mb,ub,hb,fb,_b,gb,vb,yb,bb,wb,Ib,Eb,Tb,Ab,Sb,Db,Nb,Ob,kb,Rb,Cb,Pb,$b,xb,Lb,Ub,Fb,Mb,Vb,jb,Bb,qb,Hb,Gb,Wb,Yb,Qb,zb,Kb,Jb,Xb,Zb,ew,tw,aw,iw,rw,nw,ow,sw,dw,pw,lw,cw,mw,uw,hw,fw,_w,gw,vw,yw,bw,ww,Iw,Ew,Tw,Aw,Sw,Dw,Nw,Ow,kw,Rw,Cw,Pw,$w,xw,Lw,Uw,Fw,Mw,Vw,jw,Bw,qw,Hw,Gw,Ww,Yw,Qw,zw,Kw,Jw,Xw,Zw,eI,tI,aI,iI,rI,nI,oI,sI,dI,pI,lI,cI,mI,uI,hI,fI,_I,gI,vI,yI,bI,wI,II,EI,TI,AI,SI,DI,NI,OI,kI,RI,CI,PI,$I,xI,LI,UI,FI,MI,VI,jI,BI,qI,HI,GI,WI,YI,QI,zI,KI,JI,XI,ZI,eE,tE,aE,iE,rE,nE,oE,sE,dE,pE,lE,cE,mE,uE,hE,fE,_E,gE,vE,yE,bE,wE,IE,EE,TE,AE,SE,DE,NE,OE,kE,RE,CE,PE,$E,xE,LE,UE,FE,ME,VE,jE,BE,qE,HE,GE,WE,YE,QE,zE,KE,JE,XE,ZE,eT,tT,aT;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(jy||(jy={})),function(e){e.Audio="AUDIO",e.Board="BOARD",e.Doc="DOC",e.Html="HTML",e.Image="IMAGE",e.Item="ITEM",e.Update="UPDATE",e.VibeApp="VIBE_APP",e.Video="VIDEO",e.View="VIEW"}(By||(By={})),function(e){e.Asset="ASSET",e.MondayEntity="MONDAY_ENTITY"}(qy||(qy={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(Hy||(Hy={})),function(e){e.Member="MEMBER",e.Owner="OWNER"}(Gy||(Gy={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(Wy||(Wy={})),function(e){e.ActionIntent="ACTION_INTENT",e.ClarificationReceived="CLARIFICATION_RECEIVED",e.ClarificationRequested="CLARIFICATION_REQUESTED",e.FeedbackGiven="FEEDBACK_GIVEN",e.PlanCreated="PLAN_CREATED",e.RunCompleted="RUN_COMPLETED",e.RunFailed="RUN_FAILED",e.RunStarted="RUN_STARTED",e.RunStopped="RUN_STOPPED",e.StepCompleted="STEP_COMPLETED",e.StepFailed="STEP_FAILED",e.StepRetry="STEP_RETRY",e.StepStarted="STEP_STARTED",e.StepSummary="STEP_SUMMARY",e.Thinking="THINKING",e.ToolCalled="TOOL_CALLED",e.ToolCompleted="TOOL_COMPLETED",e.ToolFailed="TOOL_FAILED"}(Yy||(Yy={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(Qy||(Qy={})),function(e){e.Team="TEAM",e.User="USER"}(zy||(zy={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(Ky||(Ky={})),function(e){e.AnyOf="ANY_OF",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.StartsWith="STARTS_WITH"}(Jy||(Jy={})),function(e){e.Table="TABLE",e.Union="UNION"}(Xy||(Xy={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",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.First="FIRST",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.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(Zy||(Zy={})),function(e){e.And="AND",e.Or="OR"}(eb||(eb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(tb||(tb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(ab||(ab={})),function(e){e.Table="TABLE"}(ib||(ib={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(rb||(rb={})),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"}(nb||(nb={})),function(e){e.CompanyName="company_name",e.Custom="custom",e.Date="date",e.DomainName="domain_name",e.EmailAddress="email_address",e.FirstName="first_name",e.LastName="last_name",e.PhoneNumber="phone_number",e.Time="time",e.Url="url",e.Year="year"}(ob||(ob={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(sb||(sb={})),function(e){e.Arabic="arabic",e.Bengali="bengali",e.Chinese="chinese",e.Danish="danish",e.Dutch="dutch",e.English="english",e.French="french",e.German="german",e.Hebrew="hebrew",e.Hindi="hindi",e.Indonesian="indonesian",e.Italian="italian",e.Japanese="japanese",e.Korean="korean",e.Norwegian="norwegian",e.Polish="polish",e.Portuguese="portuguese",e.Russian="russian",e.Spanish="spanish",e.Swedish="swedish",e.Thai="thai",e.Turkish="turkish",e.Vietnamese="vietnamese"}(db||(db={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(pb||(pb={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(lb||(lb={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(cb||(cb={})),function(e){e.Casual="casual",e.Confident="confident",e.Empathic="empathic",e.Friendly="friendly",e.Natural="natural",e.Professional="professional",e.Promotional="promotional",e.Same="same"}(mb||(mb={})),function(e){e.MondayFast="MONDAY_FAST",e.MondayPowerful="MONDAY_POWERFUL",e.MondayStandard="MONDAY_STANDARD"}(ub||(ub={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ApplicationXlsx="APPLICATION_XLSX",e.ImageAvif="IMAGE_AVIF",e.ImageGif="IMAGE_GIF",e.ImageHeic="IMAGE_HEIC",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageSvg="IMAGE_SVG",e.ImageWebp="IMAGE_WEBP",e.TextCsv="TEXT_CSV",e.TextMarkdown="TEXT_MARKDOWN",e.TextPlain="TEXT_PLAIN",e.VideoMp4="VIDEO_MP4",e.VideoOgg="VIDEO_OGG",e.VideoQuicktime="VIDEO_QUICKTIME",e.VideoWebm="VIDEO_WEBM"}(hb||(hb={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(fb||(fb={})),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.Skill="SKILL",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"}(_b||(_b={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(gb||(gb={})),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"}(vb||(vb={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(yb||(yb={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(bb||(bb={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(wb||(wb={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.None="NONE",e.Pending="PENDING"}(Ib||(Ib={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.Channel="CHANNEL",e.Initiative="INITIATIVE",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(Eb||(Eb={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(Tb||(Tb={})),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"}(Ab||(Ab={})),function(e){e.Agent="AGENT"}(Sb||(Sb={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Db||(Db={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(Nb||(Nb={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Ob||(Ob={})),function(e){e.Edit="edit",e.View="view"}(kb||(kb={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Rb||(Rb={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(Cb||(Cb={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(Pb||(Pb={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}($b||($b={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(xb||(xb={})),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"}(Lb||(Lb={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Ub||(Ub={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Fb||(Fb={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(Mb||(Mb={})),function(e){e.Edit="edit",e.View="view"}(Vb||(Vb={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(jb||(jb={})),function(e){e.AccountCapacityExceeded="ACCOUNT_CAPACITY_EXCEEDED",e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.FileTooLarge="FILE_TOO_LARGE",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(Bb||(Bb={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(qb||(qb={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(Hb||(Hb={})),function(e){e.EmailBounced="EMAIL_BOUNCED",e.EmailClicked="EMAIL_CLICKED",e.EmailDelivered="EMAIL_DELIVERED",e.EmailDropped="EMAIL_DROPPED",e.EmailOpened="EMAIL_OPENED",e.EmailRecipientComplaint="EMAIL_RECIPIENT_COMPLAINT",e.EmailRecipientGroupResubscribed="EMAIL_RECIPIENT_GROUP_RESUBSCRIBED",e.EmailRecipientGroupUnsubscribed="EMAIL_RECIPIENT_GROUP_UNSUBSCRIBED",e.EmailRecipientUnsubscribed="EMAIL_RECIPIENT_UNSUBSCRIBED",e.EmailSent="EMAIL_SENT"}(Gb||(Gb={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(Wb||(Wb={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(Yb||(Yb={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(Qb||(Qb={})),function(e){e.CompetitorMove="COMPETITOR_MOVE",e.CrisisEvent="CRISIS_EVENT",e.CustomerBehavior="CUSTOMER_BEHAVIOR",e.EmergingTechnology="EMERGING_TECHNOLOGY",e.MarketTrend="MARKET_TREND",e.Other="OTHER",e.ProductLaunch="PRODUCT_LAUNCH",e.RegulatoryChange="REGULATORY_CHANGE"}(zb||(zb={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(Kb||(Kb={})),function(e){e.Later="LATER",e.Now="NOW"}(Jb||(Jb={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(Xb||(Xb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Zb||(Zb={})),function(e){e.Blocked="BLOCKED",e.Draft="DRAFT",e.Failed="FAILED",e.Generating="GENERATING",e.Ongoing="ONGOING",e.OnHold="ON_HOLD",e.Processing="PROCESSING",e.ReadyToSend="READY_TO_SEND",e.Scheduled="SCHEDULED",e.Sending="SENDING",e.Sent="SENT"}(ew||(ew={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(tw||(tw={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(aw||(aw={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(iw||(iw={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(rw||(rw={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(nw||(nw={})),function(e){e.Description="description",e.Title="title"}(ow||(ow={})),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"}(sw||(sw={})),function(e){e.Or="OR"}(dw||(dw={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(pw||(pw={})),function(e){e.Account="ACCOUNT",e.User="USER"}(lw||(lw={})),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"}(cw||(cw={})),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"}(mw||(mw={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(uw||(uw={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(hw||(hw={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(fw||(fw={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(_w||(_w={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(gw||(gw={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(vw||(vw={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(yw||(yw={})),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"}(bw||(bw={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(ww||(ww={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(Iw||(Iw={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Ew||(Ew={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Tw||(Tw={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Aw||(Aw={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Sw||(Sw={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(Dw||(Dw={})),function(e){e.BoardInaccessible="BOARD_INACCESSIBLE",e.BoardUnavailable="BOARD_UNAVAILABLE",e.InternalError="INTERNAL_ERROR",e.InvalidRequest="INVALID_REQUEST",e.ItemLimitExceeded="ITEM_LIMIT_EXCEEDED",e.NotFound="NOT_FOUND"}(Nw||(Nw={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(Ow||(Ow={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(kw||(kw={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(Rw||(Rw={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(Cw||(Cw={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(Pw||(Pw={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}($w||($w={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(xw||(xw={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Lw||(Lw={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Uw||(Uw={})),function(e){e.Monday="monday",e.Sunday="sunday"}(Fw||(Fw={})),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"}(Mw||(Mw={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(Vw||(Vw={})),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"}(jw||(jw={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(Bw||(Bw={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(qw||(qw={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Hw||(Hw={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(Gw||(Gw={})),function(e){e.Card="CARD",e.Flat="FLAT"}(Ww||(Ww={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(Yw||(Yw={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(Qw||(Qw={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(zw||(zw={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(Kw||(Kw={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(Jw||(Jw={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.DisplayText="DISPLAY_TEXT",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Hour="HOUR",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.PageBlock="PAGE_BLOCK",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(Xw||(Xw={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(Zw||(Zw={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(eI||(eI={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(tI||(tI={})),function(e){e.And="AND",e.Or="OR"}(aI||(aI={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(iI||(iI={})),function(e){e.DataLimit="DATA_LIMIT",e.PlanLimit="PLAN_LIMIT"}(rI||(rI={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(nI||(nI={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(oI||(oI={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.AuthDomain="AUTH_DOMAIN",e.Consolidation="CONSOLIDATION",e.FirstUser="FIRST_USER",e.InternalCreation="INTERNAL_CREATION",e.Scim="SCIM",e.ServicePortalAuthDomain="SERVICE_PORTAL_AUTH_DOMAIN",e.ServicePortalUserInvitation="SERVICE_PORTAL_USER_INVITATION",e.Sso="SSO",e.SystemCreation="SYSTEM_CREATION",e.Unknown="UNKNOWN",e.User="USER"}(sI||(sI={})),function(e){e.Error="ERROR"}(dI||(dI={})),function(e){e.AnyOf="ANY_OF",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.StartsWith="STARTS_WITH"}(pI||(pI={})),function(e){e.Table="TABLE"}(lI||(lI={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.First="FIRST",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.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(cI||(cI={})),function(e){e.And="AND",e.Or="OR"}(mI||(mI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(uI||(uI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(hI||(hI={})),function(e){e.Asc="asc",e.Desc="desc"}(fI||(fI={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(_I||(_I={})),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.Hour="hour",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Numbers="numbers",e.People="people",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(gI||(gI={})),function(e){e.And="and",e.Or="or"}(vI||(vI={})),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"}(yI||(yI={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(bI||(bI={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(wI||(wI={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(II||(II={})),function(e){e.Board="BOARD",e.Doc="DOC",e.Workspace="WORKSPACE"}(EI||(EI={})),function(e){e.File="FILE"}(TI||(TI={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(AI||(AI={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(SI||(SI={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(DI||(DI={})),function(e){e.Dropdown="dropdown",e.Status="status"}(NI||(NI={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(OI||(OI={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(kI||(kI={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(RI||(RI={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(CI||(CI={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(PI||(PI={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}($I||($I={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(xI||(xI={})),function(e){e.Post="Post",e.Project="Project"}(LI||(LI={})),function(e){e.Left="left",e.Right="right"}(UI||(UI={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(FI||(FI={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(MI||(MI={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(VI||(VI={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(jI||(jI={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(BI||(BI={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(qI||(qI={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(HI||(HI={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(GI||(GI={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(WI||(WI={})),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"}(YI||(YI={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(QI||(QI={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(zI||(zI={})),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"}(KI||(KI={})),function(e){e.BaseRole="BASE_ROLE",e.Email="EMAIL",e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Name="NAME",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Status="STATUS",e.Teams="TEAMS"}(JI||(JI={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(XI||(XI={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsText="CONTAINS_TEXT",e.Equals="EQUALS",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.NotEquals="NOT_EQUALS",e.StartsWithText="STARTS_WITH_TEXT"}(ZI||(ZI={})),function(e){e.Api="API",e.Assigned="ASSIGNED",e.Automation="AUTOMATION",e.Chat="CHAT",e.Mention="MENTION",e.Schedule="SCHEDULE"}(eE||(eE={})),function(e){e.Completed="COMPLETED",e.Executing="EXECUTING",e.Failed="FAILED",e.NeedsConfirmation="NEEDS_CONFIRMATION",e.Running="RUNNING",e.Stopped="STOPPED",e.StoppedBySystem="STOPPED_BY_SYSTEM",e.Thinking="THINKING",e.WaitingClarification="WAITING_CLARIFICATION"}(tE||(tE={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(aE||(aE={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(iE||(iE={})),function(e){e.Board="BOARD"}(rE||(rE={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(nE||(nE={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(oE||(oE={})),function(e){e.Asc="ASC",e.Desc="DESC"}(sE||(sE={})),function(e){e.Complete="COMPLETE",e.Start="START"}(dE||(dE={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(pE||(pE={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(lE||(lE={})),function(e){e.CountKeys="COUNT_KEYS"}(cE||(cE={})),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"}(mE||(mE={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(uE||(uE={})),function(e){e.Nominal="nominal",e.Percent="percent"}(hE||(hE={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(fE||(fE={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(_E||(_E={})),function(e){e.Active="active",e.Inactive="inactive"}(gE||(gE={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(vE||(vE={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(yE||(yE={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(bE||(bE={})),function(e){e.Done="DONE",e.InProgress="IN_PROGRESS",e.NotATask="NOT_A_TASK",e.NotNow="NOT_NOW",e.NoLongerRelevant="NO_LONGER_RELEVANT",e.Pending="PENDING",e.Todo="TODO"}(wE||(wE={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(IE||(IE={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(EE||(EE={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(TE||(TE={})),function(e){e.Custom="CUSTOM",e.Holiday="HOLIDAY"}(AE||(AE={})),function(e){e.Activity="activity",e.AiAssistant="aiAssistant",e.AiReply="aiReply",e.AiSummary="aiSummary",e.Campaigns="campaigns",e.Custom="custom",e.CustomInternalApp="customInternalApp",e.DemoEmail="demoEmail",e.Email="email",e.Form="form",e.GoogleCalendar="googleCalendar",e.Meeting="meeting",e.MergedTickets="mergedTickets",e.Note="note",e.OutlookCalendar="outlookCalendar",e.OutreachExpertPhoneCall="outreachExpertPhoneCall",e.OutreachExpertPhoneCallV2="outreachExpertPhoneCallV2",e.PhoneCall="phoneCall",e.Portal="portal",e.PortfolioStatus="portfolio_status",e.SequencesEmail="sequencesEmail",e.VideoMeeting="videoMeeting",e.Zoom="zoom"}(SE||(SE={})),function(e){e.Crm="crm",e.Service="service"}(DE||(DE={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(NE||(NE={})),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"}(OE||(OE={})),function(e){e.InvalidField="INVALID_FIELD"}(kE||(kE={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(RE||(RE={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(CE||(CE={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY"}(PE||(PE={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}($E||($E={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(xE||(xE={})),function(e){e.Asc="ASC",e.Desc="DESC"}(LE||(LE={})),function(e){e.CreatedAt="CREATED_AT"}(UE||(UE={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(FE||(FE={})),function(e){e.Board="board"}(ME||(ME={})),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"}(VE||(VE={})),function(e){e.Board="BOARD",e.Item="ITEM"}(jE||(jE={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(BE||(BE={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(qE||(qE={})),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"}(HE||(HE={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(GE||(GE={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(WE||(WE={})),function(e){e.Error="ERROR",e.Ok="OK"}(YE||(YE={})),function(e){e.Wait="WAIT"}(QE||(QE={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(zE||(zE={})),function(e){e.LiteBuilder="LITE_BUILDER"}(KE||(KE={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(JE||(JE={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(XE||(XE={})),function(e){e.All="all",e.Member="member"}(ZE||(ZE={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(eT||(eT={})),function(e){e.CreatedAt="created_at"}(tT||(tT={})),function(e){e.Core="core",e.Crm="crm",e.Forms="forms",e.Marketing="marketing",e.ProjectManagement="project_management",e.Service="service",e.Software="software",e.Whiteboard="whiteboard"}(aT||(aT={}));const iT=zm`
2308
+ `,Ry=10485760,Cy=5e4,Py=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),$y=new Set([".pdf"]),xy=new Set([".docx"]),Ly=new Set([".xlsx"]),Uy=new Set([".xls"]),Fy=new Set([".txt",".md",".csv",".json"]),My={item_id:e.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:e.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:e.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:e.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function Vy(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function jy(e){if(null==e)return"";if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return String(e);if(e instanceof Date)return e.toISOString();if("object"==typeof e){if("result"in e)return jy(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function By(e,t,a){const i=function(e,t){if(t){const e=Vy(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Vy(e.name)}(e,a);try{if(Py.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(Uy.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>Ry)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),r=[];let n=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(n+=t.byteLength,n>Ry)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");r.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(r)}(e.public_url);let r,n;$y.has(i)?(r=await async function(e){const t=await g(new Uint8Array(e)),{text:a}=await v(t,{mergePages:!0});return a}(a),n="pdf"):xy.has(i)?(r=await async function(e){return(await f.extractRawText({buffer:e})).value}(a),n="word"):Ly.has(i)?(r=await async function(e){const t=new _.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(jy).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),n="excel"):Fy.has(i)?(r=a.toString("utf-8"),n="text"):(r=a.toString("utf-8"),n="unknown");const o=r.slice(t,t+Cy),s=r.length>t+Cy;return{file_name:e.name,file_extension:i,content_type:n,text:o,total_length:r.length,...$y.has(i)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+Cy}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var qy,Hy,Gy,Wy,Yy,Qy,zy,Ky,Jy,Xy,Zy,eb,tb,ab,ib,rb,nb,ob,sb,db,pb,lb,cb,mb,ub,hb,fb,_b,gb,vb,yb,bb,wb,Ib,Eb,Tb,Ab,Sb,Db,Nb,Ob,kb,Rb,Cb,Pb,$b,xb,Lb,Ub,Fb,Mb,Vb,jb,Bb,qb,Hb,Gb,Wb,Yb,Qb,zb,Kb,Jb,Xb,Zb,ew,tw,aw,iw,rw,nw,ow,sw,dw,pw,lw,cw,mw,uw,hw,fw,_w,gw,vw,yw,bw,ww,Iw,Ew,Tw,Aw,Sw,Dw,Nw,Ow,kw,Rw,Cw,Pw,$w,xw,Lw,Uw,Fw,Mw,Vw,jw,Bw,qw,Hw,Gw,Ww,Yw,Qw,zw,Kw,Jw,Xw,Zw,eI,tI,aI,iI,rI,nI,oI,sI,dI,pI,lI,cI,mI,uI,hI,fI,_I,gI,vI,yI,bI,wI,II,EI,TI,AI,SI,DI,NI,OI,kI,RI,CI,PI,$I,xI,LI,UI,FI,MI,VI,jI,BI,qI,HI,GI,WI,YI,QI,zI,KI,JI,XI,ZI,eE,tE,aE,iE,rE,nE,oE,sE,dE,pE,lE,cE,mE,uE,hE,fE,_E,gE,vE,yE,bE,wE,IE,EE,TE,AE,SE,DE,NE,OE,kE,RE,CE,PE,$E,xE,LE,UE,FE,ME,VE,jE,BE,qE,HE,GE,WE,YE,QE,zE,KE,JE,XE,ZE,eT,tT,aT,iT,rT;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(qy||(qy={})),function(e){e.Audio="AUDIO",e.Board="BOARD",e.Doc="DOC",e.Html="HTML",e.Image="IMAGE",e.Item="ITEM",e.Update="UPDATE",e.VibeApp="VIBE_APP",e.Video="VIDEO",e.View="VIEW"}(Hy||(Hy={})),function(e){e.Asset="ASSET",e.MondayEntity="MONDAY_ENTITY"}(Gy||(Gy={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(Wy||(Wy={})),function(e){e.Member="MEMBER",e.Owner="OWNER"}(Yy||(Yy={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(Qy||(Qy={})),function(e){e.ActionIntent="ACTION_INTENT",e.ClarificationReceived="CLARIFICATION_RECEIVED",e.ClarificationRequested="CLARIFICATION_REQUESTED",e.FeedbackGiven="FEEDBACK_GIVEN",e.PlanCreated="PLAN_CREATED",e.RunCompleted="RUN_COMPLETED",e.RunFailed="RUN_FAILED",e.RunStarted="RUN_STARTED",e.RunStopped="RUN_STOPPED",e.StepCompleted="STEP_COMPLETED",e.StepFailed="STEP_FAILED",e.StepRetry="STEP_RETRY",e.StepStarted="STEP_STARTED",e.StepSummary="STEP_SUMMARY",e.Thinking="THINKING",e.ToolCalled="TOOL_CALLED",e.ToolCompleted="TOOL_COMPLETED",e.ToolFailed="TOOL_FAILED"}(zy||(zy={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(Ky||(Ky={})),function(e){e.Team="TEAM",e.User="USER"}(Jy||(Jy={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(Xy||(Xy={})),function(e){e.AnyOf="ANY_OF",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.StartsWith="STARTS_WITH"}(Zy||(Zy={})),function(e){e.Table="TABLE",e.Union="UNION"}(eb||(eb={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",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.First="FIRST",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.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(tb||(tb={})),function(e){e.And="AND",e.Or="OR"}(ab||(ab={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(ib||(ib={})),function(e){e.Asc="ASC",e.Desc="DESC"}(rb||(rb={})),function(e){e.Table="TABLE"}(nb||(nb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(ob||(ob={})),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"}(sb||(sb={})),function(e){e.CompanyName="company_name",e.Custom="custom",e.Date="date",e.DomainName="domain_name",e.EmailAddress="email_address",e.FirstName="first_name",e.LastName="last_name",e.PhoneNumber="phone_number",e.Time="time",e.Url="url",e.Year="year"}(db||(db={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(pb||(pb={})),function(e){e.Arabic="arabic",e.Bengali="bengali",e.Chinese="chinese",e.Danish="danish",e.Dutch="dutch",e.English="english",e.French="french",e.German="german",e.Hebrew="hebrew",e.Hindi="hindi",e.Indonesian="indonesian",e.Italian="italian",e.Japanese="japanese",e.Korean="korean",e.Norwegian="norwegian",e.Polish="polish",e.Portuguese="portuguese",e.Russian="russian",e.Spanish="spanish",e.Swedish="swedish",e.Thai="thai",e.Turkish="turkish",e.Vietnamese="vietnamese"}(lb||(lb={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(cb||(cb={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(mb||(mb={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(ub||(ub={})),function(e){e.Casual="casual",e.Confident="confident",e.Empathic="empathic",e.Friendly="friendly",e.Natural="natural",e.Professional="professional",e.Promotional="promotional",e.Same="same"}(hb||(hb={})),function(e){e.MondayFast="MONDAY_FAST",e.MondayPowerful="MONDAY_POWERFUL",e.MondayStandard="MONDAY_STANDARD"}(fb||(fb={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ApplicationXlsx="APPLICATION_XLSX",e.ImageAvif="IMAGE_AVIF",e.ImageGif="IMAGE_GIF",e.ImageHeic="IMAGE_HEIC",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageSvg="IMAGE_SVG",e.ImageWebp="IMAGE_WEBP",e.TextCsv="TEXT_CSV",e.TextMarkdown="TEXT_MARKDOWN",e.TextPlain="TEXT_PLAIN",e.VideoMp4="VIDEO_MP4",e.VideoOgg="VIDEO_OGG",e.VideoQuicktime="VIDEO_QUICKTIME",e.VideoWebm="VIDEO_WEBM"}(_b||(_b={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(gb||(gb={})),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.Skill="SKILL",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"}(vb||(vb={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(yb||(yb={})),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"}(bb||(bb={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(wb||(wb={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(Ib||(Ib={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Eb||(Eb={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.None="NONE",e.Pending="PENDING"}(Tb||(Tb={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.Channel="CHANNEL",e.Initiative="INITIATIVE",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(Ab||(Ab={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(Sb||(Sb={})),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"}(Db||(Db={})),function(e){e.Agent="AGENT"}(Nb||(Nb={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Ob||(Ob={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(kb||(kb={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Rb||(Rb={})),function(e){e.Edit="edit",e.View="view"}(Cb||(Cb={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Pb||(Pb={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}($b||($b={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(xb||(xb={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(Lb||(Lb={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Ub||(Ub={})),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"}(Fb||(Fb={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Mb||(Mb={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Vb||(Vb={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(jb||(jb={})),function(e){e.Edit="edit",e.View="view"}(Bb||(Bb={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(qb||(qb={})),function(e){e.AccountCapacityExceeded="ACCOUNT_CAPACITY_EXCEEDED",e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.FileTooLarge="FILE_TOO_LARGE",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(Hb||(Hb={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(Gb||(Gb={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(Wb||(Wb={})),function(e){e.EmailBounced="EMAIL_BOUNCED",e.EmailClicked="EMAIL_CLICKED",e.EmailDelivered="EMAIL_DELIVERED",e.EmailDropped="EMAIL_DROPPED",e.EmailOpened="EMAIL_OPENED",e.EmailRecipientComplaint="EMAIL_RECIPIENT_COMPLAINT",e.EmailRecipientGroupResubscribed="EMAIL_RECIPIENT_GROUP_RESUBSCRIBED",e.EmailRecipientGroupUnsubscribed="EMAIL_RECIPIENT_GROUP_UNSUBSCRIBED",e.EmailRecipientUnsubscribed="EMAIL_RECIPIENT_UNSUBSCRIBED",e.EmailSent="EMAIL_SENT"}(Yb||(Yb={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(Qb||(Qb={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(zb||(zb={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(Kb||(Kb={})),function(e){e.CompetitorMove="COMPETITOR_MOVE",e.CrisisEvent="CRISIS_EVENT",e.CustomerBehavior="CUSTOMER_BEHAVIOR",e.EmergingTechnology="EMERGING_TECHNOLOGY",e.MarketTrend="MARKET_TREND",e.Other="OTHER",e.ProductLaunch="PRODUCT_LAUNCH",e.RegulatoryChange="REGULATORY_CHANGE"}(Jb||(Jb={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(Xb||(Xb={})),function(e){e.Later="LATER",e.Now="NOW"}(Zb||(Zb={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(ew||(ew={})),function(e){e.Asc="ASC",e.Desc="DESC"}(tw||(tw={})),function(e){e.Blocked="BLOCKED",e.Draft="DRAFT",e.Failed="FAILED",e.Generating="GENERATING",e.Ongoing="ONGOING",e.OnHold="ON_HOLD",e.Processing="PROCESSING",e.ReadyToSend="READY_TO_SEND",e.Scheduled="SCHEDULED",e.Sending="SENDING",e.Sent="SENT"}(aw||(aw={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(iw||(iw={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(rw||(rw={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(nw||(nw={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(ow||(ow={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(sw||(sw={})),function(e){e.Description="description",e.Title="title"}(dw||(dw={})),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"}(pw||(pw={})),function(e){e.Or="OR"}(lw||(lw={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(cw||(cw={})),function(e){e.Account="ACCOUNT",e.User="USER"}(mw||(mw={})),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"}(uw||(uw={})),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"}(hw||(hw={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(fw||(fw={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(_w||(_w={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(gw||(gw={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(vw||(vw={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(yw||(yw={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(bw||(bw={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(ww||(ww={})),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"}(Iw||(Iw={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Ew||(Ew={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(Tw||(Tw={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Aw||(Aw={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Sw||(Sw={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Dw||(Dw={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Nw||(Nw={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(Ow||(Ow={})),function(e){e.BoardInaccessible="BOARD_INACCESSIBLE",e.BoardUnavailable="BOARD_UNAVAILABLE",e.InternalError="INTERNAL_ERROR",e.InvalidRequest="INVALID_REQUEST",e.ItemLimitExceeded="ITEM_LIMIT_EXCEEDED",e.NotFound="NOT_FOUND"}(kw||(kw={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(Rw||(Rw={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(Cw||(Cw={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(Pw||(Pw={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}($w||($w={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(xw||(xw={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(Lw||(Lw={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Uw||(Uw={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Fw||(Fw={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Mw||(Mw={})),function(e){e.Monday="monday",e.Sunday="sunday"}(Vw||(Vw={})),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"}(jw||(jw={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(Bw||(Bw={})),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"}(qw||(qw={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(Hw||(Hw={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(Gw||(Gw={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Ww||(Ww={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(Yw||(Yw={})),function(e){e.Card="CARD",e.Flat="FLAT"}(Qw||(Qw={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(zw||(zw={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(Kw||(Kw={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(Jw||(Jw={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(Xw||(Xw={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(Zw||(Zw={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.DisplayText="DISPLAY_TEXT",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Hour="HOUR",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.PageBlock="PAGE_BLOCK",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(eI||(eI={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(tI||(tI={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(aI||(aI={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(iI||(iI={})),function(e){e.And="AND",e.Or="OR"}(rI||(rI={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(nI||(nI={})),function(e){e.DataLimit="DATA_LIMIT",e.PlanLimit="PLAN_LIMIT"}(oI||(oI={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(sI||(sI={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(dI||(dI={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.AuthDomain="AUTH_DOMAIN",e.Consolidation="CONSOLIDATION",e.FirstUser="FIRST_USER",e.InternalCreation="INTERNAL_CREATION",e.Scim="SCIM",e.ServicePortalAuthDomain="SERVICE_PORTAL_AUTH_DOMAIN",e.ServicePortalUserInvitation="SERVICE_PORTAL_USER_INVITATION",e.Sso="SSO",e.SystemCreation="SYSTEM_CREATION",e.Unknown="UNKNOWN",e.User="USER"}(pI||(pI={})),function(e){e.Error="ERROR"}(lI||(lI={})),function(e){e.AnyOf="ANY_OF",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.StartsWith="STARTS_WITH"}(cI||(cI={})),function(e){e.Table="TABLE"}(mI||(mI={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.First="FIRST",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.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(uI||(uI={})),function(e){e.And="AND",e.Or="OR"}(hI||(hI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(fI||(fI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(_I||(_I={})),function(e){e.Asc="asc",e.Desc="desc"}(gI||(gI={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(vI||(vI={})),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.Hour="hour",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Numbers="numbers",e.People="people",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(yI||(yI={})),function(e){e.And="and",e.Or="or"}(bI||(bI={})),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"}(wI||(wI={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(II||(II={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(EI||(EI={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(TI||(TI={})),function(e){e.Board="BOARD",e.Doc="DOC",e.Workspace="WORKSPACE"}(AI||(AI={})),function(e){e.File="FILE"}(SI||(SI={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(DI||(DI={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(NI||(NI={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(OI||(OI={})),function(e){e.Dropdown="dropdown",e.Status="status"}(kI||(kI={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(RI||(RI={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(CI||(CI={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(PI||(PI={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}($I||($I={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(xI||(xI={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(LI||(LI={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(UI||(UI={})),function(e){e.Post="Post",e.Project="Project"}(FI||(FI={})),function(e){e.Left="left",e.Right="right"}(MI||(MI={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(VI||(VI={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(jI||(jI={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(BI||(BI={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(qI||(qI={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(HI||(HI={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(GI||(GI={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(WI||(WI={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(YI||(YI={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(QI||(QI={})),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"}(zI||(zI={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(KI||(KI={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(JI||(JI={})),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"}(XI||(XI={})),function(e){e.BaseRole="BASE_ROLE",e.Email="EMAIL",e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Name="NAME",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Status="STATUS",e.Teams="TEAMS"}(ZI||(ZI={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(eE||(eE={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsText="CONTAINS_TEXT",e.Equals="EQUALS",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.NotEquals="NOT_EQUALS",e.StartsWithText="STARTS_WITH_TEXT"}(tE||(tE={})),function(e){e.Api="API",e.Assigned="ASSIGNED",e.Automation="AUTOMATION",e.Chat="CHAT",e.Mention="MENTION",e.Schedule="SCHEDULE"}(aE||(aE={})),function(e){e.Completed="COMPLETED",e.Executing="EXECUTING",e.Failed="FAILED",e.NeedsConfirmation="NEEDS_CONFIRMATION",e.Running="RUNNING",e.Stopped="STOPPED",e.StoppedBySystem="STOPPED_BY_SYSTEM",e.Thinking="THINKING",e.WaitingClarification="WAITING_CLARIFICATION"}(iE||(iE={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(rE||(rE={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(nE||(nE={})),function(e){e.Board="BOARD"}(oE||(oE={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(sE||(sE={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(dE||(dE={})),function(e){e.Asc="ASC",e.Desc="DESC"}(pE||(pE={})),function(e){e.Complete="COMPLETE",e.Start="START"}(lE||(lE={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(cE||(cE={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(mE||(mE={})),function(e){e.CountKeys="COUNT_KEYS"}(uE||(uE={})),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"}(hE||(hE={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(fE||(fE={})),function(e){e.Nominal="nominal",e.Percent="percent"}(_E||(_E={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(gE||(gE={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(vE||(vE={})),function(e){e.Active="active",e.Inactive="inactive"}(yE||(yE={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(bE||(bE={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(wE||(wE={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(IE||(IE={})),function(e){e.Done="DONE",e.InProgress="IN_PROGRESS",e.NotATask="NOT_A_TASK",e.NotNow="NOT_NOW",e.NoLongerRelevant="NO_LONGER_RELEVANT",e.Pending="PENDING",e.Todo="TODO"}(EE||(EE={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(TE||(TE={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(AE||(AE={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(SE||(SE={})),function(e){e.Custom="CUSTOM",e.Holiday="HOLIDAY"}(DE||(DE={})),function(e){e.Activity="activity",e.AiAssistant="aiAssistant",e.AiReply="aiReply",e.AiSummary="aiSummary",e.Campaigns="campaigns",e.Custom="custom",e.CustomInternalApp="customInternalApp",e.DemoEmail="demoEmail",e.Email="email",e.Form="form",e.GoogleCalendar="googleCalendar",e.Meeting="meeting",e.MergedTickets="mergedTickets",e.Note="note",e.OutlookCalendar="outlookCalendar",e.OutreachExpertPhoneCall="outreachExpertPhoneCall",e.OutreachExpertPhoneCallV2="outreachExpertPhoneCallV2",e.PhoneCall="phoneCall",e.Portal="portal",e.PortfolioStatus="portfolio_status",e.SequencesEmail="sequencesEmail",e.VideoMeeting="videoMeeting",e.Zoom="zoom"}(NE||(NE={})),function(e){e.Crm="crm",e.Service="service"}(OE||(OE={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(kE||(kE={})),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"}(RE||(RE={})),function(e){e.InvalidField="INVALID_FIELD"}(CE||(CE={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(PE||(PE={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}($E||($E={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY"}(xE||(xE={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(LE||(LE={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(UE||(UE={})),function(e){e.Asc="ASC",e.Desc="DESC"}(FE||(FE={})),function(e){e.CreatedAt="CREATED_AT"}(ME||(ME={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(VE||(VE={})),function(e){e.Board="board"}(jE||(jE={})),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"}(BE||(BE={})),function(e){e.Board="BOARD",e.Item="ITEM"}(qE||(qE={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(HE||(HE={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(GE||(GE={})),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"}(WE||(WE={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(YE||(YE={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(QE||(QE={})),function(e){e.Error="ERROR",e.Ok="OK"}(zE||(zE={})),function(e){e.Wait="WAIT"}(KE||(KE={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(JE||(JE={})),function(e){e.LiteBuilder="LITE_BUILDER"}(XE||(XE={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(ZE||(ZE={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(eT||(eT={})),function(e){e.All="all",e.Member="member"}(tT||(tT={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(aT||(aT={})),function(e){e.CreatedAt="created_at"}(iT||(iT={})),function(e){e.Core="core",e.Crm="crm",e.Forms="forms",e.Marketing="marketing",e.ProjectManagement="project_management",e.Service="service",e.Software="software",e.Whiteboard="whiteboard"}(rT||(rT={}));const nT=zm`
2303
2309
  fragment CustomAgentFields on CustomAgent {
2304
2310
  id
2305
2311
  kind
@@ -2318,65 +2324,65 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2318
2324
  created_at
2319
2325
  updated_at
2320
2326
  }
2321
- `,rT=zm`
2322
- ${iT}
2327
+ `,oT=zm`
2328
+ ${nT}
2323
2329
 
2324
2330
  query getCustomAgents($ids: [ID!], $limit: Int) {
2325
2331
  custom_agents(ids: $ids, limit: $limit) {
2326
2332
  ...CustomAgentFields
2327
2333
  }
2328
2334
  }
2329
- `,nT=zm`
2330
- ${iT}
2335
+ `,sT=zm`
2336
+ ${nT}
2331
2337
 
2332
2338
  mutation createAgent($input: CreateAgentInput!) {
2333
2339
  create_agent(input: $input) {
2334
2340
  ...CustomAgentFields
2335
2341
  }
2336
2342
  }
2337
- `,oT=zm`
2338
- ${iT}
2343
+ `,dT=zm`
2344
+ ${nT}
2339
2345
 
2340
2346
  mutation createBlankAgent($input: CreateBlankAgentInput) {
2341
2347
  create_blank_agent(input: $input) {
2342
2348
  ...CustomAgentFields
2343
2349
  }
2344
2350
  }
2345
- `,sT=zm`
2346
- ${iT}
2351
+ `,pT=zm`
2352
+ ${nT}
2347
2353
 
2348
2354
  mutation updateAgent($id: ID!, $input: UpdateAgentInput!) {
2349
2355
  update_agent(id: $id, input: $input) {
2350
2356
  ...CustomAgentFields
2351
2357
  }
2352
2358
  }
2353
- `,dT=zm`
2354
- ${iT}
2359
+ `,lT=zm`
2360
+ ${nT}
2355
2361
 
2356
2362
  mutation deleteAgent($id: ID!) {
2357
2363
  delete_agent(id: $id) {
2358
2364
  ...CustomAgentFields
2359
2365
  }
2360
2366
  }
2361
- `,pT=zm`
2367
+ `,cT=zm`
2362
2368
  mutation activateAgent($id: ID!) {
2363
2369
  activate_agent(id: $id) {
2364
2370
  success
2365
2371
  }
2366
2372
  }
2367
- `,lT=zm`
2373
+ `,mT=zm`
2368
2374
  mutation deactivateAgent($id: ID!, $inactive_reason: InactiveReason) {
2369
2375
  deactivate_agent(id: $id, inactive_reason: $inactive_reason) {
2370
2376
  success
2371
2377
  }
2372
2378
  }
2373
- `,cT=zm`
2379
+ `,uT=zm`
2374
2380
  mutation runAgent($id: ID!) {
2375
2381
  run_agent(id: $id) {
2376
2382
  trigger_uuid
2377
2383
  }
2378
2384
  }
2379
- `,mT=zm`
2385
+ `,hT=zm`
2380
2386
  query getAgentActiveTriggers($agent_id: ID!) {
2381
2387
  agent_active_triggers(agent_id: $agent_id) {
2382
2388
  node_id
@@ -2386,31 +2392,31 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2386
2392
  field_summary
2387
2393
  }
2388
2394
  }
2389
- `,uT=zm`
2395
+ `,fT=zm`
2390
2396
  mutation addTriggerToAgent($agent_id: ID!, $block_reference_id: ID!, $field_values: JSON) {
2391
2397
  add_trigger_to_agent(agent_id: $agent_id, block_reference_id: $block_reference_id, field_values: $field_values) {
2392
2398
  success
2393
2399
  }
2394
2400
  }
2395
- `,hT=zm`
2401
+ `,_T=zm`
2396
2402
  mutation removeTriggerFromAgent($agent_id: ID!, $node_id: ID!) {
2397
2403
  remove_trigger_from_agent(agent_id: $agent_id, node_id: $node_id) {
2398
2404
  success
2399
2405
  }
2400
2406
  }
2401
- `,fT=zm`
2407
+ `,gT=zm`
2402
2408
  mutation addSkillToAgent($agent_id: ID!, $skill_id: ID!) {
2403
2409
  add_skill_to_agent(agent_id: $agent_id, skill_id: $skill_id) {
2404
2410
  success
2405
2411
  }
2406
2412
  }
2407
- `,_T=zm`
2413
+ `,vT=zm`
2408
2414
  mutation removeSkillFromAgent($agent_id: ID!, $skill_id: ID!) {
2409
2415
  remove_skill_from_agent(agent_id: $agent_id, skill_id: $skill_id) {
2410
2416
  success
2411
2417
  }
2412
2418
  }
2413
- `,gT=zm`
2419
+ `,yT=zm`
2414
2420
  query getAgentTriggersCatalog($block_reference_ids: [ID!]) {
2415
2421
  agent_triggers_catalog(block_reference_ids: $block_reference_ids) {
2416
2422
  block_reference_id
@@ -2427,7 +2433,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2427
2433
  }
2428
2434
  }
2429
2435
  }
2430
- `,vT=zm`
2436
+ `,bT=zm`
2431
2437
  query getAgentSkillsCatalog {
2432
2438
  agent_skills_catalog {
2433
2439
  id
@@ -2435,7 +2441,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2435
2441
  description
2436
2442
  }
2437
2443
  }
2438
- `,yT=zm`
2444
+ `,wT=zm`
2439
2445
  mutation createAgentSkill($name: String!, $content: String!, $description: String) {
2440
2446
  create_agent_skill(name: $name, content: $content, description: $description) {
2441
2447
  id
@@ -2443,7 +2449,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2443
2449
  description
2444
2450
  }
2445
2451
  }
2446
- `,bT={action:e.enum(["create","create_blank","get","update","delete","activate","deactivate","run"]).describe('"create" — create a new agent via AI (pass prompt). "create_blank" — create a new agent manually (pass name/role/etc). "get" — fetch one agent by agent_id or list owned agents. "update" — modify mutable fields on an existing agent. "delete" — permanently delete an agent (irreversible). "activate" — transition agent to ACTIVE. "deactivate" — transition agent to INACTIVE. "run" — manually enqueue an agent run (fire-and-forget).'),agent_id:e.string().trim().min(1,"agent_id must be a non-empty string").optional().describe('Used with action:"get" to fetch a specific agent. Required for action:"update", "delete", "activate", "deactivate", "run". Omit for action:"create", "create_blank", or action:"get" (to list owned agents).'),prompt:e.string().trim().min(1).optional().describe('Required for action:"create". Plain-language description of what the agent should do. Platform generates profile, goal, and plan via AI.'),agent_model:e.nativeEnum(Wy).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:e.string().trim().min(1).optional().describe('Used with action:"create_blank". HTTPS URL of the avatar. Prefer dapulse-res.cloudinary.com or cdn.monday.com.'),gender:e.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:e.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:e.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:e.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const wT={action:e.enum(["list","add","remove"]).describe('"list" — returns all triggers currently attached to this agent (includes node_id needed for remove). "add" — attaches a new trigger by block_reference_id. "remove" — detaches a trigger instance by node_id.'),agent_id:e.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:e.string().trim().min(1).optional().describe('Required for action:"add". The block_reference_id from agent_catalog action:"list_triggers" identifying the trigger type to attach. Never guess this value — look it up in the catalog first.'),field_values:e.record(e.union([e.string(),e.number(),e.boolean(),e.object({value:e.string(),label:e.string()}).passthrough()])).optional().describe('Used with action:"add" when the trigger type has required_fields. Key/value object whose shape is described by field_schemas in the agent_catalog response. Scalar fields use string/number/boolean values. Selection fields use { "value": "<id>", "label": "<name>" }.'),node_id:e.string().trim().min(1).optional().describe('Required for action:"remove". The node_id of the trigger instance — get it from action:"list". Each instance has a unique node_id even if the same trigger type is attached multiple times. Do NOT pass block_reference_id here.')};const IT={action:e.enum(["create","add","remove"]).describe('"create" — author a new custom skill in the account-wide catalog (no agent_id needed). "add" — attach an existing skill to this agent by skill_id. "remove" — detach a skill from this agent.'),agent_id:e.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:e.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:e.string().trim().min(1).optional().describe('Required for action:"create". Markdown instructions defining what the skill does and how to execute it. Be specific and thorough — this is the skill\'s runtime behavior.'),description:e.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:e.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". The skill id from agent_catalog action:"list_skills", or the id returned by action:"create" in this tool. Never guess or invent a skill id.')};const ET=zm`
2452
+ `,IT={action:e.enum(["create","create_blank","get","update","delete","activate","deactivate","run"]).describe('"create" — create a new agent via AI (pass prompt). "create_blank" — create a new agent manually (pass name/role/etc). "get" — fetch one agent by agent_id or list owned agents. "update" — modify mutable fields on an existing agent. "delete" — permanently delete an agent (irreversible). "activate" — transition agent to ACTIVE. "deactivate" — transition agent to INACTIVE. "run" — manually enqueue an agent run (fire-and-forget).'),agent_id:e.string().trim().min(1,"agent_id must be a non-empty string").optional().describe('Used with action:"get" to fetch a specific agent. Required for action:"update", "delete", "activate", "deactivate", "run". Omit for action:"create", "create_blank", or action:"get" (to list owned agents).'),prompt:e.string().trim().min(1).optional().describe('Required for action:"create". Plain-language description of what the agent should do. Platform generates profile, goal, and plan via AI.'),agent_model:e.nativeEnum(Qy).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:e.string().trim().min(1).optional().describe('Used with action:"create_blank". HTTPS URL of the avatar. Prefer dapulse-res.cloudinary.com or cdn.monday.com.'),gender:e.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:e.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:e.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:e.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const ET={action:e.enum(["list","add","remove"]).describe('"list" — returns all triggers currently attached to this agent (includes node_id needed for remove). "add" — attaches a new trigger by block_reference_id. "remove" — detaches a trigger instance by node_id.'),agent_id:e.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:e.string().trim().min(1).optional().describe('Required for action:"add". The block_reference_id from agent_catalog action:"list_triggers" identifying the trigger type to attach. Never guess this value — look it up in the catalog first.'),field_values:e.record(e.union([e.string(),e.number(),e.boolean(),e.object({value:e.string(),label:e.string()}).passthrough()])).optional().describe('Used with action:"add" when the trigger type has required_fields. Key/value object whose shape is described by field_schemas in the agent_catalog response. Scalar fields use string/number/boolean values. Selection fields use { "value": "<id>", "label": "<name>" }.'),node_id:e.string().trim().min(1).optional().describe('Required for action:"remove". The node_id of the trigger instance — get it from action:"list". Each instance has a unique node_id even if the same trigger type is attached multiple times. Do NOT pass block_reference_id here.')};const TT={action:e.enum(["create","add","remove"]).describe('"create" — author a new custom skill in the account-wide catalog (no agent_id needed). "add" — attach an existing skill to this agent by skill_id. "remove" — detach a skill from this agent.'),agent_id:e.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:e.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:e.string().trim().min(1).optional().describe('Required for action:"create". Markdown instructions defining what the skill does and how to execute it. Be specific and thorough — this is the skill\'s runtime behavior.'),description:e.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:e.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". The skill id from agent_catalog action:"list_skills", or the id returned by action:"create" in this tool. Never guess or invent a skill id.')};const AT=zm`
2447
2453
  query getAgentKnowledge($id: ID!) {
2448
2454
  agent_knowledge(id: $id) {
2449
2455
  resources {
@@ -2458,25 +2464,25 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2458
2464
  }
2459
2465
  }
2460
2466
  }
2461
- `,TT=zm`
2467
+ `,ST=zm`
2462
2468
  mutation addAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2463
2469
  add_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2464
2470
  success
2465
2471
  }
2466
2472
  }
2467
- `,AT=zm`
2473
+ `,DT=zm`
2468
2474
  mutation removeAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!) {
2469
2475
  remove_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type) {
2470
2476
  success
2471
2477
  }
2472
2478
  }
2473
- `,ST=zm`
2479
+ `,NT=zm`
2474
2480
  mutation updateAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2475
2481
  update_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2476
2482
  success
2477
2483
  }
2478
2484
  }
2479
- `,DT={action:e.enum(["list","add","update","remove"]).describe('"list" — returns all resources the agent currently has access to. "add" — grants access to a board or doc. "update" — changes the permission level on an existing resource. "remove" — revokes the agent\'s access to a board or doc.'),agent_id:e.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:e.string().trim().min(1).optional().describe("Required for action:add, action:update, action:remove. The ID of the board or doc to grant/update/revoke access to."),scope_type:e.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:e.enum(["READ","READ_WRITE"]).optional().describe('Required for action:add and action:update. The permission level: "READ" (agent can read the resource) or "READ_WRITE" (agent can read and write the resource).')};const NT={action:e.enum(["list_triggers","list_skills"]).describe('"list_triggers" — fetch available trigger types with block_reference_id, field_schemas, and required_fields. Call before using manage_agent_triggers action:"add". "list_skills" — fetch available skills with id, name, description. Call before using manage_agent_skills action:"add".'),block_reference_ids:e.array(e.string()).min(1).optional().describe('Used with action:"list_triggers". Fetch specific trigger types by block_reference_id. Omit to return all trigger types.')};const OT=zm`
2485
+ `,OT={action:e.enum(["list","add","update","remove"]).describe('"list" — returns all resources the agent currently has access to. "add" — grants access to a board or doc. "update" — changes the permission level on an existing resource. "remove" — revokes the agent\'s access to a board or doc.'),agent_id:e.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:e.string().trim().min(1).optional().describe("Required for action:add, action:update, action:remove. The ID of the board or doc to grant/update/revoke access to."),scope_type:e.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:e.enum(["READ","READ_WRITE"]).optional().describe('Required for action:add and action:update. The permission level: "READ" (agent can read the resource) or "READ_WRITE" (agent can read and write the resource).')};const kT={action:e.enum(["list_triggers","list_skills"]).describe('"list_triggers" — fetch available trigger types with block_reference_id, field_schemas, and required_fields. Call before using manage_agent_triggers action:"add". "list_skills" — fetch available skills with id, name, description. Call before using manage_agent_skills action:"add".'),block_reference_ids:e.array(e.string()).min(1).optional().describe('Used with action:"list_triggers". Fetch specific trigger types by block_reference_id. Omit to return all trigger types.')};const RT=zm`
2480
2486
  query getBoardAutomations($boardIds: [ID!], $limit: Int, $cursor: String, $includeLegacy: Boolean!) {
2481
2487
  board_automations(board_ids: $boardIds, limit: $limit, cursor: $cursor) {
2482
2488
  cursor
@@ -2498,39 +2504,39 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2498
2504
  }
2499
2505
  }
2500
2506
  }
2501
- `;function kT(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function RT(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:kT(a),is_active:t??!1}}const CT={boardId:e.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:e.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:e.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const PT=zm`
2507
+ `;function CT(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function PT(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:CT(a),is_active:t??!1}}const $T={boardId:e.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:e.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:e.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const xT=zm`
2502
2508
  mutation activateLiveWorkflow($id: ID!) {
2503
2509
  activate_live_workflow(id: $id) {
2504
2510
  is_success
2505
2511
  }
2506
2512
  }
2507
- `,$T=zm`
2513
+ `,LT=zm`
2508
2514
  mutation deactivateLiveWorkflow($id: ID!) {
2509
2515
  deactivate_live_workflow(id: $id) {
2510
2516
  is_success
2511
2517
  }
2512
2518
  }
2513
- `,xT=zm`
2519
+ `,UT=zm`
2514
2520
  mutation deleteLiveWorkflow($id: ID!) {
2515
2521
  delete_live_workflow(id: $id) {
2516
2522
  is_success
2517
2523
  }
2518
2524
  }
2519
- `,LT={action:e.enum(["activate","deactivate","delete"]).describe("The operation to perform. activate: enables a paused automation so it responds to its trigger. deactivate: pauses an automation without deleting it. delete: permanently removes an automation (irreversible)."),workflowId:e.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const UT="platform-agent",FT=({path:e,method:t,headers:a,body:i,signal:r})=>fetch(`https://api.monday.com${e}`,{method:t,headers:a,body:i,signal:r}),MT=e=>e?.fetchConfig?.fetch??FT,VT={userPrompt:e.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:e.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const jT="\n triggerUuid\n eventState\n eventKind\n triggerStartedAt\n createdAt\n triggerDuration\n errorReason\n entityKind\n hostType\n hostInstanceId\n billingActionsCount\n creatorAppFeatureReferenceId\n waitingForTriggerName\n reignitionSubscriptionId\n",BT=zm`
2525
+ `,FT={action:e.enum(["activate","deactivate","delete"]).describe("The operation to perform. activate: enables a paused automation so it responds to its trigger. deactivate: pauses an automation without deleting it. delete: permanently removes an automation (irreversible)."),workflowId:e.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const MT="platform-agent",VT=({path:e,method:t,headers:a,body:i,signal:r})=>fetch(`https://api.monday.com${e}`,{method:t,headers:a,body:i,signal:r}),jT=e=>e?.fetchConfig?.fetch??VT,BT={userPrompt:e.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:e.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const qT="\n triggerUuid\n eventState\n eventKind\n triggerStartedAt\n createdAt\n triggerDuration\n errorReason\n entityKind\n hostType\n hostInstanceId\n billingActionsCount\n creatorAppFeatureReferenceId\n waitingForTriggerName\n reignitionSubscriptionId\n",HT=zm`
2520
2526
  query GetTriggerEvents($nextPageOffset: Int, $filters: TriggerEventsFiltersInput) {
2521
2527
  trigger_events(nextPageOffset: $nextPageOffset, filters: $filters) {
2522
2528
  triggerEvents {
2523
- ${jT}
2529
+ ${qT}
2524
2530
  }
2525
2531
  }
2526
2532
  }
2527
- `,qT=zm`
2533
+ `,GT=zm`
2528
2534
  query GetTriggerEvent($triggerUuid: String!) {
2529
2535
  trigger_event(triggerUuid: $triggerUuid) {
2530
- ${jT}
2536
+ ${qT}
2531
2537
  }
2532
2538
  }
2533
- `,HT=zm`
2539
+ `,WT=zm`
2534
2540
  query GetBlockEvents($triggerUuid: String!, $nextPageOffset: Int) {
2535
2541
  block_events(triggerUuid: $triggerUuid, nextPageOffset: $nextPageOffset) {
2536
2542
  blockEvents {
@@ -2550,7 +2556,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2550
2556
  }
2551
2557
  }
2552
2558
  }
2553
- `,GT=zm`
2559
+ `,YT=zm`
2554
2560
  query GetToolEvents($triggerUuid: String!, $nextPageOffset: Int) {
2555
2561
  tool_events(trigger_uuid: $triggerUuid, next_page_offset: $nextPageOffset) {
2556
2562
  tool_events {
@@ -2566,7 +2572,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2566
2572
  }
2567
2573
  }
2568
2574
  }
2569
- `,WT=e.object({dateRange:e.object({startDate:e.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:e.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:e.array(e.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:e.array(e.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:e.array(e.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:e.string().optional().describe("Filter by item identifier"),entityKind:e.string().optional().describe("Filter by entity kind"),hostType:e.string().optional().describe("Filter by host type")}).optional(),YT={mode:e.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:e.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:e.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:e.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:WT.describe("history: run filters"),triggerUuid:e.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:e.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:e.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:e.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const QT=zm`
2575
+ `,QT=e.object({dateRange:e.object({startDate:e.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:e.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:e.array(e.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:e.array(e.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:e.array(e.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:e.string().optional().describe("Filter by item identifier"),entityKind:e.string().optional().describe("Filter by entity kind"),hostType:e.string().optional().describe("Filter by host type")}).optional(),zT={mode:e.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:e.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:e.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:e.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:QT.describe("history: run filters"),triggerUuid:e.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:e.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:e.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:e.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const KT=zm`
2570
2576
  query GetAccountTriggerStatistics($filters: AccountTriggerStatisticsFiltersInput) {
2571
2577
  account_trigger_statistics(filters: $filters) {
2572
2578
  id
@@ -2575,7 +2581,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2575
2581
  total
2576
2582
  }
2577
2583
  }
2578
- `,zT=zm`
2584
+ `,JT=zm`
2579
2585
  query GetAccountTriggersByEntity($runStatus: TriggerEventState!, $filters: AccountTriggersByEntityIdFiltersInput) {
2580
2586
  account_triggers_statistics_by_entity_id(run_status: $runStatus, filters: $filters) {
2581
2587
  id
@@ -2583,7 +2589,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2583
2589
  workflow_statistics
2584
2590
  }
2585
2591
  }
2586
- `,KT={breakdown:e.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:e.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:e.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:e.array(e.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:e.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:e.array(e.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const JT=zm`
2592
+ `,XT={breakdown:e.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:e.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:e.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:e.array(e.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:e.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:e.array(e.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const ZT=zm`
2587
2593
  mutation createWorkflow(
2588
2594
  $workspace_id: ID!
2589
2595
  $title: String
@@ -2604,7 +2610,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2604
2610
  workflow_draft_id
2605
2611
  }
2606
2612
  }
2607
- `,XT={workspaceId:e.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:e.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:e.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:e.string().optional().describe("Optional workflow description."),folderId:e.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:e.array(e.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const ZT={workflowObjectId:e.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:e.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:e.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const eA={prompt:e.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const tA=zm`
2613
+ `,eA={workspaceId:e.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:e.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:e.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:e.string().optional().describe("Optional workflow description."),folderId:e.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:e.array(e.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const tA={workflowObjectId:e.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:e.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:e.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const aA={prompt:e.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const iA=zm`
2608
2614
  mutation publishWorkflow($workflow_object_id: ID!, $workflow_draft_id: ID!, $should_activate: Boolean) {
2609
2615
  publish_workflow(
2610
2616
  workflow_object_id: $workflow_object_id
@@ -2615,7 +2621,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2615
2621
  workflow_live_id
2616
2622
  }
2617
2623
  }
2618
- `,aA={workflowObjectId:e.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:e.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:e.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const iA=zm`
2624
+ `,rA={workflowObjectId:e.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:e.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:e.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const nA=zm`
2619
2625
  mutation ConfigureCategorizeAiColumn(
2620
2626
  $boardId: ID!
2621
2627
  $columnId: ID!
@@ -2635,7 +2641,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2635
2641
  column_id
2636
2642
  }
2637
2643
  }
2638
- `,rA=zm`
2644
+ `,oA=zm`
2639
2645
  mutation ConfigureSummarizeAiColumn(
2640
2646
  $boardId: ID!
2641
2647
  $columnId: ID!
@@ -2655,7 +2661,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2655
2661
  column_id
2656
2662
  }
2657
2663
  }
2658
- `,nA=zm`
2664
+ `,sA=zm`
2659
2665
  mutation ConfigureTranslateAiColumn(
2660
2666
  $boardId: ID!
2661
2667
  $columnId: ID!
@@ -2675,7 +2681,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2675
2681
  column_id
2676
2682
  }
2677
2683
  }
2678
- `,oA=zm`
2684
+ `,dA=zm`
2679
2685
  mutation ConfigureImproveTextAiColumn(
2680
2686
  $boardId: ID!
2681
2687
  $columnId: ID!
@@ -2699,7 +2705,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2699
2705
  column_id
2700
2706
  }
2701
2707
  }
2702
- `,sA=zm`
2708
+ `,pA=zm`
2703
2709
  mutation ConfigureExtractAiColumn(
2704
2710
  $boardId: ID!
2705
2711
  $columnId: ID!
@@ -2723,7 +2729,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2723
2729
  column_id
2724
2730
  }
2725
2731
  }
2726
- `,dA=zm`
2732
+ `,lA=zm`
2727
2733
  mutation ConfigureOpenBlockAiColumn(
2728
2734
  $boardId: ID!
2729
2735
  $columnId: ID!
@@ -2739,7 +2745,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2739
2745
  column_id
2740
2746
  }
2741
2747
  }
2742
- `,pA=zm`
2748
+ `,cA=zm`
2743
2749
  mutation ConfigureWriteMeAiColumn(
2744
2750
  $boardId: ID!
2745
2751
  $columnId: ID!
@@ -2759,7 +2765,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2759
2765
  column_id
2760
2766
  }
2761
2767
  }
2762
- `,lA=zm`
2768
+ `,mA=zm`
2763
2769
  mutation ConfigurePersonAssignmentAiColumn(
2764
2770
  $boardId: ID!
2765
2771
  $columnId: ID!
@@ -2779,14 +2785,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2779
2785
  column_id
2780
2786
  }
2781
2787
  }
2782
- `,cA={board_id:e.number().describe("The ID of the board containing the column"),column_id:e.string().describe("The ID of the column to configure with AI"),block_type:e.enum(["categorize","summarize","translate","improve_text","extract","open_block","write_me","person_assignment"]).describe("The AI block type to configure. See tool description for which fields apply to each block."),source_type:e.enum(["item_name","thread","column","emails_and_activities"]).optional().describe("Where the AI reads input. Required for all blocks except open_block and write_me. Values: item_name (item name), thread (updates/comments), column (another column — requires source_column_id), emails_and_activities (categorize only)."),source_column_id:e.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:e.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:e.enum(["english","spanish","french","german","hebrew","chinese","korean","arabic","bengali","danish","dutch","hindi","indonesian","italian","japanese","norwegian","polish","portuguese","russian","swedish","thai","turkish","vietnamese"]).optional().describe("Required for translate block. The target language to translate text into."),tone:e.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:e.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:e.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:e.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:e.enum(["email_address","first_name","last_name","phone_number","company_name","domain_name","url","date","time","year","custom"]).optional().describe("Required for extract block. Type of entity to extract from text."),custom_instructions:e.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:e.string().max(3e3).optional().describe("Required for open_block and write_me. Natural-language prompt. Reference columns via {pulse.column_id}, item name via {pulse.name}, subitems via {pulse.subitem.column_id}. Max 3000 chars."),groups:e.array(e.object({user_ids:e.array(e.number()).describe("Array of user IDs in this group"),description:e.string().describe("Description of this group (e.g., role, team name, or assignment criteria)")})).optional().describe("Required for person_assignment. Array of groups, each with user_ids and a description."),run_backfill:e.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const mA=zm`
2788
+ `,uA={board_id:e.number().describe("The ID of the board containing the column"),column_id:e.string().describe("The ID of the column to configure with AI"),block_type:e.enum(["categorize","summarize","translate","improve_text","extract","open_block","write_me","person_assignment"]).describe("The AI block type to configure. See tool description for which fields apply to each block."),source_type:e.enum(["item_name","thread","column","emails_and_activities"]).optional().describe("Where the AI reads input. Required for all blocks except open_block and write_me. Values: item_name (item name), thread (updates/comments), column (another column — requires source_column_id), emails_and_activities (categorize only)."),source_column_id:e.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:e.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:e.enum(["english","spanish","french","german","hebrew","chinese","korean","arabic","bengali","danish","dutch","hindi","indonesian","italian","japanese","norwegian","polish","portuguese","russian","swedish","thai","turkish","vietnamese"]).optional().describe("Required for translate block. The target language to translate text into."),tone:e.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:e.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:e.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:e.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:e.enum(["email_address","first_name","last_name","phone_number","company_name","domain_name","url","date","time","year","custom"]).optional().describe("Required for extract block. Type of entity to extract from text."),custom_instructions:e.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:e.string().max(3e3).optional().describe("Required for open_block and write_me. Natural-language prompt. Reference columns via {pulse.column_id}, item name via {pulse.name}, subitems via {pulse.subitem.column_id}. Max 3000 chars."),groups:e.array(e.object({user_ids:e.array(e.number()).describe("Array of user IDs in this group"),description:e.string().describe("Description of this group (e.g., role, team name, or assignment criteria)")})).optional().describe("Required for person_assignment. Array of groups, each with user_ids and a description."),run_backfill:e.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const hA=zm`
2783
2789
  mutation RemoveAiFromColumn($boardId: ID!, $columnId: ID!) {
2784
2790
  remove_ai_from_column(board_id: $boardId, column_id: $columnId) {
2785
2791
  column_id
2786
2792
  success
2787
2793
  }
2788
2794
  }
2789
- `,uA={board_id:e.number().describe("The ID of the board containing the column"),column_id:e.string().describe("The ID of the column to remove AI from")};const hA={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 fA{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 hA}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:{action:"enable",tool_name:a,success:!0,message:`Tool '${a}' is already enabled`,enabled:!0}};const e=this.toolkitManager.enableTool(a);return{content:{action:"enable",tool_name:a,success:e,message:e?`Tool '${a}' has been enabled and is now available for use`:`Failed to enable tool '${a}' (tool not found)`,enabled:e}}}case"disable":{if(!a)throw new Error("Tool name is required for disable action");const e=this.toolkitManager.disableTool(a);return{content:{action:"disable",tool_name:a,success:e,message:e?`Tool '${a}' has been disabled`:`Failed to disable tool '${a}' (tool not found)`,enabled:!e}}}case"status":if(a){return{content:{action:"status",tool_name:a,enabled:this.toolkitManager.isToolEnabled(a)}}}return{content:{action:"status",tools:this.toolkitManager.getToolsStatus()}};case"detailed":{const e=this.toolkitManager.getDetailedToolsStatus();return{content:{action:"detailed",active_tools:Object.entries(e).filter((([,e])=>e.enabled)).map((([e,t])=>({name:e,enabled_by_default:t.enabledByDefault}))),inactive_tools:Object.entries(e).filter((([,e])=>!e.enabled)).map((([e,t])=>({name:e,enabled_by_default:t.enabledByDefault,activate_hint:`{"action": "enable", "toolName": "${e}"}`})))}}}case"reset":{if(!a)throw new Error("Tool name is required for reset action");const e=this.toolkitManager.resetToolToDefault(a);return{content:{action:"reset",tool_name:a,success:e,message:e?`Tool '${a}' has been reset to its default state`:`Failed to reset tool '${a}' (tool not found)`,default_state:this.toolkitManager.isToolEnabledByDefault(a)}}}case"list":return{content:{action:"list",tools:this.toolkitManager.getToolsStatus()}};default:throw new Error("Invalid action. Use: enable, disable, status, list, detailed, or reset")}}}const _A=zm`
2795
+ `,fA={board_id:e.number().describe("The ID of the board containing the column"),column_id:e.string().describe("The ID of the column to remove AI from")};const _A={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 gA{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 _A}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:{action:"enable",tool_name:a,success:!0,message:`Tool '${a}' is already enabled`,enabled:!0}};const e=this.toolkitManager.enableTool(a);return{content:{action:"enable",tool_name:a,success:e,message:e?`Tool '${a}' has been enabled and is now available for use`:`Failed to enable tool '${a}' (tool not found)`,enabled:e}}}case"disable":{if(!a)throw new Error("Tool name is required for disable action");const e=this.toolkitManager.disableTool(a);return{content:{action:"disable",tool_name:a,success:e,message:e?`Tool '${a}' has been disabled`:`Failed to disable tool '${a}' (tool not found)`,enabled:!e}}}case"status":if(a){return{content:{action:"status",tool_name:a,enabled:this.toolkitManager.isToolEnabled(a)}}}return{content:{action:"status",tools:this.toolkitManager.getToolsStatus()}};case"detailed":{const e=this.toolkitManager.getDetailedToolsStatus();return{content:{action:"detailed",active_tools:Object.entries(e).filter((([,e])=>e.enabled)).map((([e,t])=>({name:e,enabled_by_default:t.enabledByDefault}))),inactive_tools:Object.entries(e).filter((([,e])=>!e.enabled)).map((([e,t])=>({name:e,enabled_by_default:t.enabledByDefault,activate_hint:`{"action": "enable", "toolName": "${e}"}`})))}}}case"reset":{if(!a)throw new Error("Tool name is required for reset action");const e=this.toolkitManager.resetToolToDefault(a);return{content:{action:"reset",tool_name:a,success:e,message:e?`Tool '${a}' has been reset to its default state`:`Failed to reset tool '${a}' (tool not found)`,default_state:this.toolkitManager.isToolEnabledByDefault(a)}}}case"list":return{content:{action:"list",tools:this.toolkitManager.getToolsStatus()}};default:throw new Error("Invalid action. Use: enable, disable, status, list, detailed, or reset")}}}const vA=zm`
2790
2796
  query getSprintsByIds($ids: [ID!]) {
2791
2797
  items(ids: $ids) {
2792
2798
  id
@@ -2821,7 +2827,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2821
2827
  }
2822
2828
  }
2823
2829
  }
2824
- `,gA={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"},vA={...gA,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},yA="BOARD_NOT_FOUND:",bA="SPRINT_NOT_FOUND:",wA="DOCUMENT_NOT_FOUND:",IA="DOCUMENT_INVALID:",EA="DOCUMENT_EMPTY:",TA="EXPORT_FAILED:",AA="INTERNAL_ERROR:",SA="VALIDATION_ERROR:",DA="task_sprint",NA={[vA.SPRINT_TASKS]:"Sprint Tasks",[vA.SPRINT_TIMELINE]:"Sprint Timeline",[vA.SPRINT_COMPLETION]:"Sprint Completion",[vA.SPRINT_START_DATE]:"Sprint Start Date",[vA.SPRINT_END_DATE]:"Sprint End Date",[vA.SPRINT_ACTIVATION]:"Sprint Activation",[vA.SPRINT_SUMMARY]:"Sprint Summary",[vA.SPRINT_CAPACITY]:"Sprint Capacity"},OA=Kl,kA={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},RA=(e,t)=>e.column_values?.find((e=>e.id===t)),CA=(e,t)=>{const a=RA(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},PA=(e,t)=>{const a=RA(e,t);return"DateValue"===a?.__typename?a.date??null:null},$A=(e,t)=>{const a=RA(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},xA=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},LA=(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)))},UA=e=>LA(e,Object.values(gA)),FA=e=>LA(e,Object.values(kA)),MA=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},VA=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Hf.BoardRelation))||null,jA={sprintId:e.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const BA=zm`
2830
+ `,yA={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"},bA={...yA,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},wA="BOARD_NOT_FOUND:",IA="SPRINT_NOT_FOUND:",EA="DOCUMENT_NOT_FOUND:",TA="DOCUMENT_INVALID:",AA="DOCUMENT_EMPTY:",SA="EXPORT_FAILED:",DA="INTERNAL_ERROR:",NA="VALIDATION_ERROR:",OA="task_sprint",kA={[bA.SPRINT_TASKS]:"Sprint Tasks",[bA.SPRINT_TIMELINE]:"Sprint Timeline",[bA.SPRINT_COMPLETION]:"Sprint Completion",[bA.SPRINT_START_DATE]:"Sprint Start Date",[bA.SPRINT_END_DATE]:"Sprint End Date",[bA.SPRINT_ACTIVATION]:"Sprint Activation",[bA.SPRINT_SUMMARY]:"Sprint Summary",[bA.SPRINT_CAPACITY]:"Sprint Capacity"},RA=Kl,CA={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},PA=(e,t)=>e.column_values?.find((e=>e.id===t)),$A=(e,t)=>{const a=PA(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},xA=(e,t)=>{const a=PA(e,t);return"DateValue"===a?.__typename?a.date??null:null},LA=(e,t)=>{const a=PA(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},UA=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},FA=(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)))},MA=e=>FA(e,Object.values(yA)),VA=e=>FA(e,Object.values(CA)),jA=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},BA=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Hf.BoardRelation))||null,qA={sprintId:e.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const HA=zm`
2825
2831
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
2826
2832
  boards(ids: [$boardId]) {
2827
2833
  items_page(limit: $limit) {
@@ -2857,7 +2863,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2857
2863
  }
2858
2864
  }
2859
2865
  }
2860
- `,qA={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 HA=zm`
2866
+ `,GA={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 WA=zm`
2861
2867
  query GetRecentBoards($limit: Int) {
2862
2868
  boards(limit: $limit, order_by: used_at, state: active) {
2863
2869
  id
@@ -2873,7 +2879,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2873
2879
  }
2874
2880
  }
2875
2881
  }
2876
- `,GA={};const WA=[class extends Tr{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=Mi.READ,this.annotations=Er({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 GA}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(HA,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${yA} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);return 0===a.length?{content:{message:"No monday-dev sprints board pairs found. ### 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### 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`;",boards_checked:t.length,pairs:[]}}:{content:{message:`Found ${a.length} matched pair(s)`,...a.length>1?{warning:"Multiple board pairs detected. Confirm with user which pair and workspace to use before any operation."}:{},pairs:a.map((e=>({sprints_board:{id:e.sprintsBoard.id,name:e.sprintsBoard.name,workspace_id:e.sprintsBoard.workspaceId,workspace_name:e.sprintsBoard.workspaceName},tasks_board:{id:e.tasksBoard.id,name:e.tasksBoard.name,workspace_id:e.tasksBoard.workspaceId,workspace_name:e.tasksBoard.workspaceName}}))),technical_reference:"Sprint Operations (all require correct board pair): Add to Sprint: Update `task_sprint` column with sprint item ID. Remove from Sprint: Clear `task_sprint` column (set to null). Search in Sprint: Filter where `task_sprint` equals sprint item ID. Move Between Sprints: Update `task_sprint` with new sprint item ID. Backlog Tasks: `task_sprint` is empty/null. Critical: `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}}}catch(e){return{content:`${AA} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}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=VA(e,gA.SPRINT_TASKS);if(!i)return;const r=MA(i);if(!r)return;const n=`${e.id}:${r}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(r,o,`Tasks Board ${r}`)})}processTasksBoard(e,t,a){const i=VA(e,DA);if(!i)return;const r=MA(i);if(!r)return;const n=`${r}:${e.id}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(r,o,`Sprints Board ${r}`),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&&(UA(i)&&this.processSprintsBoard(i,a,t),FA(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Tr{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=Mi.READ,this.annotations=Er({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 qA}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(BA,a),r=i.boards?.[0],n=r?.items_page?.items||[],o=this.buildSprintsMetadata(n);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:n.length,data:o}}}catch(e){return{content:`${AA} 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(au,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${yA} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const r=i.columns||[],n=this.validateSprintsBoardSchemaFromColumns(r);return n.isValid?{success:!0}:{success:!1,error:`${SA} ${n.errorMessage}`}}catch(e){return{success:!1,error:`${AA} 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(gA),i=xA(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=>NA[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=CA(e,vA.SPRINT_ACTIVATION),a=CA(e,vA.SPRINT_COMPLETION),i=PA(e,vA.SPRINT_START_DATE),r=PA(e,vA.SPRINT_END_DATE),n=((e,t)=>{const a=RA(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,vA.SPRINT_TIMELINE),o=$A(e,vA.SPRINT_SUMMARY);let s=OA.Planned;return a?s=OA.Completed:(t||i)&&(s=OA.Active),{id:e.id,name:e.name||"Unknown",status:s,timeline:n?{from:n.from,to:n.to}:null,start_date:i||null,end_date:r||null,is_completed:a,document_object_id:o||null}}))}},class extends Tr{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=Mi.READ,this.annotations=Er({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 jA}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${AA} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:{message:"Sprint summary retrieved",sprint_id:e.sprintId,sprint_name:t.sprintName,markdown:a.content}}:{content:a.error||`${AA} Unknown error occurred while reading document content`}}catch(e){return{content:`${AA} 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(_A,t)).items||[];if(0===a.length)return{success:!1,error:`${bA} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${bA} Sprint with ID ${e} not found.`};const r=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(gA),...t];return xA(a,i)})(i,[vA.SPRINT_SUMMARY]);if(!r.isValid)return{success:!1,error:`${SA} Sprint item is missing required columns: ${r.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const n=$A(i,vA.SPRINT_SUMMARY);return n?{success:!0,documentObjectId:n,sprintName:i.name}:{success:!1,error:`${wA} 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:`${AA} 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(Km,t)).docs||[];if(0===a.length)return{success:!1,error:`${wA} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${IA} Document data is invalid for object ID ${e}.`};const r={docId:i.id,blockIds:[]},n=await this.mondayApi.request(hu,r);if(!n.export_markdown_from_doc?.success)return{success:!1,error:`${TA} Failed to export markdown from document: ${n.export_markdown_from_doc?.error||"Unknown error"}`};const o=n.export_markdown_from_doc.markdown;return o?{success:!0,content:o}:{success:!1,error:`${EA} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${AA} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],YA=[class extends Tr{constructor(){super(...arguments),this.name="delete_item",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return g_}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(eu,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_items_page",this.type=Mi.READ,this.annotations=Er({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 and item descriptions. 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. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board 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. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return C_}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){yu(t),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,includeDescription:e.includeItemDescription};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(k_,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:bl.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,r=i?.items||[];return{board:{id:a?.id,name:a?.name},items:r.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:r.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,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)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks: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 Hf.BoardRelation:return e.linked_items;case Hf.Formula:return e.display_value;case Hf.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={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(R_,t,{versionOverride:"dev",timeout:$f})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const r=new Set(i);return a.filter((e=>r.has(e)))}},class extends Tr{constructor(){super(...arguments),this.name="create_item",this.type=Mi.WRITE,this.annotations=Er({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?i_:r_}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(t_,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let r;try{r=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const n={...r,name:e.name},o=new Au(this.mondayApi,{boardId:t});return await o.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(n)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){vu(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(a_,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){vu(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(tu,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){vu(e,"create item")}}},class extends Tr{constructor(){super(...arguments),this.name="create_update",this.type=Mi.WRITE,this.annotations=Er({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. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return p_}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=d_.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,parentId:e.parentId?.toString()},i=await this.mondayApi.request(o_,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){vu(e,"create update")}}},class extends Tr{constructor(){super(...arguments),this.name="get_updates",this.type=Mi.READ,this.annotations=Er({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. For Board queries, you can filter by date range using fromDate and toDate (both required together, ISO8601 format). By default, Board queries return only board discussion. Set includeItemUpdates to true to also include updates on individual items. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return u_}async executeInternal(e){try{const t=void 0!==e.fromDate,a=void 0!==e.toDate;if(t!==a)throw new Error("Both fromDate and toDate must be provided together for date range filtering");if((t||a)&&e.objectType===m_.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let r;r=e.objectType===m_.Item?await this.mondayApi.request(l_,{...i,itemId:e.objectId}):await this.mondayApi.request(c_,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:h_(e.fromDate),toDate:h_(e.toDate)}:{}});const n=e.objectType===m_.Item?r.items?.[0]?.updates:r.boards?.[0]?.updates;if(!n||0===n.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const o=n.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),s=e.objectType===m_.Item?r.items?.[0]?.url:r.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:s,updates:o,pagination:{page:e.page??1,limit:e.limit??25,count:o.length}}}}catch(e){vu(e,"get updates")}}},class extends Tr{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=Mi.WRITE,this.annotations=Er({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 sy}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=oy.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(o_,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. 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){vu(e,"create update")}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_schema",this.type=Mi.READ,this.annotations=Er({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 P_}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(au,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_activity",this.type=Mi.READ,this.annotations=Er({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). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return A_}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-Pf.MONTH30Days),i=e?.fromDate||a.toISOString(),r=e?.toDate||t.toISOString(),n={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:r,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},o=await this.mondayApi.request(T_,n),s=o.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 ${r}).`};const d=o.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:d?.name,board_url:d?.url,data:s.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_info",this.type=Mi.READ,this.annotations=Er({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return O_}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(S_,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 r=await this.getSubItemsBoardAsync(i);return{content:N_(i,r)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Hf.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(D_,{boardId:a});return i.boards?.[0]??null}},class extends Tr{constructor(){super(...arguments),this.name="get_full_board_data",this.type=Mi.READ,this.annotations=Er({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 E_}async executeInternal(e){try{const t={boardId:e.boardId,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(y_,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],r=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&r.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&r.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&&r.add(e.id)}))}}))}));const n=Array.from(r).filter((e=>!(Number(e)<0)));let o=[];if(n.length>0){const e={userIds:n},t=await this.mondayApi.request(b_,e);o=t.users?.filter((e=>null!==e))||[]}const s=new Map(o.map((e=>[e.id,e])));return{content:{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&&s.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&&s.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}}}}catch(e){vu(e,"get full board data")}}},class extends Tr{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=Mi.READ,this.annotations=Er({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 cg}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,r=e.teamsOnly||!1,n=e.includeTeamMembers||!1,o=!!e.name;if(e.getMe||!1){if(t||a||i||r||n||o)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(tg);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=rg(s),p=await pg(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}if(o){if(t||a||i||r||n)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const o={name:e.name},s=await this.mondayApi.request(eg,o);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 d=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${s.users.length} user(s) matching "${e.name}":\n\n${d}`,l=await pg(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(r&&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>ng)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>og)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(r||!t&&a&&!i)if(n){const t={teamIds:e.teamIds};s=await this.mondayApi.request(Z_,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(X_,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:sg};s=await this.mondayApi.request(J_,t)}else if(t){const t={userIds:e.userIds,limit:sg};s=await this.mondayApi.request(z_,t)}else{const e={userIds:void 0,limit:sg};s=await this.mondayApi.request(K_,e)}const d=rg(s),p=await pg(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Au,class extends Tr{constructor(){super(...arguments),this.name="move_item_to_group",this.type=Mi.WRITE,this.annotations=Er({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 mg}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(ru,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Tr{constructor(){super(...arguments),this.name="create_board",this.type=Mi.WRITE,this.annotations=Er({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Qu}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(nu,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends Tr{constructor(){super(...arguments),this.name="use_template",this.type=Mi.WRITE,this.annotations=Er({title:"Use Template",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Apply a monday.com template to create boards in a workspace. Returns a process_id immediately — the operation runs asynchronously and can take 30 seconds to 2+ minutes. Use check_template_status(processId) to poll every 5–10 seconds until status is COMPLETE or FAILED. Stop polling on COMPLETE (boards ready) or FAILED (unrecoverable error). Give up after ~5 minutes if neither terminal status is reached. Boards exist as empty shells until status is COMPLETE."}getInputSchema(){return zu}async executeInternal(e){const t={templateId:e.templateId,destinationWorkspaceId:e.destinationWorkspaceId,destinationName:e.destinationName,boardKind:e.boardKind},a=await this.mondayApi.request(_u,t),i=a.use_template?.process_id;return null==i?{content:{processId:null,message:"Failed to start template application. The request was rejected."}}:{content:{processId:i,message:"Template application started. Poll check_template_status with processId every 5–10 seconds. Stop on COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes."}}}},class extends Tr{constructor(){super(...arguments),this.name="check_template_status",this.type=Mi.READ,this.annotations=Er({title:"Check Template Status",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Check the status of a use_template operation. Poll after calling use_template — wait 5–10 seconds between polls. Status values: PENDING | IN_PROGRESS | COMPLETE | FAILED. Stop polling when status is COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes if neither terminal status is reached. Board IDs are only available once COMPLETE — boards exist but are empty during IN_PROGRESS. Returns null if process_id is invalid or expired (1-hour TTL)."}getInputSchema(){return Ku}async executeInternal(e){const t={processId:e.processId},a=(await this.mondayApi.request(gu,t)).template_installation_status;return a?a.status===oc.Complete?{content:{status:oc.Complete,board_ids:a.board_ids,board_ids_map:a.board_ids_map,message:`Template application complete. ${a.board_ids.length} board(s) created.`}}:a.status===oc.Failed?{content:{status:oc.Failed,board_ids:[],board_ids_map:[],message:"Template application failed. Please try again."}}:a.status===oc.Pending||a.status===oc.InProgress?{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Template application ${a.status===oc.InProgress?"in progress":"pending"}. Board IDs will be available once complete.`}}:{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Unexpected status: ${a.status}. Poll again or contact support.`}}:{content:{status:null,message:"Status not found. The process_id is invalid or has expired."}}}},class extends Tr{constructor(){super(...arguments),this.name="create_form",this.type=Mi.WRITE,this.annotations=Er({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. Also creates a backing board to store responses. Returns the formToken for future mutations."}getInputSchema(){return Fh}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(gh,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends Tr{constructor(){super(...arguments),this.name="update_form",this.type=Mi.WRITE,this.annotations=Er({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Of(this.mondayApi),this.actionHandlers=new Map([[nf.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[nf.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[nf.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[nf.activate,this.helpers.activateForm.bind(this.helpers)],[nf.createTag,this.helpers.createTag.bind(this.helpers)],[nf.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[nf.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[nf.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[nf.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[nf.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[nf.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Nf}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends Tr{constructor(){super(...arguments),this.name="get_form",this.type=Mi.READ,this.annotations=Er({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 formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return kf}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(vh,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Tr{constructor(){super(...arguments),this.name="form_questions_editor",this.type=Mi.WRITE,this.annotations=Er({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new rf(this.mondayApi),this.actionHandlers=new Map([[ef.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[ef.Update,this.helpers.updateQuestion.bind(this.helpers)],[ef.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return af}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends Tr{constructor(){super(...arguments),this.name="create_form_submission",this.type=Mi.WRITE,this.annotations=Er({title:"Create WorkForm Submission",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Submit a response to a monday.com WorkForm. Use get_form first to retrieve the WorkForm, then:\n- Inspect each question's showIfRules to determine which questions are conditionally shown based on previous answers.\n- Inspect each question's settings for any answer constraints (e.g. rating limits, select options, label limits).\n- Take note of any titles, descriptions, and content blocks to present the form naturally as you walk the user through it.\n- Take note of pages and question order to present questions in the correct sequence.\nGather all answers upfront before calling this tool — do not submit one question at a time. Accepts a bare form token, a full WorkForm URL (e.g. https://forms.monday.com/forms/{form_token}?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t) — shortened URLs are automatically resolved by following the redirect. Returns the submission ID."}getInputSchema(){return qf}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await r.head(e,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return t?this.extractTokenFromUrl(t):null}return e.startsWith("http://")||e.startsWith("https://")?this.extractTokenFromUrl(e):e}async executeInternal(e){const t=await this.resolveFormToken(e.form_token);if(!t)return{content:`Could not resolve a WorkForm token from "${e.form_token}". Please provide a valid WorkForm token or full WorkForm URL (e.g. https://forms.monday.com/forms/abc123).`};const a={form_token:t,answers:e.answers,form_timezone_offset:e.form_timezone_offset,password:e.password,tags:e.tags};try{const e=await this.mondayApi.request(xf,a,{versionOverride:"dev"});return e.create_form_submission?{content:{message:"WorkForm submitted successfully",submission_id:e.create_form_submission.id}}:{content:`WorkForm with token ${t} was not found or is not accepting submissions. Verify the WorkForm token is correct, the WorkForm is active, and any required password was provided.`}}catch(e){vu(e,"submit form")}}},class extends Tr{constructor(){super(...arguments),this.name="create_column",this.type=Mi.WRITE,this.annotations=Er({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?Gf:Wf}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(ou,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends Tr{constructor(){super(...arguments),this.name="update_column",this.type=Mi.WRITE,this.annotations=Er({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?Yf:Qf}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(du,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="create_group",this.type=Mi.WRITE,this.annotations=Er({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 e_}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(Xf,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends Tr{constructor(){super(...arguments),this.name="delete_column",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?f_:__}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(su,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},Iu,class extends Iu{constructor(e,t){super(e,t),this.name="all_api_read",this.type=Mi.READ,this.annotations=Er({title:"Run read-only Query on the monday.com API",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Execute read-only GraphQL queries against the monday.com API. Only queries are accepted — mutations are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}async executeInternal(e){const t=Od(wn(e.query));if(t?.operation===Vr.MUTATION)throw new Error("all_api_read only accepts read queries. Mutations are not allowed.");return super.executeInternal(e)}},class extends Iu{constructor(e,t){super(e,t),this.name="all_api_write",this.type=Mi.WRITE,this.annotations=Er({title:"Run Mutation on the monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute GraphQL mutations against the monday.com API to create, update, or delete data. Only mutations are accepted — queries are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your mutation."}async executeInternal(e){const t=Od(wn(e.query));if(t&&t.operation!==Vr.MUTATION)throw new Error("all_api_write only accepts mutations. Read queries are not allowed.");return super.executeInternal(e)}},class extends Tr{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=Mi.ALL_API,this.annotations=Er({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 M_}async executeInternal(e){try{const t=await this.mondayApi.request(pu),a=e?.operationType,i=t.__schema,r="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,n="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==r&&{query_fields:r},...void 0!==n&&{mutation_fields:n},types:o}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Tr{constructor(){super(...arguments),this.name="get_column_type_info",this.type=Mi.READ,this.annotations=Er({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${Mu.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${Mu.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return F_}async executeInternal(e){if(e.fetchMode===Mu.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:U_(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${$d.CountItems} function. Do not use ${$d.Count} function for that purpose.\n `}},url:x_}};const t={type:e.columnType},a=await this.mondayApi.request($_,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:x_}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends Tr{constructor(){super(...arguments),this.name="get_type_details",this.type=Mi.ALL_API,this.annotations=Er({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 V_}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,zm`
2882
+ `,YA={};const QA=[class extends Tr{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=Mi.READ,this.annotations=Er({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 YA}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(WA,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${wA} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);return 0===a.length?{content:{message:"No monday-dev sprints board pairs found. ### 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### 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`;",boards_checked:t.length,pairs:[]}}:{content:{message:`Found ${a.length} matched pair(s)`,...a.length>1?{warning:"Multiple board pairs detected. Confirm with user which pair and workspace to use before any operation."}:{},pairs:a.map((e=>({sprints_board:{id:e.sprintsBoard.id,name:e.sprintsBoard.name,workspace_id:e.sprintsBoard.workspaceId,workspace_name:e.sprintsBoard.workspaceName},tasks_board:{id:e.tasksBoard.id,name:e.tasksBoard.name,workspace_id:e.tasksBoard.workspaceId,workspace_name:e.tasksBoard.workspaceName}}))),technical_reference:"Sprint Operations (all require correct board pair): Add to Sprint: Update `task_sprint` column with sprint item ID. Remove from Sprint: Clear `task_sprint` column (set to null). Search in Sprint: Filter where `task_sprint` equals sprint item ID. Move Between Sprints: Update `task_sprint` with new sprint item ID. Backlog Tasks: `task_sprint` is empty/null. Critical: `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}}}catch(e){return{content:`${DA} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}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=BA(e,yA.SPRINT_TASKS);if(!i)return;const r=jA(i);if(!r)return;const n=`${e.id}:${r}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(r,o,`Tasks Board ${r}`)})}processTasksBoard(e,t,a){const i=BA(e,OA);if(!i)return;const r=jA(i);if(!r)return;const n=`${r}:${e.id}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(r,o,`Sprints Board ${r}`),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&&(MA(i)&&this.processSprintsBoard(i,a,t),VA(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Tr{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=Mi.READ,this.annotations=Er({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 GA}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(HA,a),r=i.boards?.[0],n=r?.items_page?.items||[],o=this.buildSprintsMetadata(n);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:n.length,data:o}}}catch(e){return{content:`${DA} 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(au,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${wA} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const r=i.columns||[],n=this.validateSprintsBoardSchemaFromColumns(r);return n.isValid?{success:!0}:{success:!1,error:`${NA} ${n.errorMessage}`}}catch(e){return{success:!1,error:`${DA} 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(yA),i=UA(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=>kA[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=$A(e,bA.SPRINT_ACTIVATION),a=$A(e,bA.SPRINT_COMPLETION),i=xA(e,bA.SPRINT_START_DATE),r=xA(e,bA.SPRINT_END_DATE),n=((e,t)=>{const a=PA(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,bA.SPRINT_TIMELINE),o=LA(e,bA.SPRINT_SUMMARY);let s=RA.Planned;return a?s=RA.Completed:(t||i)&&(s=RA.Active),{id:e.id,name:e.name||"Unknown",status:s,timeline:n?{from:n.from,to:n.to}:null,start_date:i||null,end_date:r||null,is_completed:a,document_object_id:o||null}}))}},class extends Tr{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=Mi.READ,this.annotations=Er({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 qA}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${DA} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:{message:"Sprint summary retrieved",sprint_id:e.sprintId,sprint_name:t.sprintName,markdown:a.content}}:{content:a.error||`${DA} Unknown error occurred while reading document content`}}catch(e){return{content:`${DA} 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(vA,t)).items||[];if(0===a.length)return{success:!1,error:`${IA} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${IA} Sprint with ID ${e} not found.`};const r=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(yA),...t];return UA(a,i)})(i,[bA.SPRINT_SUMMARY]);if(!r.isValid)return{success:!1,error:`${NA} Sprint item is missing required columns: ${r.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const n=LA(i,bA.SPRINT_SUMMARY);return n?{success:!0,documentObjectId:n,sprintName:i.name}:{success:!1,error:`${EA} 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:`${DA} 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(Km,t)).docs||[];if(0===a.length)return{success:!1,error:`${EA} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${TA} Document data is invalid for object ID ${e}.`};const r={docId:i.id,blockIds:[]},n=await this.mondayApi.request(hu,r);if(!n.export_markdown_from_doc?.success)return{success:!1,error:`${SA} Failed to export markdown from document: ${n.export_markdown_from_doc?.error||"Unknown error"}`};const o=n.export_markdown_from_doc.markdown;return o?{success:!0,content:o}:{success:!1,error:`${AA} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${DA} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],zA=[class extends Tr{constructor(){super(...arguments),this.name="delete_item",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return y_}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(eu,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_items_page",this.type=Mi.READ,this.annotations=Er({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 and item descriptions. 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. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board 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. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return $_}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){yu(t),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,includeDescription:e.includeItemDescription};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(C_,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:bl.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,r=i?.items||[];return{board:{id:a?.id,name:a?.name},items:r.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:r.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,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)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks: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 Hf.BoardRelation:return e.linked_items;case Hf.Formula:return e.display_value;case Hf.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={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(P_,t,{versionOverride:"dev",timeout:$f})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const r=new Set(i);return a.filter((e=>r.has(e)))}},class extends Tr{constructor(){super(...arguments),this.name="create_item",this.type=Mi.WRITE,this.annotations=Er({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?i_:r_}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(t_,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let r;try{r=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const n={...r,name:e.name},o=new Au(this.mondayApi,{boardId:t});return await o.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(n)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){vu(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(a_,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){vu(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(tu,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){vu(e,"create item")}}},class extends Tr{constructor(){super(...arguments),this.name="create_update",this.type=Mi.WRITE,this.annotations=Er({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. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return p_}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=d_.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,parentId:e.parentId?.toString()},i=await this.mondayApi.request(o_,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){vu(e,"create update")}}},class extends Tr{constructor(){super(...arguments),this.name="delete_update",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Update",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an update (comment/post) from a monday.com item."}getInputSchema(){return c_}async executeInternal(e){try{const t={id:e.id.toString()},a=await this.mondayApi.request(l_,t);if(!a.delete_update?.id)throw new Error("Failed to delete update: update not found or already deleted");return{content:{message:`Update ${a.delete_update.id} successfully deleted`,update_id:a.delete_update.id}}}catch(e){vu(e,"delete update")}}},class extends Tr{constructor(){super(...arguments),this.name="get_updates",this.type=Mi.READ,this.annotations=Er({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. For Board queries, you can filter by date range using fromDate and toDate (both required together, ISO8601 format). By default, Board queries return only board discussion. Set includeItemUpdates to true to also include updates on individual items. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return f_}async executeInternal(e){try{const t=void 0!==e.fromDate,a=void 0!==e.toDate;if(t!==a)throw new Error("Both fromDate and toDate must be provided together for date range filtering");if((t||a)&&e.objectType===h_.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let r;r=e.objectType===h_.Item?await this.mondayApi.request(m_,{...i,itemId:e.objectId}):await this.mondayApi.request(u_,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:__(e.fromDate),toDate:__(e.toDate)}:{}});const n=e.objectType===h_.Item?r.items?.[0]?.updates:r.boards?.[0]?.updates;if(!n||0===n.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const o=n.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),s=e.objectType===h_.Item?r.items?.[0]?.url:r.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:s,updates:o,pagination:{page:e.page??1,limit:e.limit??25,count:o.length}}}}catch(e){vu(e,"get updates")}}},class extends Tr{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=Mi.WRITE,this.annotations=Er({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 py}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=dy.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(o_,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. 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){vu(e,"create update")}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_schema",this.type=Mi.READ,this.annotations=Er({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 x_}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(au,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_activity",this.type=Mi.READ,this.annotations=Er({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). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return D_}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-Pf.MONTH30Days),i=e?.fromDate||a.toISOString(),r=e?.toDate||t.toISOString(),n={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:r,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},o=await this.mondayApi.request(S_,n),s=o.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 ${r}).`};const d=o.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:d?.name,board_url:d?.url,data:s.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends Tr{constructor(){super(...arguments),this.name="get_board_info",this.type=Mi.READ,this.annotations=Er({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return R_}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(N_,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 r=await this.getSubItemsBoardAsync(i);return{content:k_(i,r)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Hf.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(O_,{boardId:a});return i.boards?.[0]??null}},class extends Tr{constructor(){super(...arguments),this.name="get_full_board_data",this.type=Mi.READ,this.annotations=Er({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 A_}async executeInternal(e){try{const t={boardId:e.boardId,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(w_,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],r=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&r.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&r.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&&r.add(e.id)}))}}))}));const n=Array.from(r).filter((e=>!(Number(e)<0)));let o=[];if(n.length>0){const e={userIds:n},t=await this.mondayApi.request(I_,e);o=t.users?.filter((e=>null!==e))||[]}const s=new Map(o.map((e=>[e.id,e])));return{content:{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&&s.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&&s.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}}}}catch(e){vu(e,"get full board data")}}},class extends Tr{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=Mi.READ,this.annotations=Er({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 ug}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,r=e.teamsOnly||!1,n=e.includeTeamMembers||!1,o=!!e.name;if(e.getMe||!1){if(t||a||i||r||n||o)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(ig);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=og(s),p=await cg(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}if(o){if(t||a||i||r||n)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const o={name:e.name},s=await this.mondayApi.request(ag,o);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 d=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${s.users.length} user(s) matching "${e.name}":\n\n${d}`,l=await cg(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(r&&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>sg)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>dg)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(r||!t&&a&&!i)if(n){const t={teamIds:e.teamIds};s=await this.mondayApi.request(tg,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(eg,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:pg};s=await this.mondayApi.request(Z_,t)}else if(t){const t={userIds:e.userIds,limit:pg};s=await this.mondayApi.request(J_,t)}else{const e={userIds:void 0,limit:pg};s=await this.mondayApi.request(X_,e)}const d=og(s),p=await cg(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Au,class extends Tr{constructor(){super(...arguments),this.name="move_item_to_group",this.type=Mi.WRITE,this.annotations=Er({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 hg}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(ru,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Tr{constructor(){super(...arguments),this.name="create_board",this.type=Mi.WRITE,this.annotations=Er({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Qu}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(nu,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends Tr{constructor(){super(...arguments),this.name="use_template",this.type=Mi.WRITE,this.annotations=Er({title:"Use Template",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Apply a monday.com template to create boards in a workspace. Returns a process_id immediately — the operation runs asynchronously and can take 30 seconds to 2+ minutes. Use check_template_status(processId) to poll every 5–10 seconds until status is COMPLETE or FAILED. Stop polling on COMPLETE (boards ready) or FAILED (unrecoverable error). Give up after ~5 minutes if neither terminal status is reached. Boards exist as empty shells until status is COMPLETE."}getInputSchema(){return zu}async executeInternal(e){const t={templateId:e.templateId,destinationWorkspaceId:e.destinationWorkspaceId,destinationName:e.destinationName,boardKind:e.boardKind},a=await this.mondayApi.request(_u,t),i=a.use_template?.process_id;return null==i?{content:{processId:null,message:"Failed to start template application. The request was rejected."}}:{content:{processId:i,message:"Template application started. Poll check_template_status with processId every 5–10 seconds. Stop on COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes."}}}},class extends Tr{constructor(){super(...arguments),this.name="check_template_status",this.type=Mi.READ,this.annotations=Er({title:"Check Template Status",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Check the status of a use_template operation. Poll after calling use_template — wait 5–10 seconds between polls. Status values: PENDING | IN_PROGRESS | COMPLETE | FAILED. Stop polling when status is COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes if neither terminal status is reached. Board IDs are only available once COMPLETE — boards exist but are empty during IN_PROGRESS. Returns null if process_id is invalid or expired (1-hour TTL)."}getInputSchema(){return Ku}async executeInternal(e){const t={processId:e.processId},a=(await this.mondayApi.request(gu,t)).template_installation_status;return a?a.status===oc.Complete?{content:{status:oc.Complete,board_ids:a.board_ids,board_ids_map:a.board_ids_map,message:`Template application complete. ${a.board_ids.length} board(s) created.`}}:a.status===oc.Failed?{content:{status:oc.Failed,board_ids:[],board_ids_map:[],message:"Template application failed. Please try again."}}:a.status===oc.Pending||a.status===oc.InProgress?{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Template application ${a.status===oc.InProgress?"in progress":"pending"}. Board IDs will be available once complete.`}}:{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Unexpected status: ${a.status}. Poll again or contact support.`}}:{content:{status:null,message:"Status not found. The process_id is invalid or has expired."}}}},class extends Tr{constructor(){super(...arguments),this.name="create_form",this.type=Mi.WRITE,this.annotations=Er({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. Also creates a backing board to store responses. Returns the formToken for future mutations."}getInputSchema(){return Fh}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(gh,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends Tr{constructor(){super(...arguments),this.name="update_form",this.type=Mi.WRITE,this.annotations=Er({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Of(this.mondayApi),this.actionHandlers=new Map([[nf.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[nf.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[nf.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[nf.activate,this.helpers.activateForm.bind(this.helpers)],[nf.createTag,this.helpers.createTag.bind(this.helpers)],[nf.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[nf.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[nf.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[nf.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[nf.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[nf.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Nf}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends Tr{constructor(){super(...arguments),this.name="get_form",this.type=Mi.READ,this.annotations=Er({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 formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return kf}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(vh,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Tr{constructor(){super(...arguments),this.name="form_questions_editor",this.type=Mi.WRITE,this.annotations=Er({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new rf(this.mondayApi),this.actionHandlers=new Map([[ef.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[ef.Update,this.helpers.updateQuestion.bind(this.helpers)],[ef.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return af}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends Tr{constructor(){super(...arguments),this.name="create_form_submission",this.type=Mi.WRITE,this.annotations=Er({title:"Create WorkForm Submission",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Submit a response to a monday.com WorkForm. Use get_form first to retrieve the WorkForm, then:\n- Inspect each question's showIfRules to determine which questions are conditionally shown based on previous answers.\n- Inspect each question's settings for any answer constraints (e.g. rating limits, select options, label limits).\n- Take note of any titles, descriptions, and content blocks to present the form naturally as you walk the user through it.\n- Take note of pages and question order to present questions in the correct sequence.\nGather all answers upfront before calling this tool — do not submit one question at a time. Accepts a bare form token, a full WorkForm URL (e.g. https://forms.monday.com/forms/{form_token}?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t) — shortened URLs are automatically resolved by following the redirect. Returns the submission ID."}getInputSchema(){return qf}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await r.head(e,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return t?this.extractTokenFromUrl(t):null}return e.startsWith("http://")||e.startsWith("https://")?this.extractTokenFromUrl(e):e}async executeInternal(e){const t=await this.resolveFormToken(e.form_token);if(!t)return{content:`Could not resolve a WorkForm token from "${e.form_token}". Please provide a valid WorkForm token or full WorkForm URL (e.g. https://forms.monday.com/forms/abc123).`};const a={form_token:t,answers:e.answers,form_timezone_offset:e.form_timezone_offset,password:e.password,tags:e.tags};try{const e=await this.mondayApi.request(xf,a,{versionOverride:"dev"});return e.create_form_submission?{content:{message:"WorkForm submitted successfully",submission_id:e.create_form_submission.id}}:{content:`WorkForm with token ${t} was not found or is not accepting submissions. Verify the WorkForm token is correct, the WorkForm is active, and any required password was provided.`}}catch(e){vu(e,"submit form")}}},class extends Tr{constructor(){super(...arguments),this.name="create_column",this.type=Mi.WRITE,this.annotations=Er({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?Gf:Wf}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(ou,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends Tr{constructor(){super(...arguments),this.name="update_column",this.type=Mi.WRITE,this.annotations=Er({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?Yf:Qf}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(du,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="create_group",this.type=Mi.WRITE,this.annotations=Er({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 e_}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(Xf,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends Tr{constructor(){super(...arguments),this.name="delete_column",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?g_:v_}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(su,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},Iu,class extends Iu{constructor(e,t){super(e,t),this.name="all_api_read",this.type=Mi.READ,this.annotations=Er({title:"Run read-only Query on the monday.com API",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Execute read-only GraphQL queries against the monday.com API. Only queries are accepted — mutations are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}async executeInternal(e){const t=Od(wn(e.query));if(t?.operation===Vr.MUTATION)throw new Error("all_api_read only accepts read queries. Mutations are not allowed.");return super.executeInternal(e)}},class extends Iu{constructor(e,t){super(e,t),this.name="all_api_write",this.type=Mi.WRITE,this.annotations=Er({title:"Run Mutation on the monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute GraphQL mutations against the monday.com API to create, update, or delete data. Only mutations are accepted — queries are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your mutation."}async executeInternal(e){const t=Od(wn(e.query));if(t&&t.operation!==Vr.MUTATION)throw new Error("all_api_write only accepts mutations. Read queries are not allowed.");return super.executeInternal(e)}},class extends Tr{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=Mi.ALL_API,this.annotations=Er({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 j_}async executeInternal(e){try{const t=await this.mondayApi.request(pu),a=e?.operationType,i=t.__schema,r="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,n="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==r&&{query_fields:r},...void 0!==n&&{mutation_fields:n},types:o}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Tr{constructor(){super(...arguments),this.name="get_column_type_info",this.type=Mi.READ,this.annotations=Er({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${Mu.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${Mu.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return V_}async executeInternal(e){if(e.fetchMode===Mu.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:M_(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${$d.CountItems} function. Do not use ${$d.Count} function for that purpose.\n `}},url:U_}};const t={type:e.columnType},a=await this.mondayApi.request(L_,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:U_}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends Tr{constructor(){super(...arguments),this.name="get_type_details",this.type=Mi.ALL_API,this.annotations=Er({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 B_}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,zm`
2877
2883
  query getTypeDetails {
2878
2884
  __type(name: "${t}") {
2879
2885
  name
@@ -2961,5 +2967,5 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
2961
2967
  }
2962
2968
  }
2963
2969
  }
2964
- `),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}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 Tr{constructor(){super(...arguments),this.name="create_custom_activity",this.type=Mi.WRITE,this.annotations=Er({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return zf}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(cu,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends Tr{constructor(){super(...arguments),this.name="create_notification",this.type=Mi.WRITE,this.annotations=Er({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Jf}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Kf,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Tr{constructor(){super(...arguments),this.name="create_timeline_item",this.type=Mi.WRITE,this.annotations=Er({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return n_}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(mu,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends Tr{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=Mi.READ,this.annotations=Er({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return v_}async executeInternal(e){const t=await this.mondayApi.request(uu);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};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:{message:`Found ${a.length} custom activities`,data:a}}}},class extends Tr{constructor(){super(...arguments),this.name="read_docs",this.type=Mi.READ,this.annotations=Er({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get information about monday.com documents. Supports two modes:\n\nMODE: "content" (default) — Fetch documents with their full markdown content.\n- Requires: type ("ids" | "object_ids" | "workspace_ids") and ids array\n- Supports pagination via page/limit. Check has_more_pages in response.\n- If type "ids" returns no results, automatically retries with object_ids.\n- Set include_blocks: true to include block IDs, types, and positions in the response — required before calling update_doc.\n- Blocks default to 25 per page. Use blocks_limit and blocks_page to paginate through long documents.\n- Set include_comments: true to fetch all comments and replies on the document. Each comment is enriched with anchor info (block_id, selection_from, selection_length) indicating which block and text range it\'s attached to. Use comments_limit to control how many comments per item (default 50).\n\nMODE: "version_history" — Fetch the edit history of a single document.\n- Requires: ids with the document\'s object_id (use the object_id field from content mode results, NOT the id field).\n- The object_id is the numeric ID visible in the document URL.\n- Returns restoring points sorted newest-first. Use version_history_limit to cap results (e.g., "last 3 changes" → version_history_limit: 3).\n- Use since/until to filter by time range. If omitted, returns full history.\n- Set include_diff: true to see what content changed between versions (fetches up to 10 diffs, may be slower).\n- Examples:\n - { mode: "version_history", ids: ["5001466606"], version_history_limit: 3 }\n - { mode: "version_history", ids: ["5001466606"], since: "2026-03-11T00:00:00Z", include_diff: true }'}getInputSchema(){return Sg}async executeInternal(e){return e.mode===Tg?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??Eg,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const r=e.include_blocks??!1,n=r?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},o={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:r,...n};let s=await this.mondayApi.request(Km,o);if((!s.docs||0===s.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,includeBlocks:r,...n};s=await this.mondayApi.request(Km,a)}if(!s.docs||0===s.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const d=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:s.docs.flatMap((e=>e?[e.id]:[])),object_ids:s.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(s.docs,o,r,d,p,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:r}=e,n=e.ids?.[0];if(!n)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:Tg,object_ids:[n]};try{const e={docId:n,since:a,until:i},o=await this.mondayApi.request(Jm,e);let s=o?.doc_version_history?.restoring_points;if(!s||0===s.length)return{content:`No version history found for document ${n}${a?` from ${a}`:""}.`};if(!t)return r&&(s=s.slice(0,r)),{content:{doc_id:n,since:a,until:i,restoring_points:s}};const d=Math.min(r??10,10),p=s.slice(0,d+1),l=s.length>d,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:n,date:e.date,prevDate:a.date},r=await this.mondayApi.request(Zm,i);return{...e,diff:r?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,d);return{content:{doc_id:n,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:s.length}}}}catch(e){return{content:`Error fetching version history for document ${n}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const r of e){const e=r.insert,n="string"==typeof e?e.length:1,o=r.attributes,s=o?.comments;if(s&&Array.isArray(s))for(const e of s){const r=String(e),o=t.get(r);if(o&&o.block_id===a.id){const e=Math.max(o.selection_from+o.selection_length,i+n);o.selection_length=e-o.selection_from}else o||t.set(r,{block_id:a.id,selection_from:i,selection_length:n})}i+=n}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[r,n]=await Promise.all([this.mondayApi.request(Xm,i),this.mondayApi.request(bg,{docId:[t]}).catch((()=>null))]),o=r.boards?.[0]?.items_page?.items;if(!o)return[];let s=new Map;if(n){const e=(n.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((e=>{let t;if("string"==typeof e.content)try{t=JSON.parse(e.content)}catch{t={}}else t=e.content??{};return{id:e.id??"",type:e.type??"",content:t}}));s=this.buildCommentAnchorMap(e)}const d=[];for(const e of o)if(e.updates&&0!==e.updates.length)for(const t of e.updates)d.push({id:t.id,text_body:t.text_body,body:t.body,created_at:t.created_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:e.id,item_name:e.name,anchor:s.get(t.id)??null,replies:(t.replies??[]).map((e=>({id:e.id,text_body:e.text_body,body:e.body,created_at:e.created_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))});return d}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,r=50,n,o){const s=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,s="";try{const t={docId:e.id},a=await this.mondayApi.request(hu,t);s=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){s=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,r)),{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,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==n||void 0!==o?{blocks_pagination:{current_page:o??1,limit:n??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(n??25)}}:{}},blocks_as_markdown:s,...i&&{comments:t}}}))),d=t.page||1,p=t.limit||25,l=s.length,c=l===p;return{content:{message:`Documents retrieved (${s.length})`,pagination:{current_page:d,limit:p,count:l,has_more_pages:c},data:s}}}},class extends Tr{constructor(){super(...arguments),this.name="workspace_info",this.type=Mi.READ,this.annotations=Er({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 Dg}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(fu,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:r,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=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:[]}]))),d=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(t):d.push(t)}));const p=[];return(r||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,url:t?lg(t,o.id):void 0,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(s.values()),root_items:{boards:d,docs:p}}}(a,await pg(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends Tr{constructor(){super(...arguments),this.name="list_workspaces",this.type=Mi.READ,this.annotations=Er({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all workspaces available to the user, ordered by membership (user\'s workspaces first). Returns workspaces with their ID, name, and description.\n[IMPORTANT] To search for workspaces by name, use the "search" tool with searchType WORKSPACES instead — it provides faster and more accurate results.'}getInputSchema(){return Rg}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Og(await this.mondayApi.request(Ng,t(Dc.Member)));let i=a;if(!kg(a)){i=Og(await this.mondayApi.request(Ng,t(Dc.All)))}if(!kg(i))return{content:{message:"No workspaces found.",data:[]}};const r=i.length===e.limit,n=await pg(this.mondayApi),o=i.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:n&&e.id?lg(n,e.id):void 0})));return{content:{message:"Workspaces retrieved",...r?{next_page:e.page+1}:{},data:o}}}},class extends Tr{constructor(){super(...arguments),this.name="create_doc",this.type=Mi.WRITE,this.annotations=Er({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, optional docOwnerIds)\n- item: Creates a document attached to an item (requires item_id, optional column_id, optional docOwnerIds)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_name: "My Doc", doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, doc_name: "My Doc", folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, doc_name: "My Doc", column_id: "doc_col_1" , markdown: "..." }\n- Workspace doc with agent owner: { location: "workspace", workspace_id: 123, doc_name: "My Doc", markdown: "...", docOwnerIds: ["<agent_owner_user_id>"] }'}getInputSchema(){return Fg}async executeInternal(e){const t=Ug.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,r;if(a.type===Lg.enum.workspace){const n={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||op.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},o=await this.mondayApi.request(Pg,n);t=o?.create_doc?.id??void 0,i=o?.create_doc?.object_id??void 0,r=o?.create_doc?.url??void 0}else if(a.type===Lg.enum.item){const n={itemId:a.item_id.toString()},o=await this.mondayApi.request(Cg,n),s=o.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const d=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===Hf.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:Hf.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(ou,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},m=await this.mondayApi.request(Pg,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,r=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(xg,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($g,n),s=o?.add_content_to_doc_from_markdown?.success,d=o?.add_content_to_doc_from_markdown?.error;return s?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:r,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${d||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Tr{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=Mi.WRITE,this.annotations=Er({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return Bg}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=null;if(e.doc_id){const a=await this.mondayApi.request(jg,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Vg,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(Mg,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:r,block_ids:n,error:o}=i.add_content_to_doc_from_markdown;if(!r)return{content:`Error adding content to document: ${o||"Unknown error"}`};const s=n?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${s} block${1===s?"":"s"} created.`,doc_id:t.id,block_ids:n,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Tr{constructor(){super(...arguments),this.name="update_doc",this.type=Mi.WRITE,this.annotations=Er({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Ev}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};this.sessionContext.metadata={...this.sessionContext.metadata,operation_types:e.operations?.map((e=>e.operation_type)),operation_count:e.operations?.length??0,...e.object_id&&{object_id:e.object_id}};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(fg,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let r=0;r<e.operations.length;r++){const n=e.operations[r];try{const i=await this.executeOperation(t,n,e.object_id);a.push(`- [OK] ${n.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${n.operation_type}: ${t}`),i=r;break}}const r=null!==i?i:e.operations.length,n=e.operations.length,o=`Completed ${r}/${n} operation${1===n?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${o}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(ug,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},r=await this.mondayApi.request(hg,i),n=r?.add_content_to_doc_from_markdown;if(!n?.success)throw new Error(n?.error||"Failed to add markdown content");const o=n.block_ids?.length??0;return`${o} block${1===o?"":"s"} added${n.block_ids?.length?`. Block IDs: ${n.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Yg(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Yg(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Yg(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},r=await this.mondayApi.request(_g,i);if(!r?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const r=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Wg(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:qg(e.alignment),direction:Hg(e.direction)}};case"list_item":return{list_block:{delta_format:Wg(e.delta_format),list_block_type:e.list_block_type?e.list_block_type:void 0,indentation:e.indentation}};case"code":return{text_block:{delta_format:Wg(e.delta_format),text_block_type:sc.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(r);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=r[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const n={docId:e,afterBlockId:a,blocksInput:[r]},o=await this.mondayApi.request(Ig,n),s=o?.create_doc_blocks;if(!s||0===s.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${s.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(gg,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(vg,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(yg,{boardId:e}),a=t.boards?.[0]?.items_page?.items?.[0]?.id;if(!a)throw new Error(`No item found on the document backing board (object_id: ${e})`);return a}async fetchAllBlockContent(e){const t=await this.mondayApi.request(bg,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,r,n,o,s){if((null!=o||null!=s)&&!n)throw new Error("selection_from and selection_length require block_id");if(null!=o!=(null!=s))throw new Error("selection_from and selection_length must both be provided together");const d=n?Array.isArray(n)?n:[n]:[];if((null!=o||null!=s)&&d.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(r){const e=JSON.parse(r),t=d_.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(wg,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(d.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of d){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const r=i.content.deltaFormat;if(!r)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let n=0;for(const e of r)n+="string"==typeof e.insert?e.insert.length:1;if(0===n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const d=o??0,p=s??n;if(d+p>n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${d}, ${d+p}) is out of range for block ${a} (total length ${n})`);let l;try{l=zg(r,f,d,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...i.content,deltaFormat:l},m=await this.mondayApi.request(_g,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,r){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,r)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends Tr{constructor(){super(...arguments),this.name="update_workspace",this.type=Mi.WRITE,this.annotations=Er({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return kv}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(Ov,t),i=await pg(this.mondayApi),r=i?lg(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:r}}}},class extends Tr{constructor(){super(...arguments),this.name="update_folder",this.type=Mi.WRITE,this.annotations=Er({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Cv}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 r={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},n=await this.mondayApi.request(Rv,r);return{content:{message:`Folder ${n.update_folder?.id} updated`,folder_id:n.update_folder?.id,folder_name:n.update_folder?.name}}}},class extends Tr{constructor(){super(...arguments),this.name="create_workspace",this.type=Mi.WRITE,this.annotations=Er({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return $v}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Pv,t),i=await pg(this.mondayApi),r=i&&a.create_workspace?.id?lg(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:r}}}},class extends Tr{constructor(){super(...arguments),this.name="create_folder",this.type=Mi.WRITE,this.annotations=Er({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Lv}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(xv,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends Tr{constructor(){super(...arguments),this.name="move_object",this.type=Mi.WRITE,this.annotations=Er({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 Mv}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,parentFolderId:n,workspaceId:o,accountProductId:s},p=await this.mondayApi.request(Rv,d);return{content:{message:"Object moved",object_id:p.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(Uv,d);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(Fv,d);return p.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:p.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${p.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case $l.Folder:return this.executeUpdateFolder(e);case $l.Board:return this.executeUpdateBoardHierarchy(e);case $l.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Tr{constructor(){super(...arguments),this.name="create_dashboard",this.type=Mi.WRITE,this.annotations=Er({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 Dv}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(Tv,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Tr{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=Mi.READ,this.annotations=Er({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(Av,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,r=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:r,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:x_}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Tr{constructor(){super(...arguments),this.name="create_widget",this.type=Mi.WRITE,this.annotations=Er({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 Nv}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings 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(Sv,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===Ac.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Tr{constructor(){super(...arguments),this.name="board_insights",this.type=Mi.READ,this.annotations=Er({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 Gv}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};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===$d.Label)).map((e=>e.columnId))),r=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:$d.Label,columnId:e})))??[],n=e.aggregations.concat(r).map((e=>{if(e.function){const n=`${e.function}_${e.columnId}`,o=t[n]||0;t[n]=o+1;const s=`${n}_${o}`;return qv.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Pd.Function,function:(i=e.function,r=e.columnId,{function:i,params:i===$d.CountItems?[]:[{type:Pd.Column,column:Hv(r),as:r}]}),as:s}}var i,r;const n={type:Pd.Column,column:Hv(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),n}));return a.forEach((e=>{n.some((t=>t.as===e.column_id))||n.push({type:Pd.Column,column:Hv(e.column_id),as:e.column_id})})),{selectElements:n,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),r=function(e){return{id:e.boardId.toString(),type:Cd.Table}}(e),n={query:{from:r,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},o=await this.mondayApi.request(Vv,n),s=(o.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 r=i.result??i.value??null;t[a]=r})),t}));return s.length?{content:{message:"Board insights retrieved",board_name:o.boards?.[0]?.name,board_url:o.boards?.[0]?.url,data:s}}:{content:"No board insights found for the given query."}}},class extends Tr{constructor(){super(...arguments),this.name="search",this.type=Mi.READ,this.annotations=Er({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Supported searchType values: BOARD, DOCUMENTS, FOLDERS, WORKSPACES, UPDATES, ITEMS, TIMELINE_ITEMS.\nFor searching/listing specific users and teams, use list_users_and_teams tool.\nFor account-level info (plan, member count, products), use get_user_context tool.\nFor groups, use get_board_info tool.\nITEMS search requires a searchTerm and only returns id, title, and url.\nWORKSPACES search requires a searchTerm and only returns id, title, and description.\nUPDATES search requires a searchTerm and returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with boardIds and/or creatorIds.\nTIMELINE_ITEMS search requires a searchTerm and returns id, title, summary, and content.\nFOLDERS search requires workspaceIds and only returns id and title.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789, workspace-101, update-303, item-321, timeline-item-654). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return ry}async executeInternal(e){if(e.searchType!==iy.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.runSmartSearchAsync(e)).items}}}catch(t){yu(t);if([iy.ITEMS,iy.WORKSPACES,iy.UPDATES,iy.TIMELINE_ITEMS].includes(e.searchType))throw t}const t={[iy.BOARD]:this.searchBoardsAsync.bind(this),[iy.DOCUMENTS]:this.searchDocsAsync.bind(this),[iy.FOLDERS]:this.searchFoldersAsync.bind(this),[iy.WORKSPACES]:()=>{throw new Error("Workspaces search requires a searchTerm")},[iy.UPDATES]:()=>{throw new Error("Updates search requires a searchTerm")},[iy.ITEMS]:()=>{throw new Error("Items search requires a searchTerm")},[iy.TIMELINE_ITEMS]:()=>{throw new Error("Timeline items search requires a searchTerm")}},a=await t[e.searchType](e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async runSmartSearchAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===iy.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===iy.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===iy.WORKSPACES)return this.searchWorkspacesAsync(e.searchTerm,e.limit);if(e.searchType===iy.UPDATES){const t=e.boardIds?.map((e=>e.toString())),a=e.creatorIds?.map((e=>e.toString()));return this.searchUpdatesAsync(e.searchTerm,e.limit,t,a)}if(e.searchType===iy.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);if(e.searchType===iy.TIMELINE_ITEMS)return this.searchTimelineItemsAsync(e.searchTerm,e.limit);throw new Error(`Unsupported search type for smart search: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Zv,i,{versionOverride:"dev",timeout:$f})).search.boards.results.map((e=>({id:ay.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ey,i,{versionOverride:"dev",timeout:$f})).search.docs.results.map((e=>({id:ay.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return{items:(await this.mondayApi.request(Kv,a,{timeout:$f})).search.workspaces.results.map((e=>({id:ay.WORKSPACE+e.indexed_data.id,title:e.indexed_data.name,description:e.indexed_data.description||void 0}))),wasFiltered:!0}}async searchUpdatesAsync(e,t,a,i){const r={query:e,limit:t,boardIds:a,creatorIds:i};return{items:(await this.mondayApi.request(Jv,r,{timeout:$f})).search.updates.results.map((e=>({id:ay.UPDATE+e.indexed_data.id,title:e.indexed_data.body,itemId:e.indexed_data.item_id,boardId:e.indexed_data.board_id,creatorId:e.indexed_data.creator_id}))),wasFiltered:!0}}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(zv,i,{timeout:$f})).search.items.results.map((e=>({id:ay.ITEM+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchTimelineItemsAsync(e,t){const a={query:e,limit:t};return{items:(await this.mondayApi.request(Xv,a,{timeout:$f})).search.timeline_items.results.map((e=>({id:ay.TIMELINE_ITEM+e.indexed_data.id,title:e.indexed_data.title,summary:e.indexed_data.summary||void 0,content:e.indexed_data.content||void 0}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&vu(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Qv,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:ay.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(Yv,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:ay.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(Wv,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:ay.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=ty(e.searchTerm??""),r=(e.page-1)*e.limit,n=r+e.limit;return{items:t.filter((e=>ty(a(e)).includes(i))).slice(r,n),wasFiltered:!0}}},class extends Tr{constructor(){super(...arguments),this.name="get_user_context",this.type=Mi.READ,this.annotations=Er({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction 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(uy,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),r=this.extractRelevantBoards(a),n=this.extractRelevantPeople(a),{account:o,...s}=e;return{content:{message:"User context",...{user:s,account:o?{tier:o.tier,active_members_count:o.active_members_count,is_during_trial:o.is_during_trial,products:o.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:r,relevantPeople:n}}}}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[fy[e]]=t[e];const r=await this.mondayApi.request(hy,i),n=[];for(const e of a){const t=_y[e];for(const a of r[t]??[])a?.id&&n.push({id:a.id,name:a.name,type:e})}return n}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}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.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}},class extends Tr{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=Mi.WRITE,this.annotations=Er({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return ly}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(dy,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends Tr{constructor(){super(...arguments),this.name="get_assets",this.type=Mi.READ,this.annotations=Er({title:"Get Assets",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get assets (files) by their IDs. Returns file metadata including name, extension, size, public URL (valid for 1 hour), thumbnail URL, upload date, and who uploaded it."}getInputSchema(){return my}async executeInternal(e){const t=await this.mondayApi.request(cy,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends Tr{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=Mi.READ,this.annotations=Er({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return vy}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(gy,a,{versionOverride:"2026-04"}),r=i.notetaker?.meetings;if(!r?.meetings||0===r.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:r.meetings,pagination:{has_next_page:r.page_info?.has_next_page??!1,cursor:r.page_info?.cursor??null,count:r.meetings.length}}}}}},class extends Tr{constructor(){super(...arguments),this.name="create_view",this.type=Mi.WRITE,this.annotations=Er({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return Xu}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Ju,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="update_view",this.type=Mi.WRITE,this.annotations=Er({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return eh}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Zu,t);return a.update_view?{content:`View "${a.update_view.name}" (ID: ${a.update_view.id}, type: ${a.update_view.type}) successfully updated`}:{content:"Failed to update view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="create_view_table",this.type=Mi.WRITE,this.annotations=Er({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return rh}async executeInternal(e){const t={boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(th,t);return a.create_view_table?{content:`Table view "${a.create_view_table.name}" (ID: ${a.create_view_table.id}, type: ${a.create_view_table.type}) successfully created`}:{content:"Failed to create table view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="update_view_table",this.type=Mi.WRITE,this.annotations=Er({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return dh}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(nh,t);return a.update_view_table?{content:`Table view "${a.update_view_table.name}" (ID: ${a.update_view_table.id}, type: ${a.update_view_table.type}) successfully updated`}:{content:"Failed to update table view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="undo_action",this.type=Mi.WRITE,this.annotations=Er({title:"Undo Action",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Undo a previous action on a board using its action_record_uuid. Supports undoing column changes, deletes, archives, moves, duplicates, and more. Use get_board_activity with includeData=true to find the action_record_uuid."}getInputSchema(){return by}async executeInternal(e){return await this.mondayApi.request(yy,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends Tr{constructor(){super(...arguments),this.name="get_object_schemas",this.type=Mi.READ,this.annotations=Er({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return Du}async executeInternal(e){const t={ids:e.ids,names:e.names,limit:e.limit,page:e.page,excludeCreatedByMonday:e.excludeCreatedByMonday},a=(await this.mondayApi.request(Su,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends Tr{constructor(){super(...arguments),this.name="create_object_schema",this.type=Mi.WRITE,this.annotations=Er({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return Ou}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Nu,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="update_object_schema",this.type=Mi.WRITE,this.annotations=Er({title:"Update Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update an account-level object schema. Requires the current revision number for optimistic locking — retrieve it first via get_object_schemas."}getInputSchema(){return Ru}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(ku,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="delete_object_schema",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Object Schema",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an account-level object schema. Only allowed when no boards are connected to the schema. Provide either id or name."}getInputSchema(){return Pu}async executeInternal(e){if(!e.id&&!e.name)throw new Error("Either id or name must be provided");const t={id:e.id,name:e.name},a=await this.mondayApi.request(Cu,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends Tr{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return xu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnIds:e.columnIds},a=await this.mondayApi.request($u,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=Mi.WRITE,this.annotations=Er({title:"Manage Object Schema Board Connection",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Connect or detach a board from an account-level object schema. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."}getInputSchema(){return Fu}async executeInternal(e){if("connect"===e.action){if(!e.boardId)throw new Error("boardId is required for action=connect");if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided for action=connect");const t={boardId:e.boardId,objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName},a=await this.mondayApi.request(Lu,t);return{content:{message:"Board successfully connected to object schema",connection_id:a.connect_board_to_object_schema?.id,schema_id:a.connect_board_to_object_schema?.object_schema_id}}}{if(!e.boardIds?.length)throw new Error("boardIds is required for action=detach");const t={boardIds:e.boardIds},a=(await this.mondayApi.request(Uu,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,r=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...r.length>0&&{failures:r}}}}}},class extends Tr{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=Mi.WRITE,this.annotations=Er({title:"Manage Object Schema Columns",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Create or update columns on an account-level object schema. Column changes are propagated to all boards connected to the schema. create: adds new columns. Each column requires type and title. Call get_column_type_info with fetchMode "${Mu.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in).`}getInputSchema(){return Gu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(Vu,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(ju,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends Tr{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=Mi.WRITE,this.annotations=Er({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return Yu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:Op.Deactivate,reactivate:Op.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(Wu,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=Mi.WRITE,this.annotations=Er({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Iy}async executeInternal(e){const t=(await this.mondayApi.request(wy,{input:{file_name:e.fileName,content_type:e.contentType,file_size:e.fileSize,source:"mcp",multipart:!1}},{versionOverride:"dev"})).create_upload,a=t.parts[0]?.url;if(!a)throw new Error("create_upload returned no upload URL — parts array was empty");return{content:{upload_id:t.upload_id,upload_url:a,url_expires_at:t.expires_at}}}},class extends Tr{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=Mi.WRITE,this.annotations=Er({title:"Finalize Asset Upload",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Finalize a file upload and create the asset on monday.com. Call this after uploading the file to the presigned URL from get_asset_upload_url. Requires the etag value from the PUT response headers. Automatically attaches the uploaded asset to the specified file column on the item. Returns the created asset_id."}getInputSchema(){return Ay}async executeInternal(e){const t=(await this.mondayApi.request(Ey,{input:{upload_id:e.uploadId,holder:{type:"ITEM",id:e.itemId},board_id:e.boardId,parts:[{part_number:1,etag:e.etag}]}},{versionOverride:"dev"})).complete_upload,a=JSON.stringify({added_file:{fileType:"ASSET",name:t.filename,assetId:String(t.id)}});return await this.mondayApi.request(Ty,{boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,value:a}),{content:{asset_id:t.id,filename:t.filename,content_type:t.content_type,file_size:t.file_size,url:t.url,filelink:t.filelink}}}},class extends Tr{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=Mi.READ,this.annotations=Er({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Dy}async executeInternal(e){return{content:Sy}}},class extends Tr{constructor(){super(...arguments),this.name="fetch_file_content",this.type=Mi.READ,this.annotations=Er({title:"Fetch File Content",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch and extract the text content from a file stored in a monday.com files column.\n\nUse this tool when you need to read, summarize, or analyze the content of files attached to board items. Provide the item ID and column ID from the get_board_items_page response — the column value will be a URL like \"https://monday.com/protected_static/...\" indicating a file is present (null means no file).\n\nPROACTIVE USE: If you retrieve board items and notice a files column with a non-null value (a URL), consider fetching its content if it could help answer the user's question — don't wait to be explicitly asked.\n\nSupported file types and what is returned:\n- Text files (.txt, .md, .csv, .json): raw text content\n- Word documents (.docx): extracted text content\n- PDF files (.pdf): extracted text content\n- Excel files (.xlsx, .xls): extracted text content per sheet\n- Images (.png, .jpg, .gif, .webp, .svg, .bmp, .ico): returns the public URL so you can view or analyze the image directly\n\nText responses include a total_length field. If has_more is true, the content was truncated — you can call this tool again with next_offset if you need the remaining content.\n\nWhen to use:\n- User asks to summarize, read, or analyze the content of a file in a files column\n- User asks questions about what is inside a file (e.g., \"what does the PDF say?\")\n- User wants to extract data from a CSV or Excel file attached to a board item\n- A board item has a files column with a non-null value and the user's question may be answered by its content — even if the user didn't explicitly ask to read the file\n\nWhen NOT to use:\n- The files column value is null (no file uploaded for that item)"}getInputSchema(){return Uy}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:r=0}=e,n=await this.mondayApi.request(Ny,{itemId:[t],columnId:[a]}),o=n?.items?.[0]?.assets;if(!o||0===o.length)return{content:{message:`No file found for item ${t} in column ${a}. The column may be empty or the column ID may be incorrect.`}};return{content:{files:await Promise.all(o.map((e=>Vy(e,r,i))))}}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Full lifecycle management for monday platform agents — create, read, update, delete, change state, and run.\n\nmonday platform agents are user-built work orchestrators on monday.com — each has a profile (name, role, avatar), a goal, and a markdown execution plan. Agents in state ACTIVE can be triggered automatically. They are NOT local LangChain or MCP agents.\n\nACTIONS (only pass fields that apply to the chosen action):\n- create: { action:"create", prompt, agent_model? } — AI-generated agent. Platform creates profile, goal, and plan from the prompt.\n- create_blank: { action:"create_blank", name?, role?, role_description?, avatar_url?, gender?, background_color?, user_prompt? } — manually defined agent.\n- get one: { action:"get", agent_id }\n- list owned: { action:"get" }\n- update: { action:"update", agent_id, name?, role?, role_description?, plan?, agent_model? }\n- delete: { action:"delete", agent_id }\n- activate: { action:"activate", agent_id }\n- deactivate: { action:"deactivate", agent_id }\n- run: { action:"run", agent_id }\n\nRULES:\n- "create_blank" with no fields creates a nameless blank agent — only do this intentionally.\n- "update" requires at least one of name/role/role_description/plan/agent_model.\n- "update", "delete", "activate", "deactivate", "run" all require "agent_id".\n- Created agents start INACTIVE. Follow with action:"activate" using the returned agent_id before they can be triggered.\n- ⚠️ DESTRUCTIVE — "delete" is permanent and irreversible. When the user refers to an agent by name, ALWAYS call action:"get" first to confirm the correct agent_id before deleting.\n- "run" is fire-and-forget. Returns trigger_uuid — no run-status query exists, treat successful enqueue as the only signal.\n- Agent state is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED only appears as the return value of action:"delete".\n\nUSAGE EXAMPLES:\n- AI create: { "action": "create", "prompt": "Run my daily standup every weekday at 9am." }\n- Manual create:{ "action": "create_blank", "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Fetch one: { "action": "get", "agent_id": "42" }\n- List mine: { "action": "get" }\n- Rename: { "action": "update", "agent_id": "7", "name": "New Name" }\n- Activate: { "action": "activate", "agent_id": "7" }\n- Deactivate: { "action": "deactivate", "agent_id": "7" }\n- Run: { "action": "run", "agent_id": "7" }\n- Delete: { "action": "delete", "agent_id": "7" }\n\nRELATED TOOLS:\n- agent_catalog — browse available trigger types and skills before wiring them to an agent\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent_knowledge — manage which boards/docs this agent has access to'}getInputSchema(){return bT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"create_blank":return this.handleCreateBlank(e);case"get":return this.handleGet(e);case"update":return this.handleUpdate(e);case"delete":return this.handleDelete(e);case"activate":return this.handleActivate(e);case"deactivate":return this.handleDeactivate(e);case"run":return this.handleRun(e)}}async handleCreate(e){if(!e.prompt)throw new Error('manage_agent action:"create" requires "prompt". For a manually configured agent, use action:"create_blank".');try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(nT,t,{versionOverride:"dev"});if(!a.create_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${a.create_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${a.create_agent.id}" to activate it`,agent:a.create_agent}}}catch(e){vu(e,"create monday platform agent")}}async handleCreateBlank(e){try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(oT,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){vu(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(rT,{ids:[e.agent_id]},{versionOverride:"dev"}),a=t?.[0];return a?{content:{message:"monday platform agent",agent:a}}:{content:`monday platform agent ${e.agent_id} not found, or the authenticated user does not have access to it.`}}catch(e){vu(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(rT,{limit:100},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user (limited to 100 — ask the user if they need more)",count:t.length,agents:t}}}catch(e){vu(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(sT,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){vu(e,"update monday platform agent")}}async handleDelete(e){if(!e.agent_id)throw new Error('manage_agent action:"delete" requires "agent_id".');try{const t={id:e.agent_id},a=await this.mondayApi.request(dT,t,{versionOverride:"dev"});if(!a.delete_agent?.id)throw new Error("monday platform agent delete returned no id");return{content:{message:`monday platform agent ${a.delete_agent.id} deleted`,agent:a.delete_agent}}}catch(e){vu(e,"delete monday platform agent")}}async handleActivate(e){if(!e.agent_id)throw new Error('manage_agent action:"activate" requires "agent_id".');try{const t=await this.mondayApi.request(pT,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){vu(e,"activate monday platform agent")}}async handleDeactivate(e){if(!e.agent_id)throw new Error('manage_agent action:"deactivate" requires "agent_id".');try{const t={id:e.agent_id,inactive_reason:oI.DeactivatedByUser},a=await this.mondayApi.request(lT,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){vu(e,"deactivate monday platform agent")}}async handleRun(e){if(!e.agent_id)throw new Error('manage_agent action:"run" requires "agent_id".');try{const t=await this.mondayApi.request(cT,{id:e.agent_id},{versionOverride:"dev"});if(!t.run_agent)throw new Error("run_agent returned no data — the agent run may not have been enqueued");return{content:{message:"Agent run enqueued.",trigger_uuid:t.run_agent.trigger_uuid}}}catch(e){vu(e,"run monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent Triggers",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the triggers attached to a monday platform agent — triggers define WHEN the agent runs automatically.\n\nACTIONS:\n- list: { agent_id } — returns active triggers with node_id, block_reference_id, name, field_summary.\n- add: { agent_id, block_reference_id, field_values? } — attaches a trigger type to the agent.\n- remove: { agent_id, node_id } — detaches a trigger instance by node_id (NOT block_reference_id).\n\nWORKFLOW — add a trigger:\n1. Call agent_catalog action:"list_triggers" — note block_reference_id, field_schemas, and required_fields.\n2. Collect required field values from the user (e.g. board_id, column_id).\n3. Call this tool action:"add" with block_reference_id and field_values.\nNote: add returns only { success } — no node_id for the new instance. Call action:"list" afterward if you need the node_id.\n\nWORKFLOW — remove a trigger:\n1. Call action:"list" to see active triggers and note the node_id of the instance to remove.\n2. Call action:"remove" with that node_id.\n\nNOTE: Only triggers that can be added programmatically appear in the catalog. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\nrequire user setup in the monday.com UI — they will not appear in agent_catalog and cannot be managed here.\n\nUSAGE EXAMPLES:\n- List triggers: { "action": "list", "agent_id": "7" }\n- Add trigger: { "action": "add", "agent_id": "7", "block_reference_id": "status-change-ref", "field_values": { "board_id": "42" } }\n- Remove trigger: { "action": "remove", "agent_id": "7", "node_id": "node-abc" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_triggers" — discover available trigger types and their required field_values before calling action:"add" here\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return wT}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t={agent_id:e.agent_id},a=(await this.mondayApi.request(mT,t,{versionOverride:"dev"})).agent_active_triggers??[];return{content:{message:'Active triggers on this agent. Use node_id with action:"remove" to detach a trigger.',count:a.length,triggers:a}}}catch(e){vu(e,"list active triggers for monday platform agent")}}async handleAdd(e){if(!e.block_reference_id)throw new Error('block_reference_id is required for action:"add". Call agent_catalog action:"list_triggers" first to find the block_reference_id.');try{const t={agent_id:e.agent_id,block_reference_id:e.block_reference_id,field_values:e.field_values},a=await this.mondayApi.request(uT,t,{versionOverride:"dev"});return{content:{message:'Trigger added to agent. Call action:"list" to verify and retrieve the node_id.',success:a.add_trigger_to_agent?.success??!1}}}catch(e){vu(e,"add trigger to monday platform agent")}}async handleRemove(e){if(!e.node_id)throw new Error('node_id is required for action:"remove". Call action:"list" first to get node_id values.');try{const t={agent_id:e.agent_id,node_id:e.node_id},a=await this.mondayApi.request(hT,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){vu(e,"remove trigger from monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent Skills",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the full skill lifecycle for monday platform agents — create new skills in the catalog, attach skills to an agent, or detach them.\n\nSkills extend what an agent can do (e.g. sending emails, querying databases, posting to Slack).\n\nACTIONS:\n- create: { name, content, description? } — creates a new custom skill in the account-wide catalog.\n The skill becomes available to all agents in the account.\n- add: { agent_id, skill_id } — attaches a skill to this agent.\n- remove: { agent_id, skill_id } — detaches a skill from this agent.\n\nWORKFLOW — attach an existing skill:\n1. Call agent_catalog action:"list_skills" — find the skill_id of the skill to attach.\n2. Call this tool action:"add" with agent_id and that skill_id.\n\nWORKFLOW — create a new skill and attach it:\n1. Call this tool action:"create" with name and content — note the returned id.\n2. Call this tool action:"add" with agent_id and that id directly (no catalog lookup needed).\n\nNOTE: There is no action to list which skills are currently attached to a specific agent — the platform does not yet expose that query.\nTo browse all skills available in the account catalog, use agent_catalog action:"list_skills".\n\nUSAGE EXAMPLES:\n- Create a skill: { "action": "create", "name": "Send Slack Message", "content": "## Instructions\\nPost a message to a Slack channel.", "description": "Sends a message to Slack" }\n- Add a skill: { "action": "add", "agent_id": "7", "skill_id": "skill-abc-123" }\n- Remove a skill: { "action": "remove", "agent_id": "7", "skill_id": "skill-abc-123" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_skills" — browse existing skills to find a skill_id before calling action:"add"\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return IT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleCreate(e){if(!e.name||!e.content)throw new Error('action:"create" requires both "name" and "content".');try{const t={name:e.name,content:e.content,description:e.description},a=await this.mondayApi.request(yT,t,{versionOverride:"dev"});if(!a.create_agent_skill)throw new Error("create_agent_skill returned no data");return{content:{message:'Skill created and added to the account catalog. Use the returned id with action:"add" to attach it to an agent.',skill:a.create_agent_skill}}}catch(e){vu(e,"create monday platform agent skill")}}async handleAdd(e){if(!e.agent_id)throw new Error('agent_id is required for action:"add".');if(!e.skill_id)throw new Error('skill_id is required for action:"add". Get it from agent_catalog action:"list_skills" or from action:"create" in this tool.');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(fT,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){vu(e,"add skill to monday platform agent")}}async handleRemove(e){if(!e.agent_id)throw new Error('agent_id is required for action:"remove".');if(!e.skill_id)throw new Error('skill_id is required for action:"remove".');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(_T,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){vu(e,"remove skill from monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent Knowledge",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'List, grant, update, or revoke a monday platform agent\'s access to boards and docs.\n\nAn agent\'s "knowledge" is the set of monday.com boards and docs it can read from or write to during a run.\n\n- list: Returns all resources the agent currently has access to, including permission level and resource type.\n- add: Grants the agent access to a board or doc with the specified permission level.\n- update: Changes the permission level on a resource the agent already has access to. Call action:"list" first to confirm the resource_id exists.\n- remove: Revokes the agent\'s access to a board or doc entirely. Call action:"list" first to confirm the resource_id exists.\n\nPermission types:\n- READ: Agent can read data from the resource.\n- READ_WRITE: Agent can read and write data to the resource.\n\nUSAGE EXAMPLES:\n- List: { "action": "list", "agent_id": "7" }\n- Add board access: { "action": "add", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ" }\n- Update to read-write: { "action": "update", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ_WRITE" }\n- Remove access: { "action": "remove", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD" }\n\nRELATED TOOLS:\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform'}getInputSchema(){return DT}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"update":return this.handleUpdate(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t=(await this.mondayApi.request(ET,{id:e.agent_id},{versionOverride:"dev"})).agent_knowledge??{resources:[],files:[]};return{content:{message:"Current agent resource access.",count:t.resources?.length??0,knowledge:t}}}catch(e){vu(e,"list agent knowledge for monday platform agent")}}async handleAdd(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:add");try{const t=await this.mondayApi.request(TT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access granted to agent.",success:t.add_agent_resource_access?.success??!1}}}catch(e){vu(e,"add agent resource access for monday platform agent")}}async handleUpdate(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:update");try{const t=await this.mondayApi.request(ST,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access updated.",success:t.update_agent_resource_access?.success??!1}}}catch(e){vu(e,"update agent resource access for monday platform agent")}}async handleRemove(e){if(!e.resource_id||!e.scope_type)throw new Error("resource_id and scope_type are required for action:remove");try{const t=await this.mondayApi.request(AT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type},{versionOverride:"dev"});return{content:{message:"Resource access removed from agent.",success:t.remove_agent_resource_access?.success??!1}}}catch(e){vu(e,"remove agent resource access for monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="agent_catalog",this.type=Mi.READ,this.annotations=Er({title:"monday Platform Agent Catalog",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Browse the account-wide catalog of available trigger types and skills for monday platform agents. READ-ONLY — no agent_id required.\n\nUse this tool to discover what\'s available BEFORE wiring anything to a specific agent.\n\nACTIONS:\n- list_triggers: { block_reference_ids? } — returns available trigger types.\n Each entry has block_reference_id (required for manage_agent_triggers action:"add"), name, description,\n field_schemas (describes field_values shape), and required_fields (fields to collect from the user).\n Note: only triggers that can be added programmatically appear here. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\n require user setup in the monday.com UI and will not appear here.\n\n- list_skills: {} — returns available skills with id, name, description.\n Never guess or invent a skill id — always look it up here before calling manage_agent_skills action:"add".\n\nUSAGE EXAMPLES:\n- List all trigger types: { "action": "list_triggers" }\n- Fetch specific trigger: { "action": "list_triggers", "block_reference_ids": ["some-block-ref-id"] }\n- List all skills: { "action": "list_skills" }\n\nRELATED TOOLS:\n- manage_agent_triggers — use block_reference_id from list_triggers to attach a trigger to a specific agent\n- manage_agent_skills — use skill id from list_skills, or action:"create" to author a new skill, then attach to an agent\n- manage_agent — manage the agent entity itself (create, update, delete, activate, etc.)'}getInputSchema(){return NT}async executeInternal(e){switch(e.action){case"list_triggers":return this.handleListTriggers(e);case"list_skills":return this.handleListSkills()}}async handleListTriggers(e){try{const t={block_reference_ids:e.block_reference_ids},a=(await this.mondayApi.request(gT,t,{versionOverride:"dev"})).agent_triggers_catalog??[];return{content:{message:'Available trigger types. Use block_reference_id and inspect field_schemas/required_fields before calling manage_agent_triggers action:"add".',count:a.length,triggers:a}}}catch(e){vu(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(vT,{},{versionOverride:"dev"})).agent_skills_catalog??[];return{content:{message:'Available skills. Use id when calling manage_agent_skills action:"add".',count:e.length,skills:e}}}catch(e){vu(e,"fetch monday platform agent skills catalog")}}},class extends Tr{constructor(){super(...arguments),this.name="list_automations",this.type=Mi.READ,this.annotations=Er({title:"List Board Automations",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all automations on a specific monday.com board, including their ids, titles, active state, and configuration.\nReturns two groups: "workflows" (fully manageable, supports pagination via limit/cursor) and "legacyAutomations" (READ-ONLY automations set up in an older way — returned on the first page only, when no cursor is given).\nAlways present BOTH groups to the user together as one list of board automations — never omit or hide "legacyAutomations". The split and the read-only limitation are internal context for you only: don\'t volunteer them and don\'t label any automation "legacy" or "read-only". Only if the user asks to act on a legacy one, briefly explain it can\'t be changed (e.g. "This one was set up in an older way and can\'t be modified here").\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\n'}getInputSchema(){return CT}async executeInternal(e){try{const a=!e.cursor,i={boardIds:[e.boardId],limit:e.limit??100,includeLegacy:a,...e.cursor?{cursor:e.cursor}:{}},r=await this.mondayApi.request(OT,i),n=(r.board_automations?.items??[]).map(RT),o=r.board_automations?.cursor??null,s=a?(t=r.board_automations?.legacy_automations,null==t||"object"==typeof t&&"error"in t?null:t):null;return{content:{message:`Found ${n.length} live workflow(s) on board ${e.boardId}`,workflows:n,...null!=s?{legacyAutomations:s}:{},pagination:{nextCursor:o,hasMore:null!==o}}}}catch(e){vu(e,"list live workflows")}var t}},class extends Tr{constructor(){super(...arguments),this.name="manage_automations",this.type=Mi.WRITE,this.annotations=Er({title:"Manage Automations",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Activate, deactivate, or delete an existing monday.com automation.\n\nRequires an automation id. When the user refers to an automation by name, always call list_automations first to resolve the id — never guess or infer ids.\n\nActions:\n- activate: enables a paused automation so it starts responding to its trigger.\n- deactivate: pauses an automation while preserving its definition.\n- delete: permanently removes an automation — irreversible.\n\nWhen intent is ambiguous ("stop", "turn off", "pause"), prefer deactivate over delete.'}getInputSchema(){return LT}async executeInternal(e){const t=e;switch(t.action){case"activate":return this.activateWorkflow(t);case"deactivate":return this.deactivateWorkflow(t);case"delete":return this.deleteWorkflow(t)}}async activateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(PT,t,{versionOverride:"dev"});if(!a.activate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} activation did not report success`);return{content:{message:`Workflow ${e.workflowId} activated`,workflowId:e.workflowId,isActive:!0}}}catch(e){vu(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request($T,t,{versionOverride:"dev"});if(!a.deactivate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deactivation did not report success`);return{content:{message:`Workflow ${e.workflowId} deactivated`,workflowId:e.workflowId,isActive:!1}}}catch(e){vu(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(xT,t,{versionOverride:"dev"});if(!a.delete_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deletion did not report success`);return{content:{message:`Workflow ${e.workflowId} deleted`,workflowId:e.workflowId}}}catch(e){vu(e,"delete workflow")}}},class extends Tr{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=Mi.WRITE,this.annotations=Er({title:"Create Automation",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'\n Creates an automation on a monday board from a structured natural-language description.\n\nUse this tool only when you know:\n- boardId\n- the user\'s intended trigger\n- at least one intended action\n- any details the user provided that are relevant to the trigger, conditions, or actions\n\nThe caller does not need to know the exact available automation blocks or their required fields. Describe the user\'s intent clearly — the tool will translate that intent into supported blocks and values.\n\nIf a required detail is missing from the user\'s request, ask for clarification before calling the tool.\n\nIf the tool returns status: "needs_clarification", present the unresolved fields to the user, gather answers, then call the tool again.\n\nDescribe the automation in this format:\n\nTrigger:\n When <the event that should start the automation>\n Details:\n <relevant detail>: <value>\n\nConditions:\n - Only if <condition that should be true>\n Details:\n <relevant detail>: <value>\n\nActions:\n - <action the automation should perform>:\n <relevant detail>: <value>\n\nRules:\n- Use one trigger.\n- Conditions are optional.\n- Multiple conditions mean AND.\n- Use one or more actions.\n- Do not use branching.\n- Use natural language, not block IDs or internal field names.\n- Actions may reference values from the trigger context, such as "{{item name}}", "{{creator}}", "{{status}}", "{{group}}", or "{{board}}".\n\nTerminology:\n- Trigger: the event that starts the automation, such as "when a new item is created".\n- Conditions: optional requirements that must be true before actions run.\n- Actions: what the automation does when it runs.\n\nExample:\n\nTrigger:\n When a new item is created\n\nActions:\n - Send a notification:\n Recipient: John Snow\n Title: Important Update\n Message: The item "{{item name}}" was created.\n\n - Move the item to a group:\n Group: Top group\n'}getInputSchema(){return VT}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=MT(this.context),i=await a({serviceName:UT,path:"/platform-ai-gateway/agents/lite-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`lite-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){vu(e,"create automation")}}},class extends Tr{constructor(){super(...arguments),this.name="get_automation_runs",this.type=Mi.READ,this.annotations=Er({title:"Get Automation Runs",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Read automation/workflow run history. Read-only.\n\nModes:\n- "history": paginated run feed (state, duration, error reason). Use "filters" to narrow results and "nextPageOffset" to page (offset-only — next page = previous offset + returned count).\n- "detail": single run by "triggerUuid" (required) — returns block steps and MCP tool calls. Set "includeToolEvents": false to skip tool calls.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nKnown event states: "success", "failure", "exhausted".'}getInputSchema(){return YT}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};try{return"detail"===e.mode?await this.runDetail(e):await this.runHistory(e)}catch(e){vu(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},i=await this.mondayApi.request(BT,{nextPageOffset:t,filters:a}),r=i.trigger_events?.triggerEvents??[],n=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(r),o=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${r.length} run(s) (${o}) at offset ${t}. By state: ${function(e){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`));return t.length?t.join(", "):"none"}(n)}. Offset-only pagination — for the next page request offset ${t+r.length}.`,scope:o,offset:t,count:r.length,stateCounts:n,runs:r}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,i=e.toolEventsOffset??0,r=(await this.mondayApi.request(qT,{triggerUuid:e.triggerUuid})).trigger_event;if(!r)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[n,o]=await Promise.all([this.mondayApi.request(HT,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(GT,{triggerUuid:e.triggerUuid,nextPageOffset:i}):Promise.resolve(null)]),s=n.block_events?.blockEvents??[],d=o?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${r.eventState??"unknown"}, ${s.length} block step(s), ${d.length} tool call(s).`,found:!0,run:r,blockEvents:s,blockEventsOffset:a,toolEvents:d,toolEventsOffset:i,toolEventsIncluded:t}}}},class extends Tr{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=Mi.READ,this.annotations=Er({title:"Get Automation Statistics",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Aggregate automation run statistics. Read-only.\n\nBreakdowns:\n- "totals": success/failure/total counts at the account or board level.\n- "by_entity": per-automation and per-workflow counts for a given "runStatus" (required: "success" | "failure" | "exhausted"). Use "excludeAutomationIds" to omit specific automations.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nOptional "userIds" narrows results to specific creators.'}getInputSchema(){return KT}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};const t=e.boardId?function(e){const t=Number(e.trim());if(!Number.isInteger(t)||t<=0)throw new Error(`Invalid boardId: '${e}' is not a positive integer.`);return t}(e.boardId):void 0,a=e.boardId?`board ${e.boardId}`:"account-wide";try{return"by_entity"===e.breakdown?await this.runByEntity(e,t,a):await this.runTotals(e,t,a)}catch(e){vu(e,"get automation statistics")}}async runTotals(e,t,a){const i=(await this.mondayApi.request(QT,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${i?.success??0}, failure=${i?.failure??0}, total=${i?.total??0}.`,scope:a,breakdown:"totals",statistics:i}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const i=(await this.mondayApi.request(zT,{runStatus:e.runStatus,filters:{board_id:t,automation_ids:e.excludeAutomationIds,user_ids:e.userIds}})).account_triggers_statistics_by_entity_id;return{content:{message:`By-entity '${e.runStatus}' statistics (${a}).`,scope:a,breakdown:"by_entity",runStatus:e.runStatus,automationStatistics:i?.automation_statistics,workflowStatistics:i?.workflow_statistics}}}},class extends Tr{constructor(){super(...arguments),this.name="create_workflow",this.type=Mi.WRITE,this.annotations=Er({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n"}getInputSchema(){return XT}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(JT,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:r}=a.create_workflow;if(!i||!r)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:r}}}catch(e){vu(e,"create Workflow Builder workflow")}}},class extends Tr{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=Mi.WRITE,this.annotations=Er({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return ZT}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=MT(this.context),i=await a({serviceName:UT,path:"/platform-ai-gateway/agents/workflow-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){vu(e,"update workflow")}}},class extends Tr{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=Mi.READ,this.annotations=Er({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return eA}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=MT(this.context),i=await a({serviceName:UT,path:"/platform-ai-gateway/agents/workflow-planner",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){vu(e,"plan workflow")}}},class extends Tr{constructor(){super(...arguments),this.name="publish_workflow",this.type=Mi.WRITE,this.annotations=Er({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nUse this after create_workflow (and optionally update_workflow) to make the workflow active. Before publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\n"}getInputSchema(){return aA}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(tA,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:r}=a.publish_workflow;if(!i||!r)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:r}}}catch(e){vu(e,"publish workflow")}}},class extends Tr{constructor(){super(...arguments),this.name="configure_ai_column",this.type=Mi.WRITE,this.annotations=Er({title:"Configure AI Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add AI to a column or set up an AI column on a monday.com board. Use this tool when the user wants to automatically categorize, summarize, translate, extract, generate text, improve writing, or assign people using AI on a column. This is the right tool for requests like "add AI to a column", "set up automatic extraction/categorization/summarization", "make a column use AI", "configure AI on a column", or "use AI to automatically fill a column".\n\nThe column must already exist on the board with a compatible type for the chosen block. To create a new AI column, first use create_column to create the column, then use this tool to add AI behavior.\n\nBLOCK TYPES (only pass fields that apply to the chosen block_type):\n- categorize: { block_type, source_type, source_column_id?, additional_instructions? } — assigns labels from target column\'s existing status/dropdown options\n- summarize: { block_type, source_type, source_column_id?, additional_instructions? } — generates concise summaries\n- translate: { block_type, source_type, source_column_id?, target_language } — translates to target language\n- improve_text: { block_type, source_type, source_column_id?, tone?, improver_length?, refinement_type? } — rewrites/fixes text\n- extract: { block_type, source_type, source_column_id?, entity_type, custom_instructions?, additional_instructions? } — extracts structured info\n- open_block: { block_type, ai_query } — flexible custom prompt, reference columns via {pulse.column_id}\n- write_me: { block_type, ai_query, tone, output_length } — generates new text from prompt\n- person_assignment: { block_type, source_type, source_column_id?, groups } — assigns people based on context\n\nSOURCE TYPES (required for all blocks except open_block and write_me):\n- item_name: uses the item\'s name as input\n- thread: uses the item\'s updates/comments as input\n- column: uses another column\'s value (requires source_column_id)\n- emails_and_activities: uses emails & activities (categorize only)\n\nCOLUMN REFERENCE SYNTAX (for open_block and write_me ai_query):\n- {pulse.column_id} — regular board column\n- {pulse.name} — the item name\n- {pulse.subitem.column_id} — subitem column\n\nRELATED TOOLS:\n- create_column — create the target column first if it doesn\'t exist\n- get_board_schema — discover existing columns and their types/IDs'}getInputSchema(){return cA}async executeInternal(e){const t=void 0!==e.run_backfill?{run_backfill:e.run_backfill}:void 0;try{switch(e.block_type){case"categorize":return this.handleCategorize(e.board_id,e,t);case"summarize":return this.handleSummarize(e.board_id,e,t);case"translate":return this.handleTranslate(e.board_id,e,t);case"improve_text":return this.handleImproveText(e.board_id,e,t);case"extract":return this.handleExtract(e.board_id,e,t);case"open_block":return this.handleOpenBlock(e.board_id,e,t);case"write_me":return this.handleWriteMe(e.board_id,e,t);case"person_assignment":return this.handlePersonAssignment(e.board_id,e,t)}}catch(e){vu(e,"configure AI column")}}validateSourceType(e,t){if(!e.source_type)throw new Error(`source_type is required for ${t} block`);if("column"===e.source_type&&!e.source_column_id)throw new Error('source_column_id is required when source_type is "column"')}async handleCategorize(e,t,a){this.validateSourceType(t,"categorize");const i=await this.mondayApi.request(iA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const i=await this.mondayApi.request(rA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_summarize_ai_column?.column_id}}}async handleTranslate(e,t,a){if(this.validateSourceType(t,"translate"),!t.target_language)throw new Error("target_language is required for translate block");const i=await this.mondayApi.request(nA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,targetLanguage:t.target_language,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const i=await this.mondayApi.request(oA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,tone:t.tone,length:t.improver_length,refinementType:t.refinement_type,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_improve_text_ai_column?.column_id}}}async handleExtract(e,t,a){if(this.validateSourceType(t,"extract"),!t.entity_type)throw new Error("entity_type is required for extract block");if("custom"===t.entity_type&&!t.custom_instructions)throw new Error('custom_instructions is required for extract block when entity_type is "custom"');const i=await this.mondayApi.request(sA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,entityType:t.entity_type,customInstructions:t.custom_instructions,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_extract_ai_column?.column_id}}}async handleOpenBlock(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for open_block block");const i=await this.mondayApi.request(dA,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_open_block_ai_column?.column_id}}}async handleWriteMe(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for write_me block");if(!t.tone)throw new Error("tone is required for write_me block");if(!t.output_length)throw new Error("output_length is required for write_me block");const i=await this.mondayApi.request(pA,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,tone:t.tone,length:t.output_length,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_write_me_ai_column?.column_id}}}async handlePersonAssignment(e,t,a){if(this.validateSourceType(t,"person_assignment"),!t.groups||0===t.groups.length)throw new Error("groups is required for person_assignment block");const i=await this.mondayApi.request(lA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,groups:t.groups,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_person_assignment_ai_column?.column_id}}}},class extends Tr{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=Mi.WRITE,this.annotations=Er({title:"Remove AI from Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0})}getDescription(){return"Remove AI from a column on a monday.com board. Use this tool when the user wants to disable AI on a column, turn off AI automation, stop AI from running on a column, or delete the AI behavior from a column. This deletes all AI automation recipes and the app feature extension associated with the column. The column itself is not deleted — only its AI behavior is removed.\n\nUse get_board_schema to find column IDs before calling this tool."}getInputSchema(){return uA}async executeInternal(e){try{const t=await this.mondayApi.request(mA,{boardId:e.board_id.toString(),columnId:e.column_id});return{content:{message:"AI removed from column successfully",column_id:t.remove_ai_from_column?.column_id,success:t.remove_ai_from_column?.success}}}catch(e){vu(e,"remove AI from column")}}}];var QA;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(QA||(QA={}));const zA=(e,t)=>{let a=[];t?.mode===QA.APPS?a=[...Ir]:t?.mode!==QA.API&&t?.mode||(a=[...YA,...WA]);const i=a.map((t=>((e,t)=>e.prototype instanceof Tr?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof er?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==Mi.ALL_API;if(t.mode===QA.API&&"only"===t.enableDynamicApiTools)return e.type===Mi.ALL_API;let a=!1;return t.mode===QA.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 KA{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 JA extends Pi{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new KA,this.toolInstances=[],this.managementTool=null,this.mondayApiToken=e.mondayApiToken,this.toolkitConfig=e;const t="function"==typeof e.mondayApiToken?e.mondayApiToken():e.mondayApiToken;this.mondayApiClient=this.createApiClient(t,e),this.context={...e.context,apiVersion:e.mondayApiVersion??Xi,fetchConfig:e.fetchConfig??e.context?.fetchConfig},this.registerTools(e)}createApiClientFromToken(){return this.createApiClient(this.mondayApiToken(),this.toolkitConfig)}createApiClient(e,t){return new i({token:e,apiVersion:t.mondayApiVersion??Xi,endpoint:t.mondayApiEndpoint,requestConfig:{...t.mondayApiRequestConfig,headers:{...t.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 fA;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:"function"==typeof this.mondayApiToken?()=>this.createApiClientFromToken():this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return zA(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,r)=>{try{let r;if(a){const n=e.object(a).safeParse(i);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);r=await t.execute(n.data)}else r=await t.execute();return this.formatToolResult(r.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 r=e.object(i).safeParse(a);if(!r.success)throw new Error(`Invalid arguments: ${r.error.message}`);return(await t.execute(r.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const r=t.getInputSchema();if(r){const n=e.object(r).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data,i);return this.formatToolResult(o.content)}{const e=await t.execute(void 0,i);return this.formatToolResult(e.content)}}catch(e){return bu(e)}}}getSchemaForTool(t,i){const r=t.getInputSchema();if(r)return"json"===i?.schemaFormat?a(e.object(r)):r}formatToolResult(e){return"string"==typeof e?{content:[{type:"text",text:e}]}:{structuredContent:e,content:[{type:"text",text:JSON.stringify(e)}]}}handleToolError(e,t){return bu(e,{toolName:t,errorPrefix:`Failed to execute tool ${t}: `})}}export{KA as DynamicToolManager,JA as MondayAgentToolkit};
2970
+ `),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}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 Tr{constructor(){super(...arguments),this.name="create_custom_activity",this.type=Mi.WRITE,this.annotations=Er({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return zf}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(cu,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends Tr{constructor(){super(...arguments),this.name="create_notification",this.type=Mi.WRITE,this.annotations=Er({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Jf}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Kf,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Tr{constructor(){super(...arguments),this.name="create_timeline_item",this.type=Mi.WRITE,this.annotations=Er({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return n_}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(mu,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends Tr{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=Mi.READ,this.annotations=Er({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return b_}async executeInternal(e){const t=await this.mondayApi.request(uu);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};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:{message:`Found ${a.length} custom activities`,data:a}}}},class extends Tr{constructor(){super(...arguments),this.name="read_docs",this.type=Mi.READ,this.annotations=Er({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get information about monday.com documents. Supports two modes:\n\nMODE: "content" (default) — Fetch documents with their full markdown content.\n- Requires: type ("ids" | "object_ids" | "workspace_ids") and ids array\n- Supports pagination via page/limit. Check has_more_pages in response.\n- If type "ids" returns no results, automatically retries with object_ids.\n- Set include_blocks: true to include block IDs, types, and positions in the response — required before calling update_doc.\n- Blocks default to 25 per page. Use blocks_limit and blocks_page to paginate through long documents.\n- Set include_comments: true to fetch all comments and replies on the document. Each comment is enriched with anchor info (block_id, selection_from, selection_length) indicating which block and text range it\'s attached to. Use comments_limit to control how many comments per item (default 50).\n\nMODE: "version_history" — Fetch the edit history of a single document.\n- Requires: ids with the document\'s object_id (use the object_id field from content mode results, NOT the id field).\n- The object_id is the numeric ID visible in the document URL.\n- Returns restoring points sorted newest-first. Use version_history_limit to cap results (e.g., "last 3 changes" → version_history_limit: 3).\n- Use since/until to filter by time range. If omitted, returns full history.\n- Set include_diff: true to see what content changed between versions (fetches up to 10 diffs, may be slower).\n- Examples:\n - { mode: "version_history", ids: ["5001466606"], version_history_limit: 3 }\n - { mode: "version_history", ids: ["5001466606"], since: "2026-03-11T00:00:00Z", include_diff: true }'}getInputSchema(){return Ng}async executeInternal(e){return e.mode===Sg?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??Ag,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const r=e.include_blocks??!1,n=r?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},o={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:r,...n};let s=await this.mondayApi.request(Km,o);if((!s.docs||0===s.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,includeBlocks:r,...n};s=await this.mondayApi.request(Km,a)}if(!s.docs||0===s.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const d=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:s.docs.flatMap((e=>e?[e.id]:[])),object_ids:s.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(s.docs,o,r,d,p,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:r}=e,n=e.ids?.[0];if(!n)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:Sg,object_ids:[n]};try{const e={docId:n,since:a,until:i},o=await this.mondayApi.request(Jm,e);let s=o?.doc_version_history?.restoring_points;if(!s||0===s.length)return{content:`No version history found for document ${n}${a?` from ${a}`:""}.`};if(!t)return r&&(s=s.slice(0,r)),{content:{doc_id:n,since:a,until:i,restoring_points:s}};const d=Math.min(r??10,10),p=s.slice(0,d+1),l=s.length>d,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:n,date:e.date,prevDate:a.date},r=await this.mondayApi.request(Zm,i);return{...e,diff:r?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,d);return{content:{doc_id:n,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:s.length}}}}catch(e){return{content:`Error fetching version history for document ${n}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const r of e){const e=r.insert,n="string"==typeof e?e.length:1,o=r.attributes,s=o?.comments;if(s&&Array.isArray(s))for(const e of s){const r=String(e),o=t.get(r);if(o&&o.block_id===a.id){const e=Math.max(o.selection_from+o.selection_length,i+n);o.selection_length=e-o.selection_from}else o||t.set(r,{block_id:a.id,selection_from:i,selection_length:n})}i+=n}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[r,n]=await Promise.all([this.mondayApi.request(Xm,i),this.mondayApi.request(Ig,{docId:[t]}).catch((()=>null))]),o=r.boards?.[0]?.items_page?.items;if(!o)return[];let s=new Map;if(n){const e=(n.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((e=>{let t;if("string"==typeof e.content)try{t=JSON.parse(e.content)}catch{t={}}else t=e.content??{};return{id:e.id??"",type:e.type??"",content:t}}));s=this.buildCommentAnchorMap(e)}const d=[];for(const e of o)if(e.updates&&0!==e.updates.length)for(const t of e.updates)d.push({id:t.id,text_body:t.text_body,body:t.body,created_at:t.created_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:e.id,item_name:e.name,anchor:s.get(t.id)??null,replies:(t.replies??[]).map((e=>({id:e.id,text_body:e.text_body,body:e.body,created_at:e.created_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))});return d}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,r=50,n,o){const s=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,s="";try{const t={docId:e.id},a=await this.mondayApi.request(hu,t);s=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){s=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,r)),{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,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==n||void 0!==o?{blocks_pagination:{current_page:o??1,limit:n??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(n??25)}}:{}},blocks_as_markdown:s,...i&&{comments:t}}}))),d=t.page||1,p=t.limit||25,l=s.length,c=l===p;return{content:{message:`Documents retrieved (${s.length})`,pagination:{current_page:d,limit:p,count:l,has_more_pages:c},data:s}}}},class extends Tr{constructor(){super(...arguments),this.name="workspace_info",this.type=Mi.READ,this.annotations=Er({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 Og}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(fu,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:r,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=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:[]}]))),d=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(t):d.push(t)}));const p=[];return(r||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,url:t?mg(t,o.id):void 0,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(s.values()),root_items:{boards:d,docs:p}}}(a,await cg(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends Tr{constructor(){super(...arguments),this.name="list_workspaces",this.type=Mi.READ,this.annotations=Er({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all workspaces available to the user, ordered by membership (user\'s workspaces first). Returns workspaces with their ID, name, and description.\n[IMPORTANT] To search for workspaces by name, use the "search" tool with searchType WORKSPACES instead — it provides faster and more accurate results.'}getInputSchema(){return Pg}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Rg(await this.mondayApi.request(kg,t(Dc.Member)));let i=a;if(!Cg(a)){i=Rg(await this.mondayApi.request(kg,t(Dc.All)))}if(!Cg(i))return{content:{message:"No workspaces found.",data:[]}};const r=i.length===e.limit,n=await cg(this.mondayApi),o=i.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:n&&e.id?mg(n,e.id):void 0})));return{content:{message:"Workspaces retrieved",...r?{next_page:e.page+1}:{},data:o}}}},class extends Tr{constructor(){super(...arguments),this.name="create_doc",this.type=Mi.WRITE,this.annotations=Er({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, optional docOwnerIds)\n- item: Creates a document attached to an item (requires item_id, optional column_id, optional docOwnerIds)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_name: "My Doc", doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, doc_name: "My Doc", folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, doc_name: "My Doc", column_id: "doc_col_1" , markdown: "..." }\n- Workspace doc with agent owner: { location: "workspace", workspace_id: 123, doc_name: "My Doc", markdown: "...", docOwnerIds: ["<agent_owner_user_id>"] }'}getInputSchema(){return Vg}async executeInternal(e){const t=Mg.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,r;if(a.type===Fg.enum.workspace){const n={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||op.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},o=await this.mondayApi.request(xg,n);t=o?.create_doc?.id??void 0,i=o?.create_doc?.object_id??void 0,r=o?.create_doc?.url??void 0}else if(a.type===Fg.enum.item){const n={itemId:a.item_id.toString()},o=await this.mondayApi.request($g,n),s=o.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const d=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===Hf.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:Hf.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(ou,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},m=await this.mondayApi.request(xg,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,r=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Ug,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(Lg,n),s=o?.add_content_to_doc_from_markdown?.success,d=o?.add_content_to_doc_from_markdown?.error;return s?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:r,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${d||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Tr{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=Mi.WRITE,this.annotations=Er({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return Hg}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=null;if(e.doc_id){const a=await this.mondayApi.request(qg,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Bg,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(jg,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:r,block_ids:n,error:o}=i.add_content_to_doc_from_markdown;if(!r)return{content:`Error adding content to document: ${o||"Unknown error"}`};const s=n?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${s} block${1===s?"":"s"} created.`,doc_id:t.id,block_ids:n,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Tr{constructor(){super(...arguments),this.name="update_doc",this.type=Mi.WRITE,this.annotations=Er({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Av}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};this.sessionContext.metadata={...this.sessionContext.metadata,operation_types:e.operations?.map((e=>e.operation_type)),operation_count:e.operations?.length??0,...e.object_id&&{object_id:e.object_id}};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(gg,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let r=0;r<e.operations.length;r++){const n=e.operations[r];try{const i=await this.executeOperation(t,n,e.object_id);a.push(`- [OK] ${n.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${n.operation_type}: ${t}`),i=r;break}}const r=null!==i?i:e.operations.length,n=e.operations.length,o=`Completed ${r}/${n} operation${1===n?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${o}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(fg,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},r=await this.mondayApi.request(_g,i),n=r?.add_content_to_doc_from_markdown;if(!n?.success)throw new Error(n?.error||"Failed to add markdown content");const o=n.block_ids?.length??0;return`${o} block${1===o?"":"s"} added${n.block_ids?.length?`. Block IDs: ${n.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:zg(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:zg(e.delta_format),language:e.language};case"list_item":return{deltaFormat:zg(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},r=await this.mondayApi.request(vg,i);if(!r?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const r=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Qg(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:Gg(e.alignment),direction:Wg(e.direction)}};case"list_item":return{list_block:{delta_format:Qg(e.delta_format),list_block_type:e.list_block_type?e.list_block_type:void 0,indentation:e.indentation}};case"code":return{text_block:{delta_format:Qg(e.delta_format),text_block_type:sc.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(r);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=r[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const n={docId:e,afterBlockId:a,blocksInput:[r]},o=await this.mondayApi.request(Tg,n),s=o?.create_doc_blocks;if(!s||0===s.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${s.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(yg,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(bg,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(wg,{boardId:e}),a=t.boards?.[0]?.items_page?.items?.[0]?.id;if(!a)throw new Error(`No item found on the document backing board (object_id: ${e})`);return a}async fetchAllBlockContent(e){const t=await this.mondayApi.request(Ig,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,r,n,o,s){if((null!=o||null!=s)&&!n)throw new Error("selection_from and selection_length require block_id");if(null!=o!=(null!=s))throw new Error("selection_from and selection_length must both be provided together");const d=n?Array.isArray(n)?n:[n]:[];if((null!=o||null!=s)&&d.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(r){const e=JSON.parse(r),t=d_.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(Eg,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(d.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of d){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const r=i.content.deltaFormat;if(!r)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let n=0;for(const e of r)n+="string"==typeof e.insert?e.insert.length:1;if(0===n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const d=o??0,p=s??n;if(d+p>n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${d}, ${d+p}) is out of range for block ${a} (total length ${n})`);let l;try{l=Jg(r,f,d,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...i.content,deltaFormat:l},m=await this.mondayApi.request(vg,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,r){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,r)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends Tr{constructor(){super(...arguments),this.name="update_workspace",this.type=Mi.WRITE,this.annotations=Er({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return Cv}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(Rv,t),i=await cg(this.mondayApi),r=i?mg(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:r}}}},class extends Tr{constructor(){super(...arguments),this.name="update_folder",this.type=Mi.WRITE,this.annotations=Er({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return $v}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 r={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},n=await this.mondayApi.request(Pv,r);return{content:{message:`Folder ${n.update_folder?.id} updated`,folder_id:n.update_folder?.id,folder_name:n.update_folder?.name}}}},class extends Tr{constructor(){super(...arguments),this.name="create_workspace",this.type=Mi.WRITE,this.annotations=Er({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Lv}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(xv,t),i=await cg(this.mondayApi),r=i&&a.create_workspace?.id?mg(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:r}}}},class extends Tr{constructor(){super(...arguments),this.name="create_folder",this.type=Mi.WRITE,this.annotations=Er({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Fv}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(Uv,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends Tr{constructor(){super(...arguments),this.name="move_object",this.type=Mi.WRITE,this.annotations=Er({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 jv}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,parentFolderId:n,workspaceId:o,accountProductId:s},p=await this.mondayApi.request(Pv,d);return{content:{message:"Object moved",object_id:p.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(Mv,d);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(Vv,d);return p.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:p.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${p.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case $l.Folder:return this.executeUpdateFolder(e);case $l.Board:return this.executeUpdateBoardHierarchy(e);case $l.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Tr{constructor(){super(...arguments),this.name="create_dashboard",this.type=Mi.WRITE,this.annotations=Er({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 Ov}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(Sv,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Tr{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=Mi.READ,this.annotations=Er({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(Dv,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,r=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:r,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:U_}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Tr{constructor(){super(...arguments),this.name="create_widget",this.type=Mi.WRITE,this.annotations=Er({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 kv}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings 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(Nv,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===Ac.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Tr{constructor(){super(...arguments),this.name="board_insights",this.type=Mi.READ,this.annotations=Er({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 Yv}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};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===$d.Label)).map((e=>e.columnId))),r=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:$d.Label,columnId:e})))??[],n=e.aggregations.concat(r).map((e=>{if(e.function){const n=`${e.function}_${e.columnId}`,o=t[n]||0;t[n]=o+1;const s=`${n}_${o}`;return Gv.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Pd.Function,function:(i=e.function,r=e.columnId,{function:i,params:i===$d.CountItems?[]:[{type:Pd.Column,column:Wv(r),as:r}]}),as:s}}var i,r;const n={type:Pd.Column,column:Wv(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),n}));return a.forEach((e=>{n.some((t=>t.as===e.column_id))||n.push({type:Pd.Column,column:Wv(e.column_id),as:e.column_id})})),{selectElements:n,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),r=function(e){return{id:e.boardId.toString(),type:Cd.Table}}(e),n={query:{from:r,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},o=await this.mondayApi.request(Bv,n),s=(o.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 r=i.result??i.value??null;t[a]=r})),t}));return s.length?{content:{message:"Board insights retrieved",board_name:o.boards?.[0]?.name,board_url:o.boards?.[0]?.url,data:s}}:{content:"No board insights found for the given query."}}},class extends Tr{constructor(){super(...arguments),this.name="search",this.type=Mi.READ,this.annotations=Er({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Supported searchType values: BOARD, DOCUMENTS, FOLDERS, WORKSPACES, UPDATES, ITEMS, TIMELINE_ITEMS.\nFor searching/listing specific users and teams, use list_users_and_teams tool.\nFor account-level info (plan, member count, products), use get_user_context tool.\nFor groups, use get_board_info tool.\nITEMS search requires a searchTerm and only returns id, title, and url.\nWORKSPACES search requires a searchTerm and only returns id, title, and description.\nUPDATES search requires a searchTerm and returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with boardIds and/or creatorIds.\nTIMELINE_ITEMS search requires a searchTerm and returns id, title, summary, and content.\nFOLDERS search requires workspaceIds and only returns id and title.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789, workspace-101, update-303, item-321, timeline-item-654). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return oy}async executeInternal(e){if(e.searchType!==ny.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.runSmartSearchAsync(e)).items}}}catch(t){yu(t);if([ny.ITEMS,ny.WORKSPACES,ny.UPDATES,ny.TIMELINE_ITEMS].includes(e.searchType))throw t}const t={[ny.BOARD]:this.searchBoardsAsync.bind(this),[ny.DOCUMENTS]:this.searchDocsAsync.bind(this),[ny.FOLDERS]:this.searchFoldersAsync.bind(this),[ny.WORKSPACES]:()=>{throw new Error("Workspaces search requires a searchTerm")},[ny.UPDATES]:()=>{throw new Error("Updates search requires a searchTerm")},[ny.ITEMS]:()=>{throw new Error("Items search requires a searchTerm")},[ny.TIMELINE_ITEMS]:()=>{throw new Error("Timeline items search requires a searchTerm")}},a=await t[e.searchType](e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async runSmartSearchAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===ny.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===ny.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===ny.WORKSPACES)return this.searchWorkspacesAsync(e.searchTerm,e.limit);if(e.searchType===ny.UPDATES){const t=e.boardIds?.map((e=>e.toString())),a=e.creatorIds?.map((e=>e.toString()));return this.searchUpdatesAsync(e.searchTerm,e.limit,t,a)}if(e.searchType===ny.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);if(e.searchType===ny.TIMELINE_ITEMS)return this.searchTimelineItemsAsync(e.searchTerm,e.limit);throw new Error(`Unsupported search type for smart search: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ty,i,{versionOverride:"dev",timeout:$f})).search.boards.results.map((e=>({id:ry.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ay,i,{versionOverride:"dev",timeout:$f})).search.docs.results.map((e=>({id:ry.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return{items:(await this.mondayApi.request(Xv,a,{timeout:$f})).search.workspaces.results.map((e=>({id:ry.WORKSPACE+e.indexed_data.id,title:e.indexed_data.name,description:e.indexed_data.description||void 0}))),wasFiltered:!0}}async searchUpdatesAsync(e,t,a,i){const r={query:e,limit:t,boardIds:a,creatorIds:i};return{items:(await this.mondayApi.request(Zv,r,{timeout:$f})).search.updates.results.map((e=>({id:ry.UPDATE+e.indexed_data.id,title:e.indexed_data.body,itemId:e.indexed_data.item_id,boardId:e.indexed_data.board_id,creatorId:e.indexed_data.creator_id}))),wasFiltered:!0}}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Jv,i,{timeout:$f})).search.items.results.map((e=>({id:ry.ITEM+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchTimelineItemsAsync(e,t){const a={query:e,limit:t};return{items:(await this.mondayApi.request(ey,a,{timeout:$f})).search.timeline_items.results.map((e=>({id:ry.TIMELINE_ITEM+e.indexed_data.id,title:e.indexed_data.title,summary:e.indexed_data.summary||void 0,content:e.indexed_data.content||void 0}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&vu(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Kv,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:ry.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(zv,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:ry.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(Qv,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:ry.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=iy(e.searchTerm??""),r=(e.page-1)*e.limit,n=r+e.limit;return{items:t.filter((e=>iy(a(e)).includes(i))).slice(r,n),wasFiltered:!0}}},class extends Tr{constructor(){super(...arguments),this.name="get_user_context",this.type=Mi.READ,this.annotations=Er({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction 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(fy,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),r=this.extractRelevantBoards(a),n=this.extractRelevantPeople(a),{account:o,...s}=e;return{content:{message:"User context",...{user:s,account:o?{tier:o.tier,active_members_count:o.active_members_count,is_during_trial:o.is_during_trial,products:o.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:r,relevantPeople:n}}}}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[gy[e]]=t[e];const r=await this.mondayApi.request(_y,i),n=[];for(const e of a){const t=vy[e];for(const a of r[t]??[])a?.id&&n.push({id:a.id,name:a.name,type:e})}return n}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}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.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}},class extends Tr{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=Mi.WRITE,this.annotations=Er({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return my}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(ly,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends Tr{constructor(){super(...arguments),this.name="get_assets",this.type=Mi.READ,this.annotations=Er({title:"Get Assets",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get assets (files) by their IDs. Returns file metadata including name, extension, size, public URL (valid for 1 hour), thumbnail URL, upload date, and who uploaded it."}getInputSchema(){return hy}async executeInternal(e){const t=await this.mondayApi.request(uy,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends Tr{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=Mi.READ,this.annotations=Er({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return by}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(yy,a,{versionOverride:"2026-04"}),r=i.notetaker?.meetings;if(!r?.meetings||0===r.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:r.meetings,pagination:{has_next_page:r.page_info?.has_next_page??!1,cursor:r.page_info?.cursor??null,count:r.meetings.length}}}}}},class extends Tr{constructor(){super(...arguments),this.name="create_view",this.type=Mi.WRITE,this.annotations=Er({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return Xu}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Ju,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="update_view",this.type=Mi.WRITE,this.annotations=Er({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return eh}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Zu,t);return a.update_view?{content:`View "${a.update_view.name}" (ID: ${a.update_view.id}, type: ${a.update_view.type}) successfully updated`}:{content:"Failed to update view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="create_view_table",this.type=Mi.WRITE,this.annotations=Er({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return rh}async executeInternal(e){const t={boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(th,t);return a.create_view_table?{content:`Table view "${a.create_view_table.name}" (ID: ${a.create_view_table.id}, type: ${a.create_view_table.type}) successfully created`}:{content:"Failed to create table view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="update_view_table",this.type=Mi.WRITE,this.annotations=Er({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return dh}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(nh,t);return a.update_view_table?{content:`Table view "${a.update_view_table.name}" (ID: ${a.update_view_table.id}, type: ${a.update_view_table.type}) successfully updated`}:{content:"Failed to update table view - no response from API"}}},class extends Tr{constructor(){super(...arguments),this.name="undo_action",this.type=Mi.WRITE,this.annotations=Er({title:"Undo Action",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Undo a previous action on a board using its action_record_uuid. Supports undoing column changes, deletes, archives, moves, duplicates, and more. Use get_board_activity with includeData=true to find the action_record_uuid."}getInputSchema(){return Iy}async executeInternal(e){return await this.mondayApi.request(wy,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends Tr{constructor(){super(...arguments),this.name="get_object_schemas",this.type=Mi.READ,this.annotations=Er({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return Du}async executeInternal(e){const t={ids:e.ids,names:e.names,limit:e.limit,page:e.page,excludeCreatedByMonday:e.excludeCreatedByMonday},a=(await this.mondayApi.request(Su,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends Tr{constructor(){super(...arguments),this.name="create_object_schema",this.type=Mi.WRITE,this.annotations=Er({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return Ou}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Nu,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="update_object_schema",this.type=Mi.WRITE,this.annotations=Er({title:"Update Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update an account-level object schema. Requires the current revision number for optimistic locking — retrieve it first via get_object_schemas."}getInputSchema(){return Ru}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(ku,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="delete_object_schema",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Object Schema",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an account-level object schema. Only allowed when no boards are connected to the schema. Provide either id or name."}getInputSchema(){return Pu}async executeInternal(e){if(!e.id&&!e.name)throw new Error("Either id or name must be provided");const t={id:e.id,name:e.name},a=await this.mondayApi.request(Cu,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends Tr{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=Mi.WRITE,this.annotations=Er({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return xu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnIds:e.columnIds},a=await this.mondayApi.request($u,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=Mi.WRITE,this.annotations=Er({title:"Manage Object Schema Board Connection",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Connect or detach a board from an account-level object schema. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."}getInputSchema(){return Fu}async executeInternal(e){if("connect"===e.action){if(!e.boardId)throw new Error("boardId is required for action=connect");if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided for action=connect");const t={boardId:e.boardId,objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName},a=await this.mondayApi.request(Lu,t);return{content:{message:"Board successfully connected to object schema",connection_id:a.connect_board_to_object_schema?.id,schema_id:a.connect_board_to_object_schema?.object_schema_id}}}{if(!e.boardIds?.length)throw new Error("boardIds is required for action=detach");const t={boardIds:e.boardIds},a=(await this.mondayApi.request(Uu,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,r=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...r.length>0&&{failures:r}}}}}},class extends Tr{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=Mi.WRITE,this.annotations=Er({title:"Manage Object Schema Columns",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Create or update columns on an account-level object schema. Column changes are propagated to all boards connected to the schema. create: adds new columns. Each column requires type and title. Call get_column_type_info with fetchMode "${Mu.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in).`}getInputSchema(){return Gu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(Vu,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(ju,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends Tr{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=Mi.WRITE,this.annotations=Er({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return Yu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:Op.Deactivate,reactivate:Op.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(Wu,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends Tr{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=Mi.WRITE,this.annotations=Er({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Ty}async executeInternal(e){const t=(await this.mondayApi.request(Ey,{input:{file_name:e.fileName,content_type:e.contentType,file_size:e.fileSize,source:"mcp",multipart:!1}},{versionOverride:"dev"})).create_upload,a=t.parts[0]?.url;if(!a)throw new Error("create_upload returned no upload URL — parts array was empty");return{content:{upload_id:t.upload_id,upload_url:a,url_expires_at:t.expires_at}}}},class extends Tr{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=Mi.WRITE,this.annotations=Er({title:"Finalize Asset Upload",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Finalize a file upload and create the asset on monday.com. Call this after uploading the file to the presigned URL from get_asset_upload_url. Requires the etag value from the PUT response headers. Automatically attaches the uploaded asset to the specified file column on the item. Returns the created asset_id."}getInputSchema(){return Dy}async executeInternal(e){const t=(await this.mondayApi.request(Ay,{input:{upload_id:e.uploadId,holder:{type:"ITEM",id:e.itemId},board_id:e.boardId,parts:[{part_number:1,etag:e.etag}]}},{versionOverride:"dev"})).complete_upload,a=JSON.stringify({added_file:{fileType:"ASSET",name:t.filename,assetId:String(t.id)}});return await this.mondayApi.request(Sy,{boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,value:a}),{content:{asset_id:t.id,filename:t.filename,content_type:t.content_type,file_size:t.file_size,url:t.url,filelink:t.filelink}}}},class extends Tr{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=Mi.READ,this.annotations=Er({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Oy}async executeInternal(e){return{content:Ny}}},class extends Tr{constructor(){super(...arguments),this.name="fetch_file_content",this.type=Mi.READ,this.annotations=Er({title:"Fetch File Content",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch and extract the text content from a file stored in a monday.com files column.\n\nUse this tool when you need to read, summarize, or analyze the content of files attached to board items. Provide the item ID and column ID from the get_board_items_page response — the column value will be a URL like \"https://monday.com/protected_static/...\" indicating a file is present (null means no file).\n\nPROACTIVE USE: If you retrieve board items and notice a files column with a non-null value (a URL), consider fetching its content if it could help answer the user's question — don't wait to be explicitly asked.\n\nSupported file types and what is returned:\n- Text files (.txt, .md, .csv, .json): raw text content\n- Word documents (.docx): extracted text content\n- PDF files (.pdf): extracted text content\n- Excel files (.xlsx, .xls): extracted text content per sheet\n- Images (.png, .jpg, .gif, .webp, .svg, .bmp, .ico): returns the public URL so you can view or analyze the image directly\n\nText responses include a total_length field. If has_more is true, the content was truncated — you can call this tool again with next_offset if you need the remaining content.\n\nWhen to use:\n- User asks to summarize, read, or analyze the content of a file in a files column\n- User asks questions about what is inside a file (e.g., \"what does the PDF say?\")\n- User wants to extract data from a CSV or Excel file attached to a board item\n- A board item has a files column with a non-null value and the user's question may be answered by its content — even if the user didn't explicitly ask to read the file\n\nWhen NOT to use:\n- The files column value is null (no file uploaded for that item)"}getInputSchema(){return My}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:r=0}=e,n=await this.mondayApi.request(ky,{itemId:[t],columnId:[a]}),o=n?.items?.[0]?.assets;if(!o||0===o.length)return{content:{message:`No file found for item ${t} in column ${a}. The column may be empty or the column ID may be incorrect.`}};return{content:{files:await Promise.all(o.map((e=>By(e,r,i))))}}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Full lifecycle management for monday platform agents — create, read, update, delete, change state, and run.\n\nmonday platform agents are user-built work orchestrators on monday.com — each has a profile (name, role, avatar), a goal, and a markdown execution plan. Agents in state ACTIVE can be triggered automatically. They are NOT local LangChain or MCP agents.\n\nACTIONS (only pass fields that apply to the chosen action):\n- create: { action:"create", prompt, agent_model? } — AI-generated agent. Platform creates profile, goal, and plan from the prompt.\n- create_blank: { action:"create_blank", name?, role?, role_description?, avatar_url?, gender?, background_color?, user_prompt? } — manually defined agent.\n- get one: { action:"get", agent_id }\n- list owned: { action:"get" }\n- update: { action:"update", agent_id, name?, role?, role_description?, plan?, agent_model? }\n- delete: { action:"delete", agent_id }\n- activate: { action:"activate", agent_id }\n- deactivate: { action:"deactivate", agent_id }\n- run: { action:"run", agent_id }\n\nRULES:\n- "create_blank" with no fields creates a nameless blank agent — only do this intentionally.\n- "update" requires at least one of name/role/role_description/plan/agent_model.\n- "update", "delete", "activate", "deactivate", "run" all require "agent_id".\n- Created agents start INACTIVE. Follow with action:"activate" using the returned agent_id before they can be triggered.\n- ⚠️ DESTRUCTIVE — "delete" is permanent and irreversible. When the user refers to an agent by name, ALWAYS call action:"get" first to confirm the correct agent_id before deleting.\n- "run" is fire-and-forget. Returns trigger_uuid — no run-status query exists, treat successful enqueue as the only signal.\n- Agent state is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED only appears as the return value of action:"delete".\n\nUSAGE EXAMPLES:\n- AI create: { "action": "create", "prompt": "Run my daily standup every weekday at 9am." }\n- Manual create:{ "action": "create_blank", "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Fetch one: { "action": "get", "agent_id": "42" }\n- List mine: { "action": "get" }\n- Rename: { "action": "update", "agent_id": "7", "name": "New Name" }\n- Activate: { "action": "activate", "agent_id": "7" }\n- Deactivate: { "action": "deactivate", "agent_id": "7" }\n- Run: { "action": "run", "agent_id": "7" }\n- Delete: { "action": "delete", "agent_id": "7" }\n\nRELATED TOOLS:\n- agent_catalog — browse available trigger types and skills before wiring them to an agent\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent_knowledge — manage which boards/docs this agent has access to'}getInputSchema(){return IT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"create_blank":return this.handleCreateBlank(e);case"get":return this.handleGet(e);case"update":return this.handleUpdate(e);case"delete":return this.handleDelete(e);case"activate":return this.handleActivate(e);case"deactivate":return this.handleDeactivate(e);case"run":return this.handleRun(e)}}async handleCreate(e){if(!e.prompt)throw new Error('manage_agent action:"create" requires "prompt". For a manually configured agent, use action:"create_blank".');try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(sT,t,{versionOverride:"dev"});if(!a.create_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${a.create_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${a.create_agent.id}" to activate it`,agent:a.create_agent}}}catch(e){vu(e,"create monday platform agent")}}async handleCreateBlank(e){try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(dT,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){vu(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(oT,{ids:[e.agent_id]},{versionOverride:"dev"}),a=t?.[0];return a?{content:{message:"monday platform agent",agent:a}}:{content:`monday platform agent ${e.agent_id} not found, or the authenticated user does not have access to it.`}}catch(e){vu(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(oT,{limit:100},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user (limited to 100 — ask the user if they need more)",count:t.length,agents:t}}}catch(e){vu(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(pT,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){vu(e,"update monday platform agent")}}async handleDelete(e){if(!e.agent_id)throw new Error('manage_agent action:"delete" requires "agent_id".');try{const t={id:e.agent_id},a=await this.mondayApi.request(lT,t,{versionOverride:"dev"});if(!a.delete_agent?.id)throw new Error("monday platform agent delete returned no id");return{content:{message:`monday platform agent ${a.delete_agent.id} deleted`,agent:a.delete_agent}}}catch(e){vu(e,"delete monday platform agent")}}async handleActivate(e){if(!e.agent_id)throw new Error('manage_agent action:"activate" requires "agent_id".');try{const t=await this.mondayApi.request(cT,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){vu(e,"activate monday platform agent")}}async handleDeactivate(e){if(!e.agent_id)throw new Error('manage_agent action:"deactivate" requires "agent_id".');try{const t={id:e.agent_id,inactive_reason:dI.DeactivatedByUser},a=await this.mondayApi.request(mT,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){vu(e,"deactivate monday platform agent")}}async handleRun(e){if(!e.agent_id)throw new Error('manage_agent action:"run" requires "agent_id".');try{const t=await this.mondayApi.request(uT,{id:e.agent_id},{versionOverride:"dev"});if(!t.run_agent)throw new Error("run_agent returned no data — the agent run may not have been enqueued");return{content:{message:"Agent run enqueued.",trigger_uuid:t.run_agent.trigger_uuid}}}catch(e){vu(e,"run monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent Triggers",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the triggers attached to a monday platform agent — triggers define WHEN the agent runs automatically.\n\nACTIONS:\n- list: { agent_id } — returns active triggers with node_id, block_reference_id, name, field_summary.\n- add: { agent_id, block_reference_id, field_values? } — attaches a trigger type to the agent.\n- remove: { agent_id, node_id } — detaches a trigger instance by node_id (NOT block_reference_id).\n\nWORKFLOW — add a trigger:\n1. Call agent_catalog action:"list_triggers" — note block_reference_id, field_schemas, and required_fields.\n2. Collect required field values from the user (e.g. board_id, column_id).\n3. Call this tool action:"add" with block_reference_id and field_values.\nNote: add returns only { success } — no node_id for the new instance. Call action:"list" afterward if you need the node_id.\n\nWORKFLOW — remove a trigger:\n1. Call action:"list" to see active triggers and note the node_id of the instance to remove.\n2. Call action:"remove" with that node_id.\n\nNOTE: Only triggers that can be added programmatically appear in the catalog. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\nrequire user setup in the monday.com UI — they will not appear in agent_catalog and cannot be managed here.\n\nUSAGE EXAMPLES:\n- List triggers: { "action": "list", "agent_id": "7" }\n- Add trigger: { "action": "add", "agent_id": "7", "block_reference_id": "status-change-ref", "field_values": { "board_id": "42" } }\n- Remove trigger: { "action": "remove", "agent_id": "7", "node_id": "node-abc" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_triggers" — discover available trigger types and their required field_values before calling action:"add" here\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return ET}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t={agent_id:e.agent_id},a=(await this.mondayApi.request(hT,t,{versionOverride:"dev"})).agent_active_triggers??[];return{content:{message:'Active triggers on this agent. Use node_id with action:"remove" to detach a trigger.',count:a.length,triggers:a}}}catch(e){vu(e,"list active triggers for monday platform agent")}}async handleAdd(e){if(!e.block_reference_id)throw new Error('block_reference_id is required for action:"add". Call agent_catalog action:"list_triggers" first to find the block_reference_id.');try{const t={agent_id:e.agent_id,block_reference_id:e.block_reference_id,field_values:e.field_values},a=await this.mondayApi.request(fT,t,{versionOverride:"dev"});return{content:{message:'Trigger added to agent. Call action:"list" to verify and retrieve the node_id.',success:a.add_trigger_to_agent?.success??!1}}}catch(e){vu(e,"add trigger to monday platform agent")}}async handleRemove(e){if(!e.node_id)throw new Error('node_id is required for action:"remove". Call action:"list" first to get node_id values.');try{const t={agent_id:e.agent_id,node_id:e.node_id},a=await this.mondayApi.request(_T,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){vu(e,"remove trigger from monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent Skills",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the full skill lifecycle for monday platform agents — create new skills in the catalog, attach skills to an agent, or detach them.\n\nSkills extend what an agent can do (e.g. sending emails, querying databases, posting to Slack).\n\nACTIONS:\n- create: { name, content, description? } — creates a new custom skill in the account-wide catalog.\n The skill becomes available to all agents in the account.\n- add: { agent_id, skill_id } — attaches a skill to this agent.\n- remove: { agent_id, skill_id } — detaches a skill from this agent.\n\nWORKFLOW — attach an existing skill:\n1. Call agent_catalog action:"list_skills" — find the skill_id of the skill to attach.\n2. Call this tool action:"add" with agent_id and that skill_id.\n\nWORKFLOW — create a new skill and attach it:\n1. Call this tool action:"create" with name and content — note the returned id.\n2. Call this tool action:"add" with agent_id and that id directly (no catalog lookup needed).\n\nNOTE: There is no action to list which skills are currently attached to a specific agent — the platform does not yet expose that query.\nTo browse all skills available in the account catalog, use agent_catalog action:"list_skills".\n\nUSAGE EXAMPLES:\n- Create a skill: { "action": "create", "name": "Send Slack Message", "content": "## Instructions\\nPost a message to a Slack channel.", "description": "Sends a message to Slack" }\n- Add a skill: { "action": "add", "agent_id": "7", "skill_id": "skill-abc-123" }\n- Remove a skill: { "action": "remove", "agent_id": "7", "skill_id": "skill-abc-123" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_skills" — browse existing skills to find a skill_id before calling action:"add"\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return TT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleCreate(e){if(!e.name||!e.content)throw new Error('action:"create" requires both "name" and "content".');try{const t={name:e.name,content:e.content,description:e.description},a=await this.mondayApi.request(wT,t,{versionOverride:"dev"});if(!a.create_agent_skill)throw new Error("create_agent_skill returned no data");return{content:{message:'Skill created and added to the account catalog. Use the returned id with action:"add" to attach it to an agent.',skill:a.create_agent_skill}}}catch(e){vu(e,"create monday platform agent skill")}}async handleAdd(e){if(!e.agent_id)throw new Error('agent_id is required for action:"add".');if(!e.skill_id)throw new Error('skill_id is required for action:"add". Get it from agent_catalog action:"list_skills" or from action:"create" in this tool.');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(gT,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){vu(e,"add skill to monday platform agent")}}async handleRemove(e){if(!e.agent_id)throw new Error('agent_id is required for action:"remove".');if(!e.skill_id)throw new Error('skill_id is required for action:"remove".');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(vT,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){vu(e,"remove skill from monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=Mi.WRITE,this.annotations=Er({title:"Manage monday Platform Agent Knowledge",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'List, grant, update, or revoke a monday platform agent\'s access to boards and docs.\n\nAn agent\'s "knowledge" is the set of monday.com boards and docs it can read from or write to during a run.\n\n- list: Returns all resources the agent currently has access to, including permission level and resource type.\n- add: Grants the agent access to a board or doc with the specified permission level.\n- update: Changes the permission level on a resource the agent already has access to. Call action:"list" first to confirm the resource_id exists.\n- remove: Revokes the agent\'s access to a board or doc entirely. Call action:"list" first to confirm the resource_id exists.\n\nPermission types:\n- READ: Agent can read data from the resource.\n- READ_WRITE: Agent can read and write data to the resource.\n\nUSAGE EXAMPLES:\n- List: { "action": "list", "agent_id": "7" }\n- Add board access: { "action": "add", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ" }\n- Update to read-write: { "action": "update", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ_WRITE" }\n- Remove access: { "action": "remove", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD" }\n\nRELATED TOOLS:\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform'}getInputSchema(){return OT}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"update":return this.handleUpdate(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t=(await this.mondayApi.request(AT,{id:e.agent_id},{versionOverride:"dev"})).agent_knowledge??{resources:[],files:[]};return{content:{message:"Current agent resource access.",count:t.resources?.length??0,knowledge:t}}}catch(e){vu(e,"list agent knowledge for monday platform agent")}}async handleAdd(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:add");try{const t=await this.mondayApi.request(ST,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access granted to agent.",success:t.add_agent_resource_access?.success??!1}}}catch(e){vu(e,"add agent resource access for monday platform agent")}}async handleUpdate(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:update");try{const t=await this.mondayApi.request(NT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access updated.",success:t.update_agent_resource_access?.success??!1}}}catch(e){vu(e,"update agent resource access for monday platform agent")}}async handleRemove(e){if(!e.resource_id||!e.scope_type)throw new Error("resource_id and scope_type are required for action:remove");try{const t=await this.mondayApi.request(DT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type},{versionOverride:"dev"});return{content:{message:"Resource access removed from agent.",success:t.remove_agent_resource_access?.success??!1}}}catch(e){vu(e,"remove agent resource access for monday platform agent")}}},class extends Tr{constructor(){super(...arguments),this.name="agent_catalog",this.type=Mi.READ,this.annotations=Er({title:"monday Platform Agent Catalog",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Browse the account-wide catalog of available trigger types and skills for monday platform agents. READ-ONLY — no agent_id required.\n\nUse this tool to discover what\'s available BEFORE wiring anything to a specific agent.\n\nACTIONS:\n- list_triggers: { block_reference_ids? } — returns available trigger types.\n Each entry has block_reference_id (required for manage_agent_triggers action:"add"), name, description,\n field_schemas (describes field_values shape), and required_fields (fields to collect from the user).\n Note: only triggers that can be added programmatically appear here. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\n require user setup in the monday.com UI and will not appear here.\n\n- list_skills: {} — returns available skills with id, name, description.\n Never guess or invent a skill id — always look it up here before calling manage_agent_skills action:"add".\n\nUSAGE EXAMPLES:\n- List all trigger types: { "action": "list_triggers" }\n- Fetch specific trigger: { "action": "list_triggers", "block_reference_ids": ["some-block-ref-id"] }\n- List all skills: { "action": "list_skills" }\n\nRELATED TOOLS:\n- manage_agent_triggers — use block_reference_id from list_triggers to attach a trigger to a specific agent\n- manage_agent_skills — use skill id from list_skills, or action:"create" to author a new skill, then attach to an agent\n- manage_agent — manage the agent entity itself (create, update, delete, activate, etc.)'}getInputSchema(){return kT}async executeInternal(e){switch(e.action){case"list_triggers":return this.handleListTriggers(e);case"list_skills":return this.handleListSkills()}}async handleListTriggers(e){try{const t={block_reference_ids:e.block_reference_ids},a=(await this.mondayApi.request(yT,t,{versionOverride:"dev"})).agent_triggers_catalog??[];return{content:{message:'Available trigger types. Use block_reference_id and inspect field_schemas/required_fields before calling manage_agent_triggers action:"add".',count:a.length,triggers:a}}}catch(e){vu(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(bT,{},{versionOverride:"dev"})).agent_skills_catalog??[];return{content:{message:'Available skills. Use id when calling manage_agent_skills action:"add".',count:e.length,skills:e}}}catch(e){vu(e,"fetch monday platform agent skills catalog")}}},class extends Tr{constructor(){super(...arguments),this.name="list_automations",this.type=Mi.READ,this.annotations=Er({title:"List Board Automations",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all automations on a specific monday.com board, including their ids, titles, active state, and configuration.\nReturns two groups: "workflows" (fully manageable, supports pagination via limit/cursor) and "legacyAutomations" (READ-ONLY automations set up in an older way — returned on the first page only, when no cursor is given).\nAlways present BOTH groups to the user together as one list of board automations — never omit or hide "legacyAutomations". The split and the read-only limitation are internal context for you only: don\'t volunteer them and don\'t label any automation "legacy" or "read-only". Only if the user asks to act on a legacy one, briefly explain it can\'t be changed (e.g. "This one was set up in an older way and can\'t be modified here").\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\n'}getInputSchema(){return $T}async executeInternal(e){try{const a=!e.cursor,i={boardIds:[e.boardId],limit:e.limit??100,includeLegacy:a,...e.cursor?{cursor:e.cursor}:{}},r=await this.mondayApi.request(RT,i),n=(r.board_automations?.items??[]).map(PT),o=r.board_automations?.cursor??null,s=a?(t=r.board_automations?.legacy_automations,null==t||"object"==typeof t&&"error"in t?null:t):null;return{content:{message:`Found ${n.length} live workflow(s) on board ${e.boardId}`,workflows:n,...null!=s?{legacyAutomations:s}:{},pagination:{nextCursor:o,hasMore:null!==o}}}}catch(e){vu(e,"list live workflows")}var t}},class extends Tr{constructor(){super(...arguments),this.name="manage_automations",this.type=Mi.WRITE,this.annotations=Er({title:"Manage Automations",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Activate, deactivate, or delete an existing monday.com automation.\n\nRequires an automation id. When the user refers to an automation by name, always call list_automations first to resolve the id — never guess or infer ids.\n\nActions:\n- activate: enables a paused automation so it starts responding to its trigger.\n- deactivate: pauses an automation while preserving its definition.\n- delete: permanently removes an automation — irreversible.\n\nWhen intent is ambiguous ("stop", "turn off", "pause"), prefer deactivate over delete.'}getInputSchema(){return FT}async executeInternal(e){const t=e;switch(t.action){case"activate":return this.activateWorkflow(t);case"deactivate":return this.deactivateWorkflow(t);case"delete":return this.deleteWorkflow(t)}}async activateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(xT,t,{versionOverride:"dev"});if(!a.activate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} activation did not report success`);return{content:{message:`Workflow ${e.workflowId} activated`,workflowId:e.workflowId,isActive:!0}}}catch(e){vu(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(LT,t,{versionOverride:"dev"});if(!a.deactivate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deactivation did not report success`);return{content:{message:`Workflow ${e.workflowId} deactivated`,workflowId:e.workflowId,isActive:!1}}}catch(e){vu(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(UT,t,{versionOverride:"dev"});if(!a.delete_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deletion did not report success`);return{content:{message:`Workflow ${e.workflowId} deleted`,workflowId:e.workflowId}}}catch(e){vu(e,"delete workflow")}}},class extends Tr{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=Mi.WRITE,this.annotations=Er({title:"Create Automation",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'\n Creates an automation on a monday board from a structured natural-language description.\n\nUse this tool only when you know:\n- boardId\n- the user\'s intended trigger\n- at least one intended action\n- any details the user provided that are relevant to the trigger, conditions, or actions\n\nThe caller does not need to know the exact available automation blocks or their required fields. Describe the user\'s intent clearly — the tool will translate that intent into supported blocks and values.\n\nIf a required detail is missing from the user\'s request, ask for clarification before calling the tool.\n\nIf the tool returns status: "needs_clarification", present the unresolved fields to the user, gather answers, then call the tool again.\n\nDescribe the automation in this format:\n\nTrigger:\n When <the event that should start the automation>\n Details:\n <relevant detail>: <value>\n\nConditions:\n - Only if <condition that should be true>\n Details:\n <relevant detail>: <value>\n\nActions:\n - <action the automation should perform>:\n <relevant detail>: <value>\n\nRules:\n- Use one trigger.\n- Conditions are optional.\n- Multiple conditions mean AND.\n- Use one or more actions.\n- Do not use branching.\n- Use natural language, not block IDs or internal field names.\n- Actions may reference values from the trigger context, such as "{{item name}}", "{{creator}}", "{{status}}", "{{group}}", or "{{board}}".\n\nTerminology:\n- Trigger: the event that starts the automation, such as "when a new item is created".\n- Conditions: optional requirements that must be true before actions run.\n- Actions: what the automation does when it runs.\n\nExample:\n\nTrigger:\n When a new item is created\n\nActions:\n - Send a notification:\n Recipient: John Snow\n Title: Important Update\n Message: The item "{{item name}}" was created.\n\n - Move the item to a group:\n Group: Top group\n'}getInputSchema(){return BT}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=jT(this.context),i=await a({serviceName:MT,path:"/platform-ai-gateway/agents/lite-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`lite-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){vu(e,"create automation")}}},class extends Tr{constructor(){super(...arguments),this.name="get_automation_runs",this.type=Mi.READ,this.annotations=Er({title:"Get Automation Runs",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Read automation/workflow run history. Read-only.\n\nModes:\n- "history": paginated run feed (state, duration, error reason). Use "filters" to narrow results and "nextPageOffset" to page (offset-only — next page = previous offset + returned count).\n- "detail": single run by "triggerUuid" (required) — returns block steps and MCP tool calls. Set "includeToolEvents": false to skip tool calls.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nKnown event states: "success", "failure", "exhausted".'}getInputSchema(){return zT}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};try{return"detail"===e.mode?await this.runDetail(e):await this.runHistory(e)}catch(e){vu(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},i=await this.mondayApi.request(HT,{nextPageOffset:t,filters:a}),r=i.trigger_events?.triggerEvents??[],n=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(r),o=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${r.length} run(s) (${o}) at offset ${t}. By state: ${function(e){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`));return t.length?t.join(", "):"none"}(n)}. Offset-only pagination — for the next page request offset ${t+r.length}.`,scope:o,offset:t,count:r.length,stateCounts:n,runs:r}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,i=e.toolEventsOffset??0,r=(await this.mondayApi.request(GT,{triggerUuid:e.triggerUuid})).trigger_event;if(!r)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[n,o]=await Promise.all([this.mondayApi.request(WT,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(YT,{triggerUuid:e.triggerUuid,nextPageOffset:i}):Promise.resolve(null)]),s=n.block_events?.blockEvents??[],d=o?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${r.eventState??"unknown"}, ${s.length} block step(s), ${d.length} tool call(s).`,found:!0,run:r,blockEvents:s,blockEventsOffset:a,toolEvents:d,toolEventsOffset:i,toolEventsIncluded:t}}}},class extends Tr{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=Mi.READ,this.annotations=Er({title:"Get Automation Statistics",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Aggregate automation run statistics. Read-only.\n\nBreakdowns:\n- "totals": success/failure/total counts at the account or board level.\n- "by_entity": per-automation and per-workflow counts for a given "runStatus" (required: "success" | "failure" | "exhausted"). Use "excludeAutomationIds" to omit specific automations.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nOptional "userIds" narrows results to specific creators.'}getInputSchema(){return XT}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};const t=e.boardId?function(e){const t=Number(e.trim());if(!Number.isInteger(t)||t<=0)throw new Error(`Invalid boardId: '${e}' is not a positive integer.`);return t}(e.boardId):void 0,a=e.boardId?`board ${e.boardId}`:"account-wide";try{return"by_entity"===e.breakdown?await this.runByEntity(e,t,a):await this.runTotals(e,t,a)}catch(e){vu(e,"get automation statistics")}}async runTotals(e,t,a){const i=(await this.mondayApi.request(KT,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${i?.success??0}, failure=${i?.failure??0}, total=${i?.total??0}.`,scope:a,breakdown:"totals",statistics:i}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const i=(await this.mondayApi.request(JT,{runStatus:e.runStatus,filters:{board_id:t,automation_ids:e.excludeAutomationIds,user_ids:e.userIds}})).account_triggers_statistics_by_entity_id;return{content:{message:`By-entity '${e.runStatus}' statistics (${a}).`,scope:a,breakdown:"by_entity",runStatus:e.runStatus,automationStatistics:i?.automation_statistics,workflowStatistics:i?.workflow_statistics}}}},class extends Tr{constructor(){super(...arguments),this.name="create_workflow",this.type=Mi.WRITE,this.annotations=Er({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n"}getInputSchema(){return eA}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(ZT,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:r}=a.create_workflow;if(!i||!r)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:r}}}catch(e){vu(e,"create Workflow Builder workflow")}}},class extends Tr{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=Mi.WRITE,this.annotations=Er({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return tA}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=jT(this.context),i=await a({serviceName:MT,path:"/platform-ai-gateway/agents/workflow-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){vu(e,"update workflow")}}},class extends Tr{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=Mi.READ,this.annotations=Er({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return aA}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=jT(this.context),i=await a({serviceName:MT,path:"/platform-ai-gateway/agents/workflow-planner",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){vu(e,"plan workflow")}}},class extends Tr{constructor(){super(...arguments),this.name="publish_workflow",this.type=Mi.WRITE,this.annotations=Er({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nUse this after create_workflow (and optionally update_workflow) to make the workflow active. Before publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\n"}getInputSchema(){return rA}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(iA,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:r}=a.publish_workflow;if(!i||!r)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:r}}}catch(e){vu(e,"publish workflow")}}},class extends Tr{constructor(){super(...arguments),this.name="configure_ai_column",this.type=Mi.WRITE,this.annotations=Er({title:"Configure AI Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add AI to a column or set up an AI column on a monday.com board. Use this tool when the user wants to automatically categorize, summarize, translate, extract, generate text, improve writing, or assign people using AI on a column. This is the right tool for requests like "add AI to a column", "set up automatic extraction/categorization/summarization", "make a column use AI", "configure AI on a column", or "use AI to automatically fill a column".\n\nThe column must already exist on the board with a compatible type for the chosen block. To create a new AI column, first use create_column to create the column, then use this tool to add AI behavior.\n\nBLOCK TYPES (only pass fields that apply to the chosen block_type):\n- categorize: { block_type, source_type, source_column_id?, additional_instructions? } — assigns labels from target column\'s existing status/dropdown options\n- summarize: { block_type, source_type, source_column_id?, additional_instructions? } — generates concise summaries\n- translate: { block_type, source_type, source_column_id?, target_language } — translates to target language\n- improve_text: { block_type, source_type, source_column_id?, tone?, improver_length?, refinement_type? } — rewrites/fixes text\n- extract: { block_type, source_type, source_column_id?, entity_type, custom_instructions?, additional_instructions? } — extracts structured info\n- open_block: { block_type, ai_query } — flexible custom prompt, reference columns via {pulse.column_id}\n- write_me: { block_type, ai_query, tone, output_length } — generates new text from prompt\n- person_assignment: { block_type, source_type, source_column_id?, groups } — assigns people based on context\n\nSOURCE TYPES (required for all blocks except open_block and write_me):\n- item_name: uses the item\'s name as input\n- thread: uses the item\'s updates/comments as input\n- column: uses another column\'s value (requires source_column_id)\n- emails_and_activities: uses emails & activities (categorize only)\n\nCOLUMN REFERENCE SYNTAX (for open_block and write_me ai_query):\n- {pulse.column_id} — regular board column\n- {pulse.name} — the item name\n- {pulse.subitem.column_id} — subitem column\n\nRELATED TOOLS:\n- create_column — create the target column first if it doesn\'t exist\n- get_board_schema — discover existing columns and their types/IDs'}getInputSchema(){return uA}async executeInternal(e){const t=void 0!==e.run_backfill?{run_backfill:e.run_backfill}:void 0;try{switch(e.block_type){case"categorize":return this.handleCategorize(e.board_id,e,t);case"summarize":return this.handleSummarize(e.board_id,e,t);case"translate":return this.handleTranslate(e.board_id,e,t);case"improve_text":return this.handleImproveText(e.board_id,e,t);case"extract":return this.handleExtract(e.board_id,e,t);case"open_block":return this.handleOpenBlock(e.board_id,e,t);case"write_me":return this.handleWriteMe(e.board_id,e,t);case"person_assignment":return this.handlePersonAssignment(e.board_id,e,t)}}catch(e){vu(e,"configure AI column")}}validateSourceType(e,t){if(!e.source_type)throw new Error(`source_type is required for ${t} block`);if("column"===e.source_type&&!e.source_column_id)throw new Error('source_column_id is required when source_type is "column"')}async handleCategorize(e,t,a){this.validateSourceType(t,"categorize");const i=await this.mondayApi.request(nA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const i=await this.mondayApi.request(oA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_summarize_ai_column?.column_id}}}async handleTranslate(e,t,a){if(this.validateSourceType(t,"translate"),!t.target_language)throw new Error("target_language is required for translate block");const i=await this.mondayApi.request(sA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,targetLanguage:t.target_language,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const i=await this.mondayApi.request(dA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,tone:t.tone,length:t.improver_length,refinementType:t.refinement_type,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_improve_text_ai_column?.column_id}}}async handleExtract(e,t,a){if(this.validateSourceType(t,"extract"),!t.entity_type)throw new Error("entity_type is required for extract block");if("custom"===t.entity_type&&!t.custom_instructions)throw new Error('custom_instructions is required for extract block when entity_type is "custom"');const i=await this.mondayApi.request(pA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,entityType:t.entity_type,customInstructions:t.custom_instructions,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_extract_ai_column?.column_id}}}async handleOpenBlock(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for open_block block");const i=await this.mondayApi.request(lA,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_open_block_ai_column?.column_id}}}async handleWriteMe(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for write_me block");if(!t.tone)throw new Error("tone is required for write_me block");if(!t.output_length)throw new Error("output_length is required for write_me block");const i=await this.mondayApi.request(cA,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,tone:t.tone,length:t.output_length,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_write_me_ai_column?.column_id}}}async handlePersonAssignment(e,t,a){if(this.validateSourceType(t,"person_assignment"),!t.groups||0===t.groups.length)throw new Error("groups is required for person_assignment block");const i=await this.mondayApi.request(mA,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,groups:t.groups,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_person_assignment_ai_column?.column_id}}}},class extends Tr{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=Mi.WRITE,this.annotations=Er({title:"Remove AI from Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0})}getDescription(){return"Remove AI from a column on a monday.com board. Use this tool when the user wants to disable AI on a column, turn off AI automation, stop AI from running on a column, or delete the AI behavior from a column. This deletes all AI automation recipes and the app feature extension associated with the column. The column itself is not deleted — only its AI behavior is removed.\n\nUse get_board_schema to find column IDs before calling this tool."}getInputSchema(){return fA}async executeInternal(e){try{const t=await this.mondayApi.request(hA,{boardId:e.board_id.toString(),columnId:e.column_id});return{content:{message:"AI removed from column successfully",column_id:t.remove_ai_from_column?.column_id,success:t.remove_ai_from_column?.success}}}catch(e){vu(e,"remove AI from column")}}}];var KA;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(KA||(KA={}));const JA=(e,t)=>{let a=[];t?.mode===KA.APPS?a=[...Ir]:t?.mode!==KA.API&&t?.mode||(a=[...zA,...QA]);const i=a.map((t=>((e,t)=>e.prototype instanceof Tr?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof er?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==Mi.ALL_API;if(t.mode===KA.API&&"only"===t.enableDynamicApiTools)return e.type===Mi.ALL_API;let a=!1;return t.mode===KA.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 XA{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 ZA extends Pi{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new XA,this.toolInstances=[],this.managementTool=null,this.mondayApiToken=e.mondayApiToken,this.toolkitConfig=e;const t="function"==typeof e.mondayApiToken?e.mondayApiToken():e.mondayApiToken;this.mondayApiClient=this.createApiClient(t,e),this.context={...e.context,apiVersion:e.mondayApiVersion??Xi,fetchConfig:e.fetchConfig??e.context?.fetchConfig},this.registerTools(e)}createApiClientFromToken(){return this.createApiClient(this.mondayApiToken(),this.toolkitConfig)}createApiClient(e,t){return new i({token:e,apiVersion:t.mondayApiVersion??Xi,endpoint:t.mondayApiEndpoint,requestConfig:{...t.mondayApiRequestConfig,headers:{...t.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 gA;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:"function"==typeof this.mondayApiToken?()=>this.createApiClientFromToken():this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return JA(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,r)=>{try{let r;if(a){const n=e.object(a).safeParse(i);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);r=await t.execute(n.data)}else r=await t.execute();return this.formatToolResult(r.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 r=e.object(i).safeParse(a);if(!r.success)throw new Error(`Invalid arguments: ${r.error.message}`);return(await t.execute(r.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const r=t.getInputSchema();if(r){const n=e.object(r).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data,i);return this.formatToolResult(o.content)}{const e=await t.execute(void 0,i);return this.formatToolResult(e.content)}}catch(e){return bu(e)}}}getSchemaForTool(t,i){const r=t.getInputSchema();if(r)return"json"===i?.schemaFormat?a(e.object(r)):r}formatToolResult(e){return"string"==typeof e?{content:[{type:"text",text:e}]}:{structuredContent:e,content:[{type:"text",text:JSON.stringify(e)}]}}handleToolError(e,t){return bu(e,{toolName:t,errorPrefix:`Failed to execute tool ${t}: `})}}export{XA as DynamicToolManager,ZA as MondayAgentToolkit};
2965
2971
  //# sourceMappingURL=index.js.map