@mondaydotcomorg/agent-toolkit 2.37.0 → 2.39.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.
@@ -696,6 +696,12 @@
696
696
  }
697
697
  }
698
698
  `,$T={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."},FT={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."}},PT={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."}},UT={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."}},VT={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"}},jT={destination_workspace_id:h.z.string().describe(FT.args.destinationWorkspaceId),destination_folder_id:h.z.string().optional().describe(FT.args.destinationFolderId),destination_folder_name:h.z.string().optional().describe(FT.args.destinationFolderName),board_kind:h.z.nativeEnum(ub).optional().describe(FT.args.boardKind),destination_name:h.z.string().optional().describe(FT.args.destinationName),board_owner_ids:h.z.array(h.z.string()).optional().describe(FT.args.boardOwnerIds),board_owner_team_ids:h.z.array(h.z.string()).optional().describe(FT.args.boardOwnerTeamIds),board_subscriber_ids:h.z.array(h.z.string()).optional().describe(FT.args.boardSubscriberIds),board_subscriber_teams_ids:h.z.array(h.z.string()).optional().describe(FT.args.boardSubscriberTeamsIds)};var BT,MT,qT,zT,GT,HT,WT,YT,KT,JT,QT,XT,ZT,ex,ax,tx;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(BT||(BT={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(MT||(MT={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(qT||(qT={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(zT||(zT={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(GT||(GT={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(HT||(HT={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(WT||(WT={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(YT||(YT={})),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"}(KT||(KT={})),function(e){e.Account="account",e.QueryParam="queryParam"}(JT||(JT={})),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"}(QT||(QT={})),function(e){e.And="AND",e.Or="OR"}(XT||(XT={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(ZT||(ZT={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(ex||(ex={})),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"}(ax||(ax={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(tx||(tx={}));const ix=h.z.object({type:h.z.nativeEnum(py).describe(UT.properties.type),title:h.z.string().describe(UT.properties.title).optional(),description:h.z.string().describe(UT.properties.description).optional(),visible:h.z.boolean().describe(UT.properties.visible).optional(),required:h.z.boolean().describe(UT.properties.required).optional(),options:h.z.array(h.z.object({label:h.z.string().describe(UT.properties.selectOptionsLabel)})).describe(UT.properties.selectOptions).optional(),settings:h.z.object({checkedByDefault:h.z.boolean().describe(VT.properties.checkedByDefault).optional(),defaultCurrentDate:h.z.boolean().describe(VT.properties.defaultCurrentDate).optional(),display:h.z.nativeEnum(ry).describe(VT.properties.display).optional(),includeTime:h.z.boolean().describe(VT.properties.includeTime).optional(),locationAutofilled:h.z.boolean().describe(VT.properties.locationAutofilled).optional(),optionsOrder:h.z.nativeEnum(sy).describe(VT.properties.optionsOrder).optional(),prefixAutofilled:h.z.boolean().describe(VT.properties.prefixAutofilled).optional(),prefixPredefined:h.z.object({enabled:h.z.boolean().describe(VT.properties.prefixPredefinedEnabled),prefix:h.z.string().describe(VT.properties.prefixPredefinedPrefix).optional()}).describe(VT.properties.prefixPredefined).optional(),skipValidation:h.z.boolean().describe(VT.properties.skipValidation).optional(),prefill:h.z.object({enabled:h.z.boolean().describe(VT.properties.prefillEnabled),lookup:h.z.string().describe(VT.properties.prefillLookup).optional(),source:h.z.nativeEnum(oy).describe(VT.properties.prefillSource).optional()}).describe(VT.properties.prefill).optional()}).optional()}),nx={action:h.z.nativeEnum(tx).describe(UT.actions.type),formToken:h.z.string().describe($T.formToken),questionId:h.z.string().describe($T.questionId).optional(),question:ix.describe(UT.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 ox{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(_T,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 i={formToken:e.formToken,questionId:a,question:t};return await this.mondayApi.request(TT,i),{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}},i=await this.mondayApi.request(wT,t);return{content:`Form question created successfully. ID: ${i.create_form_question?.id}`}}}const rx=(e,a,t)=>{const i=`${String(a)}Stringified`;if(e[a]||!e[i])return;let n;try{n=JSON.parse(e[i])}catch{throw new Error(`${String(i)} is not a valid JSON`)}const o="object"==typeof n&&!!n&&a in n&&1===Object.keys(n).length?n[a]:n,r=t.safeParse(o);if(!r.success)throw new Error(`JSON string defined as ${String(i)} does not match the specified schema`);e[a]=r.data};var sx;!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"}(sx||(sx={}));const px=h.z.object({id:h.z.string().describe(FT.properties.tags.id).optional(),name:h.z.string().describe(FT.properties.tags.name).optional(),value:h.z.string().describe(FT.properties.tags.value).optional(),columnId:h.z.string().describe(FT.properties.tags.columnId).optional()}),dx=h.z.object({type:h.z.nativeEnum(zT).describe(PT.properties.backgroundType).optional(),value:h.z.string().describe(PT.properties.backgroundValue).optional()}),cx=h.z.object({format:h.z.nativeEnum(HT).describe(PT.properties.format).optional(),alignment:h.z.nativeEnum(WT).describe(PT.properties.alignment).optional(),direction:h.z.nativeEnum(GT).describe(PT.properties.direction).optional()}),lx=h.z.object({position:h.z.nativeEnum(qT).describe(PT.properties.logoPosition).optional(),size:h.z.nativeEnum(MT).describe(PT.properties.logoSize).optional()}),mx=h.z.object({text:h.z.string().describe(PT.properties.submitButtonText).optional()}),ux=h.z.object({font:h.z.string().describe(PT.properties.font).optional(),color:h.z.string().describe(PT.properties.textColor).optional(),size:h.z.nativeEnum(YT).describe(PT.properties.fontSize).optional()}),fx=h.z.object({enabled:h.z.boolean().describe(PT.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:h.z.string().describe(PT.properties.redirectUrl).optional()}),hx=h.z.object({allowEditSubmission:h.z.boolean().describe(PT.properties.allowEditSubmission).optional(),allowResubmit:h.z.boolean().describe(PT.properties.allowResubmit).optional(),allowViewSubmission:h.z.boolean().describe(PT.properties.allowViewSubmission).optional(),description:h.z.string().describe(PT.properties.postSubmissionDescription).optional(),redirectAfterSubmission:fx.describe(PT.properties.redirectAfterSubmission).optional(),showSuccessImage:h.z.boolean().describe(PT.properties.showSuccessImage).optional(),title:h.z.string().describe(PT.properties.postSubmissionTitle).optional()}),vx=h.z.object({enabled:h.z.boolean().describe(PT.properties.closeDateEnabled).optional(),date:h.z.string().describe(PT.properties.closeDateValue).optional()}),gx=h.z.object({enabled:h.z.boolean().describe(PT.properties.draftSubmissionEnabled).optional()}),bx=h.z.object({itemGroupId:h.z.string().describe(PT.properties.itemGroupId).optional(),includeNameQuestion:h.z.boolean().describe(PT.properties.includeNameQuestion).optional(),includeUpdateQuestion:h.z.boolean().describe(PT.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:h.z.boolean().describe(PT.properties.syncQuestionAndColumnsTitles).optional()}),yx=h.z.object({enabled:h.z.boolean().describe(PT.properties.passwordEnabled).optional()}),_x=h.z.object({text:h.z.string().describe(PT.properties.startButtonText).optional()}),wx=h.z.object({enabled:h.z.boolean().describe(PT.properties.preSubmissionEnabled).optional(),title:h.z.string().describe(PT.properties.preSubmissionTitle).optional(),description:h.z.string().describe(PT.properties.preSubmissionDescription).optional(),startButton:_x.describe(PT.properties.startButton).optional()}),Tx=h.z.object({enabled:h.z.boolean().describe(PT.properties.requireLoginEnabled).optional(),redirectToLogin:h.z.boolean().describe(PT.properties.redirectToLogin).optional()}),xx=h.z.object({enabled:h.z.boolean().describe(PT.properties.responseLimitEnabled).optional(),limit:h.z.number().describe(PT.properties.responseLimitValue).optional()}),Ex=h.z.object({background:dx.describe(PT.properties.background).optional(),hideBranding:h.z.boolean().describe(PT.properties.hideBranding).optional(),layout:cx.describe(PT.properties.layout).optional(),logo:lx.describe(PT.properties.logo).optional(),primaryColor:h.z.string().describe(PT.properties.primaryColor).optional(),showProgressBar:h.z.boolean().describe(PT.properties.showProgressBar).optional(),submitButton:mx.describe(PT.properties.submitButton).optional(),text:ux.describe(PT.properties.text).optional()}),Ix=h.z.object({language:h.z.string().describe(PT.properties.language).optional(),logoAltText:h.z.string().describe(PT.properties.logoAltText).optional()}),Sx=h.z.object({afterSubmissionView:hx.describe(PT.properties.afterSubmissionView).optional(),closeDate:vx.describe(PT.properties.closeDate).optional(),draftSubmission:gx.describe(PT.properties.draftSubmission).optional(),monday:bx.describe(PT.properties.monday).optional(),password:yx.describe(PT.properties.password).optional(),preSubmissionView:wx.describe(PT.properties.preSubmissionView).optional(),reCaptchaChallenge:h.z.boolean().describe(PT.properties.reCaptchaChallenge).optional(),requireLogin:Tx.describe(PT.properties.requireLogin).optional(),responseLimit:xx.describe(PT.properties.responseLimit).optional()}),Nx=h.z.object({id:h.z.string().describe(FT.inputs.questionId)}),Ax=h.z.object({appearance:Ex.describe(FT.inputs.form.appearance).optional(),accessibility:Ix.describe(FT.inputs.form.accessibility).optional(),features:Sx.describe(FT.inputs.form.features).optional(),title:h.z.string().describe(FT.inputs.title).optional(),description:h.z.string().describe(FT.inputs.description).optional(),questions:h.z.array(Nx).describe(FT.inputs.questions).optional()}),Dx={formToken:h.z.string().describe($T.formToken),action:h.z.nativeEnum(sx).describe(FT.operations.updateForm.action),formPassword:h.z.string().describe(PT.operations.setFormPassword).optional(),tag:px.describe(FT.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:Ax.describe(FT.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 Ox{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(xT,a),{content:"Form password successfully set."}}async shortenFormUrl(e){const a={formToken:e.formToken};return await this.mondayApi.request(ET,a),{content:"Form URL successfully shortened."}}async deactivateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(IT,a),{content:"Form successfully deactivated."}}async activateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(ST,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(AT,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(NT,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(DT,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(OT,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(RT,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(kT,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(CT,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(LT,a);return{content:`Form header content successfully updated: ${JSON.stringify(t.update_form,null,2)}`}}}const Rx={formToken:h.z.string().describe($T.formToken)};const kx=Object.fromEntries(Object.entries(Nb).filter((([e])=>"Person"!==e))),Cx={columnType:h.z.nativeEnum(kx).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.")},Lx={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...Cx};const $x={color:h.z.nativeEnum(Db).describe("The color of the custom activity"),icon_id:h.z.nativeEnum(Ob).describe("The icon ID of the custom activity"),name:h.z.string().describe("The name of the custom activity")};const Fx=Bw`
699
+ mutation createNotification($user_id: ID!, $target_id: ID!, $text: String!, $target_type: NotificationTargetType!) {
700
+ create_notification(user_id: $user_id, target_id: $target_id, text: $text, target_type: $target_type) {
701
+ text
702
+ }
703
+ }
704
+ `,Px={user_id:h.z.string().describe("The user ID to send the notification to"),target_id:h.z.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:h.z.string().describe("The notification text"),target_type:h.z.nativeEnum(xy).describe("The target type (Post for update/reply, Project for item/board)")};const Ux=Bw`
699
705
  mutation createGroup(
700
706
  $boardId: ID!
701
707
  $groupName: String!
@@ -714,14 +720,14 @@
714
720
  title
715
721
  }
716
722
  }
717
- `,Px=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],Ux={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(Px).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${Px.join(", ")}`),relativeTo:h.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:h.z.nativeEnum(Dy).optional().describe("Whether to position the new group before or after the relativeTo group")};const Vx=Bw`
723
+ `,Vx=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],jx={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(Vx).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${Vx.join(", ")}`),relativeTo:h.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:h.z.nativeEnum(Dy).optional().describe("Whether to position the new group before or after the relativeTo group")};const Bx=Bw`
718
724
  mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
719
725
  duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
720
726
  id
721
727
  name
722
728
  }
723
729
  }
724
- `,jx=Bw`
730
+ `,Mx=Bw`
725
731
  mutation createSubitem($parentItemId: ID!, $itemName: String!, $columnValues: JSON) {
726
732
  create_subitem(parent_item_id: $parentItemId, item_name: $itemName, column_values: $columnValues) {
727
733
  id
@@ -731,13 +737,13 @@
731
737
  }
732
738
  }
733
739
  }
