@mondaydotcomorg/agent-toolkit 3.0.16 → 3.1.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.
@@ -793,10 +793,10 @@
793
793
  }
794
794
  }
795
795
  `,PT=y_`
796
- query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
796
+ query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!, $fromDate: ISO8601DateTime, $toDate: ISO8601DateTime, $boardUpdatesOnly: Boolean) {
797
797
  boards(ids: [$boardId]) {
798
798
  id
799
- updates(limit: $limit, page: $page, board_updates_only: true) {
799
+ updates(limit: $limit, page: $page, board_updates_only: $boardUpdatesOnly, from_date: $fromDate, to_date: $toDate) {
800
800
  id
801
801
  text_body
802
802
  created_at
@@ -827,7 +827,7 @@
827
827
  }
828
828
  }
829
829
  }
830
- `;var jT;!function(e){e.Item="Item",e.Board="Board"}(jT||(jT={}));const VT={objectId:f.z.string().describe("The ID of the item or board to get updates from"),objectType:f.z.enum([jT.Item,jT.Board]).describe("Type of object for which objectId was provided"),limit:f.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:f.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:f.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:f.z.boolean().optional().default(!1).describe("Include file attachments in the response")};const UT={columnId:f.z.string().describe("The id of the column to be deleted")},BT={boardId:f.z.number().describe("The id of the board to which the new column will be added"),...UT};const MT={itemId:f.z.number()};const qT={};const zT=y_`
830
+ `;var jT;!function(e){e.Item="Item",e.Board="Board"}(jT||(jT={}));const VT={objectId:f.z.string().describe("The ID of the item or board to get updates from"),objectType:f.z.enum([jT.Item,jT.Board]).describe("Type of object for which objectId was provided"),limit:f.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:f.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:f.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:f.z.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:f.z.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:f.z.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:f.z.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 UT(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const BT={columnId:f.z.string().describe("The id of the column to be deleted")},MT={boardId:f.z.number().describe("The id of the board to which the new column will be added"),...BT};const qT={itemId:f.z.number()};const zT={};const GT=y_`
831
831
  query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
832
832
  boards(ids: [$boardId]) {
833
833
  id
@@ -870,7 +870,7 @@
870
870
  }
871
871
  }
872
872
  }
873
- `,GT=y_`
873
+ `,HT=y_`
874
874
  query getUsersByIds($userIds: [ID!]!) {
875
875
  users(ids: $userIds) {
876
876
  id
@@ -878,7 +878,7 @@
878
878
  photo_tiny
879
879
  }
880
880
  }
881
- `,HT=f.z.array(f.z.object({columnId:f.z.string().describe("The id of the column to filter by"),compareAttribute:f.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:f.z.union([f.z.string(),f.z.number(),f.z.boolean(),f.z.array(f.z.union([f.z.string(),f.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:f.z.nativeEnum(ay).optional().default(ay.AnyOf).describe("The operator to use for the filter")})).optional().describe('The configuration of filters to apply on the items. Before sending the filters, use get_board_info tool to check "filteringGuidelines" key for filtering by the column.'),WT=f.z.nativeEnum(ty).optional().default(ty.And).describe("The operator to use for the filters"),YT={boardId:f.z.string().describe("The ID of the board to fetch complete data for"),filters:HT,filtersOperator:WT};const KT=y_`
881
+ `,WT=f.z.array(f.z.object({columnId:f.z.string().describe("The id of the column to filter by"),compareAttribute:f.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:f.z.union([f.z.string(),f.z.number(),f.z.boolean(),f.z.array(f.z.union([f.z.string(),f.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:f.z.nativeEnum(ay).optional().default(ay.AnyOf).describe("The operator to use for the filter")})).optional().describe('The configuration of filters to apply on the items. Before sending the filters, use get_board_info tool to check "filteringGuidelines" key for filtering by the column.'),YT=f.z.nativeEnum(ty).optional().default(ty.And).describe("The operator to use for the filters"),KT={boardId:f.z.string().describe("The ID of the board to fetch complete data for"),filters:WT,filtersOperator:YT};const QT=y_`
882
882
  query GetBoardAllActivity(
883
883
  $boardId: ID!
884
884
  $fromDate: ISO8601DateTime!
@@ -897,7 +897,7 @@
897
897
  }
898
898
  }
899
899
  }
900
- `,QT={boardId:f.z.number().describe("The id of the board to get activity for"),fromDate:f.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:f.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:f.z.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 JT=y_`
900
+ `,JT={boardId:f.z.number().describe("The id of the board to get activity for"),fromDate:f.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:f.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:f.z.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 XT=y_`
901
901
  query GetBoardInfo($boardId: ID!) {
902
902
  boards(ids: [$boardId]) {
903
903
  # Basic Board Metadata
@@ -984,7 +984,7 @@
984
984
  }
985
985
  }
986
986
  }
987
- `,XT=y_`
987
+ `,ZT=y_`
988
988
  query GetBoardInfoJustColumns($boardId: ID!) {
989
989
  boards(ids: [$boardId]) {
990
990
  columns {
@@ -996,7 +996,7 @@
996
996
  }
997
997
  }
998
998
  }
999
- `,ZT=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0},filteringGuidelines:iE(e.columns.filter(eE)),aggregationGuidelines:aE()});function eE(e){return!!e&&["id","type"].every((t=>t in e))}const tE={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 must be passed along with "EXACT" string e.g. compareValue:["2025-01-01", "EXACT"]\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": ["2025-01-01", "EXACT"], "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'},aE=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Mg.CountItems} function. Do not use ${Mg.Count} function for that purpose.\n `,iE=e=>{const t=e.reduce(((e,t)=>tE[t.type]?(e[t.type]||(e[t.type]=[]),e[t.type].push(t.id),e):e),{});return 0===Object.keys(t).length?"":`\n[MEMORY] Remember the filtering guidelines for subsequent requests for the same board.\n# 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 Guidelines\n${Object.entries(t).map((([e,t])=>`- Column Type: ${e} (Column IDs: ${t.join(", ")}) - ${tE[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},nE={boardId:f.z.number().describe("The id of the board to get information for")};const oE=y_`
999
+ `,eE=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0},filteringGuidelines:nE(e.columns.filter(tE)),aggregationGuidelines:iE()});function tE(e){return!!e&&["id","type"].every((t=>t in e))}const aE={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 must be passed along with "EXACT" string e.g. compareValue:["2025-01-01", "EXACT"]\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": ["2025-01-01", "EXACT"], "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'},iE=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Mg.CountItems} function. Do not use ${Mg.Count} function for that purpose.\n `,nE=e=>{const t=e.reduce(((e,t)=>aE[t.type]?(e[t.type]||(e[t.type]=[]),e[t.type].push(t.id),e):e),{});return 0===Object.keys(t).length?"":`\n[MEMORY] Remember the filtering guidelines for subsequent requests for the same board.\n# 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 Guidelines\n${Object.entries(t).map((([e,t])=>`- Column Type: ${e} (Column IDs: ${t.join(", ")}) - ${aE[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},oE={boardId:f.z.number().describe("The id of the board to get information for")};const rE=y_`
1000
1000
  fragment ItemDataFragment on Item {
1001
1001
  id
1002
1002
  name
@@ -1058,7 +1058,7 @@
1058
1058
  }
1059
1059
  }
1060
1060
  }
1061
- `,rE=y_`
1061
+ `,sE=y_`
1062
1062
  query SearchItemsDev($query: String!, $limit: Int!, $filters: SearchFiltersInput!) {
1063
1063
  search(query: $query, limit: $limit, filters: $filters) {
1064
1064
  __typename
@@ -1069,11 +1069,11 @@
1069
1069
  }
1070
1070
  }
1071
1071
  }
1072
- `;var sE,pE;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(sE||(sE={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(pE||(pE={}));const dE={boardId:f.z.number().describe("The id of the board to get items from"),itemIds:f.z.array(f.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:f.z.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:f.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:f.z.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:f.z.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:f.z.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:f.z.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:f.z.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:HT,filtersOperator:WT,columnIds:f.z.array(f.z.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:f.z.array(f.z.object({columnId:f.z.string().describe("The id of the column to order by"),direction:f.z.nativeEnum(ey).optional().default(ey.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 cE={boardId:f.z.number().describe("The id of the board to get the schema of")};const lE=y_`
1072
+ `;var pE,dE;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(pE||(pE={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(dE||(dE={}));const cE={boardId:f.z.number().describe("The id of the board to get items from"),itemIds:f.z.array(f.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:f.z.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:f.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:f.z.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:f.z.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:f.z.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:f.z.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:f.z.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:WT,filtersOperator:YT,columnIds:f.z.array(f.z.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:f.z.array(f.z.object({columnId:f.z.string().describe("The id of the column to order by"),direction:f.z.nativeEnum(ey).optional().default(ey.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 lE={boardId:f.z.number().describe("The id of the board to get the schema of")};const mE=y_`
1073
1073
  query GetColumnTypeSchema($type: ColumnType!) {
1074
1074
  get_column_type_schema(type: $type)
1075
1075
  }
1076
- `,mE={columnType:f.z.nativeEnum(lT).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const uE={random_string:f.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:f.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const fE={typeName:f.z.string().describe("The name of the GraphQL type to get details for")};function hE(e){return e?"NON_NULL"===e.kind?`${hE(e.ofType)}!`:"LIST"===e.kind?`[${hE(e.ofType)}]`:e.name||"unknown":"unknown"}const vE=y_`
1076
+ `,uE={columnType:f.z.nativeEnum(lT).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const fE={random_string:f.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:f.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const hE={typeName:f.z.string().describe("The name of the GraphQL type to get details for")};function vE(e){return e?"NON_NULL"===e.kind?`${vE(e.ofType)}!`:"LIST"===e.kind?`[${vE(e.ofType)}]`:e.name||"unknown":"unknown"}const gE=y_`
1077
1077
  fragment UserDetails on User {
1078
1078
  # Basic User Information
1079
1079
  id
@@ -1105,31 +1105,31 @@
1105
1105
  time_zone_identifier
1106
1106
  utc_hours_diff
1107
1107
  }
