@mondaydotcomorg/agent-toolkit 2.30.0 → 2.31.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.
@@ -362,7 +362,7 @@
362
362
  name
363
363
  }
364
364
  }
365
- `,U_={query:h.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:h.z.string().describe("JSON string containing the variables for the GraphQL operation")};class B_ extends Yu{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=w.ALL_API,this.annotations=Wu({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return U_}async loadSchema(e){if(B_.schemaCache[e])return B_.schemaCache[e];try{const a=await this.mondayApi.rawRequest(C_),{data:t}=a,n=Xg(t);return B_.schemaCache[e]=n,n}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,a){var t;return Qg(await this.loadSchema(a),new Gf(e,t).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:a,variables:t}=e;try{let e={};try{e=JSON.parse(t)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const n=this.mondayApi.apiVersion,i=await this.validateOperation(a,n);if(i.length>0)return{content:i.join(", ")};const o=await this.mondayApi.request(a,e);return{content:JSON.stringify(o)}}catch(e){const a=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const a=e;if(a.response?.errors)return{content:a.response.errors.map((e=>e.message)).join(", ")}}return{content:a}}}}B_.schemaCache={};const M_={itemId:h.z.number().describe("The ID of the item to be updated"),columnValues:h.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"')},q_={boardId:h.z.number().describe("The ID of the board that contains the item to be updated"),...M_};class z_ extends Yu{constructor(){super(...arguments),this.name="change_item_column_values",this.type=w.WRITE,this.annotations=Wu({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board"}getInputSchema(){return this.context?.boardId?M_:q_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(N_,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}}const G_={boardName:h.z.string().describe("The name of the board to create"),boardKind:h.z.nativeEnum(gb).default(gb.Public).describe("The kind of board to create"),boardDescription:h.z.string().optional().describe("The description of the board to create"),workspaceId:h.z.string().optional().describe("The ID of the workspace to create the board in")};const H_=T_`
365
+ `,U_="2026-01",B_={query:h.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:h.z.string().describe("JSON string containing the variables for the GraphQL operation")};class M_ extends Yu{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=w.ALL_API,this.annotations=Wu({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return B_}async loadSchema(e){if(M_.schemaCache[e])return M_.schemaCache[e];try{const a=await this.mondayApi.rawRequest(C_),{data:t}=a,n=Xg(t);return M_.schemaCache[e]=n,n}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,a){var t;return Qg(await this.loadSchema(a),new Gf(e,t).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:a,variables:t}=e;try{let e={};try{e=JSON.parse(t)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const n=await this.validateOperation(a,this.context?.apiVersion??U_);if(n.length>0)return{content:n.join(", ")};const i=await this.mondayApi.request(a,e);return{content:JSON.stringify(i)}}catch(e){const a=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const a=e;if(a.response?.errors)return{content:a.response.errors.map((e=>e.message)).join(", ")}}return{content:a}}}}M_.schemaCache={};const q_={itemId:h.z.number().describe("The ID of the item to be updated"),columnValues:h.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"')},z_={boardId:h.z.number().describe("The ID of the board that contains the item to be updated"),...q_};class G_ extends Yu{constructor(){super(...arguments),this.name="change_item_column_values",this.type=w.WRITE,this.annotations=Wu({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board"}getInputSchema(){return this.context?.boardId?q_:z_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(N_,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}}const H_={boardName:h.z.string().describe("The name of the board to create"),boardKind:h.z.nativeEnum(gb).default(gb.Public).describe("The kind of board to create"),boardDescription:h.z.string().optional().describe("The description of the board to create"),workspaceId:h.z.string().optional().describe("The ID of the workspace to create the board in")};const W_=T_`
366
366
  fragment QuestionBasic on FormQuestion {
367
367
  id
368
368
  type
@@ -371,13 +371,13 @@
371
371
  visible
372
372
  required
373
373
  }
374
- `,W_=T_`
374
+ `,Y_=T_`
375
375
  fragment QuestionOptions on FormQuestion {
376
376
  options {
377
377
  label
378
378
  }
379
379
  }
380
- `,Y_=T_`
380
+ `,K_=T_`
381
381
  fragment QuestionSettings on FormQuestion {
382
382
  settings {
383
383
  prefill {
@@ -400,17 +400,17 @@
400
400
  skipValidation
401
401
  }
402
402
  }
403
- `,K_=T_`
403
+ `,J_=T_`
404
404
  fragment QuestionComplete on FormQuestion {
405
405
  ...QuestionBasic
406
406
  ...QuestionOptions
407
407
  ...QuestionSettings
408
408
  showIfRules
409
409
  }
410
- ${H_}
411
410
  ${W_}
412
411
  ${Y_}
413
- `,J_=T_`
412
+ ${K_}
413
+ `,Q_=T_`
414
414
  fragment FormFeatures on FormFeatures {
415
415
  isInternal
416
416
  reCaptchaChallenge
@@ -463,7 +463,7 @@
463
463
  syncQuestionAndColumnsTitles
464
464
  }
465
465
  }
466
- `,Q_=T_`
466
+ `,X_=T_`
467
467
  fragment FormAppearance on FormAppearance {
468
468
  hideBranding
469
469
  showProgressBar
@@ -491,19 +491,19 @@
491
491
  text
492
492
  }
493
493
  }
494
- `,X_=T_`
494
+ `,Z_=T_`
495
495
  fragment FormAccessibility on FormAccessibility {
496
496
  language
497
497
  logoAltText
498
498
  }
499
- `,Z_=T_`
499
+ `,ex=T_`
500
500
  fragment FormTag on FormTag {
501
501
  id
502
502
  name
503
503
  value
504
504
  columnId
505
505
  }
506
- `,ex=T_`
506
+ `,ax=T_`
507
507
  mutation createForm(
508
508
  $destination_workspace_id: ID!
509
509
  $destination_folder_id: ID
@@ -530,7 +530,7 @@
530
530
  token
531
531
  }
532
532
  }
533
- `,ax=T_`
533
+ `,tx=T_`
534
534
  query getForm($formToken: String!) {
535
535
  form(formToken: $formToken) {
536
536
  id
@@ -559,16 +559,16 @@
559
559
  }
560
560
  }
561
561
  }
562
- ${K_}
563
562
  ${J_}
564
563
  ${Q_}
565
564
  ${X_}
566
565
  ${Z_}
567
- `,tx=T_`
566
+ ${ex}
567
+ `,nx=T_`
568
568
  mutation deleteFormQuestion($formToken: String!, $questionId: String!) {
569
569
  delete_question(formToken: $formToken, questionId: $questionId)
570
570
  }
571
- `,nx=T_`
571
+ `,ix=T_`
572
572
  mutation createFormQuestion($formToken: String!, $question: CreateQuestionInput!) {
573
573
  create_form_question(formToken: $formToken, question: $question) {
574
574
  ...QuestionBasic
@@ -576,10 +576,10 @@
576
576
  ...QuestionSettings
577
577
  }
578
578
  }
579
- ${H_}
580
579
  ${W_}
581
580
  ${Y_}
582
- `,ix=T_`
581
+ ${K_}
582
+ `,ox=T_`
583
583
  mutation updateFormQuestion($formToken: String!, $questionId: String!, $question: UpdateQuestionInput!) {
584
584
  update_form_question(formToken: $formToken, questionId: $questionId, question: $question) {
585
585
  ...QuestionBasic
@@ -587,9 +587,9 @@
587
587
  ...QuestionSettings
588
588
  }
589
589
  }
590
- ${H_}
591
590
  ${W_}
592
591
  ${Y_}
592
+ ${K_}
593
593
  `;T_`
594
594
  mutation updateForm($formToken: String!, $input: UpdateFormInput!) {
595
595
  update_form(formToken: $formToken, input: $input) {
@@ -614,46 +614,46 @@
614
614
  }
615
615
  }
616
616
  }
617
- ${J_}
618
617
  ${Q_}
619
618
  ${X_}
620
- `;const ox=T_`
619
+ ${Z_}
620
+ `;const sx=T_`
621
621
  mutation setFormPassword($formToken: String!, $input: SetFormPasswordInput!) {
622
622
  set_form_password(formToken: $formToken, input: $input) {
623
623
  id
624
624
  }
625
625
  }
626
- `,sx=T_`
626
+ `,rx=T_`
627
627
  mutation shortenFormUrl($formToken: String!) {
628
628
  shorten_form_url(formToken: $formToken) {
629
629
  enabled
630
630
  url
631
631
  }
632
632
  }
633
- `,rx=T_`
633
+ `,px=T_`
634
634
  mutation deactivateForm($formToken: String!) {
635
635
  deactivate_form(formToken: $formToken)
636
636
  }
637
- `,px=T_`
637
+ `,dx=T_`
638
638
  mutation activateForm($formToken: String!) {
639
639
  activate_form(formToken: $formToken)
640
640
  }
641
- `,dx=T_`
641
+ `,cx=T_`
642
642
  mutation deleteFormTag($formToken: String!, $tagId: String!) {
643
643
  delete_form_tag(formToken: $formToken, tagId: $tagId)
644
644
  }
645
- `,cx=T_`
645
+ `,lx=T_`
646
646
  mutation createFormTag($formToken: String!, $tag: CreateFormTagInput!) {
647
647
  create_form_tag(formToken: $formToken, tag: $tag) {
648
648
  ...FormTag
649
649
  }
650
650
  }
651
- ${Z_}
652
- `,lx=T_`
651
+ ${ex}
652
+ `,mx=T_`
653
653
  mutation updateFormTag($formToken: String!, $tagId: String!, $tag: UpdateFormTagInput!) {
654
654
  update_form_tag(formToken: $formToken, tagId: $tagId, tag: $tag)
655
655
  }
656
- `,mx=T_`
656
+ `,ux=T_`
657
657
  mutation updateFormAppearance($formToken: String!, $appearance: FormAppearanceInput!) {
658
658
  update_form_settings(formToken: $formToken, settings: { appearance: $appearance }) {
659
659
  appearance {
@@ -661,8 +661,8 @@
661
661
  }
662
662
  }
663
663
  }
664
- ${Q_}
665
- `,ux=T_`
664
+ ${X_}
665
+ `,fx=T_`
666
666
  mutation updateFormAccessibility($formToken: String!, $accessibility: FormAccessibilityInput!) {
667
667
  update_form_settings(formToken: $formToken, settings: { accessibility: $accessibility }) {
668
668
  accessibility {
@@ -670,8 +670,8 @@
670
670
  }
671
671
  }
672
672
  }
673
- ${X_}
674
- `,fx=T_`
673
+ ${Z_}
674
+ `,hx=T_`
675
675
  mutation updateFormFeatures($formToken: String!, $features: FormFeaturesInput!) {
676
676
  update_form_settings(formToken: $formToken, settings: { features: $features }) {
677
677
  features {
@@ -679,8 +679,8 @@
679
679
  }
680
680
  }
681
681
  }
682
- ${J_}
683
- `,hx=T_`
682
+ ${Q_}
683
+ `,vx=T_`
684
684
  mutation updateFormQuestionOrder($formToken: String!, $questions: [QuestionOrderInput!]!) {
685
685
  update_form(formToken: $formToken, input: { questions: $questions }) {
686
686
  questions {
@@ -688,14 +688,14 @@
688
688
  }
689
689
  }
690
690
  }
691
- `,vx=T_`
691
+ `,gx=T_`
692
692
  mutation updateFormHeader($formToken: String!, $title: String, $description: String) {
693
693
  update_form(formToken: $formToken, input: { title: $title, description: $description }) {
694
694
  title
695
695
  description
696
696
  }
697
697
  }