734
- `,Bx=1e3;var Mx,qx;!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"}(Mx||(Mx={})),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=Bx]="SECOND"}(qx||(qx={}));const zx=10*qx.SECOND;function Gx(e,a){const t=e?.response?.errors?.map((e=>e.message))?.join(", ");if(t)throw new Error(`Failed to ${a}: ${t}`);const i=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${a}: ${i}`)}function Hx(e){if(e instanceof Error&&"AbortError"===e.name)throw new Error("Search has timed out, try providing alternative search term")}const Wx={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)")},Yx={boardId:h.z.number().describe("The id of the board to which the new item will be added"),...Wx};const Kx={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 Jx=Bw`
740
+ `,qx=1e3;var zx,Gx;!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"}(zx||(zx={})),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=qx]="SECOND"}(Gx||(Gx={}));const Hx=10*Gx.SECOND;function Wx(e,a){const t=e?.response?.errors?.map((e=>e.message))?.join(", ");if(t)throw new Error(`Failed to ${a}: ${t}`);const i=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${a}: ${i}`)}function Yx(e){if(e instanceof Error&&"AbortError"===e.name)throw new Error("Search has timed out, try providing alternative search term")}const Kx={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)")},Jx={boardId:h.z.number().describe("The id of the board to which the new item will be added"),...Kx};const Qx={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 Xx=Bw`
735
741
  mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention]) {
736
742
  create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList) {
737
743
  id
738
744
  }
739
745
  }
740
- `,Qx=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(wy).describe("The type of mention: User, Team, Board, or Project")}),Xx=h.z.array(Qx),Zx={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 eE={columnId:h.z.string().describe("The id of the column to be deleted")},aE={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...eE};const tE={itemId:h.z.number()};const iE={};const nE=Bw`
746
+ `,Zx=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(wy).describe("The type of mention: User, Team, Board, or Project")}),eE=h.z.array(Zx),aE={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 tE={columnId:h.z.string().describe("The id of the column to be deleted")},iE={boardId:h.z.number().describe("The id of the board to which the new column will be added"),...tE};const nE={itemId:h.z.number()};const oE={};const rE=Bw`
741
747
  query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
742
748
  boards(ids: [$boardId]) {
743
749
  id
@@ -780,7 +786,7 @@
780
786
  }
781
787
  }
782
788
  }
783
- `,oE=Bw`
789
+ `,sE=Bw`
784
790
  query getUsersByIds($userIds: [ID!]!) {
785
791
  users(ids: $userIds) {
786
792
  id
@@ -788,7 +794,7 @@
788
794
  photo_tiny
789
795
  }
790
796
  }
791
- `,rE=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(hy).optional().default(hy.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.'),sE=h.z.nativeEnum(fy).optional().default(fy.And).describe("The operator to use for the filters"),pE={boardId:h.z.number().describe("The ID of the board to fetch complete data for"),filters:rE,filtersOperator:sE};const dE=Bw`
797
+ `,pE=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(hy).optional().default(hy.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.'),dE=h.z.nativeEnum(fy).optional().default(fy.And).describe("The operator to use for the filters"),cE={boardId:h.z.number().describe("The ID of the board to fetch complete data for"),filters:pE,filtersOperator:dE};const lE=Bw`
792
798
  query GetBoardAllActivity(
793
799
  $boardId: ID!
794
800
  $fromDate: ISO8601DateTime!
@@ -806,7 +812,7 @@
806
812
  }
807
813
  }
808
814
  }
809
- `,cE={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 lE=Bw`
815
+ `,mE={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 uE=Bw`
810
816
  query GetBoardInfo($boardId: ID!) {
811
817
  boards(ids: [$boardId]) {
812
818
  # Basic Board Metadata
@@ -883,7 +889,7 @@
883
889
  }
884
890
  }
885
891
  }
886
- `,mE=Bw`
892
+ `,fE=Bw`
887
893
  query GetBoardInfoJustColumns($boardId: ID!) {
888
894
  boards(ids: [$boardId]) {
889
895
  columns {
@@ -895,7 +901,7 @@
895
901
  }
896
902
  }
897
903
  }
898
- `,uE=(e,a)=>({board:{...e,subItemColumns:a?.columns??void 0},filteringGuidelines:gE(e.columns.filter(fE)),aggregationGuidelines:vE()});function fE(e){return!!e&&["id","type"].every((a=>a in e))}const hE={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'},vE=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Jg.CountItems} function. Do not use ${Jg.Count} function for that purpose.\n `,gE=e=>{const a=e.reduce(((e,a)=>hE[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(", ")}) - ${hE[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},bE={boardId:h.z.number().describe("The id of the board to get information for")};const yE=Bw`
904
+ `,hE=(e,a)=>({board:{...e,subItemColumns:a?.columns??void 0},filteringGuidelines:yE(e.columns.filter(vE)),aggregationGuidelines:bE()});function vE(e){return!!e&&["id","type"].every((a=>a in e))}const gE={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'},bE=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Jg.CountItems} function. Do not use ${Jg.Count} function for that purpose.\n `,yE=e=>{const a=e.reduce(((e,a)=>gE[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(", ")}) - ${gE[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},_E={boardId:h.z.number().describe("The id of the board to get information for")};const wE=Bw`
899
905
  fragment ItemDataFragment on Item {
900
906
  id
901
907
  name
@@ -948,7 +954,7 @@
948
954
  }
949
955
  }
950
956
  }
951
- `,_E=Bw`
957
+ `,TE=Bw`
952
958
  query SearchItemsDev($searchTerm: String!, $board_ids: [ID!]) {
953
959
  search_items(board_ids: $board_ids, query: $searchTerm, size: 100) {
954
960
  results {
@@ -958,11 +964,11 @@
958
964
  }
959
965
  }
960
966
  }
961
- `,wE={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:rE,filtersOperator:sE,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(uy).optional().default(uy.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 TE={boardId:h.z.number().describe("The id of the board to get the schema of")};const xE=Bw`
967
+ `,xE={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:pE,filtersOperator:dE,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(uy).optional().default(uy.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 IE=Bw`
962
968
  query GetColumnTypeSchema($type: ColumnType!) {
963
969
  get_column_type_schema(type: $type)
964
970
  }
965
- `,EE={columnType:h.z.nativeEnum(kx).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 SE={typeName:h.z.string().describe("The name of the GraphQL type to get details for")};function NE(e){return e?"NON_NULL"===e.kind?`${NE(e.ofType)}!`:"LIST"===e.kind?`[${NE(e.ofType)}]`:e.name||"unknown":"unknown"}const AE=Bw`
971
+ `,SE={columnType:h.z.nativeEnum(kx).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 AE={typeName:h.z.string().describe("The name of the GraphQL type to get details for")};function DE(e){return e?"NON_NULL"===e.kind?`${DE(e.ofType)}!`:"LIST"===e.kind?`[${DE(e.ofType)}]`:e.name||"unknown":"unknown"}const OE=Bw`
966
972
  fragment UserDetails on User {
967
973
  # Basic User Information
968
974
  id
@@ -994,31 +1000,31 @@
994
1000
  time_zone_identifier
995
1001
  utc_hours_diff
996
1002
  }
997
- `,DE=Bw`
1003
+ `,RE=Bw`
998
1004
  fragment UserTeamMembership on Team {
999
1005
  id
1000
1006
  name
1001
1007
  is_guest
1002
1008
  picture_url
1003
1009
  }
1004
- `,OE=Bw`
1010
+ `,kE=Bw`
1005
1011
  fragment TeamBasicInfo on Team {
1006
1012
  id
1007
1013
  name
1008
1014
  }
1009
- `,RE=Bw`
1015
+ `,CE=Bw`
1010
1016
  fragment TeamExtendedInfo on Team {
1011
1017
  ...TeamBasicInfo
1012
1018
  is_guest
1013
1019
  picture_url
1014
1020
  }
1015
- `,kE=Bw`
1021
+ `,LE=Bw`
1016
1022
  fragment TeamOwner on User {
1017
1023
  id
1018
1024
  name
1019
1025
  email
1020
1026
  }
1021
- `,CE=Bw`
1027
+ `,$E=Bw`
1022
1028
  fragment TeamMember on User {
1023
1029
  id
1024
1030
  name
@@ -1038,7 +1044,7 @@
1038
1044
  time_zone_identifier
1039
1045
  utc_hours_diff
1040
1046
  }
1041
- `,LE=Bw`
1047
+ `,FE=Bw`
1042
1048
  fragment TeamMemberSimplified on User {
1043
1049
  id
1044
1050
  name
@@ -1047,15 +1053,15 @@
1047
1053
  is_admin
1048
1054
  is_guest
1049
1055
  }
1050
- `,$E=Bw`
1056
+ `,PE=Bw`
1051
1057
  fragment UserTeamMembershipSimplified on Team {
1052
1058
  id
1053
1059
  name
1054
1060
  is_guest
1055
1061
  }
1056
- `,FE=Bw`
1057
- ${AE}
1058
- ${DE}
1062
+ `,UE=Bw`
1063
+ ${OE}
1064
+ ${RE}
1059
1065
 
1060
1066
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1061
1067
  users(ids: $userIds, limit: $limit) {
@@ -1067,9 +1073,9 @@
1067
1073
  }
1068
1074
  }
1069
1075
  }
1070
- `,PE=Bw`
1071
- ${AE}
1072
- ${DE}
1076
+ `,VE=Bw`
1077
+ ${OE}
1078
+ ${RE}
1073
1079
 
1074
1080
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1075
1081
  users(ids: $userIds, limit: $limit) {
@@ -1081,13 +1087,13 @@
1081
1087
  }
1082
1088
  }
1083
1089
  }
1084
- `,UE=Bw`
1085
- ${AE}
1086
- ${$E}
1087
- ${RE}
1090
+ `,jE=Bw`
1088
1091
  ${OE}
1092
+ ${PE}
1093
+ ${CE}
1089
1094
  ${kE}
1090
1095
  ${LE}
1096
+ ${FE}
1091
1097
 
1092
1098
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1093
1099
  users(ids: $userIds, limit: $limit) {
@@ -1113,19 +1119,19 @@
1113
1119
  }
1114
1120
  }
1115
1121
  }
1116
- `,VE=Bw`
1117
- ${OE}
1122
+ `,BE=Bw`
1123
+ ${kE}
1118
1124
 
1119
1125
  query listTeamsOnly($teamIds: [ID!]) {
1120
1126
  teams(ids: $teamIds) {
1121
1127
  ...TeamBasicInfo
1122
1128
  }
1123
1129
  }
1124
- `,jE=Bw`
1125
- ${RE}
1126
- ${OE}
1127
- ${kE}
1130
+ `,ME=Bw`
1128
1131
  ${CE}
1132
+ ${kE}
1133
+ ${LE}
1134
+ ${$E}
1129
1135
 
1130
1136
  query listTeamsWithMembers($teamIds: [ID!]) {
1131
1137
  teams(ids: $teamIds) {
@@ -1142,9 +1148,9 @@
1142
1148
  }
1143
1149
  }
1144
1150
  }
1145
- `,BE=Bw`
1146
- ${AE}
1147
- ${DE}
1151
+ `,qE=Bw`
1152
+ ${OE}
1153
+ ${RE}
1148
1154
 
1149
1155
  query getUserByName($name: String) {
1150
1156
  users(name: $name) {
@@ -1156,7 +1162,7 @@
1156
1162
  }
1157
1163
  }
1158
1164
  }
1159
- `,ME=Bw`
1165
+ `,zE=Bw`
1160
1166
  query getCurrentUser {
1161
1167
  me {
1162
1168
  id
@@ -1168,7 +1174,7 @@
1168
1174
  photo_thumb
1169
1175
  }
1170
1176
  }
1171
- `;const qE=[["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 zE(e,a=""){return qE.filter((([a])=>{const t=e[a];return null!=t})).map((([t,i])=>`${a}${i}: ${e[t]}`))}const GE=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(...zE(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}`,...zE(e)];a.push(` - ${t.join(", ")}`)}})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},HE=500,WE=500,YE=1e3,KE={userIds:h.z.array(h.z.string()).max(HE).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(WE).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 JE={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 QE={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(jb).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 XE={workspace_id:h.z.number().describe("The ID of the workspace to get information for")};const ZE=Bw`
1177
+ `;const GE=[["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 HE(e,a=""){return GE.filter((([a])=>{const t=e[a];return null!=t})).map((([t,i])=>`${a}${i}: ${e[t]}`))}const WE=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(...HE(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}`,...HE(e)];a.push(` - ${t.join(", ")}`)}})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},YE=500,KE=500,JE=1e3,QE={userIds:h.z.array(h.z.string()).max(YE).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(KE).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 XE={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 ZE={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(jb).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 eI={workspace_id:h.z.number().describe("The ID of the workspace to get information for")};const aI=Bw`
1172
1178
  query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
1173
1179
  workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
1174
1180
  id
@@ -1176,7 +1182,7 @@
1176
1182
  description
1177
1183
  }
1178
1184
  }
1179
- `,eI=100,aI=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function tI(e){const a=e.workspaces?.filter((e=>null!==e));return a||[]}function iI(e){return Array.isArray(e)&&e.length>0}const nI={searchTerm:h.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORANT] Only alphanumeric characters are supported."),limit:h.z.number().min(1).max(eI).default(eI).describe("Number of workspaces to return. Set to max (100) lower for smaller response size"),page:h.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const oI=Bw`
1185
+ `,tI=100,iI=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function nI(e){const a=e.workspaces?.filter((e=>null!==e));return a||[]}function oI(e){return Array.isArray(e)&&e.length>0}const rI={searchTerm:h.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORANT] Only alphanumeric characters are supported."),limit:h.z.number().min(1).max(tI).default(tI).describe("Number of workspaces to return. Set to max (100) lower for smaller response size"),page:h.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const sI=Bw`
1180
1186
  query getItemBoard($itemId: ID!) {
1181
1187
  items(ids: [$itemId]) {
1182
1188
  id
@@ -1189,7 +1195,7 @@
1189
1195
  }
1190
1196
  }
1191
1197
  }
1192
- `,rI=Bw`
1198
+ `,pI=Bw`
1193
1199
  mutation createDoc($location: CreateDocInput!) {
1194
1200
  create_doc(location: $location) {
1195
1201
  id
@@ -1197,7 +1203,7 @@
1197
1203
  name
1198
1204
  }
1199
1205
  }
1200
- `,sI=Bw`
1206
+ `,dI=Bw`
1201
1207
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1202
1208
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1203
1209
  success
@@ -1205,11 +1211,11 @@
1205
1211
  error
1206
1212
  }
1207
1213
  }