1108
- `,gE=y_`
1108
+ `,bE=y_`
1109
1109
  fragment UserTeamMembership on Team {
1110
1110
  id
1111
1111
  name
1112
1112
  is_guest
1113
1113
  picture_url
1114
1114
  }
1115
- `,bE=y_`
1115
+ `,yE=y_`
1116
1116
  fragment TeamBasicInfo on Team {
1117
1117
  id
1118
1118
  name
1119
1119
  }
1120
- `,yE=y_`
1120
+ `,wE=y_`
1121
1121
  fragment TeamExtendedInfo on Team {
1122
1122
  ...TeamBasicInfo
1123
1123
  is_guest
1124
1124
  picture_url
1125
1125
  }
1126
- `,wE=y_`
1126
+ `,_E=y_`
1127
1127
  fragment TeamOwner on User {
1128
1128
  id
1129
1129
  name
1130
1130
  email
1131
1131
  }
1132
- `,_E=y_`
1132
+ `,xE=y_`
1133
1133
  fragment TeamMember on User {
1134
1134
  id
1135
1135
  name
@@ -1149,7 +1149,7 @@
1149
1149
  time_zone_identifier
1150
1150
  utc_hours_diff
1151
1151
  }
1152
- `,xE=y_`
1152
+ `,TE=y_`
1153
1153
  fragment TeamMemberSimplified on User {
1154
1154
  id
1155
1155
  name
@@ -1158,15 +1158,15 @@
1158
1158
  is_admin
1159
1159
  is_guest
1160
1160
  }
1161
- `,TE=y_`
1161
+ `,EE=y_`
1162
1162
  fragment UserTeamMembershipSimplified on Team {
1163
1163
  id
1164
1164
  name
1165
1165
  is_guest
1166
1166
  }
1167
- `,EE=y_`
1168
- ${vE}
1167
+ `,IE=y_`
1169
1168
  ${gE}
1169
+ ${bE}
1170
1170
 
1171
1171
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1172
1172
  users(ids: $userIds, limit: $limit) {
@@ -1178,21 +1178,21 @@
1178
1178
  }
1179
1179
  }
1180
1180
  }
1181
- `,IE=y_`
1182
- ${vE}
1181
+ `,SE=y_`
1182
+ ${gE}
1183
1183
 
1184
1184
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1185
1185
  users(ids: $userIds, limit: $limit) {
1186
1186
  ...UserDetails
1187
1187
  }
1188
1188
  }
1189
- `,SE=y_`
1190
- ${vE}
1191
- ${TE}
1192
- ${yE}
1193
- ${bE}
1189
+ `,NE=y_`
1190
+ ${gE}
1191
+ ${EE}
1194
1192
  ${wE}
1195
- ${xE}
1193
+ ${yE}
1194
+ ${_E}
1195
+ ${TE}
1196
1196
 
1197
1197
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1198
1198
  users(ids: $userIds, limit: $limit) {
@@ -1218,19 +1218,19 @@
1218
1218
  }
1219
1219
  }
1220
1220
  }
1221
- `,NE=y_`
1222
- ${bE}
1221
+ `,AE=y_`
1222
+ ${yE}
1223
1223
 
1224
1224
  query listTeamsOnly($teamIds: [ID!]) {
1225
1225
  teams(ids: $teamIds) {
1226
1226
  ...TeamBasicInfo
1227
1227
  }
1228
1228
  }
1229
- `,AE=y_`
1230
- ${yE}
1231
- ${bE}
1229
+ `,DE=y_`
1232
1230
  ${wE}
1231
+ ${yE}
1233
1232
  ${_E}
1233
+ ${xE}
1234
1234
 
1235
1235
  query listTeamsWithMembers($teamIds: [ID!]) {
1236
1236
  teams(ids: $teamIds) {
@@ -1247,9 +1247,9 @@
1247
1247
  }
1248
1248
  }
1249
1249
  }
1250
- `,DE=y_`
1251
- ${vE}
1250
+ `,OE=y_`
1252
1251
  ${gE}
1252
+ ${bE}
1253
1253
 
1254
1254
  query getUserByName($name: String) {
1255
1255
  users(name: $name) {
@@ -1261,7 +1261,7 @@
1261
1261
  }
1262
1262
  }
1263
1263
  }
1264
- `,OE=y_`
1264
+ `,kE=y_`
1265
1265
  query getCurrentUser {
1266
1266
  me {
1267
1267
  id
@@ -1273,7 +1273,7 @@
1273
1273
  photo_thumb
1274
1274
  }
1275
1275
  }
1276
- `;const kE=[["is_pending","Pending"],["is_verified","Verified"],["is_view_only","View Only"],["join_date","Join Date"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["photo_thumb","Photo Thumb"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function RE(e,t=""){return kE.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const $E=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...RE(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...RE(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},CE=500,LE=500,FE=1e3,PE={userIds:f.z.array(f.z.string()).max(CE).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:f.z.array(f.z.string()).max(LE).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:f.z.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:f.z.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:f.z.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:f.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:f.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const jE={itemId:f.z.number().describe("The id of the item to which the update will be added"),groupId:f.z.string().describe("The id of the group to which the item will be moved")};const VE={type:f.z.enum(["ids","object_ids","workspace_ids"]).describe("Query type of ids parameter that is used query by: ids, object_ids, or workspace_ids"),ids:f.z.array(f.z.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:f.z.number().optional().describe("Number of docs per page (default: 25). Affects pagination - if you get exactly this many results, there may be more pages."),order_by:f.z.nativeEnum(Ob).optional().describe("The order in which to retrieve your docs. The default shows created_at with the newest docs listed first. This argument will not be applied if you query docs by specific ids."),page:f.z.number().optional().describe("The page number to return (starts at 1). Use this to paginate through large result sets. Check response for has_more_pages indicator.")};const UE={workspace_id:f.z.number().describe("The ID of the workspace to get information for")};const BE=y_`
1276
+ `;const RE=[["is_pending","Pending"],["is_verified","Verified"],["is_view_only","View Only"],["join_date","Join Date"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["photo_thumb","Photo Thumb"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function $E(e,t=""){return RE.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const CE=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...$E(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...$E(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},LE=500,FE=500,PE=1e3,jE={userIds:f.z.array(f.z.string()).max(LE).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:f.z.array(f.z.string()).max(FE).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:f.z.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:f.z.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:f.z.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:f.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:f.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const VE={itemId:f.z.number().describe("The id of the item to which the update will be added"),groupId:f.z.string().describe("The id of the group to which the item will be moved")};const UE={type:f.z.enum(["ids","object_ids","workspace_ids"]).describe("Query type of ids parameter that is used query by: ids, object_ids, or workspace_ids"),ids:f.z.array(f.z.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:f.z.number().optional().describe("Number of docs per page (default: 25). Affects pagination - if you get exactly this many results, there may be more pages."),order_by:f.z.nativeEnum(Ob).optional().describe("The order in which to retrieve your docs. The default shows created_at with the newest docs listed first. This argument will not be applied if you query docs by specific ids."),page:f.z.number().optional().describe("The page number to return (starts at 1). Use this to paginate through large result sets. Check response for has_more_pages indicator.")};const BE={workspace_id:f.z.number().describe("The ID of the workspace to get information for")};const ME=y_`
1277
1277
  query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
1278
1278
  workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
1279
1279
  id
@@ -1281,7 +1281,7 @@
1281
1281
  description
1282
1282
  }
1283
1283
  }
1284
- `,ME=100,qE=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function zE(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function GE(e){return Array.isArray(e)&&e.length>0}const HE={searchTerm:f.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORTANT] Only alphanumeric characters are supported."),limit:f.z.number().min(1).max(ME).default(ME).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:f.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const WE=y_`
1284
+ `,qE=100,zE=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function GE(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function HE(e){return Array.isArray(e)&&e.length>0}const WE={searchTerm:f.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORTANT] Only alphanumeric characters are supported."),limit:f.z.number().min(1).max(qE).default(qE).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:f.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const YE=y_`
1285
1285
  query getItemBoard($itemId: ID!) {
1286
1286
  items(ids: [$itemId]) {
1287
1287
  id
@@ -1294,7 +1294,7 @@
1294
1294
  }
1295
1295
  }
1296
1296
  }
1297
- `,YE=y_`
1297
+ `,KE=y_`
1298
1298
  mutation createDoc($location: CreateDocInput!) {
1299
1299
  create_doc(location: $location) {
1300
1300
  id
@@ -1303,7 +1303,7 @@
1303
1303
  name
1304
1304
  }
1305
1305
  }
1306
- `,KE=y_`
1306
+ `,QE=y_`
1307
1307
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1308
1308
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1309
1309
  success
@@ -1311,11 +1311,11 @@
1311
1311
  error
1312
1312
  }
1313
1313
  }
1314
- `,QE=y_`
1314
+ `,JE=y_`
1315
1315
  mutation updateDocName($docId: ID!, $name: String!) {
1316
1316
  update_doc_name(docId: $docId, name: $name)
1317
1317
  }
1318
- `,JE=f.z.enum(["workspace","item"]),XE=f.z.discriminatedUnion("type",[f.z.object({type:f.z.literal(JE.enum.workspace).describe("Create document in workspace"),workspace_id:f.z.number().describe("Workspace ID under which to create the new document"),doc_kind:f.z.nativeEnum(nb).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:f.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),f.z.object({type:f.z.literal(JE.enum.item).describe("Create document attached to item"),item_id:f.z.number().describe("Item ID to attach the new document to"),column_id:f.z.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.")})]),ZE={doc_name:f.z.string().describe("Name for the new document."),markdown:f.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:f.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:f.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:f.z.nativeEnum(nb).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:f.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:f.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:f.z.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 eI=y_`
1318
+ `,XE=f.z.enum(["workspace","item"]),ZE=f.z.discriminatedUnion("type",[f.z.object({type:f.z.literal(XE.enum.workspace).describe("Create document in workspace"),workspace_id:f.z.number().describe("Workspace ID under which to create the new document"),doc_kind:f.z.nativeEnum(nb).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:f.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),f.z.object({type:f.z.literal(XE.enum.item).describe("Create document attached to item"),item_id:f.z.number().describe("Item ID to attach the new document to"),column_id:f.z.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.")})]),eI={doc_name:f.z.string().describe("Name for the new document."),markdown:f.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:f.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:f.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:f.z.nativeEnum(nb).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:f.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:f.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:f.z.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 tI=y_`
1319
1319
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1320
1320
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1321
1321
  success