698
- `,gx={formToken:"The unique identifier token for the form. Required for all form-specific operations.",questionId:"The unique identifier for the question. Used to target specific questions within a form."},bx={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"The type of update action to perform on the form. Can be one of the following: activate, deactivate, shortenFormUrl, setFormPassword, createTag, deleteTag, updateTag, updateForm, updateAppearance, updateAccessibility, updateFeatures, updateQuestionOrder, updateFormHeader."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Boolean indicating if responses are collected without identifying the submitter.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"The unique identifier for the tag. This will get auto generated when creating a tag and can’t be updated. This is required when updating or deleting a tag.",name:"The name of the tag. This can only be created, not updated. This is required when creating a tag.",value:"The value of the tag. This value is required when creating or updating a tag.",columnId:"The ID of the column this tag is associated with. This will get auto generated when creating a tag and can’t be updated."}},inputs:{title:"The title text for the form. Must be at least 1 character long. Can only be updated if the update action is updateFormHeader.",description:"Optional description text providing context about the form purpose. Can only be updated if the update action is updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"Ordered array of dehydrated questions, object only including each question ID, for reordering. Must include all existing question IDs. Required if the update action is updateQuestionOrder.",questionId:"The unique identifier for the question. Used to target specific questions within a form. Required when deleting or updating a question.",tag:"The tag data to create, update or delete. If deleting a tag, only provide the id of the tag to delete. If creating a tag, provide the name and value, the id and columnId are auto generated. If updating a tag, provide the id and new value, name and columnId are not changeable.",form:{describe:"The form data to update. Required if updating the appearance, accessibility, features, question order, or form header.",appearance:"The appearance data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateAppearance.",accessibility:"The accessibility data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateAccessibility.",features:"The features data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateFeatures.",questionOrder:"The question order data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateQuestionOrder.",formHeader:"The form header data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateFormHeader."}},args:{formToken:"The unique form token identifying which form to operate on.",destinationWorkspaceId:"The workspace in which the form will be created in.",destinationFolderId:"The folder in which the form will be created under.",destinationFolderName:"The name of the folder in which the form will be created in.",boardKind:"The board kind to create for the board in which the form will create items in.",destinationName:"The name of the board that will be created to store the form responses in.",boardOwnerIds:"Array of user IDs who will have owner permissions on the board in which the form will create items in.",boardOwnerTeamIds:"Array of team IDs whose members will have owner permissions on the board in which the form will create items in.",boardSubscriberIds:"Array of user IDs who will receive notifications about board activity for the board in which the form will create items in.",boardSubscriberTeamsIds:"Array of team IDs whose members will receive notifications about board activity for the board in which the form will create items in."}},yx={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:'Set a password on a form to restrict access. This will enable password protection for the form. Required for the action "setFormPassword" in the update form tool.',shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{features:"Object containing form features including but not limited to password protection, response limits, login requirements, etc. Required when updating the features of the form.",appearance:"Object containing visual styling including colors, layout, fonts, and branding elements. Required when updating the appearance of the form.",accessibility:"Object containing accessibility options such as language, alt text, etc. Required when updating the accessibility of the form.",isInternal:"Boolean indicating if the form is restricted to internal users only.",reCaptchaChallenge:"Boolean enabling reCAPTCHA verification to prevent spam submissions.",password:"Object containing password protection configuration for the form.",passwordEnabled:"Boolean disabling password protection. Can only be updated to false. In order to enable password protection use the setFormPassword action instead.",requireLogin:"Object containing login requirement settings for form access.",requireLoginEnabled:"Boolean requiring users to be logged in before submitting responses.",redirectToLogin:"Boolean automatically redirecting unauthenticated users to the login page.",shortenedLink:"Object containing shortened URL configuration for easy form sharing.",shortenedLinkEnabled:"Boolean enabling generation of shortened URLs for the form.",shortenedLinkUrl:"The generated shortened URL for form access. Only available when shortened links are enabled.",draftSubmission:"Object containing draft saving configuration allowing users to save progress.",draftSubmissionEnabled:"Boolean allowing users to save incomplete responses as drafts.",aiTranslate:"Object containing AI translation configuration for the form.",aiTranslateEnabled:"Boolean enabling AI translation for the form.",responseLimit:"Object containing response limitation settings to control submission volume.",responseLimitEnabled:"Boolean enabling response count limits for the form.",responseLimitValue:"Integer specifying the maximum number of responses allowed.",closeDate:"Object containing automatic form closure configuration.",closeDateEnabled:"Boolean enabling automatic form closure at a specified date and time.",closeDateValue:"ISO timestamp when the form will automatically stop accepting responses.",allowResubmit:"Boolean allowing users to submit multiple responses to the same form.",allowEditSubmission:"Boolean allowing users to modify their submitted responses after submission.",allowViewSubmission:"Boolean allowing users to view their submitted responses.",preSubmissionView:"Object containing welcome screen configuration displayed before the form.",preSubmissionEnabled:"Boolean showing a welcome/introduction screen before the form begins.",preSubmissionTitle:"Text displayed as the title on the welcome screen.",preSubmissionDescription:"Text providing context or instructions on the welcome screen.",startButton:"Object containing start button configuration for the welcome screen.",startButtonText:"Custom text for the button that begins the form experience.",afterSubmissionView:"Object containing settings for the post-submission user experience.",postSubmissionTitle:"Text displayed as the title after successful form submission.",postSubmissionDescription:"Text shown to users after they complete the form.",showSuccessImage:"Boolean displaying a success image after form completion.",redirectAfterSubmission:"Object containing redirect configuration after form submission.",redirectAfterSubmissionEnabled:"Boolean enabling automatic redirect after form completion to a specified URL.",redirectUrl:"The URL where users will be redirected after successfully submitting the form.",monday:"Object containing board settings for response handling.",itemGroupId:"The board group ID where new items from form responses will be created.",includeNameQuestion:"Boolean adding a name question to the form. This is a special question type that represents the name column from the associated monday board",includeUpdateQuestion:"Boolean adding an update/comment field to the form. This is a special question type that represents the updates from the associated item of the submission on the monday board. ",syncQuestionAndColumnsTitles:"Boolean synchronizing form question titles with board column names. When true, the form question titles will be synchronized with the board column names.",hideBranding:"Boolean hiding monday branding from the form display.",showProgressBar:"Boolean displaying a progress indicator showing form completion progress bar.",primaryColor:"Hex color code for the primary theme color used throughout the form.",layout:"Object containing form structure and presentation settings.",format:"String specifying the form display format. Can be a step by step form or a classic one page form.",alignment:"String controlling text and content alignment.",direction:"String setting reading direction.",background:"Object containing background appearance configuration for the form.",backgroundType:"String specifying background style.",backgroundValue:"String containing the background value. The value will depend on the background type. If the background type is color, the value will be a hex color code. If the background type is image, the value will be an image URL.",text:"Object containing typography and text styling configuration.",font:"String specifying the font family used throughout the form.",textColor:"Hex color code for the text color in the form.",fontSize:"String or number specifying the base font size for form text.",logo:"Object containing logo display configuration for form branding.",logoPosition:'String specifying logo placement ("top", "bottom", "header").',logoUrl:"URL pointing to the logo image file for display on the form.",logoSize:'String specifying logo size ("small", "medium", "large") for the logo that appears on the header of the form.',logoAltText:"Alternative text description for the logo image for accessibility.",submitButton:"Object containing submit button styling and text configuration.",submitButtonText:"Custom text displayed on the form submission button.",language:'Language code for form localization and interface text (e.g., "en", "es", "fr").'},inputs:{settings:"Complete form settings object containing all configuration options.",features:"Form features configuration including security, limits, and access controls.",appearance:"Visual styling configuration including colors, layout, and branding.",accessibility:"Accessibility configuration including language and reading direction.",password:"Password configuration for the form. Only setting enabled to false is supported. To enable a form to be password protected, please use the set_form_password mutation instead.",passwordValue:"The password to set for the form. Must be at least 1 character long."}},wx={actions:{type:"The type of operation to perform on the question. Can delete, update, or create. When updating or deleting a question, the questionId is required. When creating or updating a question, the question object is required. When updating, the question is a patch object, meaning that only the fields that are provided will be updated.",question:"The question object containing all properties for creation or update. When creating a question, the title is required."},properties:{title:"The question text displayed to respondents. Must be at least 1 character long and clearly indicate the expected response.",type:'The question type determining input behavior and validation (e.g., "text", "email", "single_select", "multi_select").',visible:"Boolean controlling question visibility to respondents. Hidden questions remain in form structure but are not displayed.",required:"Boolean indicating if the question must be answered before form submission.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Optional explanatory text providing additional context, instructions, or examples for the question.",placeholder:"Optional placeholder text shown in input fields to guide user input.",createdAt:"ISO timestamp when the question was created.",updatedAt:"ISO timestamp when the question was last modified.",selectOptions:"Array of option objects for choice-based questions (single_select, multi_select). Required when creating select type questions. Can only be provided when creating a question, not yet supported for updating a question.",selectOptionsLabel:"The display text for individual option choices in select-type questions."},inputs:{question:"Complete question object containing all properties for creation or update.",questionData:"Question configuration including type, title, and type-specific settings.",position:"Integer position where the question should be placed in the form sequence."}},_x={properties:{validation:"Validation rules applied to the question response",prefill:"Configuration for automatically populating question values from various data sources such as user account information or URL query parameters.",prefillEnabled:"Whether prefill functionality is enabled for this question. When true, the question will attempt to auto-populate values from the specified source.",prefillSource:"The data source to use for prefilling the question value. Check the PrefillSources for available options.",prefillLookup:'The specific field or parameter name to lookup from the prefill source. For account sources, this would be a user property like "name" or "email". For query parameters, this would be the parameter name that would be set in the URL.',prefixAutofilled:"Phone questions only: Automatically detect and fill the phone country prefix based on the user's geographic location or browser settings.",prefixPredefined:"Phone questions only: Configuration for setting a specific predefined phone country prefix that will be pre-selected for users.",prefixPredefinedEnabled:"Whether a predefined phone prefix is enabled for phone number questions. When true, the specified prefix will be pre-selected.",prefixPredefinedPrefix:'The predefined phone country prefix to use as country code in capital letters (e.g., "US", "UK", "IL"). Only used when enabled is true.',checkedByDefault:"Boolean/checkbox questions only: Whether the checkbox should be checked by default when the form loads.",defaultCurrentDate:"Date based questions only: Automatically set the current date as the default value when the form loads.",includeTime:"Date questions only: Whether to include time selection (hours and minutes) in addition to the date picker. When false, only date selection is available.",display:"Single/Multi Select questions only: Controls how the selection options are visually presented to users.",optionsOrder:"Single/Multi Select questions only: Determines the ordering of selection options.",locationAutofilled:"Location questions only: Automatically detect and fill the user's current location using browser geolocation services, requiring user permission.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link/URL questions only: Whether to skip URL format validation, allowing any text input."},inputs:{settings:"Question-specific configuration object that varies by question type.",validationRules:"Validation constraints and rules",choiceOptions:"List of available choices for selection questions",fileSettings:"File upload constraints and settings"}},xx={destination_workspace_id:h.z.string().describe(bx.args.destinationWorkspaceId),destination_folder_id:h.z.string().optional().describe(bx.args.destinationFolderId),destination_folder_name:h.z.string().optional().describe(bx.args.destinationFolderName),board_kind:h.z.nativeEnum(gb).optional().describe(bx.args.boardKind),destination_name:h.z.string().optional().describe(bx.args.destinationName),board_owner_ids:h.z.array(h.z.string()).optional().describe(bx.args.boardOwnerIds),board_owner_team_ids:h.z.array(h.z.string()).optional().describe(bx.args.boardOwnerTeamIds),board_subscriber_ids:h.z.array(h.z.string()).optional().describe(bx.args.boardSubscriberIds),board_subscriber_teams_ids:h.z.array(h.z.string()).optional().describe(bx.args.boardSubscriberTeamsIds)};var Tx,Ex,Ix,Sx,Nx,Ax,Dx,Ox,kx,Rx,Cx,$x,Lx,Fx,Px,jx;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(Tx||(Tx={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(Ex||(Ex={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(Ix||(Ix={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Sx||(Sx={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Nx||(Nx={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Ax||(Ax={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Dx||(Dx={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Ox||(Ox={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(kx||(kx={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Rx||(Rx={})),function(e){e.Email="email",e.Name="name",e.Title="title",e.Phone="phone",e.FirstName="first_name",e.LastName="last_name",e.Location="location",e.Timezone="time_zone",e.ManagerName="manager_display_name"}(Cx||(Cx={})),function(e){e.And="AND",e.Or="OR"}($x||($x={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Lx||(Lx={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Fx||(Fx={})),function(e){e.MultiSelect="multi-select",e.SingleSelect="single-select",e.People="people",e.Location="location",e.CountryCode="country-code",e.Country="country",e.ConnectedBoards="connected_boards"}(Px||(Px={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(jx||(jx={}));const Vx=h.z.object({type:h.z.nativeEnum(py).describe(wx.properties.type),title:h.z.string().describe(wx.properties.title).optional(),description:h.z.string().describe(wx.properties.description).optional(),visible:h.z.boolean().describe(wx.properties.visible).optional(),required:h.z.boolean().describe(wx.properties.required).optional(),options:h.z.array(h.z.object({label:h.z.string().describe(wx.properties.selectOptionsLabel)})).describe(wx.properties.selectOptions).optional(),settings:h.z.object({checkedByDefault:h.z.boolean().describe(_x.properties.checkedByDefault).optional(),defaultCurrentDate:h.z.boolean().describe(_x.properties.defaultCurrentDate).optional(),display:h.z.nativeEnum(sy).describe(_x.properties.display).optional(),includeTime:h.z.boolean().describe(_x.properties.includeTime).optional(),locationAutofilled:h.z.boolean().describe(_x.properties.locationAutofilled).optional(),optionsOrder:h.z.nativeEnum(ry).describe(_x.properties.optionsOrder).optional(),prefixAutofilled:h.z.boolean().describe(_x.properties.prefixAutofilled).optional(),prefixPredefined:h.z.object({enabled:h.z.boolean().describe(_x.properties.prefixPredefinedEnabled),prefix:h.z.string().describe(_x.properties.prefixPredefinedPrefix).optional()}).describe(_x.properties.prefixPredefined).optional(),skipValidation:h.z.boolean().describe(_x.properties.skipValidation).optional(),prefill:h.z.object({enabled:h.z.boolean().describe(_x.properties.prefillEnabled),lookup:h.z.string().describe(_x.properties.prefillLookup).optional(),source:h.z.nativeEnum(oy).describe(_x.properties.prefillSource).optional()}).describe(_x.properties.prefill).optional()}).optional()}),Ux={action:h.z.nativeEnum(jx).describe(wx.actions.type),formToken:h.z.string().describe(gx.formToken),questionId:h.z.string().describe(gx.questionId).optional(),question:Vx.describe(wx.actions.question).optional(),questionStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The question object. Send this as a stringified JSON of "question" field. Read "question" field description for details how to use it.')};class Bx{constructor(e){this.mondayApi=e}async deleteQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when deleting a question."};const t={formToken:e.formToken,questionId:a};return await this.mondayApi.request(tx,t),{content:`Form question with id ${a} deleted successfully.`}}async updateQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when updating a question."};const t=e.question;if(!t)return{content:"Must provide updated patch props for the question when updating."};const n={formToken:e.formToken,questionId:a,question:t};return await this.mondayApi.request(ix,n),{content:`Form question with id ${a} updated successfully.`}}async createQuestion(e){const a=e.question;if(!a)return{content:"Must provide a full question payload when creating a question."};if(!a.title)return{content:"Must provide a title for the question when creating a question."};const t={formToken:e.formToken,question:{...a,title:a.title}},n=await this.mondayApi.request(nx,t);return{content:`Form question created successfully. ID: ${n.create_form_question?.id}`}}}const Mx=(e,a,t)=>{const n=`${String(a)}Stringified`;if(e[a]||!e[n])return;let i;try{i=JSON.parse(e[n])}catch{throw new Error(`${String(n)} is not a valid JSON`)}const o="object"==typeof i&&!!i&&a in i&&1===Object.keys(i).length?i[a]:i,s=t.safeParse(o);if(!s.success)throw new Error(`JSON string defined as ${String(n)} does not match the specified schema`);e[a]=s.data};var qx;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateTag="updateTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(qx||(qx={}));const zx=h.z.object({id:h.z.string().describe(bx.properties.tags.id).optional(),name:h.z.string().describe(bx.properties.tags.name).optional(),value:h.z.string().describe(bx.properties.tags.value).optional(),columnId:h.z.string().describe(bx.properties.tags.columnId).optional()}),Gx=h.z.object({type:h.z.nativeEnum(Sx).describe(yx.properties.backgroundType).optional(),value:h.z.string().describe(yx.properties.backgroundValue).optional()}),Hx=h.z.object({format:h.z.nativeEnum(Ax).describe(yx.properties.format).optional(),alignment:h.z.nativeEnum(Dx).describe(yx.properties.alignment).optional(),direction:h.z.nativeEnum(Nx).describe(yx.properties.direction).optional()}),Wx=h.z.object({position:h.z.nativeEnum(Ix).describe(yx.properties.logoPosition).optional(),size:h.z.nativeEnum(Ex).describe(yx.properties.logoSize).optional()}),Yx=h.z.object({text:h.z.string().describe(yx.properties.submitButtonText).optional()}),Kx=h.z.object({font:h.z.string().describe(yx.properties.font).optional(),color:h.z.string().describe(yx.properties.textColor).optional(),size:h.z.nativeEnum(Ox).describe(yx.properties.fontSize).optional()}),Jx=h.z.object({enabled:h.z.boolean().describe(yx.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:h.z.string().describe(yx.properties.redirectUrl).optional()}),Qx=h.z.object({allowEditSubmission:h.z.boolean().describe(yx.properties.allowEditSubmission).optional(),allowResubmit:h.z.boolean().describe(yx.properties.allowResubmit).optional(),allowViewSubmission:h.z.boolean().describe(yx.properties.allowViewSubmission).optional(),description:h.z.string().describe(yx.properties.postSubmissionDescription).optional(),redirectAfterSubmission:Jx.describe(yx.properties.redirectAfterSubmission).optional(),showSuccessImage:h.z.boolean().describe(yx.properties.showSuccessImage).optional(),title:h.z.string().describe(yx.properties.postSubmissionTitle).optional()}),Xx=h.z.object({enabled:h.z.boolean().describe(yx.properties.closeDateEnabled).optional(),date:h.z.string().describe(yx.properties.closeDateValue).optional()}),Zx=h.z.object({enabled:h.z.boolean().describe(yx.properties.draftSubmissionEnabled).optional()}),eT=h.z.object({itemGroupId:h.z.string().describe(yx.properties.itemGroupId).optional(),includeNameQuestion:h.z.boolean().describe(yx.properties.includeNameQuestion).optional(),includeUpdateQuestion:h.z.boolean().describe(yx.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:h.z.boolean().describe(yx.properties.syncQuestionAndColumnsTitles).optional()}),aT=h.z.object({enabled:h.z.boolean().describe(yx.properties.passwordEnabled).optional()}),tT=h.z.object({text:h.z.string().describe(yx.properties.startButtonText).optional()}),nT=h.z.object({enabled:h.z.boolean().describe(yx.properties.preSubmissionEnabled).optional(),title:h.z.string().describe(yx.properties.preSubmissionTitle).optional(),description:h.z.string().describe(yx.properties.preSubmissionDescription).optional(),startButton:tT.describe(yx.properties.startButton).optional()}),iT=h.z.object({enabled:h.z.boolean().describe(yx.properties.requireLoginEnabled).optional(),redirectToLogin:h.z.boolean().describe(yx.properties.redirectToLogin).optional()}),oT=h.z.object({enabled:h.z.boolean().describe(yx.properties.responseLimitEnabled).optional(),limit:h.z.number().describe(yx.properties.responseLimitValue).optional()}),sT=h.z.object({background:Gx.describe(yx.properties.background).optional(),hideBranding:h.z.boolean().describe(yx.properties.hideBranding).optional(),layout:Hx.describe(yx.properties.layout).optional(),logo:Wx.describe(yx.properties.logo).optional(),primaryColor:h.z.string().describe(yx.properties.primaryColor).optional(),showProgressBar:h.z.boolean().describe(yx.properties.showProgressBar).optional(),submitButton:Yx.describe(yx.properties.submitButton).optional(),text:Kx.describe(yx.properties.text).optional()}),rT=h.z.object({language:h.z.string().describe(yx.properties.language).optional(),logoAltText:h.z.string().describe(yx.properties.logoAltText).optional()}),pT=h.z.object({afterSubmissionView:Qx.describe(yx.properties.afterSubmissionView).optional(),closeDate:Xx.describe(yx.properties.closeDate).optional(),draftSubmission:Zx.describe(yx.properties.draftSubmission).optional(),monday:eT.describe(yx.properties.monday).optional(),password:aT.describe(yx.properties.password).optional(),preSubmissionView:nT.describe(yx.properties.preSubmissionView).optional(),reCaptchaChallenge:h.z.boolean().describe(yx.properties.reCaptchaChallenge).optional(),requireLogin:iT.describe(yx.properties.requireLogin).optional(),responseLimit:oT.describe(yx.properties.responseLimit).optional()}),dT=h.z.object({id:h.z.string().describe(bx.inputs.questionId)}),cT=h.z.object({appearance:sT.describe(bx.inputs.form.appearance).optional(),accessibility:rT.describe(bx.inputs.form.accessibility).optional(),features:pT.describe(bx.inputs.form.features).optional(),title:h.z.string().describe(bx.inputs.title).optional(),description:h.z.string().describe(bx.inputs.description).optional(),questions:h.z.array(dT).describe(bx.inputs.questions).optional()}),lT={formToken:h.z.string().describe(gx.formToken),action:h.z.nativeEnum(qx).describe(bx.operations.updateForm.action),formPassword:h.z.string().describe(yx.operations.setFormPassword).optional(),tag:zx.describe(bx.inputs.tag).optional(),tagStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The tag data. Send this as a stringified JSON of "tag" field. Read "tag" field description for details how to use it.'),form:cT.describe(bx.inputs.form.describe).optional(),formStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The form data. Send this as a stringified JSON of "form" field. Read "form" field description for details how to use it.')};class mT{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const a={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(ox,a),{content:"Form password successfully set."}}async shortenFormUrl(e){const a={formToken:e.formToken};return await this.mondayApi.request(sx,a),{content:"Form URL successfully shortened."}}async deactivateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(rx,a),{content:"Form successfully deactivated."}}async activateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(px,a),{content:"Form successfully activated."}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const a={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},t=await this.mondayApi.request(cx,a);return{content:`Tag successfully added: ${JSON.stringify(t.create_form_tag,null,2)}`}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(dx,a),{content:`Tag with id: ${e.tag.id} successfully deleted.`}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(lx,a)).update_form_tag?{content:`Tag with id: ${e.tag.id} successfully updated to value: ${e.tag.value}.`}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const a={formToken:e.formToken,appearance:e.form.appearance},t=await this.mondayApi.request(mx,a);return{content:`Appearance successfully updated: ${JSON.stringify(t.update_form_settings?.appearance,null,2)}`}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const a={formToken:e.formToken,accessibility:e.form.accessibility},t=await this.mondayApi.request(ux,a);return{content:`Accessibility successfully updated: ${JSON.stringify(t.update_form_settings?.accessibility,null,2)}`}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const a={formToken:e.formToken,features:e.form.features},t=await this.mondayApi.request(fx,a);return{content:`Features successfully updated: ${JSON.stringify(t.update_form_settings?.features,null,2)}`}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const a={formToken:e.formToken,questions:e.form.questions},t=await this.mondayApi.request(hx,a);return{content:`Question order successfully updated: ${JSON.stringify(t.update_form?.questions,null,2)}`}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const a={formToken:e.formToken,title:e.form.title,description:e.form.description},t=await this.mondayApi.request(vx,a);return{content:`Form header content successfully updated: ${JSON.stringify(t.update_form,null,2)}`}}}const uT={formToken:h.z.string().describe(gx.formToken)};const fT=Object.fromEntries(Object.entries(kb).filter((([e])=>"Person"!==e))),hT={columnType:h.z.nativeEnum(fT).describe("The type of the column to be created"),columnTitle:h.z.string().describe("The title of the column to be created"),columnDescription:h.z.string().optional().describe("The description of the column to be created"),columnSettings:h.z.string().optional().describe("Column-specific configuration settings as a JSON string. Use the get_column_type_info tool to fetch the JSON schema for the given column type.")},vT={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...hT};const gT={color:h.z.nativeEnum(Rb).describe("The color of the custom activity"),icon_id:h.z.nativeEnum(Cb).describe("The icon ID of the custom activity"),name:h.z.string().describe("The name of the custom activity")};const bT=T_`
698
+ `,bx={formToken:"The unique identifier token for the form. Required for all form-specific operations.",questionId:"The unique identifier for the question. Used to target specific questions within a form."},yx={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"The type of update action to perform on the form. Can be one of the following: activate, deactivate, shortenFormUrl, setFormPassword, createTag, deleteTag, updateTag, updateForm, updateAppearance, updateAccessibility, updateFeatures, updateQuestionOrder, updateFormHeader."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Boolean indicating if responses are collected without identifying the submitter.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"The unique identifier for the tag. This will get auto generated when creating a tag and can’t be updated. This is required when updating or deleting a tag.",name:"The name of the tag. This can only be created, not updated. This is required when creating a tag.",value:"The value of the tag. This value is required when creating or updating a tag.",columnId:"The ID of the column this tag is associated with. This will get auto generated when creating a tag and can’t be updated."}},inputs:{title:"The title text for the form. Must be at least 1 character long. Can only be updated if the update action is updateFormHeader.",description:"Optional description text providing context about the form purpose. Can only be updated if the update action is updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"Ordered array of dehydrated questions, object only including each question ID, for reordering. Must include all existing question IDs. Required if the update action is updateQuestionOrder.",questionId:"The unique identifier for the question. Used to target specific questions within a form. Required when deleting or updating a question.",tag:"The tag data to create, update or delete. If deleting a tag, only provide the id of the tag to delete. If creating a tag, provide the name and value, the id and columnId are auto generated. If updating a tag, provide the id and new value, name and columnId are not changeable.",form:{describe:"The form data to update. Required if updating the appearance, accessibility, features, question order, or form header.",appearance:"The appearance data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateAppearance.",accessibility:"The accessibility data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateAccessibility.",features:"The features data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateFeatures.",questionOrder:"The question order data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateQuestionOrder.",formHeader:"The form header data to update. Acts as a patch object, meaning that only the fields that are provided will be updated. Required if the update action is updateFormHeader."}},args:{formToken:"The unique form token identifying which form to operate on.",destinationWorkspaceId:"The workspace in which the form will be created in.",destinationFolderId:"The folder in which the form will be created under.",destinationFolderName:"The name of the folder in which the form will be created in.",boardKind:"The board kind to create for the board in which the form will create items in.",destinationName:"The name of the board that will be created to store the form responses in.",boardOwnerIds:"Array of user IDs who will have owner permissions on the board in which the form will create items in.",boardOwnerTeamIds:"Array of team IDs whose members will have owner permissions on the board in which the form will create items in.",boardSubscriberIds:"Array of user IDs who will receive notifications about board activity for the board in which the form will create items in.",boardSubscriberTeamsIds:"Array of team IDs whose members will receive notifications about board activity for the board in which the form will create items in."}},wx={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:'Set a password on a form to restrict access. This will enable password protection for the form. Required for the action "setFormPassword" in the update form tool.',shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{features:"Object containing form features including but not limited to password protection, response limits, login requirements, etc. Required when updating the features of the form.",appearance:"Object containing visual styling including colors, layout, fonts, and branding elements. Required when updating the appearance of the form.",accessibility:"Object containing accessibility options such as language, alt text, etc. Required when updating the accessibility of the form.",isInternal:"Boolean indicating if the form is restricted to internal users only.",reCaptchaChallenge:"Boolean enabling reCAPTCHA verification to prevent spam submissions.",password:"Object containing password protection configuration for the form.",passwordEnabled:"Boolean disabling password protection. Can only be updated to false. In order to enable password protection use the setFormPassword action instead.",requireLogin:"Object containing login requirement settings for form access.",requireLoginEnabled:"Boolean requiring users to be logged in before submitting responses.",redirectToLogin:"Boolean automatically redirecting unauthenticated users to the login page.",shortenedLink:"Object containing shortened URL configuration for easy form sharing.",shortenedLinkEnabled:"Boolean enabling generation of shortened URLs for the form.",shortenedLinkUrl:"The generated shortened URL for form access. Only available when shortened links are enabled.",draftSubmission:"Object containing draft saving configuration allowing users to save progress.",draftSubmissionEnabled:"Boolean allowing users to save incomplete responses as drafts.",aiTranslate:"Object containing AI translation configuration for the form.",aiTranslateEnabled:"Boolean enabling AI translation for the form.",responseLimit:"Object containing response limitation settings to control submission volume.",responseLimitEnabled:"Boolean enabling response count limits for the form.",responseLimitValue:"Integer specifying the maximum number of responses allowed.",closeDate:"Object containing automatic form closure configuration.",closeDateEnabled:"Boolean enabling automatic form closure at a specified date and time.",closeDateValue:"ISO timestamp when the form will automatically stop accepting responses.",allowResubmit:"Boolean allowing users to submit multiple responses to the same form.",allowEditSubmission:"Boolean allowing users to modify their submitted responses after submission.",allowViewSubmission:"Boolean allowing users to view their submitted responses.",preSubmissionView:"Object containing welcome screen configuration displayed before the form.",preSubmissionEnabled:"Boolean showing a welcome/introduction screen before the form begins.",preSubmissionTitle:"Text displayed as the title on the welcome screen.",preSubmissionDescription:"Text providing context or instructions on the welcome screen.",startButton:"Object containing start button configuration for the welcome screen.",startButtonText:"Custom text for the button that begins the form experience.",afterSubmissionView:"Object containing settings for the post-submission user experience.",postSubmissionTitle:"Text displayed as the title after successful form submission.",postSubmissionDescription:"Text shown to users after they complete the form.",showSuccessImage:"Boolean displaying a success image after form completion.",redirectAfterSubmission:"Object containing redirect configuration after form submission.",redirectAfterSubmissionEnabled:"Boolean enabling automatic redirect after form completion to a specified URL.",redirectUrl:"The URL where users will be redirected after successfully submitting the form.",monday:"Object containing board settings for response handling.",itemGroupId:"The board group ID where new items from form responses will be created.",includeNameQuestion:"Boolean adding a name question to the form. This is a special question type that represents the name column from the associated monday board",includeUpdateQuestion:"Boolean adding an update/comment field to the form. This is a special question type that represents the updates from the associated item of the submission on the monday board. ",syncQuestionAndColumnsTitles:"Boolean synchronizing form question titles with board column names. When true, the form question titles will be synchronized with the board column names.",hideBranding:"Boolean hiding monday branding from the form display.",showProgressBar:"Boolean displaying a progress indicator showing form completion progress bar.",primaryColor:"Hex color code for the primary theme color used throughout the form.",layout:"Object containing form structure and presentation settings.",format:"String specifying the form display format. Can be a step by step form or a classic one page form.",alignment:"String controlling text and content alignment.",direction:"String setting reading direction.",background:"Object containing background appearance configuration for the form.",backgroundType:"String specifying background style.",backgroundValue:"String containing the background value. The value will depend on the background type. If the background type is color, the value will be a hex color code. If the background type is image, the value will be an image URL.",text:"Object containing typography and text styling configuration.",font:"String specifying the font family used throughout the form.",textColor:"Hex color code for the text color in the form.",fontSize:"String or number specifying the base font size for form text.",logo:"Object containing logo display configuration for form branding.",logoPosition:'String specifying logo placement ("top", "bottom", "header").',logoUrl:"URL pointing to the logo image file for display on the form.",logoSize:'String specifying logo size ("small", "medium", "large") for the logo that appears on the header of the form.',logoAltText:"Alternative text description for the logo image for accessibility.",submitButton:"Object containing submit button styling and text configuration.",submitButtonText:"Custom text displayed on the form submission button.",language:'Language code for form localization and interface text (e.g., "en", "es", "fr").'},inputs:{settings:"Complete form settings object containing all configuration options.",features:"Form features configuration including security, limits, and access controls.",appearance:"Visual styling configuration including colors, layout, and branding.",accessibility:"Accessibility configuration including language and reading direction.",password:"Password configuration for the form. Only setting enabled to false is supported. To enable a form to be password protected, please use the set_form_password mutation instead.",passwordValue:"The password to set for the form. Must be at least 1 character long."}},_x={actions:{type:"The type of operation to perform on the question. Can delete, update, or create. When updating or deleting a question, the questionId is required. When creating or updating a question, the question object is required. When updating, the question is a patch object, meaning that only the fields that are provided will be updated.",question:"The question object containing all properties for creation or update. When creating a question, the title is required."},properties:{title:"The question text displayed to respondents. Must be at least 1 character long and clearly indicate the expected response.",type:'The question type determining input behavior and validation (e.g., "text", "email", "single_select", "multi_select").',visible:"Boolean controlling question visibility to respondents. Hidden questions remain in form structure but are not displayed.",required:"Boolean indicating if the question must be answered before form submission.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Optional explanatory text providing additional context, instructions, or examples for the question.",placeholder:"Optional placeholder text shown in input fields to guide user input.",createdAt:"ISO timestamp when the question was created.",updatedAt:"ISO timestamp when the question was last modified.",selectOptions:"Array of option objects for choice-based questions (single_select, multi_select). Required when creating select type questions. Can only be provided when creating a question, not yet supported for updating a question.",selectOptionsLabel:"The display text for individual option choices in select-type questions."},inputs:{question:"Complete question object containing all properties for creation or update.",questionData:"Question configuration including type, title, and type-specific settings.",position:"Integer position where the question should be placed in the form sequence."}},xx={properties:{validation:"Validation rules applied to the question response",prefill:"Configuration for automatically populating question values from various data sources such as user account information or URL query parameters.",prefillEnabled:"Whether prefill functionality is enabled for this question. When true, the question will attempt to auto-populate values from the specified source.",prefillSource:"The data source to use for prefilling the question value. Check the PrefillSources for available options.",prefillLookup:'The specific field or parameter name to lookup from the prefill source. For account sources, this would be a user property like "name" or "email". For query parameters, this would be the parameter name that would be set in the URL.',prefixAutofilled:"Phone questions only: Automatically detect and fill the phone country prefix based on the user's geographic location or browser settings.",prefixPredefined:"Phone questions only: Configuration for setting a specific predefined phone country prefix that will be pre-selected for users.",prefixPredefinedEnabled:"Whether a predefined phone prefix is enabled for phone number questions. When true, the specified prefix will be pre-selected.",prefixPredefinedPrefix:'The predefined phone country prefix to use as country code in capital letters (e.g., "US", "UK", "IL"). Only used when enabled is true.',checkedByDefault:"Boolean/checkbox questions only: Whether the checkbox should be checked by default when the form loads.",defaultCurrentDate:"Date based questions only: Automatically set the current date as the default value when the form loads.",includeTime:"Date questions only: Whether to include time selection (hours and minutes) in addition to the date picker. When false, only date selection is available.",display:"Single/Multi Select questions only: Controls how the selection options are visually presented to users.",optionsOrder:"Single/Multi Select questions only: Determines the ordering of selection options.",locationAutofilled:"Location questions only: Automatically detect and fill the user's current location using browser geolocation services, requiring user permission.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link/URL questions only: Whether to skip URL format validation, allowing any text input."},inputs:{settings:"Question-specific configuration object that varies by question type.",validationRules:"Validation constraints and rules",choiceOptions:"List of available choices for selection questions",fileSettings:"File upload constraints and settings"}},Tx={destination_workspace_id:h.z.string().describe(yx.args.destinationWorkspaceId),destination_folder_id:h.z.string().optional().describe(yx.args.destinationFolderId),destination_folder_name:h.z.string().optional().describe(yx.args.destinationFolderName),board_kind:h.z.nativeEnum(gb).optional().describe(yx.args.boardKind),destination_name:h.z.string().optional().describe(yx.args.destinationName),board_owner_ids:h.z.array(h.z.string()).optional().describe(yx.args.boardOwnerIds),board_owner_team_ids:h.z.array(h.z.string()).optional().describe(yx.args.boardOwnerTeamIds),board_subscriber_ids:h.z.array(h.z.string()).optional().describe(yx.args.boardSubscriberIds),board_subscriber_teams_ids:h.z.array(h.z.string()).optional().describe(yx.args.boardSubscriberTeamsIds)};var Ex,Ix,Sx,Nx,Ax,Dx,Ox,kx,Rx,Cx,$x,Lx,Fx,Px,jx,Vx;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(Ex||(Ex={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(Ix||(Ix={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(Sx||(Sx={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Nx||(Nx={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Ax||(Ax={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Dx||(Dx={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Ox||(Ox={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(kx||(kx={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(Rx||(Rx={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Cx||(Cx={})),function(e){e.Email="email",e.Name="name",e.Title="title",e.Phone="phone",e.FirstName="first_name",e.LastName="last_name",e.Location="location",e.Timezone="time_zone",e.ManagerName="manager_display_name"}($x||($x={})),function(e){e.And="AND",e.Or="OR"}(Lx||(Lx={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Fx||(Fx={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Px||(Px={})),function(e){e.MultiSelect="multi-select",e.SingleSelect="single-select",e.People="people",e.Location="location",e.CountryCode="country-code",e.Country="country",e.ConnectedBoards="connected_boards"}(jx||(jx={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(Vx||(Vx={}));const Ux=h.z.object({type:h.z.nativeEnum(py).describe(_x.properties.type),title:h.z.string().describe(_x.properties.title).optional(),description:h.z.string().describe(_x.properties.description).optional(),visible:h.z.boolean().describe(_x.properties.visible).optional(),required:h.z.boolean().describe(_x.properties.required).optional(),options:h.z.array(h.z.object({label:h.z.string().describe(_x.properties.selectOptionsLabel)})).describe(_x.properties.selectOptions).optional(),settings:h.z.object({checkedByDefault:h.z.boolean().describe(xx.properties.checkedByDefault).optional(),defaultCurrentDate:h.z.boolean().describe(xx.properties.defaultCurrentDate).optional(),display:h.z.nativeEnum(sy).describe(xx.properties.display).optional(),includeTime:h.z.boolean().describe(xx.properties.includeTime).optional(),locationAutofilled:h.z.boolean().describe(xx.properties.locationAutofilled).optional(),optionsOrder:h.z.nativeEnum(ry).describe(xx.properties.optionsOrder).optional(),prefixAutofilled:h.z.boolean().describe(xx.properties.prefixAutofilled).optional(),prefixPredefined:h.z.object({enabled:h.z.boolean().describe(xx.properties.prefixPredefinedEnabled),prefix:h.z.string().describe(xx.properties.prefixPredefinedPrefix).optional()}).describe(xx.properties.prefixPredefined).optional(),skipValidation:h.z.boolean().describe(xx.properties.skipValidation).optional(),prefill:h.z.object({enabled:h.z.boolean().describe(xx.properties.prefillEnabled),lookup:h.z.string().describe(xx.properties.prefillLookup).optional(),source:h.z.nativeEnum(oy).describe(xx.properties.prefillSource).optional()}).describe(xx.properties.prefill).optional()}).optional()}),Bx={action:h.z.nativeEnum(Vx).describe(_x.actions.type),formToken:h.z.string().describe(bx.formToken),questionId:h.z.string().describe(bx.questionId).optional(),question:Ux.describe(_x.actions.question).optional(),questionStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The question object. Send this as a stringified JSON of "question" field. Read "question" field description for details how to use it.')};class Mx{constructor(e){this.mondayApi=e}async deleteQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when deleting a question."};const t={formToken:e.formToken,questionId:a};return await this.mondayApi.request(nx,t),{content:`Form question with id ${a} deleted successfully.`}}async updateQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when updating a question."};const t=e.question;if(!t)return{content:"Must provide updated patch props for the question when updating."};const n={formToken:e.formToken,questionId:a,question:t};return await this.mondayApi.request(ox,n),{content:`Form question with id ${a} updated successfully.`}}async createQuestion(e){const a=e.question;if(!a)return{content:"Must provide a full question payload when creating a question."};if(!a.title)return{content:"Must provide a title for the question when creating a question."};const t={formToken:e.formToken,question:{...a,title:a.title}},n=await this.mondayApi.request(ix,t);return{content:`Form question created successfully. ID: ${n.create_form_question?.id}`}}}const qx=(e,a,t)=>{const n=`${String(a)}Stringified`;if(e[a]||!e[n])return;let i;try{i=JSON.parse(e[n])}catch{throw new Error(`${String(n)} is not a valid JSON`)}const o="object"==typeof i&&!!i&&a in i&&1===Object.keys(i).length?i[a]:i,s=t.safeParse(o);if(!s.success)throw new Error(`JSON string defined as ${String(n)} does not match the specified schema`);e[a]=s.data};var zx;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateTag="updateTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(zx||(zx={}));const Gx=h.z.object({id:h.z.string().describe(yx.properties.tags.id).optional(),name:h.z.string().describe(yx.properties.tags.name).optional(),value:h.z.string().describe(yx.properties.tags.value).optional(),columnId:h.z.string().describe(yx.properties.tags.columnId).optional()}),Hx=h.z.object({type:h.z.nativeEnum(Nx).describe(wx.properties.backgroundType).optional(),value:h.z.string().describe(wx.properties.backgroundValue).optional()}),Wx=h.z.object({format:h.z.nativeEnum(Dx).describe(wx.properties.format).optional(),alignment:h.z.nativeEnum(Ox).describe(wx.properties.alignment).optional(),direction:h.z.nativeEnum(Ax).describe(wx.properties.direction).optional()}),Yx=h.z.object({position:h.z.nativeEnum(Sx).describe(wx.properties.logoPosition).optional(),size:h.z.nativeEnum(Ix).describe(wx.properties.logoSize).optional()}),Kx=h.z.object({text:h.z.string().describe(wx.properties.submitButtonText).optional()}),Jx=h.z.object({font:h.z.string().describe(wx.properties.font).optional(),color:h.z.string().describe(wx.properties.textColor).optional(),size:h.z.nativeEnum(kx).describe(wx.properties.fontSize).optional()}),Qx=h.z.object({enabled:h.z.boolean().describe(wx.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:h.z.string().describe(wx.properties.redirectUrl).optional()}),Xx=h.z.object({allowEditSubmission:h.z.boolean().describe(wx.properties.allowEditSubmission).optional(),allowResubmit:h.z.boolean().describe(wx.properties.allowResubmit).optional(),allowViewSubmission:h.z.boolean().describe(wx.properties.allowViewSubmission).optional(),description:h.z.string().describe(wx.properties.postSubmissionDescription).optional(),redirectAfterSubmission:Qx.describe(wx.properties.redirectAfterSubmission).optional(),showSuccessImage:h.z.boolean().describe(wx.properties.showSuccessImage).optional(),title:h.z.string().describe(wx.properties.postSubmissionTitle).optional()}),Zx=h.z.object({enabled:h.z.boolean().describe(wx.properties.closeDateEnabled).optional(),date:h.z.string().describe(wx.properties.closeDateValue).optional()}),eT=h.z.object({enabled:h.z.boolean().describe(wx.properties.draftSubmissionEnabled).optional()}),aT=h.z.object({itemGroupId:h.z.string().describe(wx.properties.itemGroupId).optional(),includeNameQuestion:h.z.boolean().describe(wx.properties.includeNameQuestion).optional(),includeUpdateQuestion:h.z.boolean().describe(wx.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:h.z.boolean().describe(wx.properties.syncQuestionAndColumnsTitles).optional()}),tT=h.z.object({enabled:h.z.boolean().describe(wx.properties.passwordEnabled).optional()}),nT=h.z.object({text:h.z.string().describe(wx.properties.startButtonText).optional()}),iT=h.z.object({enabled:h.z.boolean().describe(wx.properties.preSubmissionEnabled).optional(),title:h.z.string().describe(wx.properties.preSubmissionTitle).optional(),description:h.z.string().describe(wx.properties.preSubmissionDescription).optional(),startButton:nT.describe(wx.properties.startButton).optional()}),oT=h.z.object({enabled:h.z.boolean().describe(wx.properties.requireLoginEnabled).optional(),redirectToLogin:h.z.boolean().describe(wx.properties.redirectToLogin).optional()}),sT=h.z.object({enabled:h.z.boolean().describe(wx.properties.responseLimitEnabled).optional(),limit:h.z.number().describe(wx.properties.responseLimitValue).optional()}),rT=h.z.object({background:Hx.describe(wx.properties.background).optional(),hideBranding:h.z.boolean().describe(wx.properties.hideBranding).optional(),layout:Wx.describe(wx.properties.layout).optional(),logo:Yx.describe(wx.properties.logo).optional(),primaryColor:h.z.string().describe(wx.properties.primaryColor).optional(),showProgressBar:h.z.boolean().describe(wx.properties.showProgressBar).optional(),submitButton:Kx.describe(wx.properties.submitButton).optional(),text:Jx.describe(wx.properties.text).optional()}),pT=h.z.object({language:h.z.string().describe(wx.properties.language).optional(),logoAltText:h.z.string().describe(wx.properties.logoAltText).optional()}),dT=h.z.object({afterSubmissionView:Xx.describe(wx.properties.afterSubmissionView).optional(),closeDate:Zx.describe(wx.properties.closeDate).optional(),draftSubmission:eT.describe(wx.properties.draftSubmission).optional(),monday:aT.describe(wx.properties.monday).optional(),password:tT.describe(wx.properties.password).optional(),preSubmissionView:iT.describe(wx.properties.preSubmissionView).optional(),reCaptchaChallenge:h.z.boolean().describe(wx.properties.reCaptchaChallenge).optional(),requireLogin:oT.describe(wx.properties.requireLogin).optional(),responseLimit:sT.describe(wx.properties.responseLimit).optional()}),cT=h.z.object({id:h.z.string().describe(yx.inputs.questionId)}),lT=h.z.object({appearance:rT.describe(yx.inputs.form.appearance).optional(),accessibility:pT.describe(yx.inputs.form.accessibility).optional(),features:dT.describe(yx.inputs.form.features).optional(),title:h.z.string().describe(yx.inputs.title).optional(),description:h.z.string().describe(yx.inputs.description).optional(),questions:h.z.array(cT).describe(yx.inputs.questions).optional()}),mT={formToken:h.z.string().describe(bx.formToken),action:h.z.nativeEnum(zx).describe(yx.operations.updateForm.action),formPassword:h.z.string().describe(wx.operations.setFormPassword).optional(),tag:Gx.describe(yx.inputs.tag).optional(),tagStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The tag data. Send this as a stringified JSON of "tag" field. Read "tag" field description for details how to use it.'),form:lT.describe(yx.inputs.form.describe).optional(),formStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The form data. Send this as a stringified JSON of "form" field. Read "form" field description for details how to use it.')};class uT{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const a={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(sx,a),{content:"Form password successfully set."}}async shortenFormUrl(e){const a={formToken:e.formToken};return await this.mondayApi.request(rx,a),{content:"Form URL successfully shortened."}}async deactivateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(px,a),{content:"Form successfully deactivated."}}async activateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(dx,a),{content:"Form successfully activated."}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const a={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},t=await this.mondayApi.request(lx,a);return{content:`Tag successfully added: ${JSON.stringify(t.create_form_tag,null,2)}`}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(cx,a),{content:`Tag with id: ${e.tag.id} successfully deleted.`}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(mx,a)).update_form_tag?{content:`Tag with id: ${e.tag.id} successfully updated to value: ${e.tag.value}.`}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const a={formToken:e.formToken,appearance:e.form.appearance},t=await this.mondayApi.request(ux,a);return{content:`Appearance successfully updated: ${JSON.stringify(t.update_form_settings?.appearance,null,2)}`}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const a={formToken:e.formToken,accessibility:e.form.accessibility},t=await this.mondayApi.request(fx,a);return{content:`Accessibility successfully updated: ${JSON.stringify(t.update_form_settings?.accessibility,null,2)}`}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const a={formToken:e.formToken,features:e.form.features},t=await this.mondayApi.request(hx,a);return{content:`Features successfully updated: ${JSON.stringify(t.update_form_settings?.features,null,2)}`}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const a={formToken:e.formToken,questions:e.form.questions},t=await this.mondayApi.request(vx,a);return{content:`Question order successfully updated: ${JSON.stringify(t.update_form?.questions,null,2)}`}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const a={formToken:e.formToken,title:e.form.title,description:e.form.description},t=await this.mondayApi.request(gx,a);return{content:`Form header content successfully updated: ${JSON.stringify(t.update_form,null,2)}`}}}const fT={formToken:h.z.string().describe(bx.formToken)};const hT=Object.fromEntries(Object.entries(kb).filter((([e])=>"Person"!==e))),vT={columnType:h.z.nativeEnum(hT).describe("The type of the column to be created"),columnTitle:h.z.string().describe("The title of the column to be created"),columnDescription:h.z.string().optional().describe("The description of the column to be created"),columnSettings:h.z.string().optional().describe("Column-specific configuration settings as a JSON string. Use the get_column_type_info tool to fetch the JSON schema for the given column type.")},gT={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...vT};const bT={color:h.z.nativeEnum(Rb).describe("The color of the custom activity"),icon_id:h.z.nativeEnum(Cb).describe("The icon ID of the custom activity"),name:h.z.string().describe("The name of the custom activity")};const yT=T_`
699
699
  mutation createGroup(
700
700
  $boardId: ID!
701
701
  $groupName: String!
@@ -714,14 +714,14 @@
714
714
  title
715
715
  }