1208
- `,pI=Bw`
1214
+ `,cI=Bw`
1209
1215
  mutation updateDocName($docId: ID!, $name: String!) {
1210
1216
  update_doc_name(docId: $docId, name: $name)
1211
1217
  }
1212
- `,dI=h.z.enum(["workspace","item"]),cI=h.z.discriminatedUnion("type",[h.z.object({type:h.z.literal(dI.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(ub).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(dI.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.")})]),lI={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(ub).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 mI=Bw`
1218
+ `,lI=h.z.enum(["workspace","item"]),mI=h.z.discriminatedUnion("type",[h.z.object({type:h.z.literal(lI.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(ub).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(lI.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.")})]),uI={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(ub).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 fI=Bw`
1213
1219
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1214
1220
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1215
1221
  success
@@ -1217,13 +1223,13 @@
1217
1223
  error
1218
1224
  }
1219
1225
  }
1220
- `,uI=Bw`
1226
+ `,hI=Bw`
1221
1227
  query getDocByObjectId($objectId: [ID!]) {
1222
1228
  docs(object_ids: $objectId) {
1223
1229
  id
1224
1230
  }
1225
1231
  }
1226
- `,fI={doc_id:h.z.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:h.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:h.z.string().describe("Markdown content to add to the document."),after_block_id:h.z.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};const hI=Bw`
1232
+ `,vI={doc_id:h.z.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:h.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:h.z.string().describe("Markdown content to add to the document."),after_block_id:h.z.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};const gI=Bw`
1227
1233
  mutation CreateDashboard(
1228
1234
  $name: String!
1229
1235
  $workspace_id: ID!
@@ -1245,14 +1251,14 @@
1245
1251
  board_folder_id
1246
1252
  }
1247
1253
  }
1248
- `,vI=Bw`
1254
+ `,bI=Bw`
1249
1255
  query GetAllWidgetsSchema {
1250
1256
  all_widgets_schema {
1251
1257
  widget_type
1252
1258
  schema
1253
1259
  }
1254
1260
  }
1255
- `,gI=Bw`
1261
+ `,yI=Bw`
1256
1262
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1257
1263
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1258
1264
  id
@@ -1264,13 +1270,13 @@
1264
1270
  }
1265
1271
  }
1266
1272
  }
1267
- `,bI={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(kb).default(kb.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 yI={parent_container_id:h.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:h.z.nativeEnum(h_).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:h.z.nativeEnum(qb).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 _I=Bw`
1273
+ `,_I={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(kb).default(kb.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 wI={parent_container_id:h.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:h.z.nativeEnum(h_).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:h.z.nativeEnum(qb).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 TI=Bw`
1268
1274
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1269
1275
  update_workspace(id: $id, attributes: $attributes) {
1270
1276
  id
1271
1277
  }
1272
1278
  }
1273
- `,wI={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(y_).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 TI=Bw`
1279
+ `,xI={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(y_).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 EI=Bw`
1274
1280
  mutation updateFolder(
1275
1281
  $folderId: ID!
1276
1282
  $name: String
@@ -1296,7 +1302,7 @@
1296
1302
  id
1297
1303
  }
1298
1304
  }
1299
- `,xI={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(Sy).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 EI=Bw`
1305
+ `,II={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(Sy).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 SI=Bw`
1300
1306
  mutation createWorkspace(
1301
1307
  $name: String!
1302
1308
  $workspaceKind: WorkspaceKind!
@@ -1312,7 +1318,7 @@
1312
1318
  id
1313
1319
  }
1314
1320
  }
1315
- `,II={name:h.z.string().describe("The name of the new workspace to be created"),workspaceKind:h.z.nativeEnum(y_).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 SI=Bw`
1321
+ `,NI={name:h.z.string().describe("The name of the new workspace to be created"),workspaceKind:h.z.nativeEnum(y_).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 AI=Bw`
1316
1322
  mutation createFolder(
1317
1323
  $workspaceId: ID!
1318
1324
  $name: String!
@@ -1332,7 +1338,7 @@
1332
1338
  id
1333
1339
  }
1334
1340
  }
1335
- `,NI={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=Bw`
1341
+ `,DI={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 OI=Bw`
1336
1342
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1337
1343
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1338
1344
  success
@@ -1342,7 +1348,7 @@
1342
1348
  }
1343
1349
  }
1344
1350
  }
1345
- `,DI=Bw`
1351
+ `,RI=Bw`
1346
1352
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
1347
1353
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
1348
1354
  success
@@ -1352,7 +1358,7 @@
1352
1358
  }
1353
1359
  }
1354
1360
  }
1355
- `,OI={objectType:h.z.nativeEnum(Sy).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(Sy).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 RI=Bw`
1361
+ `,kI={objectType:h.z.nativeEnum(Sy).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(Sy).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 CI=Bw`
1356
1362
  query aggregateBoardInsights($query: AggregateQueryInput!) {
1357
1363
  aggregate(query: $query) {
1358
1364
  results {
@@ -1370,7 +1376,7 @@
1370
1376
  }
1371
1377
  }
1372
1378
  }
1373
- `,kI=new Set([Jg.Case,Jg.Between,Jg.Left,Jg.Raw,Jg.None,Jg.CountKeys]),CI=Object.values(Jg).filter((e=>!kI.has(e))),LI=new Set([Jg.Left,Jg.Trim,Jg.Upper,Jg.Lower,Jg.DateTruncDay,Jg.DateTruncWeek,Jg.DateTruncMonth,Jg.DateTruncQuarter,Jg.DateTruncYear,Jg.Color,Jg.Label,Jg.EndDate,Jg.StartDate,Jg.Hour,Jg.PhoneCountryShortName,Jg.Person,Jg.Upper,Jg.Lower,Jg.Order,Jg.Length,Jg.Flatten,Jg.IsDone]);function $I(e){return{column_id:e}}new Set([Jg.Count,Jg.CountDistinct,Jg.CountSubitems,Jg.CountItems,Jg.First,Jg.Sum,Jg.Average,Jg.Median,Jg.Min,Jg.Max,Jg.MinMax]);const FI={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(CI).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:rE,filtersOperator:sE,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(uy).optional().default(uy.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 PI=Bw`
1379
+ `,LI=new Set([Jg.Case,Jg.Between,Jg.Left,Jg.Raw,Jg.None,Jg.CountKeys]),$I=Object.values(Jg).filter((e=>!LI.has(e))),FI=new Set([Jg.Left,Jg.Trim,Jg.Upper,Jg.Lower,Jg.DateTruncDay,Jg.DateTruncWeek,Jg.DateTruncMonth,Jg.DateTruncQuarter,Jg.DateTruncYear,Jg.Color,Jg.Label,Jg.EndDate,Jg.StartDate,Jg.Hour,Jg.PhoneCountryShortName,Jg.Person,Jg.Upper,Jg.Lower,Jg.Order,Jg.Length,Jg.Flatten,Jg.IsDone]);function PI(e){return{column_id:e}}new Set([Jg.Count,Jg.CountDistinct,Jg.CountSubitems,Jg.CountItems,Jg.First,Jg.Sum,Jg.Average,Jg.Median,Jg.Min,Jg.Max,Jg.MinMax]);const UI={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($I).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:pE,filtersOperator:dE,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(uy).optional().default(uy.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 VI=Bw`
1374
1380
  query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1375
1381
  boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1376
1382
  id
@@ -1378,7 +1384,7 @@
1378
1384
  url
1379
1385
  }
1380
1386
  }
1381
- `,UI=Bw`
1387
+ `,jI=Bw`
1382
1388
  query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1383
1389
  docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1384
1390
  id
@@ -1386,14 +1392,14 @@
1386
1392
  url
1387
1393
  }
1388
1394
  }
1389
- `,VI=Bw`
1395
+ `,BI=Bw`
1390
1396
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1391
1397
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1392
1398
  id
1393
1399
  name
1394
1400
  }
1395
1401
  }
1396
- `,jI=Bw`
1402
+ `,MI=Bw`
1397
1403
  query SearchDev($query: String!, $size: Int!, $entityTypes: [SearchableEntity!], $workspaceIds: [ID!]) {
1398
1404
  search(query: $query, size: $size, entity_types: $entityTypes, workspace_ids: $workspaceIds) {
1399
1405
  __typename
@@ -1414,7 +1420,14 @@
1414
1420
  }
1415
1421
  }
1416
1422
  }