@@ -1323,13 +1323,13 @@
1323
1323
  error
1324
1324
  }
1325
1325
  }
1326
- `,tI=y_`
1326
+ `,aI=y_`
1327
1327
  query getDocByObjectId($objectId: [ID!]) {
1328
1328
  docs(object_ids: $objectId) {
1329
1329
  id
1330
1330
  }
1331
1331
  }
1332
- `,aI={doc_id:f.z.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:f.z.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:f.z.string().describe("Markdown content to add to the document."),after_block_id:f.z.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.")};const iI=y_`
1332
+ `,iI={doc_id:f.z.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:f.z.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:f.z.string().describe("Markdown content to add to the document."),after_block_id:f.z.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.")};const nI=y_`
1333
1333
  mutation CreateDashboard(
1334
1334
  $name: String!
1335
1335
  $workspace_id: ID!
@@ -1351,14 +1351,14 @@
1351
1351
  board_folder_id
1352
1352
  }
1353
1353
  }
1354
- `,nI=y_`
1354
+ `,oI=y_`
1355
1355
  query GetAllWidgetsSchema {
1356
1356
  all_widgets_schema {
1357
1357
  widget_type
1358
1358
  schema
1359
1359
  }
1360
1360
  }
1361
- `,oI=y_`
1361
+ `,rI=y_`
1362
1362
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1363
1363
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1364
1364
  id
@@ -1370,13 +1370,13 @@
1370
1370
  }
1371
1371
  }
1372
1372
  }
1373
- `,rI={name:f.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:f.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:f.z.array(f.z.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:f.z.nativeEnum(xb).default(xb.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:f.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const sI={parent_container_id:f.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:f.z.nativeEnum(Qy).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:f.z.nativeEnum($b).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:f.z.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:f.z.record(f.z.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 pI=y_`
1373
+ `,sI={name:f.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:f.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:f.z.array(f.z.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:f.z.nativeEnum(xb).default(xb.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:f.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const pI={parent_container_id:f.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:f.z.nativeEnum(Qy).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:f.z.nativeEnum($b).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:f.z.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:f.z.record(f.z.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 dI=y_`
1374
1374
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1375
1375
  update_workspace(id: $id, attributes: $attributes) {
1376
1376
  id
1377
1377
  }
1378
1378
  }
1379
- `,dI={id:f.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:f.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:f.z.string().optional().describe("The description of the workspace to update"),attributeKind:f.z.nativeEnum(Jy).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:f.z.string().optional().describe("The name of the workspace to update")};const cI=y_`
1379
+ `,cI={id:f.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:f.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:f.z.string().optional().describe("The description of the workspace to update"),attributeKind:f.z.nativeEnum(Jy).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:f.z.string().optional().describe("The name of the workspace to update")};const lI=y_`
1380
1380
  mutation updateFolder(
1381
1381
  $folderId: ID!
1382
1382
  $name: String
@@ -1402,7 +1402,7 @@
1402
1402
  id
1403
1403
  }
1404
1404
  }
1405
- `,lI={folderId:f.z.string().describe("The ID of the folder to update"),name:f.z.string().optional().describe("The new name of the folder"),color:f.z.nativeEnum(Pb).optional().describe("The new color of the folder"),fontWeight:f.z.nativeEnum(Vb).optional().describe("The new font weight of the folder"),customIcon:f.z.nativeEnum(jb).optional().describe("The new custom icon of the folder"),parentFolderId:f.z.string().optional().describe("The ID of the new parent folder"),workspaceId:f.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:f.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:f.z.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:f.z.nativeEnum(fy).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:f.z.boolean().optional().describe("Whether to position the folder after the object")};const mI=y_`
1405
+ `,mI={folderId:f.z.string().describe("The ID of the folder to update"),name:f.z.string().optional().describe("The new name of the folder"),color:f.z.nativeEnum(Pb).optional().describe("The new color of the folder"),fontWeight:f.z.nativeEnum(Vb).optional().describe("The new font weight of the folder"),customIcon:f.z.nativeEnum(jb).optional().describe("The new custom icon of the folder"),parentFolderId:f.z.string().optional().describe("The ID of the new parent folder"),workspaceId:f.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:f.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:f.z.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:f.z.nativeEnum(fy).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:f.z.boolean().optional().describe("Whether to position the folder after the object")};const uI=y_`
1406
1406
  mutation createWorkspace(
1407
1407
  $name: String!
1408
1408
  $workspaceKind: WorkspaceKind!
@@ -1418,7 +1418,7 @@
1418
1418
  id
1419
1419
  }
1420
1420
  }
1421
- `,uI={name:f.z.string().describe("The name of the new workspace to be created"),workspaceKind:f.z.nativeEnum(Jy).describe("The kind of workspace to create"),description:f.z.string().optional().describe("The description of the new workspace"),accountProductId:f.z.string().optional().describe("The account product ID associated with the workspace")};const fI=y_`
1421
+ `,fI={name:f.z.string().describe("The name of the new workspace to be created"),workspaceKind:f.z.nativeEnum(Jy).describe("The kind of workspace to create"),description:f.z.string().optional().describe("The description of the new workspace"),accountProductId:f.z.string().optional().describe("The account product ID associated with the workspace")};const hI=y_`
1422
1422
  mutation createFolder(
1423
1423
  $workspaceId: ID!
1424
1424
  $name: String!
@@ -1438,7 +1438,7 @@
1438
1438
  id
1439
1439
  }
1440
1440
  }
1441
- `,hI={workspaceId:f.z.string().describe("The ID of the workspace where the folder will be created"),name:f.z.string().describe("The name of the folder to be created"),color:f.z.nativeEnum(Pb).optional().describe("The color of the folder"),fontWeight:f.z.nativeEnum(Vb).optional().describe("The font weight of the folder"),customIcon:f.z.nativeEnum(jb).optional().describe("The custom icon of the folder"),parentFolderId:f.z.string().optional().describe("The ID of the parent folder")};const vI=y_`
1441
+ `,vI={workspaceId:f.z.string().describe("The ID of the workspace where the folder will be created"),name:f.z.string().describe("The name of the folder to be created"),color:f.z.nativeEnum(Pb).optional().describe("The color of the folder"),fontWeight:f.z.nativeEnum(Vb).optional().describe("The font weight of the folder"),customIcon:f.z.nativeEnum(jb).optional().describe("The custom icon of the folder"),parentFolderId:f.z.string().optional().describe("The ID of the parent folder")};const gI=y_`
1442
1442
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1443
1443
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1444
1444
  success
@@ -1448,7 +1448,7 @@
1448
1448
  }
1449
1449
  }
1450
1450
  }
1451
- `,gI=y_`
1451
+ `,bI=y_`
1452
1452
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
1453
1453
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
1454
1454
  success
@@ -1458,7 +1458,7 @@
1458
1458
  }
1459
1459
  }
1460
1460
  }
1461
- `,bI={objectType:f.z.nativeEnum(fy).describe("The type of object to move"),id:f.z.string().describe("The ID of the object to move"),position_object_id:f.z.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:f.z.nativeEnum(fy).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:f.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:f.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:f.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:f.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const yI=y_`
1461
+ `,yI={objectType:f.z.nativeEnum(fy).describe("The type of object to move"),id:f.z.string().describe("The ID of the object to move"),position_object_id:f.z.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:f.z.nativeEnum(fy).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:f.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:f.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:f.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:f.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const wI=y_`
1462
1462
  query aggregateBoardInsights($query: AggregateQueryInput!) {
1463
1463
  aggregate(query: $query) {
1464
1464
  results {
@@ -1476,7 +1476,7 @@
1476
1476
  }
1477
1477
  }
1478
1478
  }
1479
- `,wI=new Set([Mg.Case,Mg.Between,Mg.Left,Mg.Raw,Mg.None,Mg.CountKeys]),_I=Object.values(Mg).filter((e=>!wI.has(e))),xI=new Set([Mg.Left,Mg.Trim,Mg.Upper,Mg.Lower,Mg.DateTruncDay,Mg.DateTruncWeek,Mg.DateTruncMonth,Mg.DateTruncQuarter,Mg.DateTruncYear,Mg.Color,Mg.Label,Mg.EndDate,Mg.StartDate,Mg.Hour,Mg.PhoneCountryShortName,Mg.Person,Mg.Upper,Mg.Lower,Mg.Order,Mg.Length,Mg.Flatten,Mg.IsDone]);function TI(e){return{column_id:e}}new Set([Mg.Count,Mg.CountDistinct,Mg.CountSubitems,Mg.CountItems,Mg.First,Mg.Sum,Mg.Average,Mg.Median,Mg.Min,Mg.Max,Mg.MinMax]);const EI={boardId:f.z.number().describe("The id of the board to get insights for"),aggregations:f.z.array(f.z.object({function:f.z.enum(_I).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:f.z.string().describe("The id of the column to aggregate")})).describe('The aggregations to get. Before sending the aggregations, use get_board_info tool to check "aggregationGuidelines" key for information. Transformative functions and plain columns (no function) must be in group by.').optional(),groupBy:f.z.array(f.z.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:f.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:HT,filtersOperator:WT,orderBy:f.z.array(f.z.object({columnId:f.z.string().describe("The id of the column to order by"),direction:f.z.nativeEnum(ey).optional().default(ey.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 II=y_`
1479
+ `,_I=new Set([Mg.Case,Mg.Between,Mg.Left,Mg.Raw,Mg.None,Mg.CountKeys]),xI=Object.values(Mg).filter((e=>!_I.has(e))),TI=new Set([Mg.Left,Mg.Trim,Mg.Upper,Mg.Lower,Mg.DateTruncDay,Mg.DateTruncWeek,Mg.DateTruncMonth,Mg.DateTruncQuarter,Mg.DateTruncYear,Mg.Color,Mg.Label,Mg.EndDate,Mg.StartDate,Mg.Hour,Mg.PhoneCountryShortName,Mg.Person,Mg.Upper,Mg.Lower,Mg.Order,Mg.Length,Mg.Flatten,Mg.IsDone]);function EI(e){return{column_id:e}}new Set([Mg.Count,Mg.CountDistinct,Mg.CountSubitems,Mg.CountItems,Mg.First,Mg.Sum,Mg.Average,Mg.Median,Mg.Min,Mg.Max,Mg.MinMax]);const II={boardId:f.z.number().describe("The id of the board to get insights for"),aggregations:f.z.array(f.z.object({function:f.z.enum(xI).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:f.z.string().describe("The id of the column to aggregate")})).describe('The aggregations to get. Before sending the aggregations, use get_board_info tool to check "aggregationGuidelines" key for information. Transformative functions and plain columns (no function) must be in group by.').optional(),groupBy:f.z.array(f.z.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:f.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:WT,filtersOperator:YT,orderBy:f.z.array(f.z.object({columnId:f.z.string().describe("The id of the column to order by"),direction:f.z.nativeEnum(ey).optional().default(ey.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 SI=y_`
1480
1480
  query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1481