716
716
  }
717
- `,yT=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],wT={boardId:h.z.string().describe("The ID of the board to create the group in"),groupName:h.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:h.z.enum(yT).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${yT.join(", ")}`),relativeTo:h.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:h.z.nativeEnum(Sy).optional().describe("Whether to position the new group before or after the relativeTo group")};const _T=T_`
717
+ `,wT=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],_T={boardId:h.z.string().describe("The ID of the board to create the group in"),groupName:h.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:h.z.enum(wT).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${wT.join(", ")}`),relativeTo:h.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:h.z.nativeEnum(Sy).optional().describe("Whether to position the new group before or after the relativeTo group")};const xT=T_`
718
718
  mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
719
719
  duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
720
720
  id
721
721
  name
722
722
  }
723
723
  }
724
- `,xT=T_`
724
+ `,TT=T_`
725
725
  mutation createSubitem($parentItemId: ID!, $itemName: String!, $columnValues: JSON) {
726
726
  create_subitem(parent_item_id: $parentItemId, item_name: $itemName, column_values: $columnValues) {
727
727
  id
@@ -731,13 +731,13 @@
731
731
  }
732
732
  }
733
733
  }
734
- `,TT=1e3;var ET,IT;!function(e){e[e.YEAR=31536e3]="YEAR",e[e.MONTH31Days=2678400]="MONTH31Days",e[e.MONTH30Days=2592e3]="MONTH30Days",e[e.MONTH29Days=2505600]="MONTH29Days",e[e.MONTH28Days=2419200]="MONTH28Days",e[e.WEEK=604800]="WEEK",e[e.DAY=86400]="DAY",e[e.HOUR=3600]="HOUR",e[e.MINUTE=60]="MINUTE"}(ET||(ET={})),function(e){e[e.YEAR=31536e6]="YEAR",e[e.MONTH31Days=26784e5]="MONTH31Days",e[e.MONTH30Days=2592e6]="MONTH30Days",e[e.MONTH29Days=25056e5]="MONTH29Days",e[e.MONTH28Days=24192e5]="MONTH28Days",e[e.DAY=864e5]="DAY",e[e.HOUR=36e5]="HOUR",e[e.MINUTE=6e4]="MINUTE",e[e.SECOND=TT]="SECOND"}(IT||(IT={}));function ST(e,a){const t=e?.response?.errors?.map((e=>e.message))?.join(", ");if(t)throw new Error(`Failed to ${a}: ${t}`);const n=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${a}: ${n}`)}const NT={name:h.z.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:h.z.string().optional().describe("The id of the group id to which the new item will be added, if its not clearly specified, leave empty"),columnValues:h.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"},\\"dropdown_id\\":\\"value\\", \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),parentItemId:h.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:h.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},AT={boardId:h.z.number().describe("The id of the board to which the new item will be added"),...NT};const DT={item_id:h.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:h.z.string().describe("The ID of the custom activity for the timeline item"),title:h.z.string().describe("The title of the new timeline item"),summary:h.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:h.z.string().optional().describe("The content of the new timeline item"),timestamp:h.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:h.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:h.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:h.z.string().optional().describe("The location to add to the new timeline item"),phone:h.z.string().optional().describe("The phone number to add to the new timeline item"),url:h.z.string().optional().describe("The URL to add to the new timeline item")};const OT=T_`
734
+ `,ET=1e3;var IT,ST;function NT(e,a){const t=e?.response?.errors?.map((e=>e.message))?.join(", ");if(t)throw new Error(`Failed to ${a}: ${t}`);const n=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${a}: ${n}`)}!function(e){e[e.YEAR=31536e3]="YEAR",e[e.MONTH31Days=2678400]="MONTH31Days",e[e.MONTH30Days=2592e3]="MONTH30Days",e[e.MONTH29Days=2505600]="MONTH29Days",e[e.MONTH28Days=2419200]="MONTH28Days",e[e.WEEK=604800]="WEEK",e[e.DAY=86400]="DAY",e[e.HOUR=3600]="HOUR",e[e.MINUTE=60]="MINUTE"}(IT||(IT={})),function(e){e[e.YEAR=31536e6]="YEAR",e[e.MONTH31Days=26784e5]="MONTH31Days",e[e.MONTH30Days=2592e6]="MONTH30Days",e[e.MONTH29Days=25056e5]="MONTH29Days",e[e.MONTH28Days=24192e5]="MONTH28Days",e[e.DAY=864e5]="DAY",e[e.HOUR=36e5]="HOUR",e[e.MINUTE=6e4]="MINUTE",e[e.SECOND=ET]="SECOND"}(ST||(ST={}));const AT={name:h.z.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:h.z.string().optional().describe("The id of the group id to which the new item will be added, if its not clearly specified, leave empty"),columnValues:h.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"},\\"dropdown_id\\":\\"value\\", \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),parentItemId:h.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:h.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},DT={boardId:h.z.number().describe("The id of the board to which the new item will be added"),...AT};const OT={item_id:h.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:h.z.string().describe("The ID of the custom activity for the timeline item"),title:h.z.string().describe("The title of the new timeline item"),summary:h.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:h.z.string().optional().describe("The content of the new timeline item"),timestamp:h.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:h.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:h.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:h.z.string().optional().describe("The location to add to the new timeline item"),phone:h.z.string().optional().describe("The phone number to add to the new timeline item"),url:h.z.string().optional().describe("The URL to add to the new timeline item")};const kT=T_`
735
735
  mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention]) {
736
736
  create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList) {
737
737
  id
738
738
  }