1417
- `;var BI,MI,qI,zI,GI,HI,WI,YI,KI,JI,QI,XI,ZI,eS,aS,tS,iS,nS,oS,rS,sS,pS,dS,cS,lS,mS,uS,fS,hS,vS,gS,bS,yS,_S,wS,TS,xS,ES,IS,SS,NS,AS,DS,OS,RS,kS,CS,LS,$S,FS,PS,US,VS,jS,BS,MS,qS,zS,GS,HS,WS,YS,KS,JS,QS,XS,ZS,eN,aN,tN,iN,nN,oN,rN,sN,pN,dN,cN,lN,mN,uN,fN,hN,vN,gN,bN,yN,_N,wN,TN,xN,EN,IN,SN,NN,AN,DN,ON,RN,kN,CN,LN,$N,FN,PN,UN,VN,jN,BN,MN,qN,zN,GN,HN,WN,YN,KN,JN,QN,XN,ZN,eA,aA,tA,iA,nA,oA,rA,sA,pA,dA,cA,lA,mA,uA,fA,hA,vA,gA,bA,yA,_A,wA,TA,xA,EA;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(BI||(BI={})),function(e){e.Table="TABLE"}(MI||(MI={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsTerms="CONTAINS_TERMS",e.ContainsText="CONTAINS_TEXT",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.StartsWith="STARTS_WITH",e.WithinTheLast="WITHIN_THE_LAST",e.WithinTheNext="WITHIN_THE_NEXT"}(qI||(qI={})),function(e){e.TableHistory="TABLE_HISTORY"}(zI||(zI={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(GI||(GI={})),function(e){e.And="AND",e.Or="OR"}(HI||(HI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(WI||(WI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(YI||(YI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(KI||(KI={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(JI||(JI={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(QI||(QI={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(XI||(XI={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(ZI||(ZI={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(eS||(eS={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(aS||(aS={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(tS||(tS={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(iS||(iS={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(nS||(nS={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(oS||(oS={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(rS||(rS={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(sS||(sS={})),function(e){e.Edit="edit",e.View="view"}(pS||(pS={})),function(e){e.Communication="communication",e.Description="description",e.Name="name"}(dS||(dS={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(cS||(cS={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(lS||(lS={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(mS||(mS={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(uS||(uS={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(fS||(fS={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(hS||(hS={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(vS||(vS={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(gS||(gS={})),function(e){e.Edit="edit",e.View="view"}(bS||(bS={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(yS||(yS={})),function(e){e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(_S||(_S={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(wS||(wS={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(TS||(TS={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(xS||(xS={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(ES||(ES={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(IS||(IS={})),function(e){e.Description="description",e.Title="title"}(SS||(SS={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(NS||(NS={})),function(e){e.Account="ACCOUNT",e.User="USER"}(AS||(AS={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(DS||(DS={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(OS||(OS={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(RS||(RS={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(kS||(kS={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(CS||(CS={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(LS||(LS={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}($S||($S={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(FS||(FS={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(PS||(PS={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(US||(US={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(VS||(VS={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(jS||(jS={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(BS||(BS={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(MS||(MS={})),function(e){e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.Gantt="GANTT",e.Number="NUMBER",e.Table="TABLE"}(qS||(qS={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(zS||(zS={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(GS||(GS={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(HS||(HS={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(WS||(WS={})),function(e){e.Monday="monday",e.Sunday="sunday"}(YS||(YS={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(KS||(KS={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(JS||(JS={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(QS||(QS={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(XS||(XS={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(ZS||(ZS={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(eN||(eN={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(aN||(aN={})),function(e){e.Classic="Classic",e.OneByOne="OneByOne"}(tN||(tN={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(iN||(iN={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(nN||(nN={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(oN||(oN={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(rN||(rN={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(sN||(sN={})),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"}(pN||(pN={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(dN||(dN={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(cN||(cN={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(lN||(lN={})),function(e){e.Error="ERROR"}(mN||(mN={})),function(e){e.Asc="asc",e.Desc="desc"}(uN||(uN={})),function(e){e.And="and",e.Or="or"}(fN||(fN={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(hN||(hN={})),function(e){e.Person="person",e.Team="team"}(vN||(vN={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(gN||(gN={})),function(e){e.Board="BOARD",e.Document="DOCUMENT"}(bN||(bN={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(yN||(yN={})),function(e){e.Dropdown="dropdown",e.Status="status"}(_N||(_N={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(wN||(wN={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(TN||(TN={})),function(e){e.Post="Post",e.Project="Project"}(xN||(xN={})),function(e){e.Left="left",e.Right="right"}(EN||(EN={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(IN||(IN={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(SN||(SN={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(NN||(NN={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(AN||(AN={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(DN||(DN={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(ON||(ON={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(RN||(RN={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(kN||(kN={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(CN||(CN={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(LN||(LN={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}($N||($N={})),function(e){e.CrossEncoder="CROSS_ENCODER"}(FN||(FN={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(PN||(PN={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(UN||(UN={})),function(e){e.Hybrid="HYBRID",e.Lexical="LEXICAL",e.Semantic="SEMANTIC"}(VN||(VN={})),function(e){e.Board="BOARD",e.Document="DOCUMENT",e.Item="ITEM"}(jN||(jN={})),function(e){e.Board="BOARD"}(BN||(BN={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(MN||(MN={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(qN||(qN={})),function(e){e.Asc="ASC",e.Desc="DESC"}(zN||(zN={})),function(e){e.Complete="COMPLETE",e.Start="START"}(GN||(GN={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(HN||(HN={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(WN||(WN={})),function(e){e.CountKeys="COUNT_KEYS"}(YN||(YN={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(KN||(KN={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(JN||(JN={})),function(e){e.Nominal="nominal",e.Percent="percent"}(QN||(QN={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(XN||(XN={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(ZN||(ZN={})),function(e){e.Active="active",e.Inactive="inactive"}(eA||(eA={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(aA||(aA={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(tA||(tA={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(iA||(iA={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(nA||(nA={})),function(e){e.InvalidField="INVALID_FIELD"}(oA||(oA={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(rA||(rA={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(sA||(sA={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(pA||(pA={})),function(e){e.Board="board"}(dA||(dA={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(cA||(cA={})),function(e){e.Board="BOARD",e.Item="ITEM"}(lA||(lA={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(mA||(mA={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(uA||(uA={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(fA||(fA={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(hA||(hA={})),function(e){e.Wait="WAIT"}(vA||(vA={})),function(e){e.LiteBuilder="LITE_BUILDER"}(gA||(gA={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(bA||(bA={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(yA||(yA={})),function(e){e.All="all",e.Member="member"}(_A||(_A={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(wA||(wA={})),function(e){e.CreatedAt="created_at"}(TA||(TA={})),function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(xA||(xA={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(EA||(EA={}));const IA=100,SA={searchTerm:h.z.string().optional().describe("The search term to use for the search."),searchType:h.z.nativeEnum(EA).describe("The type of search to perform."),limit:h.z.number().max(IA).optional().default(IA).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 NA=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(wy).describe("The type of mention: User, Team, Board, or Project")}),AA=h.z.array(NA),DA={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 OA=Bw`
1423
+ `;var qI,zI,GI,HI,WI,YI,KI,JI,QI,XI,ZI,eS,aS,tS,iS,nS,oS,rS,sS,pS,dS,cS,lS,mS,uS,fS,hS,vS,gS,bS,yS,_S,wS,TS,xS,ES,IS,SS,NS,AS,DS,OS,RS,kS,CS,LS,$S,FS,PS,US,VS,jS,BS,MS,qS,zS,GS,HS,WS,YS,KS,JS,QS,XS,ZS,eN,aN,tN,iN,nN,oN,rN,sN,pN,dN,cN,lN,mN,uN,fN,hN,vN,gN,bN,yN,_N,wN,TN,xN,EN,IN,SN,NN,AN,DN,ON,RN,kN,CN,LN,$N,FN,PN,UN,VN,jN,BN,MN,qN,zN,GN,HN,WN,YN,KN,JN,QN,XN,ZN,eA,aA,tA,iA,nA,oA,rA,sA,pA,dA,cA,lA,mA,uA,fA,hA,vA,gA,bA,yA,_A,wA,TA,xA,EA,IA,SA;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(qI||(qI={})),function(e){e.Table="TABLE"}(zI||(zI={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsTerms="CONTAINS_TERMS",e.ContainsText="CONTAINS_TEXT",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.StartsWith="STARTS_WITH",e.WithinTheLast="WITHIN_THE_LAST",e.WithinTheNext="WITHIN_THE_NEXT"}(GI||(GI={})),function(e){e.TableHistory="TABLE_HISTORY"}(HI||(HI={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(WI||(WI={})),function(e){e.And="AND",e.Or="OR"}(YI||(YI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(KI||(KI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(JI||(JI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(QI||(QI={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(XI||(XI={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(ZI||(ZI={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(eS||(eS={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(aS||(aS={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(tS||(tS={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(iS||(iS={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(nS||(nS={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(oS||(oS={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(rS||(rS={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(sS||(sS={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(pS||(pS={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(dS||(dS={})),function(e){e.Edit="edit",e.View="view"}(cS||(cS={})),function(e){e.Communication="communication",e.Description="description",e.Name="name"}(lS||(lS={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(mS||(mS={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(uS||(uS={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(fS||(fS={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(hS||(hS={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(vS||(vS={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(gS||(gS={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(bS||(bS={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(yS||(yS={})),function(e){e.Edit="edit",e.View="view"}(_S||(_S={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(wS||(wS={})),function(e){e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(TS||(TS={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(xS||(xS={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(ES||(ES={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(IS||(IS={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(SS||(SS={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(NS||(NS={})),function(e){e.Description="description",e.Title="title"}(AS||(AS={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(DS||(DS={})),function(e){e.Account="ACCOUNT",e.User="USER"}(OS||(OS={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(RS||(RS={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(kS||(kS={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(CS||(CS={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(LS||(LS={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}($S||($S={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(FS||(FS={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(PS||(PS={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(US||(US={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(VS||(VS={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(jS||(jS={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(BS||(BS={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(MS||(MS={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(qS||(qS={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(zS||(zS={})),function(e){e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.Gantt="GANTT",e.Number="NUMBER",e.Table="TABLE"}(GS||(GS={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(HS||(HS={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(WS||(WS={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(YS||(YS={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(KS||(KS={})),function(e){e.Monday="monday",e.Sunday="sunday"}(JS||(JS={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(QS||(QS={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(XS||(XS={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(ZS||(ZS={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(eN||(eN={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(aN||(aN={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(tN||(tN={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(iN||(iN={})),function(e){e.Classic="Classic",e.OneByOne="OneByOne"}(nN||(nN={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(oN||(oN={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(rN||(rN={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(sN||(sN={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(pN||(pN={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(dN||(dN={})),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"}(cN||(cN={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(lN||(lN={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(mN||(mN={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(uN||(uN={})),function(e){e.Error="ERROR"}(fN||(fN={})),function(e){e.Asc="asc",e.Desc="desc"}(hN||(hN={})),function(e){e.And="and",e.Or="or"}(vN||(vN={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(gN||(gN={})),function(e){e.Person="person",e.Team="team"}(bN||(bN={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(yN||(yN={})),function(e){e.Board="BOARD",e.Document="DOCUMENT"}(_N||(_N={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(wN||(wN={})),function(e){e.Dropdown="dropdown",e.Status="status"}(TN||(TN={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(xN||(xN={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(EN||(EN={})),function(e){e.Post="Post",e.Project="Project"}(IN||(IN={})),function(e){e.Left="left",e.Right="right"}(SN||(SN={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(NN||(NN={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(AN||(AN={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(DN||(DN={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(ON||(ON={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(RN||(RN={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(kN||(kN={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(CN||(CN={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(LN||(LN={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}($N||($N={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(FN||(FN={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(PN||(PN={})),function(e){e.CrossEncoder="CROSS_ENCODER"}(UN||(UN={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(VN||(VN={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(jN||(jN={})),function(e){e.Hybrid="HYBRID",e.Lexical="LEXICAL",e.Semantic="SEMANTIC"}(BN||(BN={})),function(e){e.Board="BOARD",e.Document="DOCUMENT",e.Item="ITEM"}(MN||(MN={})),function(e){e.Board="BOARD"}(qN||(qN={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(zN||(zN={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Success="success"}(GN||(GN={})),function(e){e.Asc="ASC",e.Desc="DESC"}(HN||(HN={})),function(e){e.Complete="COMPLETE",e.Start="START"}(WN||(WN={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(YN||(YN={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(KN||(KN={})),function(e){e.CountKeys="COUNT_KEYS"}(JN||(JN={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(QN||(QN={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(XN||(XN={})),function(e){e.Nominal="nominal",e.Percent="percent"}(ZN||(ZN={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(eA||(eA={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(aA||(aA={})),function(e){e.Active="active",e.Inactive="inactive"}(tA||(tA={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(iA||(iA={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(nA||(nA={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(oA||(oA={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(rA||(rA={})),function(e){e.InvalidField="INVALID_FIELD"}(sA||(sA={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(pA||(pA={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(dA||(dA={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(cA||(cA={})),function(e){e.Board="board"}(lA||(lA={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(mA||(mA={})),function(e){e.Board="BOARD",e.Item="ITEM"}(uA||(uA={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(fA||(fA={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(hA||(hA={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(vA||(vA={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(gA||(gA={})),function(e){e.Wait="WAIT"}(bA||(bA={})),function(e){e.LiteBuilder="LITE_BUILDER"}(yA||(yA={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(_A||(_A={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(wA||(wA={})),function(e){e.All="all",e.Member="member"}(TA||(TA={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(xA||(xA={})),function(e){e.CreatedAt="created_at"}(EA||(EA={})),function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(IA||(IA={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(SA||(SA={}));const NA=100,AA={searchTerm:h.z.string().optional().describe("The search term to use for the search."),searchType:h.z.nativeEnum(SA).describe("The type of search to perform."),limit:h.z.number().max(NA).optional().default(NA).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 DA=h.z.object({id:h.z.string().describe("The ID of the entity to mention"),type:h.z.nativeEnum(wy).describe("The type of mention: User, Team, Board, or Project")}),OA=h.z.array(DA),RA={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 kA=Bw`
1424
+ mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
1425
+ update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
1426
+ id
1427
+ name
1428
+ }
1429
+ }
1430
+ `,CA=h.z.object({fileType:h.z.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:h.z.string().describe("File display name"),linkToFile:h.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:h.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:h.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),LA={boardId:h.z.string().describe("The board's unique identifier"),itemId:h.z.string().describe("The item's unique identifier"),columnId:h.z.string().describe("The file or doc column's unique identifier"),files:h.z.array(CA).describe("Array of file values to set on the column")};const $A=Bw`
1418
1431
  query getUserContext {
1419
1432
  me {
1420
1433
  id
@@ -1436,7 +1449,7 @@
1436
1449
  }
1437
1450
  }
1438
1451
  }
1439
- `,RA=Bw`
1452
+ `,FA=Bw`
1440
1453
  query getFavoriteDetails(
1441
1454
  $boardIds: [ID!]
1442
1455
  $folderIds: [ID!]
@@ -1460,7 +1473,7 @@
1460
1473
  name
1461
1474
  }
1462
1475
  }
1463
- `,kA={[dy.Board]:"boardIds",[dy.Folder]:"folderIds",[dy.Workspace]:"workspaceIds",[dy.Dashboard]:"dashboardIds"},CA={[dy.Board]:"boards",[dy.Folder]:"folders",[dy.Workspace]:"workspaces",[dy.Dashboard]:"dashboards"};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 LA=Bw`
1476
+ `,PA={[dy.Board]:"boardIds",[dy.Folder]:"folderIds",[dy.Workspace]:"workspaceIds",[dy.Dashboard]:"dashboardIds"},UA={[dy.Board]:"boards",[dy.Folder]:"folders",[dy.Workspace]:"workspaces",[dy.Dashboard]:"dashboards"};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 VA=Bw`
1464
1477
  query getSprintsByIds($ids: [ID!]) {
1465
1478
  items(ids: $ids) {
1466
1479
  id
@@ -1495,7 +1508,7 @@
1495
1508
  }
1496
1509
  }
1497
1510
  }