1481
  boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1482
1482
  id
@@ -1484,7 +1484,7 @@
1484
1484
  url
1485
1485
  }
1486
1486
  }
1487
- `,SI=y_`
1487
+ `,NI=y_`
1488
1488
  query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1489
1489
  docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1490
1490
  id
@@ -1492,14 +1492,14 @@
1492
1492
  url
1493
1493
  }
1494
1494
  }
1495
- `,NI=y_`
1495
+ `,AI=y_`
1496
1496
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1497
1497
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1498
1498
  id
1499
1499
  name
1500
1500
  }
1501
1501
  }
1502
- `,AI=y_`
1502
+ `,DI=y_`
1503
1503
  query SearchDev($query: String!, $limit: Int!, $filters: SearchFiltersInput!) {
1504
1504
  search(query: $query, limit: $limit, filters: $filters) {
1505
1505
  __typename
@@ -1520,14 +1520,14 @@
1520
1520
  }
1521
1521
  }
1522
1522
  }
1523
- `,DI=100,OI={searchTerm:f.z.string().optional().describe("The search term to use for the search."),searchType:f.z.nativeEnum(pE).describe("The type of search to perform."),limit:f.z.number().max(DI).optional().default(DI).describe("The number of items to get. The max and default value is 100."),page:f.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:f.z.array(f.z.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const kI=f.z.object({id:f.z.string().describe("The ID of the entity to mention"),type:f.z.nativeEnum(dy).describe("The type of mention: User, Team, Board, or Project")}),RI=f.z.array(kI),$I={itemId:f.z.number().describe("The id of the item to which the update will be added"),body:f.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:f.z.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 CI=y_`
1523
+ `,OI=100,kI={searchTerm:f.z.string().optional().describe("The search term to use for the search."),searchType:f.z.nativeEnum(dE).describe("The type of search to perform."),limit:f.z.number().max(OI).optional().default(OI).describe("The number of items to get. The max and default value is 100."),page:f.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:f.z.array(f.z.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const RI=f.z.object({id:f.z.string().describe("The ID of the entity to mention"),type:f.z.nativeEnum(dy).describe("The type of mention: User, Team, Board, or Project")}),$I=f.z.array(RI),CI={itemId:f.z.number().describe("The id of the item to which the update will be added"),body:f.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:f.z.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 LI=y_`
1524
1524
  mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
1525
1525
  update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
1526
1526
  id
1527
1527
  name
1528
1528
  }
1529
1529
  }
1530
- `,LI=f.z.object({fileType:f.z.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:f.z.string().describe("File display name"),linkToFile:f.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:f.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:f.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),FI={boardId:f.z.string().describe("The board's unique identifier"),itemId:f.z.string().describe("The item's unique identifier"),columnId:f.z.string().describe("The file or doc column's unique identifier"),files:f.z.array(LI).describe("Array of file values to set on the column")};const PI=y_`
1530
+ `,FI=f.z.object({fileType:f.z.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:f.z.string().describe("File display name"),linkToFile:f.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:f.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:f.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),PI={boardId:f.z.string().describe("The board's unique identifier"),itemId:f.z.string().describe("The item's unique identifier"),columnId:f.z.string().describe("The file or doc column's unique identifier"),files:f.z.array(FI).describe("Array of file values to set on the column")};const jI=y_`
1531
1531
  query getUserContext {
1532
1532
  me {
1533
1533
  id
@@ -1555,7 +1555,7 @@
1555
1555
  }
1556
1556
  }
1557
1557
  }
1558
- `,jI=y_`
1558
+ `,VI=y_`
1559
1559
  query getFavoriteDetails(
1560
1560
  $boardIds: [ID!]
1561
1561
  $folderIds: [ID!]
@@ -1579,7 +1579,7 @@
1579
1579
  name
1580
1580
  }
1581
1581
  }
1582
- `,VI={[Jb.Board]:"boardIds",[Jb.Folder]:"folderIds",[Jb.Workspace]:"workspaceIds",[Jb.Dashboard]:"dashboardIds"},UI={[Jb.Board]:"boards",[Jb.Folder]:"folders",[Jb.Workspace]:"workspaces",[Jb.Dashboard]:"dashboards"};const BI=y_`
1582
+ `,UI={[Jb.Board]:"boardIds",[Jb.Folder]:"folderIds",[Jb.Workspace]:"workspaceIds",[Jb.Dashboard]:"dashboardIds"},BI={[Jb.Board]:"boards",[Jb.Folder]:"folders",[Jb.Workspace]:"workspaces",[Jb.Dashboard]:"dashboards"};const MI=y_`
1583
1583
  query GetNotetakerMeetings(
1584
1584
  $limit: Int
1585
1585
  $cursor: String
@@ -1632,7 +1632,7 @@
1632
1632
  }
1633
1633
  }
1634
1634
  }
1635
- `,MI={ids:f.z.array(f.z.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:f.z.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:f.z.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:f.z.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:f.z.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:f.z.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:f.z.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:f.z.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:f.z.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};f.z.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'),f.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const qI=y_`
1635
+ `,qI={ids:f.z.array(f.z.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:f.z.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:f.z.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:f.z.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:f.z.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:f.z.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:f.z.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:f.z.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:f.z.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};f.z.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'),f.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const zI=y_`
1636
1636
  query getSprintsByIds($ids: [ID!]) {
1637
1637
  items(ids: $ids) {
1638
1638
  id
@@ -1667,7 +1667,7 @@
1667
1667
  }
1668
1668
  }
1669
1669
  }
1670
- `,zI={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"},GI={...zI,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},HI="BOARD_NOT_FOUND:",WI="SPRINT_NOT_FOUND:",YI="DOCUMENT_NOT_FOUND:",KI="DOCUMENT_INVALID:",QI="DOCUMENT_EMPTY:",JI="EXPORT_FAILED:",XI="INTERNAL_ERROR:",ZI="VALIDATION_ERROR:",eS="task_sprint",tS={[GI.SPRINT_TASKS]:"Sprint Tasks",[GI.SPRINT_TIMELINE]:"Sprint Timeline",[GI.SPRINT_COMPLETION]:"Sprint Completion",[GI.SPRINT_START_DATE]:"Sprint Start Date",[GI.SPRINT_END_DATE]:"Sprint End Date",[GI.SPRINT_ACTIVATION]:"Sprint Activation",[GI.SPRINT_SUMMARY]:"Sprint Summary",[GI.SPRINT_CAPACITY]:"Sprint Capacity"},aS=Ay,iS={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},nS=(e,t)=>e.column_values?.find((e=>e.id===t)),oS=(e,t)=>{const a=nS(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},rS=(e,t)=>{const a=nS(e,t);return"DateValue"===a?.__typename?a.date??null:null},sS=(e,t)=>{const a=nS(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},pS=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},dS=(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)))},cS=e=>dS(e,Object.values(zI)),lS=e=>dS(e,Object.values(iS)),mS=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},uS=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===lT.BoardRelation))||null,fS={sprintId:f.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const hS=y_`
1670
+ `,GI={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"},HI={...GI,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},WI="BOARD_NOT_FOUND:",YI="SPRINT_NOT_FOUND:",KI="DOCUMENT_NOT_FOUND:",QI="DOCUMENT_INVALID:",JI="DOCUMENT_EMPTY:",XI="EXPORT_FAILED:",ZI="INTERNAL_ERROR:",eS="VALIDATION_ERROR:",tS="task_sprint",aS={[HI.SPRINT_TASKS]:"Sprint Tasks",[HI.SPRINT_TIMELINE]:"Sprint Timeline",[HI.SPRINT_COMPLETION]:"Sprint Completion",[HI.SPRINT_START_DATE]:"Sprint Start Date",[HI.SPRINT_END_DATE]:"Sprint End Date",[HI.SPRINT_ACTIVATION]:"Sprint Activation",[HI.SPRINT_SUMMARY]:"Sprint Summary",[HI.SPRINT_CAPACITY]:"Sprint Capacity"},iS=Ay,nS={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},oS=(e,t)=>e.column_values?.find((e=>e.id===t)),rS=(e,t)=>{const a=oS(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},sS=(e,t)=>{const a=oS(e,t);return"DateValue"===a?.__typename?a.date??null:null},pS=(e,t)=>{const a=oS(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},dS=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},cS=(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)))},lS=e=>cS(e,Object.values(GI)),mS=e=>cS(e,Object.values(nS)),uS=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},fS=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===lT.BoardRelation))||null,hS={sprintId:f.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const vS=y_`
1671
1671
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
1672
1672
  boards(ids: [$boardId]) {
1673
1673
  items_page(limit: $limit) {
@@ -1703,7 +1703,7 @@
1703
1703
  }
1704
1704
  }
1705
1705
  }