739
739
  }
740
- `,kT=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(yy).describe("The type of mention: User, Team, Board, or Project")}),RT=h.z.array(kT),CT={itemId:h.z.number().describe("The id of the item to which the update will be added"),body:h.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:h.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 $T={columnId:h.z.string().describe("The id of the column to be deleted")},LT={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...$T};const FT={itemId:h.z.number()};const PT={};const jT=T_`
740
+ `,RT=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(yy).describe("The type of mention: User, Team, Board, or Project")}),CT=h.z.array(RT),$T={itemId:h.z.number().describe("The id of the item to which the update will be added"),body:h.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:h.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 LT={columnId:h.z.string().describe("The id of the column to be deleted")},FT={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...LT};const PT={itemId:h.z.number()};const jT={};const VT=T_`
741
741
  query getBoardData($boardId: ID!, $itemsLimit: Int!) {
742
742
  boards(ids: [$boardId]) {
743
743
  id
@@ -780,7 +780,7 @@
780
780
  }
781
781
  }
782
782
  }
783
- `,VT=T_`
783
+ `,UT=T_`
784
784
  query getUsersByIds($userIds: [ID!]!) {
785
785
  users(ids: $userIds) {
786
786
  id
@@ -788,7 +788,7 @@
788
788
  photo_tiny
789
789
  }
790
790
  }
791
- `,UT={boardId:h.z.number().describe("The ID of the board to fetch complete data for")};const BT=T_`
791
+ `,BT={boardId:h.z.number().describe("The ID of the board to fetch complete data for")};const MT=T_`
792
792
  query GetBoardAllActivity(
793
793
  $boardId: ID!
794
794
  $fromDate: ISO8601DateTime!
@@ -806,7 +806,7 @@
806
806
  }
807
807
  }
808
808
  }
809
- `,MT={boardId:h.z.number().describe("The id of the board to get activity for"),fromDate:h.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:h.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now")};const qT=T_`
809
+ `,qT={boardId:h.z.number().describe("The id of the board to get activity for"),fromDate:h.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:h.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now")};const zT=T_`
810
810
  query GetBoardInfo($boardId: ID!) {
811
811
  boards(ids: [$boardId]) {
812
812
  # Basic Board Metadata
@@ -883,7 +883,7 @@
883
883
  }
884
884
  }
885
885
  }
886
- `,zT=T_`
886
+ `,GT=T_`
887
887
  query GetBoardInfoJustColumns($boardId: ID!) {
888
888
  boards(ids: [$boardId]) {
889
889
  columns {
@@ -896,7 +896,7 @@
896
896
 
897
897
  }
898
898
  }
899
- `,GT=(e,a)=>({board:{...e,subItemColumns:a?.columns??void 0},filteringGuidelines:KT(e.columns.filter(HT)),aggregationGuidelines:YT()});function HT(e){return!!e&&["id","type"].every((a=>a in e))}const WT={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'},YT=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${tb.CountItems} function. Do not use ${tb.Count} function for that purpose.\n `,KT=e=>{const a=e.reduce(((e,a)=>WT[a.type]?(e[a.type]||(e[a.type]=[]),e[a.type].push(a.id),e):e),{});return 0===Object.keys(a).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(a).map((([e,a])=>`- Column Type: ${e} (Column IDs: ${a.join(", ")}) - ${WT[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},JT={boardId:h.z.number().describe("The id of the board to get information for")};const QT=T_`
899
+ `,HT=(e,a)=>({board:{...e,subItemColumns:a?.columns??void 0},filteringGuidelines:JT(e.columns.filter(WT)),aggregationGuidelines:KT()});function WT(e){return!!e&&["id","type"].every((a=>a in e))}const YT={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'},KT=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${tb.CountItems} function. Do not use ${tb.Count} function for that purpose.\n `,JT=e=>{const a=e.reduce(((e,a)=>YT[a.type]?(e[a.type]||(e[a.type]=[]),e[a.type].push(a.id),e):e),{});return 0===Object.keys(a).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(a).map((([e,a])=>`- Column Type: ${e} (Column IDs: ${a.join(", ")}) - ${YT[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},QT={boardId:h.z.number().describe("The id of the board to get information for")};const XT=T_`
900
900
  fragment ItemDataFragment on Item {
901
901
  id
902
902
  name
@@ -941,7 +941,7 @@
941
941
  }
942
942
  }
943
943
  }
944
- `,XT=T_`
944
+ `,ZT=T_`
945
945
  query SmartSearchBoardItemIds($searchTerm: String!, $board_ids: [ID!]) {
946
946
  search_items(board_ids: $board_ids, query: $searchTerm, size: 100) {
947
947
  results {
@@ -951,11 +951,11 @@
951
951
  }
952
952
  }
953
953
  }
954
- `,ZT={boardId:h.z.number().describe("The id of the board to get items from"),itemIds:h.z.array(h.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:h.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:h.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:h.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:h.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."),includeSubItems:h.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:h.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."),filtersStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. Send this as a stringified JSON array of "filters" field. Read "filters" field description for details how to use it.'),filters:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to filter by"),compareAttribute:h.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:h.z.union([h.z.string(),h.z.number(),h.z.boolean(),h.z.array(h.z.union([h.z.string(),h.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:h.z.nativeEnum(fy).optional().default(fy.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.'),filtersOperator:h.z.nativeEnum(uy).optional().default(uy.And).describe("The operator to use for the filters"),columnIds:h.z.array(h.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"),orderByStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. Send this as a stringified JSON array of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to order by"),direction:h.z.nativeEnum(my).optional().default(my.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 eE={boardId:h.z.number().describe("The id of the board to get the schema of")};const aE=T_`
954
+ `,eE={boardId:h.z.number().describe("The id of the board to get items from"),itemIds:h.z.array(h.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:h.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:h.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:h.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:h.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."),includeSubItems:h.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:h.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."),filtersStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. Send this as a stringified JSON array of "filters" field. Read "filters" field description for details how to use it.'),filters:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to filter by"),compareAttribute:h.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:h.z.union([h.z.string(),h.z.number(),h.z.boolean(),h.z.array(h.z.union([h.z.string(),h.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:h.z.nativeEnum(fy).optional().default(fy.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.'),filtersOperator:h.z.nativeEnum(uy).optional().default(uy.And).describe("The operator to use for the filters"),columnIds:h.z.array(h.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"),orderByStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. Send this as a stringified JSON array of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to order by"),direction:h.z.nativeEnum(my).optional().default(my.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 aE={boardId:h.z.number().describe("The id of the board to get the schema of")};const tE=T_`
955
955
  query GetColumnTypeSchema($type: ColumnType!) {
956
956
  get_column_type_schema(type: $type)
957
957
  }
958
- `,tE={columnType:h.z.nativeEnum(fT).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const nE={random_string:h.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:h.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const iE={typeName:h.z.string().describe("The name of the GraphQL type to get details for")};function oE(e){return e?"NON_NULL"===e.kind?`${oE(e.ofType)}!`:"LIST"===e.kind?`[${oE(e.ofType)}]`:e.name||"unknown":"unknown"}const sE=T_`
958
+ `,nE={columnType:h.z.nativeEnum(hT).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const iE={random_string:h.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:h.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const oE={typeName:h.z.string().describe("The name of the GraphQL type to get details for")};function sE(e){return e?"NON_NULL"===e.kind?`${sE(e.ofType)}!`:"LIST"===e.kind?`[${sE(e.ofType)}]`:e.name||"unknown":"unknown"}const rE=T_`
959
959
  fragment UserDetails on User {
960
960
  # Basic User Information
961
961
  id
@@ -987,31 +987,31 @@
987
987
  time_zone_identifier
988
988
  utc_hours_diff
989
989
  }
990
- `,rE=T_`
990
+ `,pE=T_`
991
991
  fragment UserTeamMembership on Team {
992
992
  id
993
993
  name
994
994
  is_guest
995
995
  picture_url
996
996
  }
997
- `,pE=T_`
997
+ `,dE=T_`
998
998
  fragment TeamBasicInfo on Team {
999
999
  id
1000
1000
  name
1001
1001
  }
1002
- `,dE=T_`
1002
+ `,cE=T_`
1003
1003
  fragment TeamExtendedInfo on Team {
1004
1004
  ...TeamBasicInfo
1005
1005
  is_guest
1006
1006
  picture_url
1007
1007
  }
1008
- `,cE=T_`
1008
+ `,lE=T_`
1009
1009
  fragment TeamOwner on User {
1010
1010
  id
1011
1011
  name
1012
1012
  email
1013
1013
  }
1014
- `,lE=T_`
1014
+ `,mE=T_`
1015
1015
  fragment TeamMember on User {
1016
1016
  id
1017
1017
  name
@@ -1031,7 +1031,7 @@
1031
1031
  time_zone_identifier
1032
1032
  utc_hours_diff
1033
1033
  }
1034
- `,mE=T_`
1034
+ `,uE=T_`
1035
1035
  fragment TeamMemberSimplified on User {
1036
1036
  id
1037
1037
  name
@@ -1040,15 +1040,15 @@
1040
1040
  is_admin
1041
1041
  is_guest
1042
1042
  }
1043
- `,uE=T_`
1043
+ `,fE=T_`
1044
1044
  fragment UserTeamMembershipSimplified on Team {
1045
1045
  id
1046
1046
  name
1047
1047
  is_guest
1048
1048
  }
1049
- `,fE=T_`
1050
- ${sE}
1049
+ `,hE=T_`
1051
1050
  ${rE}
1051
+ ${pE}
1052
1052
 
1053
1053
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1054
1054
  users(ids: $userIds, limit: $limit) {
@@ -1060,9 +1060,9 @@
1060
1060
  }
1061
1061
  }
1062
1062
  }
1063
- `,hE=T_`
1064
- ${sE}
1063
+ `,vE=T_`
1065
1064
  ${rE}
1065
+ ${pE}
1066
1066
 
1067
1067
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1068
1068
  users(ids: $userIds, limit: $limit) {
@@ -1074,13 +1074,13 @@
1074
1074
  }
1075
1075
  }
1076
1076
  }
1077
- `,vE=T_`
1078
- ${sE}
1079
- ${uE}
1080
- ${dE}
1081
- ${pE}
1077
+ `,gE=T_`
1078
+ ${rE}
1079
+ ${fE}
1082
1080
  ${cE}
1083
- ${mE}
1081
+ ${dE}
1082
+ ${lE}
1083
+ ${uE}
1084
1084
 
1085
1085
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1086
1086
  users(ids: $userIds, limit: $limit) {
@@ -1106,19 +1106,19 @@
1106
1106
  }
1107
1107
  }
1108
1108
  }
1109
- `,gE=T_`
1110
- ${pE}
1109
+ `,bE=T_`
1110
+ ${dE}
1111
1111
 
1112
1112
  query listTeamsOnly($teamIds: [ID!]) {
1113
1113
  teams(ids: $teamIds) {
1114
1114
  ...TeamBasicInfo
1115
1115
  }
1116
1116
  }
1117
- `,bE=T_`
1118
- ${dE}
1119
- ${pE}
1117
+ `,yE=T_`
1120
1118
  ${cE}
1119
+ ${dE}
1121
1120
  ${lE}
1121
+ ${mE}
1122
1122
 
1123
1123
  query listTeamsWithMembers($teamIds: [ID!]) {
1124
1124
  teams(ids: $teamIds) {
@@ -1135,9 +1135,9 @@
1135
1135
  }
1136
1136
  }
1137
1137
  }
1138
- `,yE=T_`
1139
- ${sE}
1138
+ `,wE=T_`
1140
1139
  ${rE}
1140
+ ${pE}
1141
1141
 
1142
1142
  query getUserByName($name: String) {
1143
1143
  users(name: $name) {
@@ -1149,7 +1149,7 @@
1149
1149
  }
1150
1150
  }
1151
1151
  }
1152
- `,wE=T_`
1152
+ `,_E=T_`
1153
1153
  query getCurrentUser {
1154
1154
  me {
1155
1155
  id
@@ -1161,7 +1161,7 @@
1161
1161
  photo_thumb
1162
1162
  }
1163
1163
  }
1164
- `;const _E=[["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 xE(e,a=""){return _E.filter((([a])=>{const t=e[a];return null!=t})).map((([t,n])=>`${a}${n}: ${e[t]}`))}const TE=e=>{const a=[];return"users"in e&&e.users&&e.users.length>0&&(a.push("Users:"),e.users.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),a.push(` Email: ${e.email}`),a.push(` Title: ${e.title||"N/A"}`),a.push(` Enabled: ${e.enabled}`),a.push(` Admin: ${e.is_admin||!1}`),a.push(` Guest: ${e.is_guest||!1}`),a.push(...xE(e," ")),e.teams&&e.teams.length>0&&(a.push(" Teams:"),e.teams.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),a.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(a.push("Teams:"),e.teams.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(a.push(` Guest Team: ${e.is_guest||!1}`),a.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(a.push(" Owners:"),e.owners.forEach((e=>{a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(a.push(" Members:"),e.users.forEach((e=>{if(e){const t=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...xE(e)];a.push(` - ${t.join(", ")}`)}})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},EE=500,IE=500,SE=1e3,NE={userIds:h.z.array(h.z.string()).max(EE).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:h.z.array(h.z.string()).max(IE).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:h.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:h.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:h.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:h.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:h.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const AE={itemId:h.z.number().describe("The id of the item to which the update will be added"),groupId:h.z.string().describe("The id of the group to which the item will be moved")};const DE={type:h.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:h.z.array(h.z.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:h.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:h.z.nativeEnum(Mb).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:h.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 OE={workspace_id:h.z.number().describe("The ID of the workspace to get information for")};const kE=T_`
1164
+ `;const xE=[["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 TE(e,a=""){return xE.filter((([a])=>{const t=e[a];return null!=t})).map((([t,n])=>`${a}${n}: ${e[t]}`))}const EE=e=>{const a=[];return"users"in e&&e.users&&e.users.length>0&&(a.push("Users:"),e.users.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),a.push(` Email: ${e.email}`),a.push(` Title: ${e.title||"N/A"}`),a.push(` Enabled: ${e.enabled}`),a.push(` Admin: ${e.is_admin||!1}`),a.push(` Guest: ${e.is_guest||!1}`),a.push(...TE(e," ")),e.teams&&e.teams.length>0&&(a.push(" Teams:"),e.teams.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),a.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(a.push("Teams:"),e.teams.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(a.push(` Guest Team: ${e.is_guest||!1}`),a.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(a.push(" Owners:"),e.owners.forEach((e=>{a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(a.push(" Members:"),e.users.forEach((e=>{if(e){const t=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...TE(e)];a.push(` - ${t.join(", ")}`)}})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},IE=500,SE=500,NE=1e3,AE={userIds:h.z.array(h.z.string()).max(IE).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:h.z.array(h.z.string()).max(SE).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:h.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:h.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:h.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:h.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:h.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const DE={itemId:h.z.number().describe("The id of the item to which the update will be added"),groupId:h.z.string().describe("The id of the group to which the item will be moved")};const OE={type:h.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:h.z.array(h.z.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:h.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:h.z.nativeEnum(Mb).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:h.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 kE={workspace_id:h.z.number().describe("The ID of the workspace to get information for")};const RE=T_`
1165
1165
  query listWorkspaces($limit: Int!, $page: Int!) {
1166
1166
  workspaces(limit: $limit, page: $page) {
1167
1167
  id
@@ -1169,7 +1169,7 @@
1169
1169
  description
1170
1170
  }
1171
1171
  }
1172
- `,RE=100,CE=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,""),$E={searchTerm:h.z.string().optional().describe("The search term to filter the workspaces by. If not provided, all workspaces will be returned. [IMPORANT] Only alphanumeric characters are supported."),limit:h.z.number().min(1).max(RE).default(RE).describe("The number of workspaces to return. Default and maximum allowed is 100"),page:h.z.number().min(1).default(1).describe("The page number to return. Default is 1.")};const LE=T_`
1172
+ `,CE=100,$E=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,""),LE={searchTerm:h.z.string().optional().describe("The search term to filter the workspaces by. If not provided, all workspaces will be returned. [IMPORANT] Only alphanumeric characters are supported."),limit:h.z.number().min(1).max(CE).default(CE).describe("The number of workspaces to return. Default and maximum allowed is 100"),page:h.z.number().min(1).default(1).describe("The page number to return. Default is 1.")};const FE=T_`
1173
1173
  query getItemBoard($itemId: ID!) {
1174
1174
  items(ids: [$itemId]) {
1175
1175
  id
@@ -1182,7 +1182,7 @@
1182
1182
  }
1183
1183
  }
1184
1184
  }
1185
- `,FE=T_`
1185
+ `,PE=T_`
1186
1186
  mutation createDoc($location: CreateDocInput!) {
1187
1187
  create_doc(location: $location) {
1188
1188
  id
@@ -1190,7 +1190,7 @@
1190
1190
  name
1191
1191
  }
1192
1192
  }
1193
- `,PE=T_`
1193
+ `,jE=T_`
1194
1194
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1195
1195
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1196
1196
  success
@@ -1198,11 +1198,11 @@
1198
1198
  error
1199
1199
  }
1200
1200
  }
1201
- `,jE=T_`
1201
+ `,VE=T_`
1202
1202
  mutation updateDocName($docId: ID!, $name: String!) {
1203
1203
  update_doc_name(docId: $docId, name: $name)
1204
1204
  }
1205
- `,VE=h.z.enum(["workspace","item"]),UE=h.z.discriminatedUnion("type",[h.z.object({type:h.z.literal(VE.enum.workspace).describe("Create document in workspace"),workspace_id:h.z.number().describe("Workspace ID under which to create the new document"),doc_kind:h.z.nativeEnum(gb).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:h.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),h.z.object({type:h.z.literal(VE.enum.item).describe("Create document attached to item"),item_id:h.z.number().describe("Item ID to attach the new document to"),column_id:h.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.")})]),BE={doc_name:h.z.string().describe("Name for the new document."),markdown:h.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:h.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:h.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:h.z.nativeEnum(gb).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:h.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:h.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:h.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 ME=T_`
1205
+ `,UE=h.z.enum(["workspace","item"]),BE=h.z.discriminatedUnion("type",[h.z.object({type:h.z.literal(UE.enum.workspace).describe("Create document in workspace"),workspace_id:h.z.number().describe("Workspace ID under which to create the new document"),doc_kind:h.z.nativeEnum(gb).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:h.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),h.z.object({type:h.z.literal(UE.enum.item).describe("Create document attached to item"),item_id:h.z.number().describe("Item ID to attach the new document to"),column_id:h.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.")})]),ME={doc_name:h.z.string().describe("Name for the new document."),markdown:h.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:h.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:h.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:h.z.nativeEnum(gb).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:h.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:h.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:h.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 qE=T_`
1206
1206
  mutation CreateDashboard(
1207
1207
  $name: String!
1208
1208
  $workspace_id: ID!
@@ -1224,14 +1224,14 @@
1224
1224
  board_folder_id
1225
1225
  }