1498
- `,$A={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"},FA={...$A,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},PA="BOARD_NOT_FOUND:",UA="SPRINT_NOT_FOUND:",VA="DOCUMENT_NOT_FOUND:",jA="DOCUMENT_INVALID:",BA="DOCUMENT_EMPTY:",MA="EXPORT_FAILED:",qA="INTERNAL_ERROR:",zA="VALIDATION_ERROR:",GA="task_sprint",HA={[FA.SPRINT_TASKS]:"Sprint Tasks",[FA.SPRINT_TIMELINE]:"Sprint Timeline",[FA.SPRINT_COMPLETION]:"Sprint Completion",[FA.SPRINT_START_DATE]:"Sprint Start Date",[FA.SPRINT_END_DATE]:"Sprint End Date",[FA.SPRINT_ACTIVATION]:"Sprint Activation",[FA.SPRINT_SUMMARY]:"Sprint Summary",[FA.SPRINT_CAPACITY]:"Sprint Capacity"},WA=Hy,YA={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},KA=(e,a)=>e.column_values?.find((e=>e.id===a)),JA=(e,a)=>{const t=KA(e,a);return"CheckboxValue"===t?.__typename?t.checked??!1:null},QA=(e,a)=>{const t=KA(e,a);return"DateValue"===t?.__typename?t.date??null:null},XA=(e,a)=>{const t=KA(e,a);return"DocValue"===t?.__typename&&t.file?.doc?.object_id?t.file.doc.object_id:null},ZA=(e,a)=>{const t=a.filter((a=>!e.has(a)));return{isValid:0===t.length,missingColumns:t}},eD=(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)))},aD=e=>eD(e,Object.values($A)),tD=e=>eD(e,Object.values(YA)),iD=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},nD=(e,a)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===a&&e.type===kx.BoardRelation))||null,oD={sprintId:h.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const rD=Bw`
1511
+ `,jA={SPRINT_TASKS:"sprint_tasks",SPRINT_TIMELINE:"sprint_timeline",SPRINT_COMPLETION:"sprint_completion",SPRINT_START_DATE:"sprint_start_date",SPRINT_END_DATE:"sprint_end_date",SPRINT_ACTIVATION:"sprint_activation"},BA={...jA,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},MA="BOARD_NOT_FOUND:",qA="SPRINT_NOT_FOUND:",zA="DOCUMENT_NOT_FOUND:",GA="DOCUMENT_INVALID:",HA="DOCUMENT_EMPTY:",WA="EXPORT_FAILED:",YA="INTERNAL_ERROR:",KA="VALIDATION_ERROR:",JA="task_sprint",QA={[BA.SPRINT_TASKS]:"Sprint Tasks",[BA.SPRINT_TIMELINE]:"Sprint Timeline",[BA.SPRINT_COMPLETION]:"Sprint Completion",[BA.SPRINT_START_DATE]:"Sprint Start Date",[BA.SPRINT_END_DATE]:"Sprint End Date",[BA.SPRINT_ACTIVATION]:"Sprint Activation",[BA.SPRINT_SUMMARY]:"Sprint Summary",[BA.SPRINT_CAPACITY]:"Sprint Capacity"},XA=Hy,ZA={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},eD=(e,a)=>e.column_values?.find((e=>e.id===a)),aD=(e,a)=>{const t=eD(e,a);return"CheckboxValue"===t?.__typename?t.checked??!1:null},tD=(e,a)=>{const t=eD(e,a);return"DateValue"===t?.__typename?t.date??null:null},iD=(e,a)=>{const t=eD(e,a);return"DocValue"===t?.__typename&&t.file?.doc?.object_id?t.file.doc.object_id:null},nD=(e,a)=>{const t=a.filter((a=>!e.has(a)));return{isValid:0===t.length,missingColumns:t}},oD=(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)))},rD=e=>oD(e,Object.values(jA)),sD=e=>oD(e,Object.values(ZA)),pD=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},dD=(e,a)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===a&&e.type===kx.BoardRelation))||null,cD={sprintId:h.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const lD=Bw`
1499
1512
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
1500
1513
  boards(ids: [$boardId]) {
1501
1514
  items_page(limit: $limit) {
@@ -1531,7 +1544,7 @@
1531
1544
  }
1532
1545
  }
1533
1546
  }
1534
- `,sD={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 pD=Bw`
1547
+ `,mD={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 uD=Bw`
1535
1548
  query GetRecentBoards($limit: Int) {
1536
1549
  boards(limit: $limit, order_by: used_at, state: active) {
1537
1550
  id
@@ -1547,7 +1560,7 @@
1547
1560
  }
1548
1561
  }
1549
1562
  }