1706
- `,vS={sprintsBoardId:f.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:f.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const gS=y_`
1706
+ `,gS={sprintsBoardId:f.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:f.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const bS=y_`
1707
1707
  query GetRecentBoards($limit: Int) {
1708
1708
  boards(limit: $limit, order_by: used_at, state: active) {
1709
1709
  id
@@ -1719,7 +1719,7 @@
1719
1719
  }
1720
1720
  }
1721
1721
  }
1722
- `,bS={};const yS=[class extends Cu{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=exports.ToolType.READ,this.annotations=$u({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 bS}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(gS,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${HI} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);if(0===a.length)return{content:this.generateNotFoundMessage(t.length)};return{content:this.generateReport(a)}}catch(e){return{content:`${XI} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}generateMultiplePairsWarning(e){return`## ⚠️ Multiple SprintsBoard Detected\n**${e}** different board pairs found. Each pair is isolated and workspace-specific.\n**AI Agent - REQUIRED:** Before ANY operation, confirm with user which pair and workspace to use.\n---\n`}generatePairDetails(e,t){return`### Pair ${t+1}\n**Sprints Board:**\n- ID: \`${e.sprintsBoard.id}\`\n- Name: ${e.sprintsBoard.name}\n- Workspace: ${e.sprintsBoard.workspaceName} (ID: ${e.sprintsBoard.workspaceId})\n\n**Tasks Board:**\n- ID: \`${e.tasksBoard.id}\`\n- Name: ${e.tasksBoard.name}\n- Workspace: ${e.tasksBoard.workspaceName} (ID: ${e.tasksBoard.workspaceId})\n---\n\n`}generateTechnicalReference(){return"## 📋 Technical Reference\n\n**Sprint Operations** (all require correct board pair):\n• Add to Sprint: Update `task_sprint` column with sprint item ID\n• Remove from Sprint: Clear `task_sprint` column (set to null)\n• Search in Sprint: Filter where `task_sprint` equals sprint item ID\n• Move Between Sprints: Update `task_sprint` with new sprint item ID\n• Backlog Tasks: `task_sprint` is empty/null\n\n**Critical:** `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}generateReport(e){const t=e.length>1?this.generateMultiplePairsWarning(e.length):"",a=e.map(((e,t)=>this.generatePairDetails(e,t))).join(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${t}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${a}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=uS(e,zI.SPRINT_TASKS);if(!i)return;const n=mS(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=uS(e,eS);if(!i)return;const n=mS(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(cS(i)&&this.processSprintsBoard(i,a,t),lS(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Cu{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=exports.ToolType.READ,this.annotations=$u({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 vS}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(hS,a),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${XI} 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(x_,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${HI} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${ZI} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${XI} 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(zI),i=pS(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=>tS[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let t="# Sprints Metadata Report\n\n";return t+=`**Total Sprints:** ${e.length}\n\n`,t+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",t+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const a=e.name||"Unknown",i=e.id,n=oS(e,GI.SPRINT_ACTIVATION),o=oS(e,GI.SPRINT_COMPLETION),r=rS(e,GI.SPRINT_START_DATE),s=rS(e,GI.SPRINT_END_DATE),p=((e,t)=>{const a=nS(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,GI.SPRINT_TIMELINE),d=sS(e,GI.SPRINT_SUMMARY);let c=aS.Planned;o?c=aS.Completed:(n||r)&&(c=aS.Active);const l=p?`${p.from} to ${p.to}`:"Not set";t+=`| ${a} | ${i} | ${c} | ${l} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),t+="\n## Status Definitions:\n",t+=`- **${aS.Planned}**: Sprint not yet started (no activation, no start date)\n`,t+=`- **${aS.Active}**: Sprint is active (activated but not completed)\n`,t+=`- **${aS.Completed}**: Sprint is finished\n\n`,t}},class extends Cu{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=exports.ToolType.READ,this.annotations=$u({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 fS}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${XI} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:a.content}:{content:a.error||`${XI} Unknown error occurred while reading document content`}}catch(e){return{content:`${XI} 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(qI,t)).items||[];if(0===a.length)return{success:!1,error:`${WI} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${WI} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(zI),...t];return pS(a,i)})(i,[GI.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${ZI} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=sS(i,GI.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${YI} 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:`${XI} 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($_,t)).docs||[];if(0===a.length)return{success:!1,error:`${YI} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${KI} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(C_,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${JI} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${QI} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${XI} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],wS=[class extends Cu{constructor(){super(...arguments),this.name="delete_item",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return MT}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(w_,t);return{content:`Item ${a.delete_item?.id} successfully deleted`}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_items_page",this.type=exports.ToolType.READ,this.annotations=$u({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's description (the rich-text body/details of a monday.com item), set 'includeItemDescription' to true — the response will include the item description's document blocks with their content, type, and id. Use this whenever the user asks about an item's 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'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. 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's views, find the matching view by name, then extract its filter field and pass it as the filters argument here."}getInputSchema(){return dE}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){AT(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(oE,a),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:ay.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}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 lT.BoardRelation:return e.linked_items;case lT.Formula:return e.display_value;case lT.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:100,filters:{entities:[{items:{board_ids:[e.boardId.toString()]}}]}},a=await this.mondayApi.request(rE,t,{versionOverride:"dev",timeout:ST}),i=a.search?.filter((e=>"ItemSearchResult"===e.__typename))?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Cu{constructor(){super(...arguments),this.name="create_item",this.type=exports.ToolType.WRITE,this.annotations=$u({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?DT:OT}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(wT,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new U_(this.mondayApi,this.apiToken,{boardId:t}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){NT(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(_T,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${a.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){NT(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(__,a);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){NT(e,"create item")}}},class extends Cu{constructor(){super(...arguments),this.name="create_update",this.type=exports.ToolType.WRITE,this.annotations=$u({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 LT}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=CT.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(RT,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){NT(e,"create update")}}},class extends Cu{constructor(){super(...arguments),this.name="get_updates",this.type=exports.ToolType.READ,this.annotations=$u({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. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return VT}async executeInternal(e){try{const t={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let a;a=e.objectType===jT.Item?await this.mondayApi.request(FT,{...t,itemId:e.objectId}):await this.mondayApi.request(PT,{...t,boardId:e.objectId});const i=e.objectType===jT.Item?a.items?.[0]?.updates:a.boards?.[0]?.updates;if(!i||0===i.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const n=i.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})),o={updates:n,pagination:{page:e.page??1,limit:e.limit??25,count:n.length}};return{content:JSON.stringify(o,null,2)}}catch(e){NT(e,"get updates")}}},class extends Cu{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=exports.ToolType.WRITE,this.annotations=$u({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 $I}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=RI.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(RT,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){NT(e,"create update")}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_schema",this.type=exports.ToolType.READ,this.annotations=$u({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 cE}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(x_,a);return{content:`The current schema of the board ${t} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_activity",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return QT}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-IT.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(KT,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=e.includeData??!1,d=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${p&&e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${d}`}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_info",this.type=exports.ToolType.READ,this.annotations=$u({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 nE}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(JT,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(ZT(i,n),null,2)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===lT.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(XT,{boardId:a});return i.boards?.[0]??null}},class extends Cu{constructor(){super(...arguments),this.name="get_full_board_data",this.type=exports.ToolType.READ,this.annotations=$u({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 YT}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(zT,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(GT,e);r=t.users?.filter((e=>null!==e))||[]}const s=new Map(r.map((e=>[e.id,e]))),p={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:r,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:r.length}};return{content:JSON.stringify(p,null,2)}}catch(e){NT(e,"get full board data")}}},class extends Cu{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=exports.ToolType.READ,this.annotations=$u({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 PE}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(OE);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:$E(s)}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(DE,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>CE)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>LE)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(AE,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(NE,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:FE};s=await this.mondayApi.request(SE,t)}else if(t){const t={userIds:e.userIds,limit:FE};s=await this.mondayApi.request(EE,t)}else{const e={userIds:void 0,limit:FE};s=await this.mondayApi.request(IE,e)}return{content:$E(s)}}},U_,class extends Cu{constructor(){super(...arguments),this.name="move_item_to_group",this.type=exports.ToolType.WRITE,this.annotations=$u({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 jE}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(E_,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Cu{constructor(){super(...arguments),this.name="create_board",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return B_}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(I_,t);return{content:`Board ${a.create_board?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_form",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return wx}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(X_,t);return{content:`Form created successfully. Board ID: ${a.create_form?.boardId}, Token: ${a.create_form?.token}`}}},class extends Cu{constructor(){super(...arguments),this.name="update_form",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new dT(this.mondayApi),this.actionHandlers=new Map([[Ux.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Ux.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Ux.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Ux.activate,this.helpers.activateForm.bind(this.helpers)],[Ux.createTag,this.helpers.createTag.bind(this.helpers)],[Ux.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Ux.updateTag,this.helpers.updateTag.bind(this.helpers)],[Ux.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Ux.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Ux.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Ux.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Ux.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return'Update a monday.com form. Handles the following form update actions that can only be done one at a time using the correct "action" input: \n - update form\'s feature settings with the action "updateFeatures",\n - update form\'s appearance settings with the action "updateAppearance",\n - update form\'s accessibility settings with the action "updateAccessibility",\n - update form\'s title with the action "updateFormHeader",\n - update form\'s description with the action "updateFormHeader",\n - update form\'s question order with the action "updateQuestionOrder",\n - create a new form tag with the action "createTag",\n - delete a form tag with the action "deleteTag",\n - update a form tag with the action "updateTag",\n - set or update the form\'s password with the action "setFormPassword"\n - shorten form\'s url with the action "shortenFormUrl"\n - deactivate form with the action "deactivateForm"\n - reactivate form with the action "activateForm"'}getInputSchema(){return pT}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 Cu{constructor(){super(...arguments),this.name="get_form",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return cT}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Z_,t);return a.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(a.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Cu{constructor(){super(...arguments),this.name="form_questions_editor",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new Vx(this.mondayApi),this.actionHandlers=new Map([[Fx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Fx.Update,this.helpers.updateQuestion.bind(this.helpers)],[Fx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return jx}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends Cu{constructor(){super(...arguments),this.name="create_column",this.type=exports.ToolType.WRITE,this.annotations=$u({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?mT:uT}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(S_,a);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_group",this.type=exports.ToolType.WRITE,this.annotations=$u({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 yT}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(gT,t);return{content:`Group "${a.create_group?.title}" (ID: ${a.create_group?.id}) successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="delete_column",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?UT:BT}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(N_,t);return{content:`Column ${a.delete_column?.id} successfully deleted`}}},P_,class extends Cu{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=exports.ToolType.ALL_API,this.annotations=$u({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 uE}async executeInternal(e){try{const t=await this.mondayApi.request(A_),a=e?.operationType,i=t.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=t.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=t.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return a&&"read"!==a||(s+=`- Query Type: ${t.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),a&&"write"!==a||(s+=`- Mutation Type: ${t.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Cu{constructor(){super(...arguments),this.name="get_column_type_info",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return mE}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(lE,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="get_type_details",this.type=exports.ToolType.ALL_API,this.annotations=$u({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 fE}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,y_`
1722
+ `,yS={};const wS=[class extends Cu{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=exports.ToolType.READ,this.annotations=$u({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 yS}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(bS,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${WI} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);if(0===a.length)return{content:this.generateNotFoundMessage(t.length)};return{content:this.generateReport(a)}}catch(e){return{content:`${ZI} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}generateMultiplePairsWarning(e){return`## ⚠️ Multiple SprintsBoard Detected\n**${e}** different board pairs found. Each pair is isolated and workspace-specific.\n**AI Agent - REQUIRED:** Before ANY operation, confirm with user which pair and workspace to use.\n---\n`}generatePairDetails(e,t){return`### Pair ${t+1}\n**Sprints Board:**\n- ID: \`${e.sprintsBoard.id}\`\n- Name: ${e.sprintsBoard.name}\n- Workspace: ${e.sprintsBoard.workspaceName} (ID: ${e.sprintsBoard.workspaceId})\n\n**Tasks Board:**\n- ID: \`${e.tasksBoard.id}\`\n- Name: ${e.tasksBoard.name}\n- Workspace: ${e.tasksBoard.workspaceName} (ID: ${e.tasksBoard.workspaceId})\n---\n\n`}generateTechnicalReference(){return"## 📋 Technical Reference\n\n**Sprint Operations** (all require correct board pair):\n• Add to Sprint: Update `task_sprint` column with sprint item ID\n• Remove from Sprint: Clear `task_sprint` column (set to null)\n• Search in Sprint: Filter where `task_sprint` equals sprint item ID\n• Move Between Sprints: Update `task_sprint` with new sprint item ID\n• Backlog Tasks: `task_sprint` is empty/null\n\n**Critical:** `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}generateReport(e){const t=e.length>1?this.generateMultiplePairsWarning(e.length):"",a=e.map(((e,t)=>this.generatePairDetails(e,t))).join(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${t}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${a}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=fS(e,GI.SPRINT_TASKS);if(!i)return;const n=uS(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=fS(e,tS);if(!i)return;const n=uS(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(lS(i)&&this.processSprintsBoard(i,a,t),mS(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Cu{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=exports.ToolType.READ,this.annotations=$u({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 gS}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(vS,a),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${ZI} 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(x_,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${WI} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${eS} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${ZI} 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(GI),i=dS(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=>aS[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let t="# Sprints Metadata Report\n\n";return t+=`**Total Sprints:** ${e.length}\n\n`,t+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",t+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const a=e.name||"Unknown",i=e.id,n=rS(e,HI.SPRINT_ACTIVATION),o=rS(e,HI.SPRINT_COMPLETION),r=sS(e,HI.SPRINT_START_DATE),s=sS(e,HI.SPRINT_END_DATE),p=((e,t)=>{const a=oS(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,HI.SPRINT_TIMELINE),d=pS(e,HI.SPRINT_SUMMARY);let c=iS.Planned;o?c=iS.Completed:(n||r)&&(c=iS.Active);const l=p?`${p.from} to ${p.to}`:"Not set";t+=`| ${a} | ${i} | ${c} | ${l} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),t+="\n## Status Definitions:\n",t+=`- **${iS.Planned}**: Sprint not yet started (no activation, no start date)\n`,t+=`- **${iS.Active}**: Sprint is active (activated but not completed)\n`,t+=`- **${iS.Completed}**: Sprint is finished\n\n`,t}},class extends Cu{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=exports.ToolType.READ,this.annotations=$u({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 hS}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${ZI} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:a.content}:{content:a.error||`${ZI} Unknown error occurred while reading document content`}}catch(e){return{content:`${ZI} 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(zI,t)).items||[];if(0===a.length)return{success:!1,error:`${YI} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${YI} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(GI),...t];return dS(a,i)})(i,[HI.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${eS} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=pS(i,HI.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${KI} 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:`${ZI} 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($_,t)).docs||[];if(0===a.length)return{success:!1,error:`${KI} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${QI} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(C_,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${XI} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${JI} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${ZI} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],_S=[class extends Cu{constructor(){super(...arguments),this.name="delete_item",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return qT}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(w_,t);return{content:`Item ${a.delete_item?.id} successfully deleted`}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_items_page",this.type=exports.ToolType.READ,this.annotations=$u({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's description (the rich-text body/details of a monday.com item), set 'includeItemDescription' to true — the response will include the item description's document blocks with their content, type, and id. Use this whenever the user asks about an item's 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'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. 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's views, find the matching view by name, then extract its filter field and pass it as the filters argument here."}getInputSchema(){return cE}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){AT(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(rE,a),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:ay.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}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 lT.BoardRelation:return e.linked_items;case lT.Formula:return e.display_value;case lT.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:100,filters:{entities:[{items:{board_ids:[e.boardId.toString()]}}]}},a=await this.mondayApi.request(sE,t,{versionOverride:"dev",timeout:ST}),i=a.search?.filter((e=>"ItemSearchResult"===e.__typename))?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Cu{constructor(){super(...arguments),this.name="create_item",this.type=exports.ToolType.WRITE,this.annotations=$u({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?DT:OT}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(wT,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new U_(this.mondayApi,this.apiToken,{boardId:t}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){NT(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(_T,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${a.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){NT(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(__,a);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){NT(e,"create item")}}},class extends Cu{constructor(){super(...arguments),this.name="create_update",this.type=exports.ToolType.WRITE,this.annotations=$u({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 LT}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=CT.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(RT,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){NT(e,"create update")}}},class extends Cu{constructor(){super(...arguments),this.name="get_updates",this.type=exports.ToolType.READ,this.annotations=$u({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 VT}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===jT.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 n;n=e.objectType===jT.Item?await this.mondayApi.request(FT,{...i,itemId:e.objectId}):await this.mondayApi.request(PT,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:UT(e.fromDate),toDate:UT(e.toDate)}:{}});const o=e.objectType===jT.Item?n.items?.[0]?.updates:n.boards?.[0]?.updates;if(!o||0===o.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const r=o.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={updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}};return{content:JSON.stringify(s,null,2)}}catch(e){NT(e,"get updates")}}},class extends Cu{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=exports.ToolType.WRITE,this.annotations=$u({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 CI}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=$I.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(RT,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){NT(e,"create update")}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_schema",this.type=exports.ToolType.READ,this.annotations=$u({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 lE}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(x_,a);return{content:`The current schema of the board ${t} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_activity",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return JT}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-IT.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(QT,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=e.includeData??!1,d=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${p&&e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${d}`}}},class extends Cu{constructor(){super(...arguments),this.name="get_board_info",this.type=exports.ToolType.READ,this.annotations=$u({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 oE}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(XT,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(eE(i,n),null,2)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===lT.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(ZT,{boardId:a});return i.boards?.[0]??null}},class extends Cu{constructor(){super(...arguments),this.name="get_full_board_data",this.type=exports.ToolType.READ,this.annotations=$u({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 KT}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(GT,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(HT,e);r=t.users?.filter((e=>null!==e))||[]}const s=new Map(r.map((e=>[e.id,e]))),p={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:r,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:r.length}};return{content:JSON.stringify(p,null,2)}}catch(e){NT(e,"get full board data")}}},class extends Cu{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=exports.ToolType.READ,this.annotations=$u({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 jE}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(kE);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:CE(s)}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(OE,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>LE)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>FE)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(DE,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(AE,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:PE};s=await this.mondayApi.request(NE,t)}else if(t){const t={userIds:e.userIds,limit:PE};s=await this.mondayApi.request(IE,t)}else{const e={userIds:void 0,limit:PE};s=await this.mondayApi.request(SE,e)}return{content:CE(s)}}},U_,class extends Cu{constructor(){super(...arguments),this.name="move_item_to_group",this.type=exports.ToolType.WRITE,this.annotations=$u({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 VE}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(E_,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Cu{constructor(){super(...arguments),this.name="create_board",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return B_}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(I_,t);return{content:`Board ${a.create_board?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_form",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return wx}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(X_,t);return{content:`Form created successfully. Board ID: ${a.create_form?.boardId}, Token: ${a.create_form?.token}`}}},class extends Cu{constructor(){super(...arguments),this.name="update_form",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new dT(this.mondayApi),this.actionHandlers=new Map([[Ux.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Ux.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Ux.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Ux.activate,this.helpers.activateForm.bind(this.helpers)],[Ux.createTag,this.helpers.createTag.bind(this.helpers)],[Ux.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Ux.updateTag,this.helpers.updateTag.bind(this.helpers)],[Ux.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Ux.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Ux.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Ux.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Ux.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return'Update a monday.com form. Handles the following form update actions that can only be done one at a time using the correct "action" input: \n - update form\'s feature settings with the action "updateFeatures",\n - update form\'s appearance settings with the action "updateAppearance",\n - update form\'s accessibility settings with the action "updateAccessibility",\n - update form\'s title with the action "updateFormHeader",\n - update form\'s description with the action "updateFormHeader",\n - update form\'s question order with the action "updateQuestionOrder",\n - create a new form tag with the action "createTag",\n - delete a form tag with the action "deleteTag",\n - update a form tag with the action "updateTag",\n - set or update the form\'s password with the action "setFormPassword"\n - shorten form\'s url with the action "shortenFormUrl"\n - deactivate form with the action "deactivateForm"\n - reactivate form with the action "activateForm"'}getInputSchema(){return pT}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 Cu{constructor(){super(...arguments),this.name="get_form",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return cT}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Z_,t);return a.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(a.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Cu{constructor(){super(...arguments),this.name="form_questions_editor",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new Vx(this.mondayApi),this.actionHandlers=new Map([[Fx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Fx.Update,this.helpers.updateQuestion.bind(this.helpers)],[Fx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return jx}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends Cu{constructor(){super(...arguments),this.name="create_column",this.type=exports.ToolType.WRITE,this.annotations=$u({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?mT:uT}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(S_,a);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_group",this.type=exports.ToolType.WRITE,this.annotations=$u({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 yT}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(gT,t);return{content:`Group "${a.create_group?.title}" (ID: ${a.create_group?.id}) successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="delete_column",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?BT:MT}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(N_,t);return{content:`Column ${a.delete_column?.id} successfully deleted`}}},P_,class extends Cu{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=exports.ToolType.ALL_API,this.annotations=$u({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 fE}async executeInternal(e){try{const t=await this.mondayApi.request(A_),a=e?.operationType,i=t.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=t.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=t.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return a&&"read"!==a||(s+=`- Query Type: ${t.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),a&&"write"!==a||(s+=`- Mutation Type: ${t.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Cu{constructor(){super(...arguments),this.name="get_column_type_info",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return uE}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(mE,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="get_type_details",this.type=exports.ToolType.ALL_API,this.annotations=$u({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 hE}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,y_`
1723
1723
  query getTypeDetails {
1724
1724
  __type(name: "${t}") {
1725
1725
  name
@@ -1807,5 +1807,5 @@
1807
1807
  }
1808
1808
  }
1809
1809
  }