1226
1226
  }
1227
- `,qE=T_`
1227
+ `,zE=T_`
1228
1228
  query GetAllWidgetsSchema {
1229
1229
  all_widgets_schema {
1230
1230
  widget_type
1231
1231
  schema
1232
1232
  }
1233
1233
  }
1234
- `,zE=T_`
1234
+ `,GE=T_`
1235
1235
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1236
1236
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1237
1237
  id
@@ -1243,13 +1243,13 @@
1243
1243
  }
1244
1244
  }
1245
1245
  }
1246
- `,GE={name:h.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:h.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:h.z.array(h.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:h.z.nativeEnum(Lb).default(Lb.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:h.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const HE={parent_container_id:h.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:h.z.nativeEnum(aw).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:h.z.nativeEnum(Gb).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:h.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:h.z.record(h.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."),settingsStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The settings object. Send this as a stringified JSON of "settings" field. Read "settings" field description for details how to use it.')};const WE=T_`
1246
+ `,HE={name:h.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:h.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:h.z.array(h.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:h.z.nativeEnum(Lb).default(Lb.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:h.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const WE={parent_container_id:h.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:h.z.nativeEnum(aw).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:h.z.nativeEnum(Gb).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:h.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:h.z.record(h.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."),settingsStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The settings object. Send this as a stringified JSON of "settings" field. Read "settings" field description for details how to use it.')};const YE=T_`
1247
1247
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1248
1248
  update_workspace(id: $id, attributes: $attributes) {
1249
1249
  id
1250
1250
  }
1251
1251
  }
1252
- `,YE={id:h.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:h.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:h.z.string().optional().describe("The description of the workspace to update"),attributeKind:h.z.nativeEnum(tw).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:h.z.string().optional().describe("The name of the workspace to update")};const KE=T_`
1252
+ `,KE={id:h.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:h.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:h.z.string().optional().describe("The description of the workspace to update"),attributeKind:h.z.nativeEnum(tw).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:h.z.string().optional().describe("The name of the workspace to update")};const JE=T_`
1253
1253
  mutation updateFolder(
1254
1254
  $folderId: ID!
1255
1255
  $name: String
@@ -1275,7 +1275,7 @@
1275
1275
  id
1276
1276
  }
1277
1277
  }
1278
- `,JE={folderId:h.z.string().describe("The ID of the folder to update"),name:h.z.string().optional().describe("The new name of the folder"),color:h.z.nativeEnum(Kb).optional().describe("The new color of the folder"),fontWeight:h.z.nativeEnum(Qb).optional().describe("The new font weight of the folder"),customIcon:h.z.nativeEnum(Jb).optional().describe("The new custom icon of the folder"),parentFolderId:h.z.string().optional().describe("The ID of the new parent folder"),workspaceId:h.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:h.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:h.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:h.z.nativeEnum(Ey).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:h.z.boolean().optional().describe("Whether to position the folder after the object")};const QE=T_`
1278
+ `,QE={folderId:h.z.string().describe("The ID of the folder to update"),name:h.z.string().optional().describe("The new name of the folder"),color:h.z.nativeEnum(Kb).optional().describe("The new color of the folder"),fontWeight:h.z.nativeEnum(Qb).optional().describe("The new font weight of the folder"),customIcon:h.z.nativeEnum(Jb).optional().describe("The new custom icon of the folder"),parentFolderId:h.z.string().optional().describe("The ID of the new parent folder"),workspaceId:h.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:h.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:h.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:h.z.nativeEnum(Ey).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:h.z.boolean().optional().describe("Whether to position the folder after the object")};const XE=T_`
1279
1279
  mutation createWorkspace(
1280
1280
  $name: String!
1281
1281
  $workspaceKind: WorkspaceKind!
@@ -1291,7 +1291,7 @@
1291
1291
  id
1292
1292
  }
1293
1293
  }
1294
- `,XE={name:h.z.string().describe("The name of the new workspace to be created"),workspaceKind:h.z.nativeEnum(tw).describe("The kind of workspace to create"),description:h.z.string().optional().describe("The description of the new workspace"),accountProductId:h.z.string().optional().describe("The account product ID associated with the workspace")};const ZE=T_`
1294
+ `,ZE={name:h.z.string().describe("The name of the new workspace to be created"),workspaceKind:h.z.nativeEnum(tw).describe("The kind of workspace to create"),description:h.z.string().optional().describe("The description of the new workspace"),accountProductId:h.z.string().optional().describe("The account product ID associated with the workspace")};const eI=T_`
1295
1295
  mutation createFolder(
1296
1296
  $workspaceId: ID!
1297
1297
  $name: String!
@@ -1311,7 +1311,7 @@
1311
1311
  id
1312
1312
  }
1313
1313
  }
1314
- `,eI={workspaceId:h.z.string().describe("The ID of the workspace where the folder will be created"),name:h.z.string().describe("The name of the folder to be created"),color:h.z.nativeEnum(Kb).optional().describe("The color of the folder"),fontWeight:h.z.nativeEnum(Qb).optional().describe("The font weight of the folder"),customIcon:h.z.nativeEnum(Jb).optional().describe("The custom icon of the folder"),parentFolderId:h.z.string().optional().describe("The ID of the parent folder")};const aI=T_`
1314
+ `,aI={workspaceId:h.z.string().describe("The ID of the workspace where the folder will be created"),name:h.z.string().describe("The name of the folder to be created"),color:h.z.nativeEnum(Kb).optional().describe("The color of the folder"),fontWeight:h.z.nativeEnum(Qb).optional().describe("The font weight of the folder"),customIcon:h.z.nativeEnum(Jb).optional().describe("The custom icon of the folder"),parentFolderId:h.z.string().optional().describe("The ID of the parent folder")};const tI=T_`
1315
1315
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1316
1316
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1317
1317
  success
@@ -1321,7 +1321,7 @@
1321
1321
  }
1322
1322
  }
1323
1323
  }
1324
- `,tI=T_`
1324
+ `,nI=T_`
1325
1325
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
1326
1326
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
1327
1327
  success
@@ -1331,7 +1331,7 @@
1331
1331
  }
1332
1332
  }
1333
1333
  }
1334
- `,nI={objectType:h.z.nativeEnum(Ey).describe("The type of object to move"),id:h.z.string().describe("The ID of the object to move"),position_object_id:h.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:h.z.nativeEnum(Ey).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:h.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:h.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:h.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:h.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const iI=T_`
1334
+ `,iI={objectType:h.z.nativeEnum(Ey).describe("The type of object to move"),id:h.z.string().describe("The ID of the object to move"),position_object_id:h.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:h.z.nativeEnum(Ey).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:h.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:h.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:h.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:h.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const oI=T_`
1335
1335
  query aggregateBoardInsights($query: AggregateQueryInput!) {
1336
1336
  aggregate(query: $query) {
1337
1337
  results {
@@ -1352,7 +1352,7 @@
1352
1352
  }
1353
1353
  }
1354
1354
  }
1355
- `,oI=new Set([tb.Case,tb.Between,tb.Left,tb.Raw,tb.None,tb.CountKeys]),sI=Object.values(tb).filter((e=>!oI.has(e))),rI=new Set([tb.Left,tb.Trim,tb.Upper,tb.Lower,tb.DateTruncDay,tb.DateTruncWeek,tb.DateTruncMonth,tb.DateTruncQuarter,tb.DateTruncYear,tb.Color,tb.Label,tb.EndDate,tb.StartDate,tb.Hour,tb.PhoneCountryShortName,tb.Person,tb.Upper,tb.Lower,tb.Order,tb.Length,tb.Flatten,tb.IsDone]);function pI(e){return{column_id:e}}new Set([tb.Count,tb.CountDistinct,tb.CountSubitems,tb.CountItems,tb.First,tb.Sum,tb.Average,tb.Median,tb.Min,tb.Max,tb.MinMax]);const dI={boardId:h.z.number().describe("The id of the board to get insights for"),aggregationsStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The aggregations to get. Send this as a stringified JSON array of "aggregations" field. Read "aggregations" field description for details how to use it.'),aggregations:h.z.array(h.z.object({function:h.z.enum(sI).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:h.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. [REQUIRED PRECONDITION]: Either send this field or the stringified version of it.').optional(),groupBy:h.z.array(h.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:h.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filtersStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. Send this as a stringified JSON array of "filters" field. Read "filters" field description for details how to use it.'),filters:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to filter by"),compareAttribute:h.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:h.z.any().describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:h.z.nativeEnum(fy).optional().default(fy.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.'),filtersOperator:h.z.nativeEnum(uy).optional().default(uy.And).describe("The logical operator to use for the filters"),orderByStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. Send this as a stringified JSON array of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to order by"),direction:h.z.nativeEnum(my).optional().default(my.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 cI=T_`
1355
+ `,sI=new Set([tb.Case,tb.Between,tb.Left,tb.Raw,tb.None,tb.CountKeys]),rI=Object.values(tb).filter((e=>!sI.has(e))),pI=new Set([tb.Left,tb.Trim,tb.Upper,tb.Lower,tb.DateTruncDay,tb.DateTruncWeek,tb.DateTruncMonth,tb.DateTruncQuarter,tb.DateTruncYear,tb.Color,tb.Label,tb.EndDate,tb.StartDate,tb.Hour,tb.PhoneCountryShortName,tb.Person,tb.Upper,tb.Lower,tb.Order,tb.Length,tb.Flatten,tb.IsDone]);function dI(e){return{column_id:e}}new Set([tb.Count,tb.CountDistinct,tb.CountSubitems,tb.CountItems,tb.First,tb.Sum,tb.Average,tb.Median,tb.Min,tb.Max,tb.MinMax]);const cI={boardId:h.z.number().describe("The id of the board to get insights for"),aggregationsStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The aggregations to get. Send this as a stringified JSON array of "aggregations" field. Read "aggregations" field description for details how to use it.'),aggregations:h.z.array(h.z.object({function:h.z.enum(rI).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:h.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. [REQUIRED PRECONDITION]: Either send this field or the stringified version of it.').optional(),groupBy:h.z.array(h.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:h.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filtersStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. Send this as a stringified JSON array of "filters" field. Read "filters" field description for details how to use it.'),filters:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to filter by"),compareAttribute:h.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:h.z.any().describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:h.z.nativeEnum(fy).optional().default(fy.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.'),filtersOperator:h.z.nativeEnum(uy).optional().default(uy.And).describe("The logical operator to use for the filters"),orderByStringified:h.z.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. Send this as a stringified JSON array of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:h.z.array(h.z.object({columnId:h.z.string().describe("The id of the column to order by"),direction:h.z.nativeEnum(my).optional().default(my.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 lI=T_`
1356
1356
  query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1357
1357
  boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1358
1358
  id
@@ -1360,7 +1360,7 @@
1360
1360
  url
1361
1361
  }
1362
1362
  }
1363
- `,lI=T_`
1363
+ `,mI=T_`
1364
1364
  query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1365
1365
  docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1366
1366
  id
@@ -1368,14 +1368,14 @@
1368
1368
  url
1369
1369
  }
1370
1370
  }
1371
- `,mI=T_`
1371
+ `,uI=T_`
1372
1372
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1373
1373
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1374
1374
  id
1375
1375
  name
1376
1376
  }
1377
1377
  }
1378
- `;var uI,fI;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(uI||(uI={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(fI||(fI={}));const hI=100,vI={searchTerm:h.z.string().optional().describe("The search term to use for the search."),searchType:h.z.nativeEnum(fI).describe("The type of search to perform."),limit:h.z.number().max(hI).optional().default(hI).describe("The number of items to get. The max and default value is 100."),page:h.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:h.z.array(h.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 gI=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(yy).describe("The type of mention: User, Team, Board, or Project")}),bI=h.z.array(gI),yI={itemId:h.z.number().describe("The id of the item to which the update will be added"),body:h.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:h.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')};h.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'),h.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const wI=T_`
1378
+ `;var fI,hI;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(fI||(fI={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(hI||(hI={}));const vI=100,gI={searchTerm:h.z.string().optional().describe("The search term to use for the search."),searchType:h.z.nativeEnum(hI).describe("The type of search to perform."),limit:h.z.number().max(vI).optional().default(vI).describe("The number of items to get. The max and default value is 100."),page:h.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:h.z.array(h.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 bI=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(yy).describe("The type of mention: User, Team, Board, or Project")}),yI=h.z.array(bI),wI={itemId:h.z.number().describe("The id of the item to which the update will be added"),body:h.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:h.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')};h.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'),h.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const _I=T_`
1379
1379
  query getSprintsByIds($ids: [ID!]) {
1380
1380
  items(ids: $ids) {
1381
1381
  id
@@ -1410,7 +1410,7 @@
1410
1410
  }
1411
1411
  }
1412
1412
  }
1413
- `,_I={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"},xI={..._I,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},TI="BOARD_NOT_FOUND:",EI="SPRINT_NOT_FOUND:",II="DOCUMENT_NOT_FOUND:",SI="DOCUMENT_INVALID:",NI="DOCUMENT_EMPTY:",AI="EXPORT_FAILED:",DI="INTERNAL_ERROR:",OI="VALIDATION_ERROR:",kI="task_sprint",RI={[xI.SPRINT_TASKS]:"Sprint Tasks",[xI.SPRINT_TIMELINE]:"Sprint Timeline",[xI.SPRINT_COMPLETION]:"Sprint Completion",[xI.SPRINT_START_DATE]:"Sprint Start Date",[xI.SPRINT_END_DATE]:"Sprint End Date",[xI.SPRINT_ACTIVATION]:"Sprint Activation",[xI.SPRINT_SUMMARY]:"Sprint Summary",[xI.SPRINT_CAPACITY]:"Sprint Capacity"},CI=Ly,$I={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},LI=(e,a)=>e.column_values?.find((e=>e.id===a)),FI=(e,a)=>{const t=LI(e,a);return"CheckboxValue"===t?.__typename?t.checked??!1:null},PI=(e,a)=>{const t=LI(e,a);return"DateValue"===t?.__typename?t.date??null:null},jI=(e,a)=>{const t=LI(e,a);return"DocValue"===t?.__typename&&t.file?.doc?.object_id?t.file.doc.object_id:null},VI=(e,a)=>{const t=a.filter((a=>!e.has(a)));return{isValid:0===t.length,missingColumns:t}},UI=(e,a)=>{if(!e.columns)return!1;const t=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return a.every((e=>t.has(e)))},BI=e=>UI(e,Object.values(_I)),MI=e=>UI(e,Object.values($I)),qI=e=>{if(!e?.settings)return null;const a=e.settings;return a.boardIds&&Array.isArray(a.boardIds)&&a.boardIds[0]?.toString()||a.boardId?.toString()||null},zI=(e,a)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===a&&e.type===fT.BoardRelation))||null,GI={sprintId:h.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const HI=T_`
1413
+ `,xI={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"},TI={...xI,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},EI="BOARD_NOT_FOUND:",II="SPRINT_NOT_FOUND:",SI="DOCUMENT_NOT_FOUND:",NI="DOCUMENT_INVALID:",AI="DOCUMENT_EMPTY:",DI="EXPORT_FAILED:",OI="INTERNAL_ERROR:",kI="VALIDATION_ERROR:",RI="task_sprint",CI={[TI.SPRINT_TASKS]:"Sprint Tasks",[TI.SPRINT_TIMELINE]:"Sprint Timeline",[TI.SPRINT_COMPLETION]:"Sprint Completion",[TI.SPRINT_START_DATE]:"Sprint Start Date",[TI.SPRINT_END_DATE]:"Sprint End Date",[TI.SPRINT_ACTIVATION]:"Sprint Activation",[TI.SPRINT_SUMMARY]:"Sprint Summary",[TI.SPRINT_CAPACITY]:"Sprint Capacity"},$I=Ly,LI={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},FI=(e,a)=>e.column_values?.find((e=>e.id===a)),PI=(e,a)=>{const t=FI(e,a);return"CheckboxValue"===t?.__typename?t.checked??!1:null},jI=(e,a)=>{const t=FI(e,a);return"DateValue"===t?.__typename?t.date??null:null},VI=(e,a)=>{const t=FI(e,a);return"DocValue"===t?.__typename&&t.file?.doc?.object_id?t.file.doc.object_id:null},UI=(e,a)=>{const t=a.filter((a=>!e.has(a)));return{isValid:0===t.length,missingColumns:t}},BI=(e,a)=>{if(!e.columns)return!1;const t=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return a.every((e=>t.has(e)))},MI=e=>BI(e,Object.values(xI)),qI=e=>BI(e,Object.values(LI)),zI=e=>{if(!e?.settings)return null;const a=e.settings;return a.boardIds&&Array.isArray(a.boardIds)&&a.boardIds[0]?.toString()||a.boardId?.toString()||null},GI=(e,a)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===a&&e.type===hT.BoardRelation))||null,HI={sprintId:h.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const WI=T_`
1414
1414
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
1415
1415
  boards(ids: [$boardId]) {
1416
1416
  items_page(limit: $limit) {
@@ -1446,7 +1446,7 @@
1446
1446
  }
1447
1447
  }
1448
1448
  }
1449
- `,WI={sprintsBoardId:h.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:h.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const YI=T_`
1449
+ `,YI={sprintsBoardId:h.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:h.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const KI=T_`
1450
1450
  query GetRecentBoards($limit: Int) {
1451
1451
  boards(limit: $limit, order_by: used_at, state: active) {
1452
1452
  id
@@ -1462,7 +1462,7 @@
1462
1462
  }
1463
1463
  }
1464
1464
  }