1550
- `,dD={};const cD=[class extends Fu{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=_.READ,this.annotations=$u({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return dD}async executeInternal(e){try{const e={limit:100},a=((await this.mondayApi.request(pD,e)).boards||[]).filter((e=>null!==e));if(0===a.length)return{content:`${PA} 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:`${qA} 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(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${a}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${t}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,a,t){return{id:e,name:a?.name||t,workspaceId:a?.workspace?.id||"unknown",workspaceName:a?.workspace?.name||"Unknown"}}processSprintsBoard(e,a,t){const i=nD(e,$A.SPRINT_TASKS);if(!i)return;const n=iD(i);if(!n)return;const o=`${e.id}:${n}`;if(t.has(o))return;const r=a.get(n);t.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,a,t){const i=nD(e,GA);if(!i)return;const n=iD(i);if(!n)return;const o=`${n}:${e.id}`;if(t.has(o))return;const r=a.get(n);t.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),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 i of e)i.columns&&(aD(i)&&this.processSprintsBoard(i,t,a),tD(i)&&this.processTasksBoard(i,t,a));return Array.from(a.values())}},class extends Fu{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=_.READ,this.annotations=$u({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return sD}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},i=await this.mondayApi.request(rD,t),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${qA} 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(zw,a),i=t.boards?.[0];if(!i)return{success:!1,error:`${PA} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${zA} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${qA} 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($A),i=ZA(a,t);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((a=>{const t=(e=>HA[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",i=e.id,n=JA(e,FA.SPRINT_ACTIVATION),o=JA(e,FA.SPRINT_COMPLETION),r=QA(e,FA.SPRINT_START_DATE),s=QA(e,FA.SPRINT_END_DATE),p=((e,a)=>{const t=KA(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,FA.SPRINT_TIMELINE),d=XA(e,FA.SPRINT_SUMMARY);let c=WA.Planned;o?c=WA.Completed:(n||r)&&(c=WA.Active);const l=p?`${p.from} to ${p.to}`:"Not set";a+=`| ${t} | ${i} | ${c} | ${l} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),a+="\n## Status Definitions:\n",a+=`- **${WA.Planned}**: Sprint not yet started (no activation, no start date)\n`,a+=`- **${WA.Active}**: Sprint is active (activated but not completed)\n`,a+=`- **${WA.Completed}**: Sprint is finished\n\n`,a}},class extends Fu{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=_.READ,this.annotations=$u({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return oD}async executeInternal(e){try{const a=await this.getSprintMetadata(e.sprintId);if(!a.success)return{content:a.error||`${qA} Unknown error occurred while getting sprint metadata`};const t=await this.readSprintSummaryDocument(a.documentObjectId);return t.success?{content:t.content}:{content:t.error||`${qA} Unknown error occurred while reading document content`}}catch(e){return{content:`${qA} 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(LA,a)).items||[];if(0===t.length)return{success:!1,error:`${UA} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=t[0];if(!i)return{success:!1,error:`${UA} Sprint with ID ${e} not found.`};const n=((e,a=[])=>{const t=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values($A),...a];return ZA(t,i)})(i,[FA.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${zA} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=XA(i,FA.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${VA} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${qA} 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(aT,a)).docs||[];if(0===t.length)return{success:!1,error:`${VA} Document with object ID ${e} not found or not accessible.`};const i=t[0];if(!i||!i.id)return{success:!1,error:`${jA} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(tT,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${MA} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${BA} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${qA} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],lD=[class extends Fu{constructor(){super(...arguments),this.name="delete_item",this.type=_.WRITE,this.annotations=$u({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return tE}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(Mw,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_items_page",this.type=_.READ,this.annotations=$u({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. 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 wE}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(a){Hx(a),rx(e,"filters",wE.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};rx(e,"filters",wE.filters),rx(e,"orderBy",wE.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 i=await this.mondayApi.request(yE,t),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,a){return(a=(a=a??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:hy.ContainsText,compareValue:e}),a}mapResult(e,a){const t=e.boards?.[0],i=t?.items_page,n=i?.items||[];return{board:{id:t?.id,name:t?.name},items:n.map((e=>this.mapItem(e,a))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.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 kx.BoardRelation:return e.linked_items;case kx.Formula:return e.display_value;case kx.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(_E,a,{versionOverride:"dev",timeout:zx}),i=t.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Fu{constructor(){super(...arguments),this.name="create_item",this.type=_.WRITE,this.annotations=$u({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?Wx:Yx}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()},i=await this.mondayApi.request(Vx,t);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new pT(this.mondayApi,this.apiToken,{boardId:a}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){Gx(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(jx,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){Gx(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(qw,t);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){Gx(e,"create item")}}},class extends Fu{constructor(){super(...arguments),this.name="create_update",this.type=_.WRITE,this.annotations=$u({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update."}getInputSchema(){return Zx}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),i=Xx.safeParse(t);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);a=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(Jx,t);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){Gx(e,"create update")}}},class extends Fu{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=_.WRITE,this.annotations=$u({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return DA}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),i=AA.safeParse(t);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);a=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(Jx,t);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){Gx(e,"create update")}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_schema",this.type=_.READ,this.annotations=$u({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id"}getInputSchema(){if(!this.context?.boardId)return TE}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(zw,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_activity",this.type=_.READ,this.annotations=$u({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return cE}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-qx.MONTH30Days),i=e?.fromDate||t.toISOString(),n=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},r=await this.mondayApi.request(dE,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${p}`}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_info",this.type=_.READ,this.annotations=$u({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return bE}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(lE,a),i=t.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(uE(i,n),null,2)}}async getSubItemsBoardAsync(e){const a=e.columns?.find((e=>e?.type===kx.Subtasks));if(!a)return null;const t=a.settings.boardIds[0],i=await this.mondayApi.request(mE,{boardId:t});return i.boards?.[0]??null}},class extends Fu{constructor(){super(...arguments),this.name="get_full_board_data",this.type=_.READ,this.annotations=$u({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return pE}async executeInternal(e){try{const a={boardId:e.boardId.toString(),itemsLimit:7};e.filters&&(a.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const t=await this.mondayApi.request(nE,a);if(!t.boards||0===t.boards.length||!t.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=t.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const a=e;a.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));let o=[];if(n.size>0){const e={userIds:Array.from(n)},a=await this.mondayApi.request(oE,e);o=a.users?.filter((e=>null!==e))||[]}const r=new Map(o.map((e=>[e.id,e]))),s={board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,a)=>e+(a.updates?.length||0)),0),total_unique_creators:o.length}};return{content:JSON.stringify(s,null,2)}}catch(e){Gx(e,"get full board data")}}},class extends Fu{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=_.READ,this.annotations=$u({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return KE}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(ME);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:GE(s)}}if(r){if(a||t||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(BE,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>HE)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>WE)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};s=await this.mondayApi.request(jE,a)}else{const a={teamIds:e.teamIds};s=await this.mondayApi.request(VE,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:YE};s=await this.mondayApi.request(UE,a)}else if(a){const a={userIds:e.userIds,limit:YE};s=await this.mondayApi.request(FE,a)}else{const e={userIds:void 0,limit:YE};s=await this.mondayApi.request(PE,e)}return{content:GE(s)}}},pT,class extends Fu{constructor(){super(...arguments),this.name="move_item_to_group",this.type=_.WRITE,this.annotations=$u({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to a group in a monday.com board"}getInputSchema(){return JE}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(Hw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Fu{constructor(){super(...arguments),this.name="create_board",this.type=_.WRITE,this.annotations=$u({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return dT}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(Ww,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_form",this.type=_.WRITE,this.annotations=$u({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return jT}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(bT,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Fu{constructor(){super(...arguments),this.name="update_form",this.type=_.WRITE,this.annotations=$u({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Ox(this.mondayApi),this.actionHandlers=new Map([[sx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[sx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[sx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[sx.activate,this.helpers.activateForm.bind(this.helpers)],[sx.createTag,this.helpers.createTag.bind(this.helpers)],[sx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[sx.updateTag,this.helpers.updateTag.bind(this.helpers)],[sx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[sx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[sx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[sx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[sx.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 Dx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(rx(e,"tag",Dx.tag),rx(e,"form",Dx.form),await a(e)):{content:"Received an invalid action for the update form tool."}}},class extends Fu{constructor(){super(...arguments),this.name="get_form",this.type=_.READ,this.annotations=$u({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return Rx}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(yT,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 Fu{constructor(){super(...arguments),this.name="form_questions_editor",this.type=_.WRITE,this.annotations=$u({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new ox(this.mondayApi),this.actionHandlers=new Map([[tx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[tx.Update,this.helpers.updateQuestion.bind(this.helpers)],[tx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return nx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(rx(e,"question",nx.question),await a(e)):{content:`Unknown action: ${e.action}`}}},class extends Fu{constructor(){super(...arguments),this.name="create_column",this.type=_.WRITE,this.annotations=$u({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new column in a monday.com board"}getInputSchema(){return this.context?.boardId?Cx:Lx}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},i=await this.mondayApi.request(Yw,t);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_group",this.type=_.WRITE,this.annotations=$u({title:"Create Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new group in a monday.com board. Groups are sections that organize related items. Use when users want to add structure, categorize items, or create workflow phases. Groups can be positioned relative to existing groups and assigned predefined colors. Items will always be created in the top group and so the top group should be the most relevant one for new item creation"}getInputSchema(){return Ux}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(Fx,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="delete_column",this.type=_.WRITE,this.annotations=$u({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?eE:aE}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(Kw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},oT,class extends Fu{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=_.ALL_API,this.annotations=$u({title:"Get GraphQL Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch the monday.com GraphQL schema structure including query and mutation definitions. This tool returns available query fields, mutation fields, and a list of GraphQL types in the schema. You can filter results by operation type (read/write) to focus on either queries or mutations."}getInputSchema(){return IE}async executeInternal(e){try{const a=await this.mondayApi.request(Jw),t=e?.operationType,i=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return t&&"read"!==t||(s+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(s+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fu{constructor(){super(...arguments),this.name="get_column_type_info",this.type=_.READ,this.annotations=$u({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return EE}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(xE,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Fu{constructor(){super(...arguments),this.name="get_type_details",this.type=_.ALL_API,this.annotations=$u({title:"Get Type Details",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get detailed information about a specific GraphQL type from the monday.com API schema"}getInputSchema(){return SE}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,Bw`
1563
+ `,fD={};const hD=[class extends Fu{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=_.READ,this.annotations=$u({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return fD}async executeInternal(e){try{const e={limit:100},a=((await this.mondayApi.request(uD,e)).boards||[]).filter((e=>null!==e));if(0===a.length)return{content:`${MA} 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:`${YA} 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(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${a}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${t}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,a,t){return{id:e,name:a?.name||t,workspaceId:a?.workspace?.id||"unknown",workspaceName:a?.workspace?.name||"Unknown"}}processSprintsBoard(e,a,t){const i=dD(e,jA.SPRINT_TASKS);if(!i)return;const n=pD(i);if(!n)return;const o=`${e.id}:${n}`;if(t.has(o))return;const r=a.get(n);t.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,a,t){const i=dD(e,JA);if(!i)return;const n=pD(i);if(!n)return;const o=`${n}:${e.id}`;if(t.has(o))return;const r=a.get(n);t.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),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 i of e)i.columns&&(rD(i)&&this.processSprintsBoard(i,t,a),sD(i)&&this.processTasksBoard(i,t,a));return Array.from(a.values())}},class extends Fu{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=_.READ,this.annotations=$u({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return mD}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},i=await this.mondayApi.request(lD,t),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${YA} 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(zw,a),i=t.boards?.[0];if(!i)return{success:!1,error:`${MA} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${KA} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${YA} 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(jA),i=nD(a,t);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((a=>{const t=(e=>QA[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",i=e.id,n=aD(e,BA.SPRINT_ACTIVATION),o=aD(e,BA.SPRINT_COMPLETION),r=tD(e,BA.SPRINT_START_DATE),s=tD(e,BA.SPRINT_END_DATE),p=((e,a)=>{const t=eD(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,BA.SPRINT_TIMELINE),d=iD(e,BA.SPRINT_SUMMARY);let c=XA.Planned;o?c=XA.Completed:(n||r)&&(c=XA.Active);const l=p?`${p.from} to ${p.to}`:"Not set";a+=`| ${t} | ${i} | ${c} | ${l} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),a+="\n## Status Definitions:\n",a+=`- **${XA.Planned}**: Sprint not yet started (no activation, no start date)\n`,a+=`- **${XA.Active}**: Sprint is active (activated but not completed)\n`,a+=`- **${XA.Completed}**: Sprint is finished\n\n`,a}},class extends Fu{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=_.READ,this.annotations=$u({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return cD}async executeInternal(e){try{const a=await this.getSprintMetadata(e.sprintId);if(!a.success)return{content:a.error||`${YA} Unknown error occurred while getting sprint metadata`};const t=await this.readSprintSummaryDocument(a.documentObjectId);return t.success?{content:t.content}:{content:t.error||`${YA} Unknown error occurred while reading document content`}}catch(e){return{content:`${YA} 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(VA,a)).items||[];if(0===t.length)return{success:!1,error:`${qA} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=t[0];if(!i)return{success:!1,error:`${qA} Sprint with ID ${e} not found.`};const n=((e,a=[])=>{const t=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(jA),...a];return nD(t,i)})(i,[BA.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${KA} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=iD(i,BA.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${zA} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${YA} 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(aT,a)).docs||[];if(0===t.length)return{success:!1,error:`${zA} Document with object ID ${e} not found or not accessible.`};const i=t[0];if(!i||!i.id)return{success:!1,error:`${GA} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(tT,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${WA} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${HA} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${YA} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],vD=[class extends Fu{constructor(){super(...arguments),this.name="delete_item",this.type=_.WRITE,this.annotations=$u({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return nE}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(Mw,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_items_page",this.type=_.READ,this.annotations=$u({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. 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 xE}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(a){Yx(a),rx(e,"filters",xE.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};rx(e,"filters",xE.filters),rx(e,"orderBy",xE.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 i=await this.mondayApi.request(wE,t),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,a){return(a=(a=a??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:hy.ContainsText,compareValue:e}),a}mapResult(e,a){const t=e.boards?.[0],i=t?.items_page,n=i?.items||[];return{board:{id:t?.id,name:t?.name},items:n.map((e=>this.mapItem(e,a))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.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 kx.BoardRelation:return e.linked_items;case kx.Formula:return e.display_value;case kx.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(TE,a,{versionOverride:"dev",timeout:Hx}),i=t.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Fu{constructor(){super(...arguments),this.name="create_item",this.type=_.WRITE,this.annotations=$u({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?Kx:Jx}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()},i=await this.mondayApi.request(Bx,t);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new pT(this.mondayApi,this.apiToken,{boardId:a}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){Wx(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(Mx,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){Wx(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(qw,t);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){Wx(e,"create item")}}},class extends Fu{constructor(){super(...arguments),this.name="create_update",this.type=_.WRITE,this.annotations=$u({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update."}getInputSchema(){return aE}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),i=eE.safeParse(t);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);a=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(Xx,t);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){Wx(e,"create update")}}},class extends Fu{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=_.WRITE,this.annotations=$u({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return RA}async executeInternal(e){let a;if(e.mentionsList)try{const t=JSON.parse(e.mentionsList),i=OA.safeParse(t);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);a=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(Xx,t);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){Wx(e,"create update")}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_schema",this.type=_.READ,this.annotations=$u({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id"}getInputSchema(){if(!this.context?.boardId)return EE}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(zw,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_activity",this.type=_.READ,this.annotations=$u({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return mE}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-Gx.MONTH30Days),i=e?.fromDate||t.toISOString(),n=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},r=await this.mondayApi.request(lE,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${p}`}}},class extends Fu{constructor(){super(...arguments),this.name="get_board_info",this.type=_.READ,this.annotations=$u({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return _E}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(uE,a),i=t.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(hE(i,n),null,2)}}async getSubItemsBoardAsync(e){const a=e.columns?.find((e=>e?.type===kx.Subtasks));if(!a)return null;const t=a.settings.boardIds[0],i=await this.mondayApi.request(fE,{boardId:t});return i.boards?.[0]??null}},class extends Fu{constructor(){super(...arguments),this.name="get_full_board_data",this.type=_.READ,this.annotations=$u({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return cE}async executeInternal(e){try{const a={boardId:e.boardId.toString(),itemsLimit:7};e.filters&&(a.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const t=await this.mondayApi.request(rE,a);if(!t.boards||0===t.boards.length||!t.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=t.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const a=e;a.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));let o=[];if(n.size>0){const e={userIds:Array.from(n)},a=await this.mondayApi.request(sE,e);o=a.users?.filter((e=>null!==e))||[]}const r=new Map(o.map((e=>[e.id,e]))),s={board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&r.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,a)=>e+(a.updates?.length||0)),0),total_unique_creators:o.length}};return{content:JSON.stringify(s,null,2)}}catch(e){Wx(e,"get full board data")}}},class extends Fu{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=_.READ,this.annotations=$u({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return QE}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(zE);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:WE(s)}}if(r){if(a||t||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(qE,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>YE)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>KE)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};s=await this.mondayApi.request(ME,a)}else{const a={teamIds:e.teamIds};s=await this.mondayApi.request(BE,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:JE};s=await this.mondayApi.request(jE,a)}else if(a){const a={userIds:e.userIds,limit:JE};s=await this.mondayApi.request(UE,a)}else{const e={userIds:void 0,limit:JE};s=await this.mondayApi.request(VE,e)}return{content:WE(s)}}},pT,class extends Fu{constructor(){super(...arguments),this.name="move_item_to_group",this.type=_.WRITE,this.annotations=$u({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to a group in a monday.com board"}getInputSchema(){return XE}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(Hw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Fu{constructor(){super(...arguments),this.name="create_board",this.type=_.WRITE,this.annotations=$u({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return dT}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(Ww,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_form",this.type=_.WRITE,this.annotations=$u({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return jT}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(bT,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Fu{constructor(){super(...arguments),this.name="update_form",this.type=_.WRITE,this.annotations=$u({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Ox(this.mondayApi),this.actionHandlers=new Map([[sx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[sx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[sx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[sx.activate,this.helpers.activateForm.bind(this.helpers)],[sx.createTag,this.helpers.createTag.bind(this.helpers)],[sx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[sx.updateTag,this.helpers.updateTag.bind(this.helpers)],[sx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[sx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[sx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[sx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[sx.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 Dx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(rx(e,"tag",Dx.tag),rx(e,"form",Dx.form),await a(e)):{content:"Received an invalid action for the update form tool."}}},class extends Fu{constructor(){super(...arguments),this.name="get_form",this.type=_.READ,this.annotations=$u({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return Rx}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(yT,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 Fu{constructor(){super(...arguments),this.name="form_questions_editor",this.type=_.WRITE,this.annotations=$u({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new ox(this.mondayApi),this.actionHandlers=new Map([[tx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[tx.Update,this.helpers.updateQuestion.bind(this.helpers)],[tx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return nx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?(rx(e,"question",nx.question),await a(e)):{content:`Unknown action: ${e.action}`}}},class extends Fu{constructor(){super(...arguments),this.name="create_column",this.type=_.WRITE,this.annotations=$u({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new column in a monday.com board"}getInputSchema(){return this.context?.boardId?Cx:Lx}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},i=await this.mondayApi.request(Yw,t);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_group",this.type=_.WRITE,this.annotations=$u({title:"Create Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new group in a monday.com board. Groups are sections that organize related items. Use when users want to add structure, categorize items, or create workflow phases. Groups can be positioned relative to existing groups and assigned predefined colors. Items will always be created in the top group and so the top group should be the most relevant one for new item creation"}getInputSchema(){return jx}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(Ux,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="delete_column",this.type=_.WRITE,this.annotations=$u({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?tE:iE}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(Kw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},oT,class extends Fu{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=_.ALL_API,this.annotations=$u({title:"Get GraphQL Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch the monday.com GraphQL schema structure including query and mutation definitions. This tool returns available query fields, mutation fields, and a list of GraphQL types in the schema. You can filter results by operation type (read/write) to focus on either queries or mutations."}getInputSchema(){return NE}async executeInternal(e){try{const a=await this.mondayApi.request(Jw),t=e?.operationType,i=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return t&&"read"!==t||(s+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(s+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fu{constructor(){super(...arguments),this.name="get_column_type_info",this.type=_.READ,this.annotations=$u({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return SE}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(IE,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Fu{constructor(){super(...arguments),this.name="get_type_details",this.type=_.ALL_API,this.annotations=$u({title:"Get Type Details",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get detailed information about a specific GraphQL type from the monday.com API schema"}getInputSchema(){return AE}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,Bw`
1551
1564
  query getTypeDetails {
1552
1565
  __type(name: "${a}") {
1553
1566
  name
@@ -1635,5 +1648,5 @@
1635
1648
  }
1636
1649
  }
1637
1650
  }
1638
- `),i=await this.mondayApi.request(t);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const a=NE(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const a=NE(e.type);n+=` - ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const a=NE(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const 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 Fu{constructor(){super(...arguments),this.name="create_custom_activity",this.type=_.WRITE,this.annotations=$u({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return $x}async executeInternal(e){const a={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Xw,a),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_timeline_item",this.type=_.WRITE,this.annotations=$u({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return Kx}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(Zw,a);return{content:`Timeline item '${e.title}' with ID ${t.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Fu{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=_.READ,this.annotations=$u({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return iE}async executeInternal(e){const a=await this.mondayApi.request(eT);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 Fu{constructor(){super(...arguments),this.name="read_docs",this.type=_.READ,this.annotations=$u({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get a collection of monday.com documents with their content as markdown. \n\nPAGINATION: \n- Default limit is 25 documents per page\n- Use 'page' parameter to get additional pages (starts at 1)\n- Check response for 'has_more_pages' to know if you should continue paginating\n- If user asks for \"all documents\" and you get exactly 25 results, continue with page 2, 3, etc.\n\nFILTERING: Provide a type value and array of ids:\n- type: 'ids' for specific document IDs\n- type: 'object_ids' for specific document object IDs \n- type: 'workspace_ids' for all docs in specific workspaces\n- ids: array of ID strings (at least 1 required)\n\nExamples:\n- { type: 'ids', ids: ['123', '456'] }\n- { type: 'object_ids', ids: ['123'] }\n- { type: 'workspace_ids', ids: ['ws_101'] }\n\nUSAGE PATTERNS:\n- For specific documents: use type 'ids' or 'object_ids' (A monday doc has two unique identifiers)\n- For workspace exploration: use type 'workspace_ids' with pagination\n- For large searches: start with page 1, then paginate if has_more_pages=true"}getInputSchema(){return QE}async executeInternal(e){try{let a,t,i;switch(e.type){case"ids":a=e.ids;break;case"object_ids":t=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:a,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(aT,n);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:i};o=await this.mondayApi.request(aT,t)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,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},i=await this.mondayApi.request(tT,t);a=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){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}}))),i=a.page||1,n=a.limit||25,o=t.length,r=o===n;return{content:`Successfully retrieved ${t.length} document${1===t.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(t,null,2)}`}}},class extends Fu{constructor(){super(...arguments),this.name="workspace_info",this.type=_.READ,this.annotations=$u({title:"Get Workspace Information",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool returns the boards, docs and folders in a workspace and which folder they are in. It returns up to 100 of each object type, if you receive 100 assume there are additional objects of that type in the workspace."}getInputSchema(){return XE}async executeInternal(e){const a={workspace_id:e.workspace_id},t=await this.mondayApi.request(iT,a);if(!t.workspaces||0===t.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:a,boards:t,docs:i,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(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&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(a):s.push(a)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.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(r.values()),root_items:{boards:s,docs:p}}}(t);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,a)=>e+a.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,a)=>e+a.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Fu{constructor(){super(...arguments),this.name="list_workspaces",this.type=_.READ,this.annotations=$u({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return nI}async executeInternal(e){const a=e.searchTerm?1e4:e.limit,t=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=aI(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:a,page:t,membershipKind:e}),o=tI(await this.mondayApi.request(ZE,n(__.Member))),r=!iI(o)||i&&!function(e,a){return a.some((a=>aI(a.name).includes(e)))}(i,o);let s=o;if(r){s=tI(await this.mondayApi.request(ZE,n(__.All)))}if(!iI(s))return{content:"No workspaces found."};const p=i&&s?.length<=eI,d=function(e,a,t,i){if(!e||a.length<=eI)return a;const n=(t-1)*i,o=n+i;return a.filter((a=>aI(a.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!iI(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const c=d.length===e.limit,l=function(e){return e.map((e=>{const a=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${a}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${l}\n${c?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends Fu{constructor(){super(...arguments),this.name="create_doc",this.type=_.WRITE,this.annotations=$u({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return lI}async executeInternal(e){const a=cI.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,i;if(t.type===dI.enum.workspace){const n={location:{workspace:{workspace_id:t.workspace_id.toString(),name:e.doc_name,kind:t.doc_kind||ub.Public,folder_id:t.folder_id?.toString()}}},o=await this.mondayApi.request(rI,n);a=o?.create_doc?.id??void 0,i=o?.create_doc?.url??void 0}else if(t.type===dI.enum.item){const n={itemId:t.item_id.toString()},o=await this.mondayApi.request(oI,n),r=o.items?.[0];if(!r)return{content:`Error: Item with id ${t.item_id} not found.`};const s=r.board?.id,p=r.board?.columns?.find((e=>e&&e.type===kx.Doc));let d=t.column_id;if(!d)if(p)d=p.id;else{const e={boardId:s.toString(),columnType:kx.Doc,columnTitle:"Doc"},a=await this.mondayApi.request(Yw,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(rI,c);if(a=l.create_doc?.id??void 0,i=l.create_doc?.url??void 0,e.doc_name&&a)try{const t={docId:a,name:e.doc_name};await this.mondayApi.request(pI,t)}catch(e){console.warn("Failed to update doc name:",e)}}if(!a)return{content:"Error: Failed to create document."};const n={docId:a,markdown:e.markdown},o=await this.mondayApi.request(sI,n),r=o?.add_content_to_doc_from_markdown?.success,s=o?.add_content_to_doc_from_markdown?.error;return r?{content:`✅ Document successfully created (id: ${a}). ${i?`\n\nURL: ${i}`:""}`}:{content:`Document ${a} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fu{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=_.WRITE,this.annotations=$u({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return fI}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let a=e.doc_id;if(!a){const t=await this.mondayApi.request(uI,{objectId:[e.object_id]}),i=t.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};a=i.id}const t={docId:a,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(mI,t);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:`Successfully added content to document ${a}. ${s} block${1===s?"":"s"} created.${o&&o.length>0?` Block IDs: ${o.join(", ")}`:""}`}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fu{constructor(){super(...arguments),this.name="update_workspace",this.type=_.WRITE,this.annotations=$u({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return wI}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(_I,a);return{content:`Workspace ${t.update_workspace?.id} successfully updated`}}},class extends Fu{constructor(){super(...arguments),this.name="update_folder",this.type=_.WRITE,this.annotations=$u({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return xI}async executeInternal(e){const{position_object_id:a,position_object_type:t,position_is_after:i}=e;if(!!a!=!!t)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:a?{position_is_after:i,position_object_id:a,position_object_type:t}:void 0},o=await this.mondayApi.request(TI,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Fu{constructor(){super(...arguments),this.name="create_workspace",this.type=_.WRITE,this.annotations=$u({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return II}async executeInternal(e){const a={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},t=await this.mondayApi.request(EI,a);return{content:`Workspace ${t.create_workspace?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_folder",this.type=_.WRITE,this.annotations=$u({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return NI}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(SI,a);return{content:`Folder ${t.create_folder?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="move_object",this.type=_.WRITE,this.annotations=$u({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use `position` for relative placement based on another object, `parentFolderId` for folder changes, `workspaceId` for workspace moves, and `accountProductId` for account product changes."}getInputSchema(){return OI}async executeUpdateFolder(e){const{id:a,position_object_id:t,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!t!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:a,position:t?{position_is_after:n,position_object_id:t,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(TI,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:a,position_object_id:t,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!t!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:a,attributes:{position:t?{position_is_after:n,position_object_id:t,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},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:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!t!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:a,attributes:{position:t?{position_is_after:n,position_object_id:t,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(DI,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 Sy.Folder:return this.executeUpdateFolder(e);case Sy.Board:return this.executeUpdateBoardHierarchy(e);case Sy.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${a}`)}}},class extends Fu{constructor(){super(...arguments),this.name="create_dashboard",this.type=_.WRITE,this.annotations=$u({title:"Create Dashboard",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Use this tool to create a new monday.com dashboard that aggregates data from one or more boards. \n Dashboards provide visual representations of board data through widgets and charts.\n \n Use this tool when users want to:\n - Create a dashboard to visualize board data\n - Aggregate information from multiple boards\n - Set up a data visualization container for widgets"}getInputSchema(){return bI}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(hI,a);if(!t.create_dashboard)throw new Error("Failed to create dashboard");const i=t.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===kb.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${a}`)}}},class extends Fu{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=_.READ,this.annotations=$u({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},a=await this.mondayApi.request(vI,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 i=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,n=a?.description||a?.title||`${e.widget_type} widget for data visualization`;t[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(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 Fu{constructor(){super(...arguments),this.name="create_widget",this.type=_.WRITE,this.annotations=$u({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return yI}async executeInternal(e){if(rx(e,"settings",yI.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(gI,a);if(!t.create_widget)throw new Error("Failed to create widget");const i=t.create_widget,n=i.parent?.kind===h_.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(a){const t=a instanceof Error?a.message:String(a);throw new Error(`Failed to create ${e.widget_kind} widget: ${t}`)}}},class extends Fu{constructor(){super(...arguments),this.name="board_insights",this.type=_.READ,this.annotations=$u({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return FI}async executeInternal(e){if(!e.aggregations&&!e.aggregationsStringified)return{content:'Input must contain either the "aggregations" field or the "aggregationsStringified" field.'};rx(e,"aggregations",FI.aggregations),rx(e,"filters",FI.filters),rx(e,"orderBy",FI.orderBy);const{selectElements:a,groupByElements:t}=function(e){const a={},t=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===Jg.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Jg.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=a[o]||0;a[o]=r+1;const s=`${o}_${r}`;return LI.has(e.function)&&(t.some((e=>e.column_id===s))||t.push({column_id:s})),{type:Kg.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Jg.CountItems?[]:[{type:Kg.Column,column:$I(n),as:n}]}),as:s}}var i,n;const o={type:Kg.Column,column:$I(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:Kg.Column,column:$I(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:t}}(e),i=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),n=function(e){return{id:e.boardId.toString(),type:Mg.Table}}(e),o={query:{from:n,query:i,select:a,group_by:t,limit:e.limit}},r=await this.mondayApi.request(RI,o),s=(r.aggregate?.results??[]).map((e=>{const a={};return(e.entries??[]).forEach((e=>{const t=e.alias??"";if(!t)return;const i=e.value;if(!i)return void(a[t]=null);const n=i.result??i.value??null;a[t]=n})),a}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Fu{constructor(){super(...arguments),this.name="search",this.type=_.READ,this.annotations=$u({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor users and teams, use list_users_and_teams tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return SA}async executeInternal(e){if(e.searchType!==EA.FOLDERS&&e.searchTerm)try{const a={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(a,null,2)}}catch(e){Hx(e)}const a={[EA.BOARD]:this.searchBoardsAsync.bind(this),[EA.DOCUMENTS]:this.searchDocsAsync.bind(this),[EA.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!a)throw new Error(`Unsupported search type: ${e.searchType}`);const t=await a(e),i={disclaimer:t.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:t.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const a={[EA.BOARD]:jN.Board,[EA.DOCUMENTS]:jN.Document,[EA.FOLDERS]:void 0}[e.searchType];if(!a)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t={query:e.searchTerm,size:e.limit,entityTypes:[a],workspaceIds:e.workspaceIds?.map((e=>e.toString()))},i=(await this.mondayApi.request(jI,t,{versionOverride:"dev",timeout:zx})).search||[],n=[];for(const e of i)"CrossEntityBoardResult"===e.__typename?n.push({id:xA.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"CrossEntityDocResult"===e.__typename&&n.push({id:xA.DOCUMENT+e.data.id,title:e.data.name});return{items:n,wasFiltered:!0}}async searchFoldersAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(VI,a),i=this.searchAndVirtuallyPaginate(e,t.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:xA.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(UI,a),i=this.searchAndVirtuallyPaginate(e,t.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:xA.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(PI,a),i=this.searchAndVirtuallyPaginate(e,t.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:xA.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?1e4:e.limit}}searchAndVirtuallyPaginate(e,a,t){if(a.length<=IA)return{items:a,wasFiltered:!1};const i=aI(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:a.filter((e=>aI(t(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends Fu{constructor(){super(...arguments),this.name="get_user_context",this.type=_.READ,this.annotations=$u({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:a,intelligence:t}=await this.mondayApi.request(OA,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(a||[]),relevantBoards:this.extractRelevantBoards(t)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const a=this.groupByType(e),t=Object.keys(a);if(0===t.length)return[];const i={};for(const e of t)i[kA[e]]=a[e];const n=await this.mondayApi.request(RA,i),o=[];for(const e of t){const a=CA[e];for(const t of n[a]??[])t?.id&&o.push({id:t.id,name:t.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const a=[];for(const t of e.relevant_boards)t?.id&&t?.board?.name&&a.push({id:t.id,name:t.board.name});return a}groupByType(e){const a={};for(const t of e){const e=t?.object;e?.id&&e?.type&&(a[e.type]??=[]).push(e.id)}return a}}];var mD;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(mD||(mD={}));const uD=(e,a)=>{let t=[];a?.mode===mD.APPS?t=[...Lu]:a?.mode!==mD.API&&a?.mode||(t=[...lD,...cD]);const i=t.map((a=>((e,a)=>e.prototype instanceof Fu?new e(a.apiClient,a.apiToken,a.context):e.prototype instanceof mu?new e(a.apiToken):new e)(a,e)));return i.filter((e=>{if(!a)return e.type!==_.ALL_API;if(a.mode===mD.API&&"only"===a.enableDynamicApiTools)return e.type===_.ALL_API;let t=!1;return a.mode===mD.API&&!1===a.enableDynamicApiTools&&(t=t||e.type===_.ALL_API),a.readOnlyMode&&(t=t||e.type!==_.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??cu,endpoint:a.mondayApiEndpoint,requestConfig:a.mondayApiRequestConfig}),this.mondayApiToken=a.mondayApiToken,this.context={...a.context,apiVersion:a.mondayApiVersion??cu},this.tools=this.initializeTools(a)}initializeTools(e){const a={apiClient:this.mondayApi,apiToken:this.mondayApiToken,context:this.context};return uD(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,i=JSON.parse(t),n=this.tools.find((e=>e.name===a));if(!n)throw new Error(`Unknown tool: ${a}`);const o=n.getInputSchema();if(o){const a=h.z.object(o).safeParse(i);if(!a.success)throw new Error(`Invalid arguments: ${a.error.message}`);const t=await n.execute(a.data);return{role:"tool",tool_call_id:e.id,content:t.content}}{const a=await n.execute();return{role:"tool",tool_call_id:e.id,content:a.content}}}};
1651
+ `),i=await this.mondayApi.request(t);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const a=DE(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const a=DE(e.type);n+=` - ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const a=DE(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const 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 Fu{constructor(){super(...arguments),this.name="create_custom_activity",this.type=_.WRITE,this.annotations=$u({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return $x}async executeInternal(e){const a={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Xw,a),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_notification",this.type=_.WRITE,this.annotations=$u({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Px}async executeInternal(e){const a={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Fx,a);return{content:`Notification successfully sent to user ${e.user_id}: "${e.text}"`}}catch(a){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Fu{constructor(){super(...arguments),this.name="create_timeline_item",this.type=_.WRITE,this.annotations=$u({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return Qx}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(Zw,a);return{content:`Timeline item '${e.title}' with ID ${t.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Fu{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=_.READ,this.annotations=$u({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return oE}async executeInternal(e){const a=await this.mondayApi.request(eT);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 Fu{constructor(){super(...arguments),this.name="read_docs",this.type=_.READ,this.annotations=$u({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get a collection of monday.com documents with their content as markdown. \n\nPAGINATION: \n- Default limit is 25 documents per page\n- Use 'page' parameter to get additional pages (starts at 1)\n- Check response for 'has_more_pages' to know if you should continue paginating\n- If user asks for \"all documents\" and you get exactly 25 results, continue with page 2, 3, etc.\n\nFILTERING: Provide a type value and array of ids:\n- type: 'ids' for specific document IDs\n- type: 'object_ids' for specific document object IDs \n- type: 'workspace_ids' for all docs in specific workspaces\n- ids: array of ID strings (at least 1 required)\n\nExamples:\n- { type: 'ids', ids: ['123', '456'] }\n- { type: 'object_ids', ids: ['123'] }\n- { type: 'workspace_ids', ids: ['ws_101'] }\n\nUSAGE PATTERNS:\n- For specific documents: use type 'ids' or 'object_ids' (A monday doc has two unique identifiers)\n- For workspace exploration: use type 'workspace_ids' with pagination\n- For large searches: start with page 1, then paginate if has_more_pages=true"}getInputSchema(){return ZE}async executeInternal(e){try{let a,t,i;switch(e.type){case"ids":a=e.ids;break;case"object_ids":t=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:a,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(aT,n);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:i};o=await this.mondayApi.request(aT,t)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,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},i=await this.mondayApi.request(tT,t);a=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){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}}))),i=a.page||1,n=a.limit||25,o=t.length,r=o===n;return{content:`Successfully retrieved ${t.length} document${1===t.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(t,null,2)}`}}},class extends Fu{constructor(){super(...arguments),this.name="workspace_info",this.type=_.READ,this.annotations=$u({title:"Get Workspace Information",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool returns the boards, docs and folders in a workspace and which folder they are in. It returns up to 100 of each object type, if you receive 100 assume there are additional objects of that type in the workspace."}getInputSchema(){return eI}async executeInternal(e){const a={workspace_id:e.workspace_id},t=await this.mondayApi.request(iT,a);if(!t.workspaces||0===t.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:a,boards:t,docs:i,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(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&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(a):s.push(a)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.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(r.values()),root_items:{boards:s,docs:p}}}(t);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,a)=>e+a.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,a)=>e+a.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Fu{constructor(){super(...arguments),this.name="list_workspaces",this.type=_.READ,this.annotations=$u({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return rI}async executeInternal(e){const a=e.searchTerm?1e4:e.limit,t=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=iI(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:a,page:t,membershipKind:e}),o=nI(await this.mondayApi.request(aI,n(__.Member))),r=!oI(o)||i&&!function(e,a){return a.some((a=>iI(a.name).includes(e)))}(i,o);let s=o;if(r){s=nI(await this.mondayApi.request(aI,n(__.All)))}if(!oI(s))return{content:"No workspaces found."};const p=i&&s?.length<=tI,d=function(e,a,t,i){if(!e||a.length<=tI)return a;const n=(t-1)*i,o=n+i;return a.filter((a=>iI(a.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!oI(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const c=d.length===e.limit,l=function(e){return e.map((e=>{const a=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${a}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${l}\n${c?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends Fu{constructor(){super(...arguments),this.name="create_doc",this.type=_.WRITE,this.annotations=$u({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return uI}async executeInternal(e){const a=mI.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,i;if(t.type===lI.enum.workspace){const n={location:{workspace:{workspace_id:t.workspace_id.toString(),name:e.doc_name,kind:t.doc_kind||ub.Public,folder_id:t.folder_id?.toString()}}},o=await this.mondayApi.request(pI,n);a=o?.create_doc?.id??void 0,i=o?.create_doc?.url??void 0}else if(t.type===lI.enum.item){const n={itemId:t.item_id.toString()},o=await this.mondayApi.request(sI,n),r=o.items?.[0];if(!r)return{content:`Error: Item with id ${t.item_id} not found.`};const s=r.board?.id,p=r.board?.columns?.find((e=>e&&e.type===kx.Doc));let d=t.column_id;if(!d)if(p)d=p.id;else{const e={boardId:s.toString(),columnType:kx.Doc,columnTitle:"Doc"},a=await this.mondayApi.request(Yw,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(pI,c);if(a=l.create_doc?.id??void 0,i=l.create_doc?.url??void 0,e.doc_name&&a)try{const t={docId:a,name:e.doc_name};await this.mondayApi.request(cI,t)}catch(e){console.warn("Failed to update doc name:",e)}}if(!a)return{content:"Error: Failed to create document."};const n={docId:a,markdown:e.markdown},o=await this.mondayApi.request(dI,n),r=o?.add_content_to_doc_from_markdown?.success,s=o?.add_content_to_doc_from_markdown?.error;return r?{content:`✅ Document successfully created (id: ${a}). ${i?`\n\nURL: ${i}`:""}`}:{content:`Document ${a} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fu{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=_.WRITE,this.annotations=$u({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return vI}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let a=e.doc_id;if(!a){const t=await this.mondayApi.request(hI,{objectId:[e.object_id]}),i=t.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};a=i.id}const t={docId:a,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(fI,t);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:`Successfully added content to document ${a}. ${s} block${1===s?"":"s"} created.${o&&o.length>0?` Block IDs: ${o.join(", ")}`:""}`}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fu{constructor(){super(...arguments),this.name="update_workspace",this.type=_.WRITE,this.annotations=$u({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return xI}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(TI,a);return{content:`Workspace ${t.update_workspace?.id} successfully updated`}}},class extends Fu{constructor(){super(...arguments),this.name="update_folder",this.type=_.WRITE,this.annotations=$u({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return II}async executeInternal(e){const{position_object_id:a,position_object_type:t,position_is_after:i}=e;if(!!a!=!!t)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:a?{position_is_after:i,position_object_id:a,position_object_type:t}:void 0},o=await this.mondayApi.request(EI,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends Fu{constructor(){super(...arguments),this.name="create_workspace",this.type=_.WRITE,this.annotations=$u({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return NI}async executeInternal(e){const a={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},t=await this.mondayApi.request(SI,a);return{content:`Workspace ${t.create_workspace?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="create_folder",this.type=_.WRITE,this.annotations=$u({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return DI}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(AI,a);return{content:`Folder ${t.create_folder?.id} successfully created`}}},class extends Fu{constructor(){super(...arguments),this.name="move_object",this.type=_.WRITE,this.annotations=$u({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use `position` for relative placement based on another object, `parentFolderId` for folder changes, `workspaceId` for workspace moves, and `accountProductId` for account product changes."}getInputSchema(){return kI}async executeUpdateFolder(e){const{id:a,position_object_id:t,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!t!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:a,position:t?{position_is_after:n,position_object_id:t,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(EI,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:a,position_object_id:t,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!t!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:a,attributes:{position:t?{position_is_after:n,position_object_id:t,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(OI,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:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!t!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:a,attributes:{position:t?{position_is_after:n,position_object_id:t,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(RI,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 Sy.Folder:return this.executeUpdateFolder(e);case Sy.Board:return this.executeUpdateBoardHierarchy(e);case Sy.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${a}`)}}},class extends Fu{constructor(){super(...arguments),this.name="create_dashboard",this.type=_.WRITE,this.annotations=$u({title:"Create Dashboard",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Use this tool to create a new monday.com dashboard that aggregates data from one or more boards. \n Dashboards provide visual representations of board data through widgets and charts.\n \n Use this tool when users want to:\n - Create a dashboard to visualize board data\n - Aggregate information from multiple boards\n - Set up a data visualization container for widgets"}getInputSchema(){return _I}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(gI,a);if(!t.create_dashboard)throw new Error("Failed to create dashboard");const i=t.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===kb.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${a}`)}}},class extends Fu{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=_.READ,this.annotations=$u({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},a=await this.mondayApi.request(bI,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 i=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,n=a?.description||a?.title||`${e.widget_type} widget for data visualization`;t[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(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 Fu{constructor(){super(...arguments),this.name="create_widget",this.type=_.WRITE,this.annotations=$u({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return wI}async executeInternal(e){if(rx(e,"settings",wI.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(yI,a);if(!t.create_widget)throw new Error("Failed to create widget");const i=t.create_widget,n=i.parent?.kind===h_.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(a){const t=a instanceof Error?a.message:String(a);throw new Error(`Failed to create ${e.widget_kind} widget: ${t}`)}}},class extends Fu{constructor(){super(...arguments),this.name="board_insights",this.type=_.READ,this.annotations=$u({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return UI}async executeInternal(e){if(!e.aggregations&&!e.aggregationsStringified)return{content:'Input must contain either the "aggregations" field or the "aggregationsStringified" field.'};rx(e,"aggregations",UI.aggregations),rx(e,"filters",UI.filters),rx(e,"orderBy",UI.orderBy);const{selectElements:a,groupByElements:t}=function(e){const a={},t=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===Jg.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Jg.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=a[o]||0;a[o]=r+1;const s=`${o}_${r}`;return FI.has(e.function)&&(t.some((e=>e.column_id===s))||t.push({column_id:s})),{type:Kg.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Jg.CountItems?[]:[{type:Kg.Column,column:PI(n),as:n}]}),as:s}}var i,n;const o={type:Kg.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:Kg.Column,column:PI(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:t}}(e),i=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),n=function(e){return{id:e.boardId.toString(),type:Mg.Table}}(e),o={query:{from:n,query:i,select:a,group_by:t,limit:e.limit}},r=await this.mondayApi.request(CI,o),s=(r.aggregate?.results??[]).map((e=>{const a={};return(e.entries??[]).forEach((e=>{const t=e.alias??"";if(!t)return;const i=e.value;if(!i)return void(a[t]=null);const n=i.result??i.value??null;a[t]=n})),a}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends Fu{constructor(){super(...arguments),this.name="search",this.type=_.READ,this.annotations=$u({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor users and teams, use list_users_and_teams tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return AA}async executeInternal(e){if(e.searchType!==SA.FOLDERS&&e.searchTerm)try{const a={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(a,null,2)}}catch(e){Yx(e)}const a={[SA.BOARD]:this.searchBoardsAsync.bind(this),[SA.DOCUMENTS]:this.searchDocsAsync.bind(this),[SA.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!a)throw new Error(`Unsupported search type: ${e.searchType}`);const t=await a(e),i={disclaimer:t.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:t.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const a={[SA.BOARD]:MN.Board,[SA.DOCUMENTS]:MN.Document,[SA.FOLDERS]:void 0}[e.searchType];if(!a)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t={query:e.searchTerm,size:e.limit,entityTypes:[a],workspaceIds:e.workspaceIds?.map((e=>e.toString()))},i=(await this.mondayApi.request(MI,t,{versionOverride:"dev",timeout:Hx})).search||[],n=[];for(const e of i)"CrossEntityBoardResult"===e.__typename?n.push({id:IA.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"CrossEntityDocResult"===e.__typename&&n.push({id:IA.DOCUMENT+e.data.id,title:e.data.name});return{items:n,wasFiltered:!0}}async searchFoldersAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(BI,a),i=this.searchAndVirtuallyPaginate(e,t.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:IA.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(jI,a),i=this.searchAndVirtuallyPaginate(e,t.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:IA.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const a={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},t=await this.mondayApi.request(VI,a),i=this.searchAndVirtuallyPaginate(e,t.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:IA.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?1e4:e.limit}}searchAndVirtuallyPaginate(e,a,t){if(a.length<=NA)return{items:a,wasFiltered:!1};const i=iI(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:a.filter((e=>iI(t(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends Fu{constructor(){super(...arguments),this.name="get_user_context",this.type=_.READ,this.annotations=$u({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:a,intelligence:t}=await this.mondayApi.request($A,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(a||[]),relevantBoards:this.extractRelevantBoards(t)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const a=this.groupByType(e),t=Object.keys(a);if(0===t.length)return[];const i={};for(const e of t)i[PA[e]]=a[e];const n=await this.mondayApi.request(FA,i),o=[];for(const e of t){const a=UA[e];for(const t of n[a]??[])t?.id&&o.push({id:t.id,name:t.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const a=[];for(const t of e.relevant_boards)t?.id&&t?.board?.name&&a.push({id:t.id,name:t.board.name});return a}groupByType(e){const a={};for(const t of e){const e=t?.object;e?.id&&e?.type&&(a[e.type]??=[]).push(e.id)}return a}},class extends Fu{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=_.WRITE,this.annotations=$u({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return LA}async executeInternal(e){const a={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},t=await this.mondayApi.request(kA,a);return{content:`Item ${t.update_assets_on_item?.id} (${t.update_assets_on_item?.name}) assets successfully updated`}}}];var gD;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(gD||(gD={}));const bD=(e,a)=>{let t=[];a?.mode===gD.APPS?t=[...Lu]:a?.mode!==gD.API&&a?.mode||(t=[...vD,...hD]);const i=t.map((a=>((e,a)=>e.prototype instanceof Fu?new e(a.apiClient,a.apiToken,a.context):e.prototype instanceof mu?new e(a.apiToken):new e)(a,e)));return i.filter((e=>{if(!a)return e.type!==_.ALL_API;if(a.mode===gD.API&&"only"===a.enableDynamicApiTools)return e.type===_.ALL_API;let t=!1;return a.mode===gD.API&&!1===a.enableDynamicApiTools&&(t=t||e.type===_.ALL_API),a.readOnlyMode&&(t=t||e.type!==_.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??cu,endpoint:a.mondayApiEndpoint,requestConfig:a.mondayApiRequestConfig}),this.mondayApiToken=a.mondayApiToken,this.context={...a.context,apiVersion:a.mondayApiVersion??cu},this.tools=this.initializeTools(a)}initializeTools(e){const a={apiClient:this.mondayApi,apiToken:this.mondayApiToken,context:this.context};return bD(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,i=JSON.parse(t),n=this.tools.find((e=>e.name===a));if(!n)throw new Error(`Unknown tool: ${a}`);const o=n.getInputSchema();if(o){const a=h.z.object(o).safeParse(i);if(!a.success)throw new Error(`Invalid arguments: ${a.error.message}`);const t=await n.execute(a.data);return{role:"tool",tool_call_id:e.id,content:t.content}}{const a=await n.execute();return{role:"tool",tool_call_id:e.id,content:a.content}}}};
1639
1652
  //# sourceMappingURL=index.js.map