1810
- `),i=await this.mondayApi.request(a);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const t=hE(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const t=hE(e.type);n+=` - ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const t=hE(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends Cu{constructor(){super(...arguments),this.name="create_custom_activity",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return fT}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(O_,t),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_notification",this.type=exports.ToolType.WRITE,this.annotations=$u({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 vT}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(hT,t);return{content:`Notification successfully sent to user ${e.user_id}: "${e.text}"`}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Cu{constructor(){super(...arguments),this.name="create_timeline_item",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return kT}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(k_,t);return{content:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Cu{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=exports.ToolType.READ,this.annotations=$u({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return qT}async executeInternal(e){const t=await this.mondayApi.request(R_);if(!t.custom_activity||0===t.custom_activity.length)return{content:"No custom activities found"};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${a.length} custom activities: ${JSON.stringify(a,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="read_docs",this.type=exports.ToolType.READ,this.annotations=$u({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get a collection of monday.com documents with their content as markdown. \n\nPAGINATION: \n- Default limit is 25 documents per page\n- Use 'page' parameter to get additional pages (starts at 1)\n- Check response for 'has_more_pages' to know if you should continue paginating\n- If user asks for \"all documents\" and you get exactly 25 results, continue with page 2, 3, etc.\n\nFILTERING: Provide a type value and array of ids:\n- type: 'ids' for specific document IDs\n- type: 'object_ids' for specific document object IDs \n- type: 'workspace_ids' for all docs in specific workspaces\n- ids: array of ID strings (at least 1 required)\n\nExamples:\n- { type: 'ids', ids: ['123', '456'] }\n- { type: 'object_ids', ids: ['123'] }\n- { type: 'workspace_ids', ids: ['ws_101'] }\n\nUSAGE PATTERNS:\n- For specific documents: use type 'ids' or 'object_ids' (A monday doc has two unique identifiers)\n- For workspace exploration: use type 'workspace_ids' with pagination\n- For large searches: start with page 1, then paginate if has_more_pages=true"}getInputSchema(){return VE}async executeInternal(e){try{let t,a,i;switch(e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request($_,n);if((!o.docs||0===o.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request($_,a)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,t,a){return e===t?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${t} documents, which suggests there may be more. Consider calling this tool again with page: ${a+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,t){const a=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t="";try{const a={docId:e.id},i=await this.mondayApi.request(C_,a);t=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){t=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:t}}))),i=t.page||1,n=t.limit||25,o=a.length,r=o===n;return{content:`Successfully retrieved ${a.length} document${1===a.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(a,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="workspace_info",this.type=exports.ToolType.READ,this.annotations=$u({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 UE}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(L_,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:t,boards:a,docs:i,folders:n}=e,o=t?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(a||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(r.values()),root_items:{boards:s,docs:p}}}(a);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,t)=>e+t.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,t)=>e+t.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="list_workspaces",this.type=exports.ToolType.READ,this.annotations=$u({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return HE}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=qE(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=zE(await this.mondayApi.request(BE,n(Xy.Member))),r=!GE(o)||i&&!function(e,t){return t.some((t=>qE(t.name).includes(e)))}(i,o);let s=o;if(r){s=zE(await this.mondayApi.request(BE,n(Xy.All)))}if(!GE(s))return{content:"No workspaces found."};const p=i&&s?.length<=ME,d=function(e,t,a,i){if(!e||t.length<=ME)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>qE(t.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!GE(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const c=d.length===e.limit,l=function(e){return e.map((e=>{const t=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${t}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${l}\n${c?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends Cu{constructor(){super(...arguments),this.name="create_doc",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return ZE}async executeInternal(e){const t=XE.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,n;if(a.type===JE.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||nb.Public,folder_id:a.folder_id?.toString()}}},r=await this.mondayApi.request(YE,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===JE.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(WE,o),s=r.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const p=s.board?.id,d=s.board?.columns?.find((e=>e&&e.type===lT.Doc));let c=a.column_id;if(!c)if(d)c=d.id;else{const e={boardId:p.toString(),columnType:lT.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(S_,e);if(c=t?.create_column?.id,!c)return{content:"Error: Failed to create doc column."}}const l={location:{board:{item_id:a.item_id.toString(),column_id:c}}},m=await this.mondayApi.request(YE,l);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(QE,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const o={docId:t,markdown:e.markdown},r=await this.mondayApi.request(KE,o),s=r?.add_content_to_doc_from_markdown?.success,p=r?.add_content_to_doc_from_markdown?.error;return s?{content:`✅ Document successfully created (id: ${t}, object_id: ${i}). ${n?`\n\nURL: ${n}`:""}`}:{content:`Document ${t} created, but failed to add markdown content: ${p||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Cu{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=exports.ToolType.WRITE,this.annotations=$u({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 aI}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=e.doc_id;if(!t){const a=await this.mondayApi.request(tI,{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={docId:t,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(eI,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:`Successfully added content to document ${t}. ${s} block${1===s?"":"s"} created.${o&&o.length>0?` Block IDs: ${o.join(", ")}`:""}`}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Cu{constructor(){super(...arguments),this.name="update_workspace",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return dI}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(pI,t);return{content:`Workspace ${a.update_workspace?.id} successfully updated`}}},class extends Cu{constructor(){super(...arguments),this.name="update_folder",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return lI}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(cI,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Cu{constructor(){super(...arguments),this.name="create_workspace",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return uI}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(mI,t);return{content:`Workspace ${a.create_workspace?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_folder",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return hI}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(fI,t);return{content:`Folder ${a.create_folder?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="move_object",this.type=exports.ToolType.WRITE,this.annotations=$u({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 bI}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(cI,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(vI,p);return d.update_board_hierarchy?.success?{content:`Board ${d.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${d.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(gI,p);return d.update_overview_hierarchy?.success?{content:`Overview ${d.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${d.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case fy.Folder:return this.executeUpdateFolder(e);case fy.Board:return this.executeUpdateBoardHierarchy(e);case fy.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Cu{constructor(){super(...arguments),this.name="create_dashboard",this.type=exports.ToolType.WRITE,this.annotations=$u({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 rI}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(iI,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===xb.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Cu{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=exports.ToolType.READ,this.annotations=$u({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(nI,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(a,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Cu{constructor(){super(...arguments),this.name="create_widget",this.type=exports.ToolType.WRITE,this.annotations=$u({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 sI}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(oI,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget,n=i.parent?.kind===Qy.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Cu{constructor(){super(...arguments),this.name="board_insights",this.type=exports.ToolType.READ,this.annotations=$u({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 EI}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===Mg.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Mg.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return xI.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Bg.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Mg.CountItems?[]:[{type:Bg.Column,column:TI(n),as:n}]}),as:s}}var i,n;const o={type:Bg.Column,column:TI(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:Bg.Column,column:TI(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:Ug.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit}},r=await this.mondayApi.request(yI,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Cu{constructor(){super(...arguments),this.name="search",this.type=exports.ToolType.READ,this.annotations=$u({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor users and teams, use list_users_and_teams tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return OI}async executeInternal(e){if(e.searchType!==pE.FOLDERS&&e.searchTerm)try{const t={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(t,null,2)}}catch(e){AT(e)}const t={[pE.BOARD]:this.searchBoardsAsync.bind(this),[pE.DOCUMENTS]:this.searchDocsAsync.bind(this),[pE.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e),i={disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:a.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const t={[pE.BOARD]:{entities:[{boards:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[pE.DOCUMENTS]:{entities:[{docs:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[pE.FOLDERS]:void 0}[e.searchType];if(!t)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const a={query:e.searchTerm,limit:e.limit,filters:t},i=(await this.mondayApi.request(AI,a,{versionOverride:"dev",timeout:ST})).search||[],n=[];for(const e of i)"BoardSearchResult"===e.__typename?n.push({id:sE.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"DocSearchResult"===e.__typename&&n.push({id:sE.DOCUMENT+e.data.id,title:e.data.name});return{items:n,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&&NT(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(NI,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:sE.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(SI,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:sE.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(II,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:sE.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<=DI)return{items:t,wasFiltered:!1};const i=qE(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>qE(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends Cu{constructor(){super(...arguments),this.name="get_user_context",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - 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(PI,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(t||[]),relevantBoards:this.extractRelevantBoards(a),relevantPeople:this.extractRelevantPeople(a)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[VI[e]]=t[e];const n=await this.mondayApi.request(jI,i),o=[];for(const e of a){const t=UI[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}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 Cu{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=exports.ToolType.WRITE,this.annotations=$u({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 FI}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(CI,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends Cu{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=exports.ToolType.READ,this.annotations=$u({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 MI}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(BI,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};const o={meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}};return{content:JSON.stringify(o,null,2)}}},class extends Cu{constructor(){super(...arguments),this.name="create_view",this.type=exports.ToolType.WRITE,this.annotations=$u({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 q_}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort},a=await this.mondayApi.request(M_,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"}}}],_S=[...wS,...yS,...Ru];exports.allGraphqlApiTools=wS,exports.allMondayAppsTools=Ru,exports.allMondayDevTools=yS,exports.allTools=_S;
1810
+ `),i=await this.mondayApi.request(a);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const t=vE(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const t=vE(e.type);n+=` - ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const t=vE(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends Cu{constructor(){super(...arguments),this.name="create_custom_activity",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return fT}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(O_,t),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_notification",this.type=exports.ToolType.WRITE,this.annotations=$u({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 vT}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(hT,t);return{content:`Notification successfully sent to user ${e.user_id}: "${e.text}"`}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Cu{constructor(){super(...arguments),this.name="create_timeline_item",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return kT}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(k_,t);return{content:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Cu{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=exports.ToolType.READ,this.annotations=$u({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return zT}async executeInternal(e){const t=await this.mondayApi.request(R_);if(!t.custom_activity||0===t.custom_activity.length)return{content:"No custom activities found"};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${a.length} custom activities: ${JSON.stringify(a,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="read_docs",this.type=exports.ToolType.READ,this.annotations=$u({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get a collection of monday.com documents with their content as markdown. \n\nPAGINATION: \n- Default limit is 25 documents per page\n- Use 'page' parameter to get additional pages (starts at 1)\n- Check response for 'has_more_pages' to know if you should continue paginating\n- If user asks for \"all documents\" and you get exactly 25 results, continue with page 2, 3, etc.\n\nFILTERING: Provide a type value and array of ids:\n- type: 'ids' for specific document IDs\n- type: 'object_ids' for specific document object IDs \n- type: 'workspace_ids' for all docs in specific workspaces\n- ids: array of ID strings (at least 1 required)\n\nExamples:\n- { type: 'ids', ids: ['123', '456'] }\n- { type: 'object_ids', ids: ['123'] }\n- { type: 'workspace_ids', ids: ['ws_101'] }\n\nUSAGE PATTERNS:\n- For specific documents: use type 'ids' or 'object_ids' (A monday doc has two unique identifiers)\n- For workspace exploration: use type 'workspace_ids' with pagination\n- For large searches: start with page 1, then paginate if has_more_pages=true"}getInputSchema(){return UE}async executeInternal(e){try{let t,a,i;switch(e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request($_,n);if((!o.docs||0===o.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request($_,a)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,t,a){return e===t?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${t} documents, which suggests there may be more. Consider calling this tool again with page: ${a+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,t){const a=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t="";try{const a={docId:e.id},i=await this.mondayApi.request(C_,a);t=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){t=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:t}}))),i=t.page||1,n=t.limit||25,o=a.length,r=o===n;return{content:`Successfully retrieved ${a.length} document${1===a.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(a,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="workspace_info",this.type=exports.ToolType.READ,this.annotations=$u({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 BE}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(L_,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:t,boards:a,docs:i,folders:n}=e,o=t?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(a||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(r.values()),root_items:{boards:s,docs:p}}}(a);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,t)=>e+t.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,t)=>e+t.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Cu{constructor(){super(...arguments),this.name="list_workspaces",this.type=exports.ToolType.READ,this.annotations=$u({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return WE}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=zE(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=GE(await this.mondayApi.request(ME,n(Xy.Member))),r=!HE(o)||i&&!function(e,t){return t.some((t=>zE(t.name).includes(e)))}(i,o);let s=o;if(r){s=GE(await this.mondayApi.request(ME,n(Xy.All)))}if(!HE(s))return{content:"No workspaces found."};const p=i&&s?.length<=qE,d=function(e,t,a,i){if(!e||t.length<=qE)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>zE(t.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!HE(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const c=d.length===e.limit,l=function(e){return e.map((e=>{const t=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${t}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${l}\n${c?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends Cu{constructor(){super(...arguments),this.name="create_doc",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return eI}async executeInternal(e){const t=ZE.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,n;if(a.type===XE.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||nb.Public,folder_id:a.folder_id?.toString()}}},r=await this.mondayApi.request(KE,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===XE.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(YE,o),s=r.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const p=s.board?.id,d=s.board?.columns?.find((e=>e&&e.type===lT.Doc));let c=a.column_id;if(!c)if(d)c=d.id;else{const e={boardId:p.toString(),columnType:lT.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(S_,e);if(c=t?.create_column?.id,!c)return{content:"Error: Failed to create doc column."}}const l={location:{board:{item_id:a.item_id.toString(),column_id:c}}},m=await this.mondayApi.request(KE,l);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(JE,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const o={docId:t,markdown:e.markdown},r=await this.mondayApi.request(QE,o),s=r?.add_content_to_doc_from_markdown?.success,p=r?.add_content_to_doc_from_markdown?.error;return s?{content:`✅ Document successfully created (id: ${t}, object_id: ${i}). ${n?`\n\nURL: ${n}`:""}`}:{content:`Document ${t} created, but failed to add markdown content: ${p||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Cu{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=exports.ToolType.WRITE,this.annotations=$u({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 iI}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=e.doc_id;if(!t){const a=await this.mondayApi.request(aI,{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={docId:t,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(tI,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:`Successfully added content to document ${t}. ${s} block${1===s?"":"s"} created.${o&&o.length>0?` Block IDs: ${o.join(", ")}`:""}`}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Cu{constructor(){super(...arguments),this.name="update_workspace",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return cI}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(dI,t);return{content:`Workspace ${a.update_workspace?.id} successfully updated`}}},class extends Cu{constructor(){super(...arguments),this.name="update_folder",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return mI}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(lI,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Cu{constructor(){super(...arguments),this.name="create_workspace",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return fI}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(uI,t);return{content:`Workspace ${a.create_workspace?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="create_folder",this.type=exports.ToolType.WRITE,this.annotations=$u({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return vI}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(hI,t);return{content:`Folder ${a.create_folder?.id} successfully created`}}},class extends Cu{constructor(){super(...arguments),this.name="move_object",this.type=exports.ToolType.WRITE,this.annotations=$u({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 yI}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(lI,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(gI,p);return d.update_board_hierarchy?.success?{content:`Board ${d.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${d.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(bI,p);return d.update_overview_hierarchy?.success?{content:`Overview ${d.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${d.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case fy.Folder:return this.executeUpdateFolder(e);case fy.Board:return this.executeUpdateBoardHierarchy(e);case fy.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Cu{constructor(){super(...arguments),this.name="create_dashboard",this.type=exports.ToolType.WRITE,this.annotations=$u({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 sI}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(nI,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===xb.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Cu{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=exports.ToolType.READ,this.annotations=$u({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(oI,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(a,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Cu{constructor(){super(...arguments),this.name="create_widget",this.type=exports.ToolType.WRITE,this.annotations=$u({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 pI}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(rI,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget,n=i.parent?.kind===Qy.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Cu{constructor(){super(...arguments),this.name="board_insights",this.type=exports.ToolType.READ,this.annotations=$u({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 II}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===Mg.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Mg.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return TI.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Bg.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Mg.CountItems?[]:[{type:Bg.Column,column:EI(n),as:n}]}),as:s}}var i,n;const o={type:Bg.Column,column:EI(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:Bg.Column,column:EI(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:Ug.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit}},r=await this.mondayApi.request(wI,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Cu{constructor(){super(...arguments),this.name="search",this.type=exports.ToolType.READ,this.annotations=$u({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor users and teams, use list_users_and_teams tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return kI}async executeInternal(e){if(e.searchType!==dE.FOLDERS&&e.searchTerm)try{const t={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(t,null,2)}}catch(e){AT(e)}const t={[dE.BOARD]:this.searchBoardsAsync.bind(this),[dE.DOCUMENTS]:this.searchDocsAsync.bind(this),[dE.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e),i={disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:a.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const t={[dE.BOARD]:{entities:[{boards:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[dE.DOCUMENTS]:{entities:[{docs:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[dE.FOLDERS]:void 0}[e.searchType];if(!t)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const a={query:e.searchTerm,limit:e.limit,filters:t},i=(await this.mondayApi.request(DI,a,{versionOverride:"dev",timeout:ST})).search||[],n=[];for(const e of i)"BoardSearchResult"===e.__typename?n.push({id:pE.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"DocSearchResult"===e.__typename&&n.push({id:pE.DOCUMENT+e.data.id,title:e.data.name});return{items:n,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&&NT(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(AI,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:pE.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(NI,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:pE.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(SI,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:pE.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<=OI)return{items:t,wasFiltered:!1};const i=zE(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>zE(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends Cu{constructor(){super(...arguments),this.name="get_user_context",this.type=exports.ToolType.READ,this.annotations=$u({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - 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(jI,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(t||[]),relevantBoards:this.extractRelevantBoards(a),relevantPeople:this.extractRelevantPeople(a)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[UI[e]]=t[e];const n=await this.mondayApi.request(VI,i),o=[];for(const e of a){const t=BI[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}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 Cu{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=exports.ToolType.WRITE,this.annotations=$u({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 PI}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(LI,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends Cu{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=exports.ToolType.READ,this.annotations=$u({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 qI}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(MI,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};const o={meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}};return{content:JSON.stringify(o,null,2)}}},class extends Cu{constructor(){super(...arguments),this.name="create_view",this.type=exports.ToolType.WRITE,this.annotations=$u({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 q_}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort},a=await this.mondayApi.request(M_,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"}}}],xS=[..._S,...wS,...Ru];exports.allGraphqlApiTools=_S,exports.allMondayAppsTools=Ru,exports.allMondayDevTools=wS,exports.allTools=xS;
1811
1811
  //# sourceMappingURL=index.js.map