1465
- `,KI={};const JI=[class extends Yu{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=w.READ,this.annotations=Wu({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 KI}async executeInternal(e){try{const e={limit:100},a=((await this.mondayApi.request(YI,e)).boards||[]).filter((e=>null!==e));if(0===a.length)return{content:`${TI} No boards found in your account. Please verify you have access to monday.com boards.`};const t=this.extractBoardPairs(a);if(0===t.length)return{content:this.generateNotFoundMessage(a.length)};return{content:this.generateReport(t)}}catch(e){return{content:`${DI} 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,a){return`### Pair ${a+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 a=e.length>1?this.generateMultiplePairsWarning(e.length):"",t=e.map(((e,a)=>this.generatePairDetails(e,a))).join(""),n=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${a}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${t}${n}`}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,a,t){return{id:e,name:a?.name||t,workspaceId:a?.workspace?.id||"unknown",workspaceName:a?.workspace?.name||"Unknown"}}processSprintsBoard(e,a,t){const n=zI(e,_I.SPRINT_TASKS);if(!n)return;const i=qI(n);if(!i)return;const o=`${e.id}:${i}`;if(t.has(o))return;const s=a.get(i);t.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(i,s,`Tasks Board ${i}`)})}processTasksBoard(e,a,t){const n=zI(e,kI);if(!n)return;const i=qI(n);if(!i)return;const o=`${i}:${e.id}`;if(t.has(o))return;const s=a.get(i);t.set(o,{sprintsBoard:this.createBoardInfo(i,s,`Sprints Board ${i}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const a=new Map,t=new Map(e.map((e=>[e.id,e])));for(const n of e)n.columns&&(BI(n)&&this.processSprintsBoard(n,t,a),MI(n)&&this.processTasksBoard(n,t,a));return Array.from(a.values())}},class extends Yu{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=w.READ,this.annotations=Wu({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 WI}async executeInternal(e){try{const a=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!a.success)return{content:a.error||"Board schema validation failed"};const t={boardId:e.sprintsBoardId.toString(),limit:e.limit},n=await this.mondayApi.request(HI,t),i=n.boards?.[0],o=i?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${DI} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const a={boardId:e.toString()},t=await this.mondayApi.request(S_,a),n=t.boards?.[0];if(!n)return{success:!1,error:`${TI} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const i=n.columns||[],o=this.validateSprintsBoardSchemaFromColumns(i);return o.isValid?{success:!0}:{success:!1,error:`${OI} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${DI} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const a=new Set(e.filter((e=>null!==e)).map((e=>e.id))),t=Object.values(_I),n=VI(a,t);if(!n.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return n.missingColumns.forEach((a=>{const t=(e=>RI[e]||e)(a);e+=`- ${t}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let a="# Sprints Metadata Report\n\n";return a+=`**Total Sprints:** ${e.length}\n\n`,a+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",a+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const t=e.name||"Unknown",n=e.id,i=FI(e,xI.SPRINT_ACTIVATION),o=FI(e,xI.SPRINT_COMPLETION),s=PI(e,xI.SPRINT_START_DATE),r=PI(e,xI.SPRINT_END_DATE),p=((e,a)=>{const t=LI(e,a);if("TimelineValue"===t?.__typename&&t.from&&t.to)return{from:t.from.split("T")[0],to:t.to.split("T")[0]};return null})(e,xI.SPRINT_TIMELINE),d=jI(e,xI.SPRINT_SUMMARY);let c=CI.Planned;o?c=CI.Completed:(i||s)&&(c=CI.Active);const l=p?`${p.from} to ${p.to}`:"Not set";a+=`| ${t} | ${n} | ${c} | ${l} | ${s||"Not started"} | ${r||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),a+="\n## Status Definitions:\n",a+=`- **${CI.Planned}**: Sprint not yet started (no activation, no start date)\n`,a+=`- **${CI.Active}**: Sprint is active (activated but not completed)\n`,a+=`- **${CI.Completed}**: Sprint is finished\n\n`,a}},class extends Yu{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=w.READ,this.annotations=Wu({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 GI}async executeInternal(e){try{const a=await this.getSprintMetadata(e.sprintId);if(!a.success)return{content:a.error||`${DI} Unknown error occurred while getting sprint metadata`};const t=await this.readSprintSummaryDocument(a.documentObjectId);return t.success?{content:t.content}:{content:t.error||`${DI} Unknown error occurred while reading document content`}}catch(e){return{content:`${DI} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const a={ids:[String(e)]},t=(await this.mondayApi.request(wI,a)).items||[];if(0===t.length)return{success:!1,error:`${EI} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const n=t[0];if(!n)return{success:!1,error:`${EI} Sprint with ID ${e} not found.`};const i=((e,a=[])=>{const t=new Set((e.column_values||[]).map((e=>e.id))),n=[...Object.values(_I),...a];return VI(t,n)})(n,[xI.SPRINT_SUMMARY]);if(!i.isValid)return{success:!1,error:`${OI} Sprint item is missing required columns: ${i.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=jI(n,xI.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:n.name}:{success:!1,error:`${II} No sprint summary document found for sprint "${n.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${DI} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const a={object_ids:[e],limit:1},t=(await this.mondayApi.request(P_,a)).docs||[];if(0===t.length)return{success:!1,error:`${II} Document with object ID ${e} not found or not accessible.`};const n=t[0];if(!n||!n.id)return{success:!1,error:`${SI} Document data is invalid for object ID ${e}.`};const i={docId:n.id,blockIds:[]},o=await this.mondayApi.request(j_,i);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${AI} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const s=o.export_markdown_from_doc.markdown;return s?{success:!0,content:s}:{success:!1,error:`${NI} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${DI} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],QI=[class extends Yu{constructor(){super(...arguments),this.name="delete_item",this.type=w.WRITE,this.annotations=Wu({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return FT}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(E_,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_items_page",this.type=w.READ,this.annotations=Wu({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available."}getInputSchema(){return ZT}async executeInternal(e){const a=!e.cursor;if(a&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch{Mx(e,"filters",ZT.filters),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const t={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems};Mx(e,"filters",ZT.filters),Mx(e,"orderBy",ZT.orderBy),a&&(e.itemIds||e.filters||e.orderBy)&&(t.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 n=await this.mondayApi.request(QT,t),i=this.mapResult(n,e);return{content:JSON.stringify(i,null,2)}}rebuildFiltersWithManualSearch(e,a){return(a=(a=a??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:fy.ContainsText,compareValue:e}),a}mapResult(e,a){const t=e.boards?.[0],n=t?.items_page,i=n?.items||[];return{board:{id:t?.id,name:t?.name},items:i.map((e=>this.mapItem(e,a))),pagination:{has_more:!!n?.cursor,nextCursor:n?.cursor||null,count:i.length}}}mapItem(e,a){const t={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(a.includeColumns&&e.column_values){t.column_values={};for(const a of e.column_values)t.column_values[a.id]=this.getColumnValueData(a)}return a.includeSubItems&&"subitems"in e&&e.subitems&&(t.subitems=e.subitems.slice(0,a.subItemLimit).map((e=>this.mapItem(e,a)))),t}getColumnValueData(e){switch(e.type){case fT.BoardRelation:return e.linked_items;case fT.Formula:return e.display_value;case fT.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 a={board_ids:[e.boardId.toString()],searchTerm:e.searchTerm},t=await this.mondayApi.request(XT,a),n=t.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===n.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return n;const o=new Set(i);return n.filter((e=>o.has(e)))}},class extends Yu{constructor(){super(...arguments),this.name="create_item",this.type=w.WRITE,this.annotations=Wu({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?NT:AT}async executeInternal(e){const a=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,a):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,a)}async duplicateAndUpdateItem(e,a){try{const t={boardId:a.toString(),itemId:e.duplicateFromItemId.toString()},n=await this.mondayApi.request(_T,t);if(!n.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let i;try{i=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...i,name:e.name},s=new z_(this.mondayApi,this.apiToken,{boardId:a}),r=await s.execute({itemId:parseInt(n.duplicate_item.id),columnValues:JSON.stringify(o)});if(r.content.includes("Error"))throw new Error("Failed to update duplicated item: "+r.content);return{content:`Item ${n.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){ST(e,"duplicate item")}}async createSubitem(e){const a={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const t=await this.mondayApi.request(xT,a);if(!t.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${t.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){ST(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},n=await this.mondayApi.request(I_,t);return{content:`Item ${n.create_item?.id} successfully created`}}catch(e){ST(e,"create item")}}},class extends Yu{constructor(){super(...arguments),this.name="create_update",this.type=w.WRITE,this.annotations=Wu({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update."}getInputSchema(){return CT}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),n=RT.safeParse(t);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);a=n.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},n=await this.mondayApi.request(OT,t);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${n.create_update.id} successfully created on item ${e.itemId}`}}catch(e){ST(e,"create update")}}},class extends Yu{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=w.WRITE,this.annotations=Wu({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 yI}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),n=bI.safeParse(t);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);a=n.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},n=await this.mondayApi.request(OT,t);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${n.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){ST(e,"create update")}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_schema",this.type=w.READ,this.annotations=Wu({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 eE}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},n=await this.mondayApi.request(S_,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${n.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${n.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_activity",this.type=w.READ,this.annotations=Wu({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 MT}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-IT.MONTH30Days),n=e?.fromDate||t.toISOString(),i=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:n,toDate:i,limit:this.defaultLimit,page:1},s=await this.mondayApi.request(BT,o),r=s.boards?.[0]?.activity_logs;if(!r||0===r.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${n} to ${i}).`};const p=r.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${n} to ${i} (${r.length} entries):\n\n${p}`}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_info",this.type=w.READ,this.annotations=Wu({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return JT}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(qT,a),n=t.boards?.[0];if(!n)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const i=await this.getSubItemsBoardAsync(n);return{content:JSON.stringify(GT(n,i),null,2)}}async getSubItemsBoardAsync(e){const a=e.columns?.find((e=>e?.type===fT.Subtasks));if(!a)return null;const t=a.settings.boardIds[0],n=await this.mondayApi.request(zT,{boardId:t});return n.boards?.[0]??null}},class extends Yu{constructor(){super(...arguments),this.name="get_full_board_data",this.type=w.READ,this.annotations=Wu({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 UT}async executeInternal(e){try{const a={boardId:e.boardId.toString(),itemsLimit:7},t=await this.mondayApi.request(jT,a);if(!t.boards||0===t.boards.length||!t.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const n=t.boards[0],i=new Set;n.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&i.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&i.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const a=e;a.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&i.add(e.id)}))}}))}));let o=[];if(i.size>0){const e={userIds:Array.from(i)},a=await this.mondayApi.request(VT,e);o=a.users?.filter((e=>null!==e))||[]}const s=new Map(o.map((e=>[e.id,e]))),r={board:{id:n.id,name:n.name,columns:n.columns,items:n.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:n.items_page.items.length,total_updates:n.items_page.items.reduce(((e,a)=>e+(a.updates?.length||0)),0),total_unique_creators:o.length}};return{content:JSON.stringify(r,null,2)}}catch(e){ST(e,"get full board data")}}},class extends Yu{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=w.READ,this.annotations=Wu({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 NE}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,n=e.includeTeams||!1,i=e.teamsOnly||!1,o=e.includeTeamMembers||!1,s=!!e.name;if(e.getMe||!1){if(a||t||n||i||o||s)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(wE);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const r={users:[e.me]};return{content:TE(r)}}if(s){if(a||t||n||i||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const s={name:e.name},r=await this.mondayApi.request(yE,s);if(!r.users||0===r.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=r.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${r.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(i&&n)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>EE)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(t&&e.teamIds&&e.teamIds.length>IE)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let r;if(i||!a&&t&&!n)if(o){const a={teamIds:e.teamIds};r=await this.mondayApi.request(bE,a)}else{const a={teamIds:e.teamIds};r=await this.mondayApi.request(gE,a)}else if(n){const a={userIds:e.userIds,teamIds:e.teamIds,limit:SE};r=await this.mondayApi.request(vE,a)}else if(a){const a={userIds:e.userIds,limit:SE};r=await this.mondayApi.request(fE,a)}else{const e={userIds:void 0,limit:SE};r=await this.mondayApi.request(hE,e)}return{content:TE(r)}}},z_,class extends Yu{constructor(){super(...arguments),this.name="move_item_to_group",this.type=w.WRITE,this.annotations=Wu({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 AE}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(A_,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Yu{constructor(){super(...arguments),this.name="create_board",this.type=w.WRITE,this.annotations=Wu({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return G_}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(D_,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_form",this.type=w.WRITE,this.annotations=Wu({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 xx}async executeInternal(e){const a={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},t=await this.mondayApi.request(ex,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Yu{constructor(){super(...arguments),this.name="update_form",this.type=w.WRITE,this.annotations=Wu({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new mT(this.mondayApi),this.actionHandlers=new Map([[qx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[qx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[qx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[qx.activate,this.helpers.activateForm.bind(this.helpers)],[qx.createTag,this.helpers.createTag.bind(this.helpers)],[qx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[qx.updateTag,this.helpers.updateTag.bind(this.helpers)],[qx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[qx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[qx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[qx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[qx.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 lT}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(Mx(e,"tag",lT.tag),Mx(e,"form",lT.form),await a(e)):{content:"Received an invalid action for the update form tool."}}},class extends Yu{constructor(){super(...arguments),this.name="get_form",this.type=w.READ,this.annotations=Wu({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 uT}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(ax,a);return t.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(t.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Yu{constructor(){super(...arguments),this.name="form_questions_editor",this.type=w.WRITE,this.annotations=Wu({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new Bx(this.mondayApi),this.actionHandlers=new Map([[jx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[jx.Update,this.helpers.updateQuestion.bind(this.helpers)],[jx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Ux}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(Mx(e,"question",Ux.question),await a(e)):{content:`Unknown action: ${e.action}`}}},class extends Yu{constructor(){super(...arguments),this.name="create_column",this.type=w.WRITE,this.annotations=Wu({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?hT:vT}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},n=await this.mondayApi.request(O_,t);return{content:`Column ${n.create_column?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_group",this.type=w.WRITE,this.annotations=Wu({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 wT}async executeInternal(e){const a={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},t=await this.mondayApi.request(bT,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="delete_column",this.type=w.WRITE,this.annotations=Wu({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?$T:LT}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(k_,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},B_,class extends Yu{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=w.ALL_API,this.annotations=Wu({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 nE}async executeInternal(e){try{const a=await this.mondayApi.request(R_),t=e?.operationType,n=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",i=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,s=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let r="## GraphQL Schema\n";return t&&"read"!==t||(r+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,r+=`## Query Fields\n${n}\n\n`),t&&"write"!==t||(r+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,r+=`## Mutation Fields\n${i}\n\n`),r+=`## Available Types\n${s}\n\n`,r+='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:r}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Yu{constructor(){super(...arguments),this.name="get_column_type_info",this.type=w.READ,this.annotations=Wu({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 tE}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(aE,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const n={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(n,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="get_type_details",this.type=w.ALL_API,this.annotations=Wu({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 iE}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const t=(a=e.typeName,T_`
1465
+ `,JI={};const QI=[class extends Yu{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=w.READ,this.annotations=Wu({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 JI}async executeInternal(e){try{const e={limit:100},a=((await this.mondayApi.request(KI,e)).boards||[]).filter((e=>null!==e));if(0===a.length)return{content:`${EI} No boards found in your account. Please verify you have access to monday.com boards.`};const t=this.extractBoardPairs(a);if(0===t.length)return{content:this.generateNotFoundMessage(a.length)};return{content:this.generateReport(t)}}catch(e){return{content:`${OI} 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,a){return`### Pair ${a+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 a=e.length>1?this.generateMultiplePairsWarning(e.length):"",t=e.map(((e,a)=>this.generatePairDetails(e,a))).join(""),n=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${a}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${t}${n}`}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,a,t){return{id:e,name:a?.name||t,workspaceId:a?.workspace?.id||"unknown",workspaceName:a?.workspace?.name||"Unknown"}}processSprintsBoard(e,a,t){const n=GI(e,xI.SPRINT_TASKS);if(!n)return;const i=zI(n);if(!i)return;const o=`${e.id}:${i}`;if(t.has(o))return;const s=a.get(i);t.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(i,s,`Tasks Board ${i}`)})}processTasksBoard(e,a,t){const n=GI(e,RI);if(!n)return;const i=zI(n);if(!i)return;const o=`${i}:${e.id}`;if(t.has(o))return;const s=a.get(i);t.set(o,{sprintsBoard:this.createBoardInfo(i,s,`Sprints Board ${i}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const a=new Map,t=new Map(e.map((e=>[e.id,e])));for(const n of e)n.columns&&(MI(n)&&this.processSprintsBoard(n,t,a),qI(n)&&this.processTasksBoard(n,t,a));return Array.from(a.values())}},class extends Yu{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=w.READ,this.annotations=Wu({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 YI}async executeInternal(e){try{const a=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!a.success)return{content:a.error||"Board schema validation failed"};const t={boardId:e.sprintsBoardId.toString(),limit:e.limit},n=await this.mondayApi.request(WI,t),i=n.boards?.[0],o=i?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${OI} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const a={boardId:e.toString()},t=await this.mondayApi.request(S_,a),n=t.boards?.[0];if(!n)return{success:!1,error:`${EI} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const i=n.columns||[],o=this.validateSprintsBoardSchemaFromColumns(i);return o.isValid?{success:!0}:{success:!1,error:`${kI} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${OI} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const a=new Set(e.filter((e=>null!==e)).map((e=>e.id))),t=Object.values(xI),n=UI(a,t);if(!n.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return n.missingColumns.forEach((a=>{const t=(e=>CI[e]||e)(a);e+=`- ${t}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let a="# Sprints Metadata Report\n\n";return a+=`**Total Sprints:** ${e.length}\n\n`,a+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",a+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const t=e.name||"Unknown",n=e.id,i=PI(e,TI.SPRINT_ACTIVATION),o=PI(e,TI.SPRINT_COMPLETION),s=jI(e,TI.SPRINT_START_DATE),r=jI(e,TI.SPRINT_END_DATE),p=((e,a)=>{const t=FI(e,a);if("TimelineValue"===t?.__typename&&t.from&&t.to)return{from:t.from.split("T")[0],to:t.to.split("T")[0]};return null})(e,TI.SPRINT_TIMELINE),d=VI(e,TI.SPRINT_SUMMARY);let c=$I.Planned;o?c=$I.Completed:(i||s)&&(c=$I.Active);const l=p?`${p.from} to ${p.to}`:"Not set";a+=`| ${t} | ${n} | ${c} | ${l} | ${s||"Not started"} | ${r||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),a+="\n## Status Definitions:\n",a+=`- **${$I.Planned}**: Sprint not yet started (no activation, no start date)\n`,a+=`- **${$I.Active}**: Sprint is active (activated but not completed)\n`,a+=`- **${$I.Completed}**: Sprint is finished\n\n`,a}},class extends Yu{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=w.READ,this.annotations=Wu({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 HI}async executeInternal(e){try{const a=await this.getSprintMetadata(e.sprintId);if(!a.success)return{content:a.error||`${OI} Unknown error occurred while getting sprint metadata`};const t=await this.readSprintSummaryDocument(a.documentObjectId);return t.success?{content:t.content}:{content:t.error||`${OI} Unknown error occurred while reading document content`}}catch(e){return{content:`${OI} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const a={ids:[String(e)]},t=(await this.mondayApi.request(_I,a)).items||[];if(0===t.length)return{success:!1,error:`${II} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const n=t[0];if(!n)return{success:!1,error:`${II} Sprint with ID ${e} not found.`};const i=((e,a=[])=>{const t=new Set((e.column_values||[]).map((e=>e.id))),n=[...Object.values(xI),...a];return UI(t,n)})(n,[TI.SPRINT_SUMMARY]);if(!i.isValid)return{success:!1,error:`${kI} Sprint item is missing required columns: ${i.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=VI(n,TI.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:n.name}:{success:!1,error:`${SI} No sprint summary document found for sprint "${n.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${OI} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const a={object_ids:[e],limit:1},t=(await this.mondayApi.request(P_,a)).docs||[];if(0===t.length)return{success:!1,error:`${SI} Document with object ID ${e} not found or not accessible.`};const n=t[0];if(!n||!n.id)return{success:!1,error:`${NI} Document data is invalid for object ID ${e}.`};const i={docId:n.id,blockIds:[]},o=await this.mondayApi.request(j_,i);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${DI} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const s=o.export_markdown_from_doc.markdown;return s?{success:!0,content:s}:{success:!1,error:`${AI} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${OI} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],XI=[class extends Yu{constructor(){super(...arguments),this.name="delete_item",this.type=w.WRITE,this.annotations=Wu({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return PT}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(E_,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_items_page",this.type=w.READ,this.annotations=Wu({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available."}getInputSchema(){return eE}async executeInternal(e){const a=!e.cursor;if(a&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch{qx(e,"filters",eE.filters),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const t={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems};qx(e,"filters",eE.filters),qx(e,"orderBy",eE.orderBy),a&&(e.itemIds||e.filters||e.orderBy)&&(t.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 n=await this.mondayApi.request(XT,t),i=this.mapResult(n,e);return{content:JSON.stringify(i,null,2)}}rebuildFiltersWithManualSearch(e,a){return(a=(a=a??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:fy.ContainsText,compareValue:e}),a}mapResult(e,a){const t=e.boards?.[0],n=t?.items_page,i=n?.items||[];return{board:{id:t?.id,name:t?.name},items:i.map((e=>this.mapItem(e,a))),pagination:{has_more:!!n?.cursor,nextCursor:n?.cursor||null,count:i.length}}}mapItem(e,a){const t={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(a.includeColumns&&e.column_values){t.column_values={};for(const a of e.column_values)t.column_values[a.id]=this.getColumnValueData(a)}return a.includeSubItems&&"subitems"in e&&e.subitems&&(t.subitems=e.subitems.slice(0,a.subItemLimit).map((e=>this.mapItem(e,a)))),t}getColumnValueData(e){switch(e.type){case hT.BoardRelation:return e.linked_items;case hT.Formula:return e.display_value;case hT.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 a={board_ids:[e.boardId.toString()],searchTerm:e.searchTerm},t=await this.mondayApi.request(ZT,a),n=t.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===n.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return n;const o=new Set(i);return n.filter((e=>o.has(e)))}},class extends Yu{constructor(){super(...arguments),this.name="create_item",this.type=w.WRITE,this.annotations=Wu({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?AT:DT}async executeInternal(e){const a=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,a):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,a)}async duplicateAndUpdateItem(e,a){try{const t={boardId:a.toString(),itemId:e.duplicateFromItemId.toString()},n=await this.mondayApi.request(xT,t);if(!n.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let i;try{i=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...i,name:e.name},s=new G_(this.mondayApi,this.apiToken,{boardId:a}),r=await s.execute({itemId:parseInt(n.duplicate_item.id),columnValues:JSON.stringify(o)});if(r.content.includes("Error"))throw new Error("Failed to update duplicated item: "+r.content);return{content:`Item ${n.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){NT(e,"duplicate item")}}async createSubitem(e){const a={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const t=await this.mondayApi.request(TT,a);if(!t.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${t.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){NT(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},n=await this.mondayApi.request(I_,t);return{content:`Item ${n.create_item?.id} successfully created`}}catch(e){NT(e,"create item")}}},class extends Yu{constructor(){super(...arguments),this.name="create_update",this.type=w.WRITE,this.annotations=Wu({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update."}getInputSchema(){return $T}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),n=CT.safeParse(t);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);a=n.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},n=await this.mondayApi.request(kT,t);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${n.create_update.id} successfully created on item ${e.itemId}`}}catch(e){NT(e,"create update")}}},class extends Yu{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=w.WRITE,this.annotations=Wu({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 wI}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),n=yI.safeParse(t);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);a=n.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},n=await this.mondayApi.request(kT,t);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${n.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 Yu{constructor(){super(...arguments),this.name="get_board_schema",this.type=w.READ,this.annotations=Wu({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 aE}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},n=await this.mondayApi.request(S_,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${n.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${n.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_activity",this.type=w.READ,this.annotations=Wu({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 a=new Date,t=new Date(a.getTime()-ST.MONTH30Days),n=e?.fromDate||t.toISOString(),i=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:n,toDate:i,limit:this.defaultLimit,page:1},s=await this.mondayApi.request(MT,o),r=s.boards?.[0]?.activity_logs;if(!r||0===r.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${n} to ${i}).`};const p=r.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${n} to ${i} (${r.length} entries):\n\n${p}`}}},class extends Yu{constructor(){super(...arguments),this.name="get_board_info",this.type=w.READ,this.annotations=Wu({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return QT}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(zT,a),n=t.boards?.[0];if(!n)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const i=await this.getSubItemsBoardAsync(n);return{content:JSON.stringify(HT(n,i),null,2)}}async getSubItemsBoardAsync(e){const a=e.columns?.find((e=>e?.type===hT.Subtasks));if(!a)return null;const t=a.settings.boardIds[0],n=await this.mondayApi.request(GT,{boardId:t});return n.boards?.[0]??null}},class extends Yu{constructor(){super(...arguments),this.name="get_full_board_data",this.type=w.READ,this.annotations=Wu({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 BT}async executeInternal(e){try{const a={boardId:e.boardId.toString(),itemsLimit:7},t=await this.mondayApi.request(VT,a);if(!t.boards||0===t.boards.length||!t.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const n=t.boards[0],i=new Set;n.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&i.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&i.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const a=e;a.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&i.add(e.id)}))}}))}));let o=[];if(i.size>0){const e={userIds:Array.from(i)},a=await this.mondayApi.request(UT,e);o=a.users?.filter((e=>null!==e))||[]}const s=new Map(o.map((e=>[e.id,e]))),r={board:{id:n.id,name:n.name,columns:n.columns,items:n.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:n.items_page.items.length,total_updates:n.items_page.items.reduce(((e,a)=>e+(a.updates?.length||0)),0),total_unique_creators:o.length}};return{content:JSON.stringify(r,null,2)}}catch(e){NT(e,"get full board data")}}},class extends Yu{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=w.READ,this.annotations=Wu({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 AE}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,n=e.includeTeams||!1,i=e.teamsOnly||!1,o=e.includeTeamMembers||!1,s=!!e.name;if(e.getMe||!1){if(a||t||n||i||o||s)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(_E);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const r={users:[e.me]};return{content:EE(r)}}if(s){if(a||t||n||i||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const s={name:e.name},r=await this.mondayApi.request(wE,s);if(!r.users||0===r.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=r.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${r.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(i&&n)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>IE)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(t&&e.teamIds&&e.teamIds.length>SE)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let r;if(i||!a&&t&&!n)if(o){const a={teamIds:e.teamIds};r=await this.mondayApi.request(yE,a)}else{const a={teamIds:e.teamIds};r=await this.mondayApi.request(bE,a)}else if(n){const a={userIds:e.userIds,teamIds:e.teamIds,limit:NE};r=await this.mondayApi.request(gE,a)}else if(a){const a={userIds:e.userIds,limit:NE};r=await this.mondayApi.request(hE,a)}else{const e={userIds:void 0,limit:NE};r=await this.mondayApi.request(vE,e)}return{content:EE(r)}}},G_,class extends Yu{constructor(){super(...arguments),this.name="move_item_to_group",this.type=w.WRITE,this.annotations=Wu({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 DE}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(A_,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Yu{constructor(){super(...arguments),this.name="create_board",this.type=w.WRITE,this.annotations=Wu({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return H_}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(D_,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_form",this.type=w.WRITE,this.annotations=Wu({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 Tx}async executeInternal(e){const a={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},t=await this.mondayApi.request(ax,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Yu{constructor(){super(...arguments),this.name="update_form",this.type=w.WRITE,this.annotations=Wu({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new uT(this.mondayApi),this.actionHandlers=new Map([[zx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[zx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[zx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[zx.activate,this.helpers.activateForm.bind(this.helpers)],[zx.createTag,this.helpers.createTag.bind(this.helpers)],[zx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[zx.updateTag,this.helpers.updateTag.bind(this.helpers)],[zx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[zx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[zx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[zx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[zx.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 mT}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(qx(e,"tag",mT.tag),qx(e,"form",mT.form),await a(e)):{content:"Received an invalid action for the update form tool."}}},class extends Yu{constructor(){super(...arguments),this.name="get_form",this.type=w.READ,this.annotations=Wu({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 fT}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(tx,a);return t.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(t.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Yu{constructor(){super(...arguments),this.name="form_questions_editor",this.type=w.WRITE,this.annotations=Wu({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new Mx(this.mondayApi),this.actionHandlers=new Map([[Vx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Vx.Update,this.helpers.updateQuestion.bind(this.helpers)],[Vx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Bx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(qx(e,"question",Bx.question),await a(e)):{content:`Unknown action: ${e.action}`}}},class extends Yu{constructor(){super(...arguments),this.name="create_column",this.type=w.WRITE,this.annotations=Wu({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?vT:gT}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},n=await this.mondayApi.request(O_,t);return{content:`Column ${n.create_column?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_group",this.type=w.WRITE,this.annotations=Wu({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 _T}async executeInternal(e){const a={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},t=await this.mondayApi.request(yT,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="delete_column",this.type=w.WRITE,this.annotations=Wu({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?LT:FT}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(k_,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},M_,class extends Yu{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=w.ALL_API,this.annotations=Wu({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 iE}async executeInternal(e){try{const a=await this.mondayApi.request(R_),t=e?.operationType,n=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",i=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,s=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let r="## GraphQL Schema\n";return t&&"read"!==t||(r+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,r+=`## Query Fields\n${n}\n\n`),t&&"write"!==t||(r+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,r+=`## Mutation Fields\n${i}\n\n`),r+=`## Available Types\n${s}\n\n`,r+='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:r}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Yu{constructor(){super(...arguments),this.name="get_column_type_info",this.type=w.READ,this.annotations=Wu({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 nE}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(tE,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const n={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(n,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="get_type_details",this.type=w.ALL_API,this.annotations=Wu({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 oE}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const t=(a=e.typeName,T_`
1466
1466
  query getTypeDetails {
1467
1467
  __type(name: "${a}") {
1468
1468
  name
@@ -1550,5 +1550,5 @@
1550
1550
  }
1551
1551
  }
1552
1552
  }
1553
- `),n=await this.mondayApi.request(t);if(!n.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let i=`## Type: ${n.__type.name||"Unnamed"} ${e.typeName===n.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${n.__type.kind}\n${n.__type.description?`Description: ${n.__type.description}`:""}\n\n`;return n.__type.fields&&n.__type.fields.length>0&&(i+="## Fields\n",n.__type.fields.forEach((e=>{const a=oE(e.type);i+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(i+=" Arguments:\n",e.args.forEach((e=>{const a=oE(e.type);i+=` - ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),i+="\n"),n.__type.inputFields&&n.__type.inputFields.length>0&&(i+="## Input Fields\n",n.__type.inputFields.forEach((e=>{const a=oE(e.type);i+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),i+="\n"),n.__type.interfaces&&n.__type.interfaces.length>0&&(i+="## Implements\n",n.__type.interfaces.forEach((e=>{i+=`- ${e.name}\n`})),i+="\n"),n.__type.enumValues&&n.__type.enumValues.length>0&&(i+="## Enum Values\n",n.__type.enumValues.forEach((e=>{i+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),i+="\n"),n.__type.possibleTypes&&n.__type.possibleTypes.length>0&&(i+="## Possible Types\n",n.__type.possibleTypes.forEach((e=>{i+=`- ${e.name}\n`}))),i+=`\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\\": \\"${n.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:i}}catch(e){const a=e instanceof Error?e.message:"Unknown error",t=a.includes("JSON");return{content:`Error fetching type details: ${a}${t?"\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 a}},class extends Yu{constructor(){super(...arguments),this.name="create_custom_activity",this.type=w.WRITE,this.annotations=Wu({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return gT}async executeInternal(e){const a={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request($_,a),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_timeline_item",this.type=w.WRITE,this.annotations=Wu({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return DT}async executeInternal(e){const a={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&&(a.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const t=await this.mondayApi.request(L_,a);return{content:`Timeline item '${e.title}' with ID ${t.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Yu{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=w.READ,this.annotations=Wu({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return PT}async executeInternal(e){const a=await this.mondayApi.request(F_);if(!a.custom_activity||0===a.custom_activity.length)return{content:"No custom activities found"};const t=a.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${t.length} custom activities: ${JSON.stringify(t,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="read_docs",this.type=w.READ,this.annotations=Wu({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 DE}async executeInternal(e){try{let a,t,n;switch(e.type){case"ids":a=e.ids;break;case"object_ids":t=e.ids;break;case"workspace_ids":n=e.ids}const i={ids:a,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:n};let o=await this.mondayApi.request(P_,i);if((!o.docs||0===o.docs.length)&&a){const t={ids:void 0,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:n};o=await this.mondayApi.request(P_,t)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const s=await this.enrichDocsWithMarkdown(o.docs,i),r=this.shouldSuggestPagination(o.docs.length,i.limit||25,i.page||1);return{content:s.content+r}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,a,t){return e===a?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${a} documents, which suggests there may be more. Consider calling this tool again with page: ${t+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,a){const t=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let a="";try{const t={docId:e.id},n=await this.mondayApi.request(j_,t);a=n.export_markdown_from_doc.success&&n.export_markdown_from_doc.markdown?n.export_markdown_from_doc.markdown:`Error getting markdown: ${n.export_markdown_from_doc.error||"Unknown error"}`}catch(e){a=`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:a}}))),n=a.page||1,i=a.limit||25,o=t.length,s=o===i;return{content:`Successfully retrieved ${t.length} document${1===t.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${n}\n- Documents per page: ${i}\n- Documents in this response: ${o}\n- Has more pages: ${s?"YES - call again with page: "+(n+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(t,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="workspace_info",this.type=w.READ,this.annotations=Wu({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 OE}async executeInternal(e){const a={workspace_id:e.workspace_id},t=await this.mondayApi.request(V_,a);if(!t.workspaces||0===t.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const n=function(e){const{workspaces:a,boards:t,docs:n,folders:i}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=new Map((i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),r=[];(t||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(a):r.push(a)}));const p=[];return(n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(a):p.push(a)})),{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(s.values()),root_items:{boards:r,docs:p}}}(t);return{content:`Workspace Information:\n\n**Workspace:** ${n.workspace.name} (ID: ${n.workspace.id})\n- Description: ${n.workspace.description||"No description"}\n- Kind: ${n.workspace.kind}\n- State: ${n.workspace.state}\n- Default Workspace: ${n.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${n.workspace.created_at}\n- Owners/Subscribers: ${n.workspace.owners_subscribers.length} users\n\n**Folders (${n.folders.length}):**\n${n.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 (${n.root_items.boards.length}): ${n.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${n.root_items.docs.length}): ${n.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${n.folders.length}\n- Total Boards: ${n.folders.reduce(((e,a)=>e+a.boards.length),0)+n.root_items.boards.length}\n- Total Docs: ${n.folders.reduce(((e,a)=>e+a.docs.length),0)+n.root_items.docs.length}\n\n${JSON.stringify(n,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="list_workspaces",this.type=w.READ,this.annotations=Wu({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 $E}async executeInternal(e){const a=e.searchTerm?1e4:e.limit,t=e.searchTerm?1:e.page;let n=null;if(e.searchTerm&&(n=CE(e.searchTerm),0===n.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const i={limit:a,page:t},o=await this.mondayApi.request(kE,i),s=o.workspaces?.filter((e=>e));if(!s||0===s.length)return{content:"No workspaces found."};const r=n&&s.length<=RE,p=this.filterWorkspacesIfNeeded(n,s,e);if(0===p.length)return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const d=p.length===e.limit;return{content:`\n${r?"IMPORTANT: Search term was not applied. Returning all workspaces. Please perform the filtering manually.":""}\n${p.map((e=>{const a=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${a}`})).join("\n")}\n${d?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}filterWorkspacesIfNeeded(e,a,t){if(!e||a.length<=RE)return a;const n=(t.page-1)*t.limit,i=n+t.limit;return a.filter((a=>CE(a.name).includes(e))).slice(n,i)}},class extends Yu{constructor(){super(...arguments),this.name="create_doc",this.type=w.WRITE,this.annotations=Wu({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 BE}async executeInternal(e){const a=UE.safeParse({...e,type:e.location});if(!a.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const t=a.data;try{let a,n;if(t.type===VE.enum.workspace){const i={location:{workspace:{workspace_id:t.workspace_id.toString(),name:e.doc_name,kind:t.doc_kind||gb.Public,folder_id:t.folder_id?.toString()}}},o=await this.mondayApi.request(FE,i);a=o?.create_doc?.id??void 0,n=o?.create_doc?.url??void 0}else if(t.type===VE.enum.item){const i={itemId:t.item_id.toString()},o=await this.mondayApi.request(LE,i),s=o.items?.[0];if(!s)return{content:`Error: Item with id ${t.item_id} not found.`};const r=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===fT.Doc));let d=t.column_id;if(!d)if(p)d=p.id;else{const e={boardId:r.toString(),columnType:fT.Doc,columnTitle:"Doc"},a=await this.mondayApi.request(O_,e);if(d=a?.create_column?.id,!d)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:t.item_id.toString(),column_id:d}}},l=await this.mondayApi.request(FE,c);if(a=l.create_doc?.id??void 0,n=l.create_doc?.url??void 0,e.doc_name&&a)try{const t={docId:a,name:e.doc_name};await this.mondayApi.request(jE,t)}catch(e){console.warn("Failed to update doc name:",e)}}if(!a)return{content:"Error: Failed to create document."};const i={docId:a,markdown:e.markdown},o=await this.mondayApi.request(PE,i),s=o?.add_content_to_doc_from_markdown?.success,r=o?.add_content_to_doc_from_markdown?.error;return s?{content:`✅ Document successfully created (id: ${a}). ${n?`\n\nURL: ${n}`:""}`}:{content:`Document ${a} created, but failed to add markdown content: ${r||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Yu{constructor(){super(...arguments),this.name="update_workspace",this.type=w.WRITE,this.annotations=Wu({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return YE}async executeInternal(e){const a={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},t=await this.mondayApi.request(WE,a);return{content:`Workspace ${t.update_workspace?.id} successfully updated`}}},class extends Yu{constructor(){super(...arguments),this.name="update_folder",this.type=w.WRITE,this.annotations=Wu({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return JE}async executeInternal(e){const{position_object_id:a,position_object_type:t,position_is_after:n}=e;if(!!a!=!!t)throw new Error("position_object_id and position_object_type must be provided together");const i={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:a?{position_is_after:n,position_object_id:a,position_object_type:t}:void 0},o=await this.mondayApi.request(KE,i);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Yu{constructor(){super(...arguments),this.name="create_workspace",this.type=w.WRITE,this.annotations=Wu({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return XE}async executeInternal(e){const a={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},t=await this.mondayApi.request(QE,a);return{content:`Workspace ${t.create_workspace?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_folder",this.type=w.WRITE,this.annotations=Wu({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return eI}async executeInternal(e){const a={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},t=await this.mondayApi.request(ZE,a);return{content:`Folder ${t.create_folder?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="move_object",this.type=w.WRITE,this.annotations=Wu({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 nI}async executeUpdateFolder(e){const{id:a,position_object_id:t,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:s,accountProductId:r}=e;if(!!t!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:a,position:t?{position_is_after:i,position_object_id:t,position_object_type:n}:void 0,parentFolderId:o,workspaceId:s,accountProductId:r},d=await this.mondayApi.request(KE,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:a,position_object_id:t,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:s,accountProductId:r}=e;if(!!t!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:a,attributes:{position:t?{position_is_after:i,position_object_id:t,position_object_type:n}:void 0,folder_id:o,workspace_id:s,account_product_id:r}},d=await this.mondayApi.request(aI,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:a,position_object_id:t,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:s,accountProductId:r}=e;if(!!t!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:a,attributes:{position:t?{position_is_after:i,position_object_id:t,position_object_type:n}:void 0,folder_id:o,workspace_id:s,account_product_id:r}},d=await this.mondayApi.request(tI,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:a}=e;switch(a){case Ey.Folder:return this.executeUpdateFolder(e);case Ey.Board:return this.executeUpdateBoardHierarchy(e);case Ey.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${a}`)}}},class extends Yu{constructor(){super(...arguments),this.name="create_dashboard",this.type=w.WRITE,this.annotations=Wu({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 GE}async executeInternal(e){try{const a={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()},t=await this.mondayApi.request(ME,a);if(!t.create_dashboard)throw new Error("Failed to create dashboard");const n=t.create_dashboard,i=n.board_folder_id?` in folder ${n.board_folder_id}`:" in workspace root",o=n.kind===Lb.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${n.name}" successfully created!\n\nDashboard Details:\n• ID: ${n.id}\n• Name: ${n.name}\n• Workspace ID: ${n.workspace_id}${i}\n• Visibility: ${n.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 a=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${a}`)}}},class extends Yu{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=w.READ,this.annotations=Wu({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={},a=await this.mondayApi.request(qE,e);if(!a.all_widgets_schema||0===a.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const t={};let n=0;for(const e of a.all_widgets_schema)if(e?.widget_type&&e?.schema){const a="string"==typeof e.schema?JSON.parse(e.schema):e.schema,i=a?.description||a?.title||`${e.widget_type} widget for data visualization`;t[e.widget_type]={type:e.widget_type,description:i,schema:e.schema},n++}if(0===n)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${n} schemas found):\n${Object.keys(t).map((e=>`• **${e}**: ${t[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(t,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 a=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${a}`)}}},class extends Yu{constructor(){super(...arguments),this.name="create_widget",this.type=w.WRITE,this.annotations=Wu({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 HE}async executeInternal(e){if(Mx(e,"settings",HE.settings),!e.settings)throw new Error("You must pass either settings or settingsStringified parameter");try{const a={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},t=await this.mondayApi.request(zE,a);if(!t.create_widget)throw new Error("Failed to create widget");const n=t.create_widget,i=n.parent?.kind===aw.Dashboard?`dashboard ${n.parent.id}`:`board view ${n.parent?.id}`;return{content:`✅ Widget "${n.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${n.id}\n• **Name**: ${n.name}\n• **Type**: ${n.kind}\n• **Location**: Placed in ${i}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(a){const t=a instanceof Error?a.message:String(a);throw new Error(`Failed to create ${e.widget_kind} widget: ${t}`)}}},class extends Yu{constructor(){super(...arguments),this.name="board_insights",this.type=w.READ,this.annotations=Wu({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 dI}async executeInternal(e){if(!e.aggregations&&!e.aggregationsStringified)return{content:'Input must contain either the "aggregations" field or the "aggregationsStringified" field.'};Mx(e,"aggregations",dI.aggregations),Mx(e,"filters",dI.filters),Mx(e,"orderBy",dI.orderBy);const{selectElements:a,groupByElements:t}=function(e){const a={},t=e.groupBy?.map((e=>({column_id:e})))||[],n=new Set(e.aggregations.filter((e=>e.function===tb.Label)).map((e=>e.columnId))),i=e.groupBy?.filter((e=>!n.has(e))).map((e=>({function:tb.Label,columnId:e})))??[],o=e.aggregations.concat(i).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,s=a[o]||0;a[o]=s+1;const r=`${o}_${s}`;return rI.has(e.function)&&(t.some((e=>e.column_id===r))||t.push({column_id:r})),{type:ab.Function,function:(n=e.function,i=e.columnId,{function:n,params:n===tb.CountItems?[]:[{type:ab.Column,column:pI(i),as:i}]}),as:r}}var n,i;const o={type:ab.Column,column:pI(e.columnId),as:e.columnId};return t.some((a=>a.column_id===e.columnId))||t.push({column_id:e.columnId}),o}));return t.forEach((e=>{o.some((a=>a.as===e.column_id))||o.push({type:ab.Column,column:pI(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:t}}(e),n=function(e){if(!e.filters&&!e.orderBy)return;const a={};return e.filters&&(a.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),a.operator=e.filtersOperator),e.orderBy&&(a.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),a}(e),i=function(e){return{id:e.boardId.toString(),type:eb.Table}}(e),o={query:{from:i,query:n,select:a,group_by:t,limit:e.limit}},s=await this.mondayApi.request(iI,o),r=(s.aggregate?.results??[]).map((e=>{const a={};return(e.entries??[]).forEach((e=>{const t=e.alias??"";if(!t)return;const n=e.value;if(!n)return void(a[t]=null);const i=n.result??n.value_string??n.value_int??n.value_float??n.value_boolean??null;a[t]=i})),a}));return r.length?{content:`Board insights result (${r.length} rows):\n${JSON.stringify(r,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Yu{constructor(){super(...arguments),this.name="search",this.type=w.READ,this.annotations=Wu({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 vI}async executeInternal(e){const a={[fI.BOARD]:this.searchBoardsAsync.bind(this),[fI.DOCUMENTS]:this.searchDocsAsync.bind(this),[fI.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!a)throw new Error(`Unsupported search type: ${e.searchType}`);const t=await a(e),n={disclaimer:t.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:t.items};return{content:JSON.stringify(n,null,2)}}async searchFoldersAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(mI,a),n=this.searchAndVirtuallyPaginate(e,t.folders||[],(e=>e.name));return{items:n.items.map((e=>({id:uI.FOLDER+e.id,title:e.name}))),wasFiltered:n.wasFiltered}}async searchDocsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(lI,a),n=this.searchAndVirtuallyPaginate(e,t.docs||[],(e=>e.name));return{items:n.items.map((e=>({id:uI.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:n.wasFiltered}}async searchBoardsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(cI,a),n=this.searchAndVirtuallyPaginate(e,t.boards||[],(e=>e.name));return{items:n.items.map((e=>({id:uI.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:n.wasFiltered}}getPagingParamsForSearch(e){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?1e4:e.limit}}searchAndVirtuallyPaginate(e,a,t){if(a.length<=hI)return{items:a,wasFiltered:!1};const n=CE(e.searchTerm??""),i=(e.page-1)*e.limit,o=i+e.limit;return{items:a.filter((e=>CE(t(e)).includes(n))).slice(i,o),wasFiltered:!0}}}];var XI;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(XI||(XI={}));const ZI=(e,a)=>{let t=[];a?.mode===XI.APPS?t=[...Hu]:a?.mode!==XI.API&&a?.mode||(t=[...QI,...JI]);const n=t.map((a=>((e,a)=>e.prototype instanceof Yu?new e(a.apiClient,a.apiToken,a.context):e.prototype instanceof lu?new e(a.apiToken):new e)(a,e)));return n.filter((e=>{if(!a)return e.type!==w.ALL_API;if(a.mode===XI.API&&"only"===a.enableDynamicApiTools)return e.type===w.ALL_API;let t=!1;return a.mode===XI.API&&!1===a.enableDynamicApiTools&&(t=t||e.type===w.ALL_API),a.readOnlyMode&&(t=t||e.type!==w.READ),a.include?t=t||!a.include?.includes(e.name):a.exclude&&(t=t||a.exclude?.includes(e.name)),!t}))};exports.MondayAgentToolkit=class{constructor(a){this.mondayApi=new e.ApiClient({token:a.mondayApiToken,apiVersion:a.mondayApiVersion??"2026-01",requestConfig:a.mondayApiRequestConfig}),this.mondayApiToken=a.mondayApiToken,this.context=a.context,this.tools=this.initializeTools(a)}initializeTools(e){const a={apiClient:this.mondayApi,apiToken:this.mondayApiToken,context:this.context};return ZI(a,e.toolsConfiguration)}getTools(){return this.tools.map((e=>{const a=e.getInputSchema();return{type:"function",function:{name:e.name,description:e.getDescription(),parameters:a?g.zodToJsonSchema(h.z.object(a)):void 0}}}))}async handleToolCall(e){const{name:a,arguments:t}=e.function,n=JSON.parse(t),i=this.tools.find((e=>e.name===a));if(!i)throw new Error(`Unknown tool: ${a}`);const o=i.getInputSchema();if(o){const a=h.z.object(o).safeParse(n);if(!a.success)throw new Error(`Invalid arguments: ${a.error.message}`);const t=await i.execute(a.data);return{role:"tool",tool_call_id:e.id,content:t.content}}{const a=await i.execute();return{role:"tool",tool_call_id:e.id,content:a.content}}}};
1553
+ `),n=await this.mondayApi.request(t);if(!n.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let i=`## Type: ${n.__type.name||"Unnamed"} ${e.typeName===n.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${n.__type.kind}\n${n.__type.description?`Description: ${n.__type.description}`:""}\n\n`;return n.__type.fields&&n.__type.fields.length>0&&(i+="## Fields\n",n.__type.fields.forEach((e=>{const a=sE(e.type);i+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(i+=" Arguments:\n",e.args.forEach((e=>{const a=sE(e.type);i+=` - ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),i+="\n"),n.__type.inputFields&&n.__type.inputFields.length>0&&(i+="## Input Fields\n",n.__type.inputFields.forEach((e=>{const a=sE(e.type);i+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),i+="\n"),n.__type.interfaces&&n.__type.interfaces.length>0&&(i+="## Implements\n",n.__type.interfaces.forEach((e=>{i+=`- ${e.name}\n`})),i+="\n"),n.__type.enumValues&&n.__type.enumValues.length>0&&(i+="## Enum Values\n",n.__type.enumValues.forEach((e=>{i+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),i+="\n"),n.__type.possibleTypes&&n.__type.possibleTypes.length>0&&(i+="## Possible Types\n",n.__type.possibleTypes.forEach((e=>{i+=`- ${e.name}\n`}))),i+=`\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\\": \\"${n.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:i}}catch(e){const a=e instanceof Error?e.message:"Unknown error",t=a.includes("JSON");return{content:`Error fetching type details: ${a}${t?"\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 a}},class extends Yu{constructor(){super(...arguments),this.name="create_custom_activity",this.type=w.WRITE,this.annotations=Wu({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return bT}async executeInternal(e){const a={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request($_,a),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_timeline_item",this.type=w.WRITE,this.annotations=Wu({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return OT}async executeInternal(e){const a={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&&(a.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const t=await this.mondayApi.request(L_,a);return{content:`Timeline item '${e.title}' with ID ${t.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Yu{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=w.READ,this.annotations=Wu({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return jT}async executeInternal(e){const a=await this.mondayApi.request(F_);if(!a.custom_activity||0===a.custom_activity.length)return{content:"No custom activities found"};const t=a.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${t.length} custom activities: ${JSON.stringify(t,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="read_docs",this.type=w.READ,this.annotations=Wu({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 OE}async executeInternal(e){try{let a,t,n;switch(e.type){case"ids":a=e.ids;break;case"object_ids":t=e.ids;break;case"workspace_ids":n=e.ids}const i={ids:a,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:n};let o=await this.mondayApi.request(P_,i);if((!o.docs||0===o.docs.length)&&a){const t={ids:void 0,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:n};o=await this.mondayApi.request(P_,t)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const s=await this.enrichDocsWithMarkdown(o.docs,i),r=this.shouldSuggestPagination(o.docs.length,i.limit||25,i.page||1);return{content:s.content+r}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,a,t){return e===a?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${a} documents, which suggests there may be more. Consider calling this tool again with page: ${t+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,a){const t=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let a="";try{const t={docId:e.id},n=await this.mondayApi.request(j_,t);a=n.export_markdown_from_doc.success&&n.export_markdown_from_doc.markdown?n.export_markdown_from_doc.markdown:`Error getting markdown: ${n.export_markdown_from_doc.error||"Unknown error"}`}catch(e){a=`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:a}}))),n=a.page||1,i=a.limit||25,o=t.length,s=o===i;return{content:`Successfully retrieved ${t.length} document${1===t.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${n}\n- Documents per page: ${i}\n- Documents in this response: ${o}\n- Has more pages: ${s?"YES - call again with page: "+(n+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(t,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="workspace_info",this.type=w.READ,this.annotations=Wu({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 kE}async executeInternal(e){const a={workspace_id:e.workspace_id},t=await this.mondayApi.request(V_,a);if(!t.workspaces||0===t.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const n=function(e){const{workspaces:a,boards:t,docs:n,folders:i}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=new Map((i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),r=[];(t||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(a):r.push(a)}));const p=[];return(n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(a):p.push(a)})),{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(s.values()),root_items:{boards:r,docs:p}}}(t);return{content:`Workspace Information:\n\n**Workspace:** ${n.workspace.name} (ID: ${n.workspace.id})\n- Description: ${n.workspace.description||"No description"}\n- Kind: ${n.workspace.kind}\n- State: ${n.workspace.state}\n- Default Workspace: ${n.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${n.workspace.created_at}\n- Owners/Subscribers: ${n.workspace.owners_subscribers.length} users\n\n**Folders (${n.folders.length}):**\n${n.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 (${n.root_items.boards.length}): ${n.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${n.root_items.docs.length}): ${n.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${n.folders.length}\n- Total Boards: ${n.folders.reduce(((e,a)=>e+a.boards.length),0)+n.root_items.boards.length}\n- Total Docs: ${n.folders.reduce(((e,a)=>e+a.docs.length),0)+n.root_items.docs.length}\n\n${JSON.stringify(n,null,2)}`}}},class extends Yu{constructor(){super(...arguments),this.name="list_workspaces",this.type=w.READ,this.annotations=Wu({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 LE}async executeInternal(e){const a=e.searchTerm?1e4:e.limit,t=e.searchTerm?1:e.page;let n=null;if(e.searchTerm&&(n=$E(e.searchTerm),0===n.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const i={limit:a,page:t},o=await this.mondayApi.request(RE,i),s=o.workspaces?.filter((e=>e));if(!s||0===s.length)return{content:"No workspaces found."};const r=n&&s.length<=CE,p=this.filterWorkspacesIfNeeded(n,s,e);if(0===p.length)return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const d=p.length===e.limit;return{content:`\n${r?"IMPORTANT: Search term was not applied. Returning all workspaces. Please perform the filtering manually.":""}\n${p.map((e=>{const a=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${a}`})).join("\n")}\n${d?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}filterWorkspacesIfNeeded(e,a,t){if(!e||a.length<=CE)return a;const n=(t.page-1)*t.limit,i=n+t.limit;return a.filter((a=>$E(a.name).includes(e))).slice(n,i)}},class extends Yu{constructor(){super(...arguments),this.name="create_doc",this.type=w.WRITE,this.annotations=Wu({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 ME}async executeInternal(e){const a=BE.safeParse({...e,type:e.location});if(!a.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const t=a.data;try{let a,n;if(t.type===UE.enum.workspace){const i={location:{workspace:{workspace_id:t.workspace_id.toString(),name:e.doc_name,kind:t.doc_kind||gb.Public,folder_id:t.folder_id?.toString()}}},o=await this.mondayApi.request(PE,i);a=o?.create_doc?.id??void 0,n=o?.create_doc?.url??void 0}else if(t.type===UE.enum.item){const i={itemId:t.item_id.toString()},o=await this.mondayApi.request(FE,i),s=o.items?.[0];if(!s)return{content:`Error: Item with id ${t.item_id} not found.`};const r=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===hT.Doc));let d=t.column_id;if(!d)if(p)d=p.id;else{const e={boardId:r.toString(),columnType:hT.Doc,columnTitle:"Doc"},a=await this.mondayApi.request(O_,e);if(d=a?.create_column?.id,!d)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:t.item_id.toString(),column_id:d}}},l=await this.mondayApi.request(PE,c);if(a=l.create_doc?.id??void 0,n=l.create_doc?.url??void 0,e.doc_name&&a)try{const t={docId:a,name:e.doc_name};await this.mondayApi.request(VE,t)}catch(e){console.warn("Failed to update doc name:",e)}}if(!a)return{content:"Error: Failed to create document."};const i={docId:a,markdown:e.markdown},o=await this.mondayApi.request(jE,i),s=o?.add_content_to_doc_from_markdown?.success,r=o?.add_content_to_doc_from_markdown?.error;return s?{content:`✅ Document successfully created (id: ${a}). ${n?`\n\nURL: ${n}`:""}`}:{content:`Document ${a} created, but failed to add markdown content: ${r||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Yu{constructor(){super(...arguments),this.name="update_workspace",this.type=w.WRITE,this.annotations=Wu({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return KE}async executeInternal(e){const a={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},t=await this.mondayApi.request(YE,a);return{content:`Workspace ${t.update_workspace?.id} successfully updated`}}},class extends Yu{constructor(){super(...arguments),this.name="update_folder",this.type=w.WRITE,this.annotations=Wu({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return QE}async executeInternal(e){const{position_object_id:a,position_object_type:t,position_is_after:n}=e;if(!!a!=!!t)throw new Error("position_object_id and position_object_type must be provided together");const i={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:a?{position_is_after:n,position_object_id:a,position_object_type:t}:void 0},o=await this.mondayApi.request(JE,i);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Yu{constructor(){super(...arguments),this.name="create_workspace",this.type=w.WRITE,this.annotations=Wu({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return ZE}async executeInternal(e){const a={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},t=await this.mondayApi.request(XE,a);return{content:`Workspace ${t.create_workspace?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="create_folder",this.type=w.WRITE,this.annotations=Wu({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return aI}async executeInternal(e){const a={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},t=await this.mondayApi.request(eI,a);return{content:`Folder ${t.create_folder?.id} successfully created`}}},class extends Yu{constructor(){super(...arguments),this.name="move_object",this.type=w.WRITE,this.annotations=Wu({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 iI}async executeUpdateFolder(e){const{id:a,position_object_id:t,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:s,accountProductId:r}=e;if(!!t!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:a,position:t?{position_is_after:i,position_object_id:t,position_object_type:n}:void 0,parentFolderId:o,workspaceId:s,accountProductId:r},d=await this.mondayApi.request(JE,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:a,position_object_id:t,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:s,accountProductId:r}=e;if(!!t!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:a,attributes:{position:t?{position_is_after:i,position_object_id:t,position_object_type:n}:void 0,folder_id:o,workspace_id:s,account_product_id:r}},d=await this.mondayApi.request(tI,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:a,position_object_id:t,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:s,accountProductId:r}=e;if(!!t!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:a,attributes:{position:t?{position_is_after:i,position_object_id:t,position_object_type:n}:void 0,folder_id:o,workspace_id:s,account_product_id:r}},d=await this.mondayApi.request(nI,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:a}=e;switch(a){case Ey.Folder:return this.executeUpdateFolder(e);case Ey.Board:return this.executeUpdateBoardHierarchy(e);case Ey.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${a}`)}}},class extends Yu{constructor(){super(...arguments),this.name="create_dashboard",this.type=w.WRITE,this.annotations=Wu({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 HE}async executeInternal(e){try{const a={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()},t=await this.mondayApi.request(qE,a);if(!t.create_dashboard)throw new Error("Failed to create dashboard");const n=t.create_dashboard,i=n.board_folder_id?` in folder ${n.board_folder_id}`:" in workspace root",o=n.kind===Lb.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${n.name}" successfully created!\n\nDashboard Details:\n• ID: ${n.id}\n• Name: ${n.name}\n• Workspace ID: ${n.workspace_id}${i}\n• Visibility: ${n.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 a=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${a}`)}}},class extends Yu{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=w.READ,this.annotations=Wu({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={},a=await this.mondayApi.request(zE,e);if(!a.all_widgets_schema||0===a.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const t={};let n=0;for(const e of a.all_widgets_schema)if(e?.widget_type&&e?.schema){const a="string"==typeof e.schema?JSON.parse(e.schema):e.schema,i=a?.description||a?.title||`${e.widget_type} widget for data visualization`;t[e.widget_type]={type:e.widget_type,description:i,schema:e.schema},n++}if(0===n)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${n} schemas found):\n${Object.keys(t).map((e=>`• **${e}**: ${t[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(t,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 a=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${a}`)}}},class extends Yu{constructor(){super(...arguments),this.name="create_widget",this.type=w.WRITE,this.annotations=Wu({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 WE}async executeInternal(e){if(qx(e,"settings",WE.settings),!e.settings)throw new Error("You must pass either settings or settingsStringified parameter");try{const a={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},t=await this.mondayApi.request(GE,a);if(!t.create_widget)throw new Error("Failed to create widget");const n=t.create_widget,i=n.parent?.kind===aw.Dashboard?`dashboard ${n.parent.id}`:`board view ${n.parent?.id}`;return{content:`✅ Widget "${n.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${n.id}\n• **Name**: ${n.name}\n• **Type**: ${n.kind}\n• **Location**: Placed in ${i}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(a){const t=a instanceof Error?a.message:String(a);throw new Error(`Failed to create ${e.widget_kind} widget: ${t}`)}}},class extends Yu{constructor(){super(...arguments),this.name="board_insights",this.type=w.READ,this.annotations=Wu({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 cI}async executeInternal(e){if(!e.aggregations&&!e.aggregationsStringified)return{content:'Input must contain either the "aggregations" field or the "aggregationsStringified" field.'};qx(e,"aggregations",cI.aggregations),qx(e,"filters",cI.filters),qx(e,"orderBy",cI.orderBy);const{selectElements:a,groupByElements:t}=function(e){const a={},t=e.groupBy?.map((e=>({column_id:e})))||[],n=new Set(e.aggregations.filter((e=>e.function===tb.Label)).map((e=>e.columnId))),i=e.groupBy?.filter((e=>!n.has(e))).map((e=>({function:tb.Label,columnId:e})))??[],o=e.aggregations.concat(i).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,s=a[o]||0;a[o]=s+1;const r=`${o}_${s}`;return pI.has(e.function)&&(t.some((e=>e.column_id===r))||t.push({column_id:r})),{type:ab.Function,function:(n=e.function,i=e.columnId,{function:n,params:n===tb.CountItems?[]:[{type:ab.Column,column:dI(i),as:i}]}),as:r}}var n,i;const o={type:ab.Column,column:dI(e.columnId),as:e.columnId};return t.some((a=>a.column_id===e.columnId))||t.push({column_id:e.columnId}),o}));return t.forEach((e=>{o.some((a=>a.as===e.column_id))||o.push({type:ab.Column,column:dI(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:t}}(e),n=function(e){if(!e.filters&&!e.orderBy)return;const a={};return e.filters&&(a.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),a.operator=e.filtersOperator),e.orderBy&&(a.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),a}(e),i=function(e){return{id:e.boardId.toString(),type:eb.Table}}(e),o={query:{from:i,query:n,select:a,group_by:t,limit:e.limit}},s=await this.mondayApi.request(oI,o),r=(s.aggregate?.results??[]).map((e=>{const a={};return(e.entries??[]).forEach((e=>{const t=e.alias??"";if(!t)return;const n=e.value;if(!n)return void(a[t]=null);const i=n.result??n.value_string??n.value_int??n.value_float??n.value_boolean??null;a[t]=i})),a}));return r.length?{content:`Board insights result (${r.length} rows):\n${JSON.stringify(r,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Yu{constructor(){super(...arguments),this.name="search",this.type=w.READ,this.annotations=Wu({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 gI}async executeInternal(e){const a={[hI.BOARD]:this.searchBoardsAsync.bind(this),[hI.DOCUMENTS]:this.searchDocsAsync.bind(this),[hI.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!a)throw new Error(`Unsupported search type: ${e.searchType}`);const t=await a(e),n={disclaimer:t.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:t.items};return{content:JSON.stringify(n,null,2)}}async searchFoldersAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(uI,a),n=this.searchAndVirtuallyPaginate(e,t.folders||[],(e=>e.name));return{items:n.items.map((e=>({id:fI.FOLDER+e.id,title:e.name}))),wasFiltered:n.wasFiltered}}async searchDocsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(mI,a),n=this.searchAndVirtuallyPaginate(e,t.docs||[],(e=>e.name));return{items:n.items.map((e=>({id:fI.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:n.wasFiltered}}async searchBoardsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(lI,a),n=this.searchAndVirtuallyPaginate(e,t.boards||[],(e=>e.name));return{items:n.items.map((e=>({id:fI.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:n.wasFiltered}}getPagingParamsForSearch(e){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?1e4:e.limit}}searchAndVirtuallyPaginate(e,a,t){if(a.length<=vI)return{items:a,wasFiltered:!1};const n=$E(e.searchTerm??""),i=(e.page-1)*e.limit,o=i+e.limit;return{items:a.filter((e=>$E(t(e)).includes(n))).slice(i,o),wasFiltered:!0}}}];var ZI;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(ZI||(ZI={}));const eS=(e,a)=>{let t=[];a?.mode===ZI.APPS?t=[...Hu]:a?.mode!==ZI.API&&a?.mode||(t=[...XI,...QI]);const n=t.map((a=>((e,a)=>e.prototype instanceof Yu?new e(a.apiClient,a.apiToken,a.context):e.prototype instanceof lu?new e(a.apiToken):new e)(a,e)));return n.filter((e=>{if(!a)return e.type!==w.ALL_API;if(a.mode===ZI.API&&"only"===a.enableDynamicApiTools)return e.type===w.ALL_API;let t=!1;return a.mode===ZI.API&&!1===a.enableDynamicApiTools&&(t=t||e.type===w.ALL_API),a.readOnlyMode&&(t=t||e.type!==w.READ),a.include?t=t||!a.include?.includes(e.name):a.exclude&&(t=t||a.exclude?.includes(e.name)),!t}))};exports.MondayAgentToolkit=class{constructor(a){this.mondayApi=new e.ApiClient({token:a.mondayApiToken,apiVersion:a.mondayApiVersion??U_,endpoint:a.mondayApiEndpoint,requestConfig:a.mondayApiRequestConfig}),this.mondayApiToken=a.mondayApiToken,this.context={...a.context,apiVersion:a.mondayApiVersion??U_},this.tools=this.initializeTools(a)}initializeTools(e){const a={apiClient:this.mondayApi,apiToken:this.mondayApiToken,context:this.context};return eS(a,e.toolsConfiguration)}getTools(){return this.tools.map((e=>{const a=e.getInputSchema();return{type:"function",function:{name:e.name,description:e.getDescription(),parameters:a?g.zodToJsonSchema(h.z.object(a)):void 0}}}))}async handleToolCall(e){const{name:a,arguments:t}=e.function,n=JSON.parse(t),i=this.tools.find((e=>e.name===a));if(!i)throw new Error(`Unknown tool: ${a}`);const o=i.getInputSchema();if(o){const a=h.z.object(o).safeParse(n);if(!a.success)throw new Error(`Invalid arguments: ${a.error.message}`);const t=await i.execute(a.data);return{role:"tool",tool_call_id:e.id,content:t.content}}{const a=await i.execute();return{role:"tool",tool_call_id:e.id,content:a.content}}}};
1554
1554
  //# sourceMappingURL=index.js.map