@mondaydotcomorg/agent-toolkit 5.78.3 → 5.78.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/index.js +10 -4
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.js +33 -27
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +10 -4
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +10 -4
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.js +10 -4
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +10 -4
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/openai/index.js
CHANGED
|
@@ -1068,7 +1068,7 @@
|
|
|
1068
1068
|
description
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
|
-
`,Uu={questionId:"Question ID. Required for update/delete."},Pu={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},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:"Hides submitter identity.",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:"Required for delete. Auto-generated.",name:"Required for create. Cannot be updated.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/delete. Delete: id only. Create: name (id/columnId auto-generated).",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},Vu={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:"Required for setFormPassword action.",shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{passwordEnabled:"Can only be set to false. Use setFormPassword to enable.",closeDateValue:"ISO timestamp.",includeNameQuestion:"Adds name column as a form question.",includeUpdateQuestion:"Adds updates/comments field linked to the board item.",syncQuestionAndColumnsTitles:"Syncs question titles with board column names.",allowCreateItem:"Shows 'Create Item' button on the board to open this form.",backgroundValue:"Hex color or image URL (depends on type).",logoSize:"Logo size for the form header.",language:"Form locale, 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."}},Mu={actions:{type:"Action to perform on the question of a form. create requires question. update requires questionId and question with type always included. delete requires questionId.",question:"The question to create or update. Always include type, then only the fields you want to set or change."},properties:{title:"Question text. Required when creating.",type:"Question type. Always required. Cannot be changed after creation — always send the existing type when updating.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Help text shown under 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:"Options for select questions. Always include all options — omitting an existing option will delete it. To update safely, call get_form first to retrieve existing option values, then include all options you want to keep with their original value fields.",selectOptionsValue:"Unique identifier for the option. If this option was used in existing submissions, it must keep its original value to preserve data integrity.",blockType:"The kind of block to create. Includes all question types and content block types.",insertAfterQuestionId:"ID to insert after. Omit to append. Null for first position.",pageBlockId:"Page block ID to group this question within. Set to null to remove from page block. Omit to leave unchanged."},showIfRules:"Conditional visibility. All operators must be OR.",showIfConditionBuildingBlockId:"Question ID to evaluate.",showIfConditionValues:"Answer values that satisfy the condition.",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."}},Fu={properties:{validation:"Validation rules applied to the question response",prefill:"Auto-populates from account data or URL query params.",prefillLookup:"Field name (e.g. 'email') or URL param name.",prefixAutofilled:"Phone only. Auto-detects country prefix.",prefixPredefined:"Phone only. Sets a default country prefix.",prefixPredefinedPrefix:"Country code, e.g. 'US', 'IL'.",checkedByDefault:"Boolean question type only.",defaultCurrentDate:"Date question type only.",includeTime:"Date only. Adds time picker.",display:"SingleSelect/MultiSelect only.",optionsOrder:"SingleSelect/MultiSelect only.",locationAutofilled:"Location only. Auto-fills current location.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link only. Skips URL format validation.",labelLimitCount:"MultiSelect only. Max selections. Pair with labelLimitCountEnabled.",labelLimitCountEnabled:"MultiSelect only. Enables selection limit.",defaultAnswer:"ShortText/LongText/Name/Link only. Pre-filled default value."},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"}},Bu={destination_workspace_id:i.z.string(),destination_folder_id:i.z.string().optional(),destination_folder_name:i.z.string().optional(),board_kind:i.z.nativeEnum(ho).optional(),destination_name:i.z.string().optional().describe(Pu.args.destinationName),board_owner_ids:i.z.array(i.z.string()).optional(),board_owner_team_ids:i.z.array(i.z.string()).optional(),board_subscriber_ids:i.z.array(i.z.string()).optional().describe(Pu.args.boardSubscriberIds),board_subscriber_teams_ids:i.z.array(i.z.string()).optional().describe(Pu.args.boardSubscriberTeamsIds)};var zu,ju,qu,Gu,Hu,Wu,Yu,Qu,Ku,Ju,Xu,Zu,eh,th,ah,ih;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(zu||(zu={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(ju||(ju={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(qu||(qu={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Gu||(Gu={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Hu||(Hu={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Wu||(Wu={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Yu||(Yu={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Qu||(Qu={})),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"}(Ku||(Ku={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ju||(Ju={})),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"}(Xu||(Xu={})),function(e){e.Or="OR"}(Zu||(Zu={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(eh||(eh={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(th||(th={})),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"}(ah||(ah={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(ih||(ih={}));const nh=i.z.object({type:i.z.nativeEnum(ns).describe(Mu.properties.type),title:i.z.string().describe(Mu.properties.title).optional(),description:i.z.string().describe(Mu.properties.description).optional(),visible:i.z.boolean().optional(),required:i.z.boolean().optional(),insert_after_question_id:i.z.string().nullish().describe(Mu.properties.insertAfterQuestionId),page_block_id:i.z.string().nullish().describe(Mu.properties.pageBlockId),show_if_rules:i.z.object({operator:i.z.nativeEnum(Ko),rules:i.z.array(i.z.object({operator:i.z.nativeEnum(Ko),conditions:i.z.array(i.z.object({building_block_id:i.z.string().describe(Mu.showIfConditionBuildingBlockId),operator:i.z.nativeEnum(Ko),values:i.z.array(i.z.string()).describe(Mu.showIfConditionValues)}))}))}).describe(Mu.showIfRules).optional(),options:i.z.array(i.z.object({label:i.z.string(),value:i.z.string().optional().describe(Mu.properties.selectOptionsValue),visible:i.z.boolean().optional()})).describe(Mu.properties.selectOptions).optional(),settings:i.z.object({checkedByDefault:i.z.boolean().describe(Fu.properties.checkedByDefault).optional(),defaultCurrentDate:i.z.boolean().describe(Fu.properties.defaultCurrentDate).optional(),display:i.z.nativeEnum(as).describe(Fu.properties.display).optional(),includeTime:i.z.boolean().describe(Fu.properties.includeTime).optional(),locationAutofilled:i.z.boolean().describe(Fu.properties.locationAutofilled).optional(),optionsOrder:i.z.nativeEnum(is).describe(Fu.properties.optionsOrder).optional(),prefixAutofilled:i.z.boolean().describe(Fu.properties.prefixAutofilled).optional(),prefixPredefined:i.z.object({enabled:i.z.boolean(),prefix:i.z.string().describe(Fu.properties.prefixPredefinedPrefix).optional()}).describe(Fu.properties.prefixPredefined).optional(),skipValidation:i.z.boolean().describe(Fu.properties.skipValidation).optional(),labelLimitCount:i.z.number().int().describe(Fu.properties.labelLimitCount).optional(),label_limit_count_enabled:i.z.boolean().describe(Fu.properties.labelLimitCountEnabled).optional(),default_answer:i.z.string().describe(Fu.properties.defaultAnswer).optional(),prefill:i.z.object({enabled:i.z.boolean(),lookup:i.z.string().describe(Fu.properties.prefillLookup).optional(),source:i.z.nativeEnum(ts).optional()}).describe(Fu.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),oh={action:i.z.nativeEnum(ih).describe(Mu.actions.type),formToken:i.z.string(),questionId:i.z.string().describe(Uu.questionId).optional(),question:nh.describe(Mu.actions.question).optional()};class rh{constructor(e){this.getMondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.getMondayApi().request(wu,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.getMondayApi().request(Eu,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.getMondayApi().request(Tu,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var sh;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(sh||(sh={}));const dh=i.z.object({id:i.z.string().describe(Pu.properties.tags.id).optional(),name:i.z.string().describe(Pu.properties.tags.name).optional(),columnId:i.z.string().describe(Pu.properties.tags.columnId).optional()}),ph=i.z.object({type:i.z.nativeEnum(Gu).optional(),value:i.z.string().describe(Vu.properties.backgroundValue).optional()}),lh=i.z.object({format:i.z.nativeEnum(Wu).optional(),alignment:i.z.nativeEnum(Yu).optional(),direction:i.z.nativeEnum(Hu).optional()}),ch=i.z.object({position:i.z.nativeEnum(qu).optional(),size:i.z.nativeEnum(ju).describe(Vu.properties.logoSize).optional()}),mh=i.z.object({text:i.z.string().optional()}),uh=i.z.object({font:i.z.string().optional(),color:i.z.string().optional(),size:i.z.nativeEnum(Qu).optional()}),hh=i.z.object({enabled:i.z.boolean().optional(),redirectUrl:i.z.string().optional()}),fh=i.z.object({allowEditSubmission:i.z.boolean().optional(),allowResubmit:i.z.boolean().optional(),allowViewSubmission:i.z.boolean().optional(),description:i.z.string().optional(),redirectAfterSubmission:hh.optional(),showSuccessImage:i.z.boolean().optional(),title:i.z.string().optional()}),_h=i.z.object({enabled:i.z.boolean().optional(),date:i.z.string().describe(Vu.properties.closeDateValue).optional()}),bh=i.z.object({enabled:i.z.boolean().optional()}),gh=i.z.object({itemGroupId:i.z.string().optional(),includeNameQuestion:i.z.boolean().describe(Vu.properties.includeNameQuestion).optional(),includeUpdateQuestion:i.z.boolean().describe(Vu.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:i.z.boolean().describe(Vu.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:i.z.boolean().describe(Vu.properties.allowCreateItem).optional()}),yh=i.z.object({enabled:i.z.boolean().describe(Vu.properties.passwordEnabled).optional()}),vh=i.z.object({text:i.z.string().optional()}),Ih=i.z.object({enabled:i.z.boolean().optional(),title:i.z.string().optional(),description:i.z.string().optional(),startButton:vh.optional()}),wh=i.z.object({enabled:i.z.boolean().optional(),redirectToLogin:i.z.boolean().optional()}),Th=i.z.object({enabled:i.z.boolean().optional(),limit:i.z.number().optional()}),Eh=i.z.object({background:ph.optional(),hideBranding:i.z.boolean().optional(),layout:lh.optional(),logo:ch.optional(),primaryColor:i.z.string().optional(),showProgressBar:i.z.boolean().optional(),submitButton:mh.optional(),text:uh.optional()}),Ah=i.z.object({language:i.z.string().describe(Vu.properties.language).optional(),logoAltText:i.z.string().optional()}),Sh=i.z.object({enabled:i.z.boolean().optional()}),Dh=i.z.object({afterSubmissionView:fh.optional(),ai_translate:Sh.optional(),closeDate:_h.optional(),draftSubmission:bh.optional(),monday:gh.optional(),password:yh.optional(),preSubmissionView:Ih.optional(),reCaptchaChallenge:i.z.boolean().optional(),requireLogin:wh.optional(),responseLimit:Th.optional(),is_anonymous:i.z.boolean().describe(Pu.properties.isAnonymous).optional()}),Nh=i.z.object({id:i.z.string().describe(Pu.inputs.questionId),page_block_id:i.z.string().describe(Mu.properties.pageBlockId).optional()}),Oh=i.z.object({appearance:Eh.describe(Pu.inputs.form.appearance).optional(),accessibility:Ah.describe(Pu.inputs.form.accessibility).optional(),features:Dh.describe(Pu.inputs.form.features).optional(),title:i.z.string().describe(Pu.inputs.title).optional(),description:i.z.string().describe(Pu.inputs.description).optional(),questions:i.z.array(Nh).describe(Pu.inputs.questions).optional()}),kh={formToken:i.z.string(),action:i.z.nativeEnum(sh).describe(Pu.operations.updateForm.action),formPassword:i.z.string().describe(Vu.operations.setFormPassword).optional(),tag:dh.describe(Pu.inputs.tag).optional(),form:Oh.describe(Pu.inputs.form.describe).optional()};class Rh{constructor(e){this.getMondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.getMondayApi().request(Au,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Su,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Du,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Nu,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}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 t={formToken:e.formToken,tag:{name:e.tag.name}},a=await this.getMondayApi().request(ku,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}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 t={formToken:e.formToken,tagId:e.tag.id};return await this.getMondayApi().request(Ou,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.getMondayApi().request(Ru,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.getMondayApi().request(Cu,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},n=await this.getMondayApi().request($u,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:n.update_form_settings?.features}}}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 t={formToken:e.formToken,questions:e.form.questions},a=await this.getMondayApi().request(xu,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}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 t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.getMondayApi().request(Lu,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const Ch={formToken:i.z.string()};const $h=Nc`
|
|
1071
|
+
`,Uu={questionId:"Question ID. Required for update/delete."},Pu={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},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:"Hides submitter identity.",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:"Required for delete. Auto-generated.",name:"Required for create. Cannot be updated.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/delete. Delete: id only. Create: name (id/columnId auto-generated).",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},Vu={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:"Required for setFormPassword action.",shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{passwordEnabled:"Can only be set to false. Use setFormPassword to enable.",closeDateValue:"ISO timestamp.",includeNameQuestion:"Adds name column as a form question.",includeUpdateQuestion:"Adds updates/comments field linked to the board item.",syncQuestionAndColumnsTitles:"Syncs question titles with board column names.",allowCreateItem:"Shows 'Create Item' button on the board to open this form.",backgroundValue:"Hex color or image URL (depends on type).",logoSize:"Logo size for the form header.",language:"Form locale, 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."}},Mu={actions:{type:"Action to perform on the question of a form. create requires question. update requires questionId and question with type always included. delete requires questionId.",question:"The question to create or update. Always include type, then only the fields you want to set or change."},properties:{title:"Question text. Required when creating.",type:"Question type. Always required. Cannot be changed after creation — always send the existing type when updating.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Help text shown under 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:"Options for select questions. Always include all options — omitting an existing option will delete it. To update safely, call get_form first to retrieve existing option values, then include all options you want to keep with their original value fields.",selectOptionsValue:"Unique identifier for the option. If this option was used in existing submissions, it must keep its original value to preserve data integrity.",blockType:"The kind of block to create. Includes all question types and content block types.",insertAfterQuestionId:"ID to insert after. Omit to append. Null for first position.",pageBlockId:"Page block ID to group this question within. Set to null to remove from page block. Omit to leave unchanged."},showIfRules:"Conditional visibility. All operators must be OR.",showIfConditionBuildingBlockId:"Question ID to evaluate.",showIfConditionValues:"Answer values that satisfy the condition.",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."}},Fu={properties:{validation:"Validation rules applied to the question response",prefill:"Auto-populates from account data or URL query params.",prefillLookup:"Field name (e.g. 'email') or URL param name.",prefixAutofilled:"Phone only. Auto-detects country prefix.",prefixPredefined:"Phone only. Sets a default country prefix.",prefixPredefinedPrefix:"Country code, e.g. 'US', 'IL'.",checkedByDefault:"Boolean question type only.",defaultCurrentDate:"Date question type only.",includeTime:"Date only. Adds time picker.",display:"SingleSelect/MultiSelect only.",optionsOrder:"SingleSelect/MultiSelect only.",locationAutofilled:"Location only. Auto-fills current location.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link only. Skips URL format validation.",labelLimitCount:"MultiSelect only. Max selections. Pair with labelLimitCountEnabled.",labelLimitCountEnabled:"MultiSelect only. Enables selection limit.",defaultAnswer:"ShortText/LongText/Name/Link only. Pre-filled default value."},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"}},Bu={destination_workspace_id:i.z.string(),destination_folder_id:i.z.string().optional(),destination_folder_name:i.z.string().optional(),board_kind:i.z.nativeEnum(ho).optional(),destination_name:i.z.string().optional().describe(Pu.args.destinationName),board_owner_ids:i.z.array(i.z.string()).optional(),board_owner_team_ids:i.z.array(i.z.string()).optional(),board_subscriber_ids:i.z.array(i.z.string()).optional().describe(Pu.args.boardSubscriberIds),board_subscriber_teams_ids:i.z.array(i.z.string()).optional().describe(Pu.args.boardSubscriberTeamsIds)};var zu,ju,qu,Gu,Hu,Wu,Yu,Qu,Ku,Ju,Xu,Zu,eh,th,ah,ih;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(zu||(zu={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(ju||(ju={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(qu||(qu={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Gu||(Gu={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Hu||(Hu={})),function(e){e.Card="CARD",e.Flat="FLAT"}(Wu||(Wu={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Yu||(Yu={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Qu||(Qu={})),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"}(Ku||(Ku={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ju||(Ju={})),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"}(Xu||(Xu={})),function(e){e.Or="OR"}(Zu||(Zu={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(eh||(eh={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(th||(th={})),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"}(ah||(ah={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(ih||(ih={}));const nh=i.z.object({type:i.z.nativeEnum(ns).describe(Mu.properties.type),title:i.z.string().describe(Mu.properties.title).optional(),description:i.z.string().describe(Mu.properties.description).optional(),visible:i.z.boolean().optional(),required:i.z.boolean().optional(),insert_after_question_id:i.z.string().nullish().describe(Mu.properties.insertAfterQuestionId),page_block_id:i.z.string().nullish().describe(Mu.properties.pageBlockId),show_if_rules:i.z.object({operator:i.z.nativeEnum(Ko),rules:i.z.array(i.z.object({operator:i.z.nativeEnum(Ko),conditions:i.z.array(i.z.object({building_block_id:i.z.string().describe(Mu.showIfConditionBuildingBlockId),operator:i.z.nativeEnum(Ko),values:i.z.array(i.z.string()).describe(Mu.showIfConditionValues)}))}))}).describe(Mu.showIfRules).optional(),options:i.z.array(i.z.object({label:i.z.string(),value:i.z.string().optional().describe(Mu.properties.selectOptionsValue),visible:i.z.boolean().optional()})).describe(Mu.properties.selectOptions).optional(),settings:i.z.object({checkedByDefault:i.z.boolean().describe(Fu.properties.checkedByDefault).optional(),defaultCurrentDate:i.z.boolean().describe(Fu.properties.defaultCurrentDate).optional(),display:i.z.nativeEnum(as).describe(Fu.properties.display).optional(),includeTime:i.z.boolean().describe(Fu.properties.includeTime).optional(),locationAutofilled:i.z.boolean().describe(Fu.properties.locationAutofilled).optional(),optionsOrder:i.z.nativeEnum(is).describe(Fu.properties.optionsOrder).optional(),prefixAutofilled:i.z.boolean().describe(Fu.properties.prefixAutofilled).optional(),prefixPredefined:i.z.object({enabled:i.z.boolean(),prefix:i.z.string().describe(Fu.properties.prefixPredefinedPrefix).optional()}).describe(Fu.properties.prefixPredefined).optional(),skipValidation:i.z.boolean().describe(Fu.properties.skipValidation).optional(),labelLimitCount:i.z.number().int().describe(Fu.properties.labelLimitCount).optional(),label_limit_count_enabled:i.z.boolean().describe(Fu.properties.labelLimitCountEnabled).optional(),default_answer:i.z.string().describe(Fu.properties.defaultAnswer).optional(),prefill:i.z.object({enabled:i.z.boolean(),lookup:i.z.string().describe(Fu.properties.prefillLookup).optional(),source:i.z.nativeEnum(ts).optional()}).describe(Fu.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),oh={action:i.z.nativeEnum(ih).describe(Mu.actions.type),formToken:i.z.string(),questionId:i.z.string().describe(Uu.questionId).optional(),question:nh.describe(Mu.actions.question).optional()};class rh{constructor(e){this.getMondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.getMondayApi().request(wu,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.getMondayApi().request(Eu,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.getMondayApi().request(Tu,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var sh;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(sh||(sh={}));const dh=i.z.object({id:i.z.string().describe(Pu.properties.tags.id).optional(),name:i.z.string().describe(Pu.properties.tags.name).optional(),columnId:i.z.string().describe(Pu.properties.tags.columnId).optional()}),ph=i.z.object({type:i.z.nativeEnum(Gu).optional(),value:i.z.string().describe(Vu.properties.backgroundValue).optional()}),lh=i.z.object({type:i.z.nativeEnum(Wu).optional(),alignment:i.z.nativeEnum(Yu).optional(),direction:i.z.nativeEnum(Hu).optional()}),ch=i.z.object({position:i.z.nativeEnum(qu).optional(),size:i.z.nativeEnum(ju).describe(Vu.properties.logoSize).optional()}),mh=i.z.object({text:i.z.string().optional()}),uh=i.z.object({font:i.z.string().optional(),color:i.z.string().optional(),size:i.z.nativeEnum(Qu).optional()}),hh=i.z.object({enabled:i.z.boolean().optional(),redirectUrl:i.z.string().optional()}),fh=i.z.object({allowEditSubmission:i.z.boolean().optional(),allowResubmit:i.z.boolean().optional(),allowViewSubmission:i.z.boolean().optional(),description:i.z.string().optional(),redirectAfterSubmission:hh.optional(),showSuccessImage:i.z.boolean().optional(),title:i.z.string().optional()}),_h=i.z.object({enabled:i.z.boolean().optional(),date:i.z.string().describe(Vu.properties.closeDateValue).optional()}),bh=i.z.object({enabled:i.z.boolean().optional()}),gh=i.z.object({itemGroupId:i.z.string().optional(),includeNameQuestion:i.z.boolean().describe(Vu.properties.includeNameQuestion).optional(),includeUpdateQuestion:i.z.boolean().describe(Vu.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:i.z.boolean().describe(Vu.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:i.z.boolean().describe(Vu.properties.allowCreateItem).optional()}),yh=i.z.object({enabled:i.z.boolean().describe(Vu.properties.passwordEnabled).optional()}),vh=i.z.object({text:i.z.string().optional()}),Ih=i.z.object({enabled:i.z.boolean().optional(),title:i.z.string().optional(),description:i.z.string().optional(),startButton:vh.optional()}),wh=i.z.object({enabled:i.z.boolean().optional(),redirectToLogin:i.z.boolean().optional()}),Th=i.z.object({enabled:i.z.boolean().optional(),limit:i.z.number().optional()}),Eh=i.z.object({background:ph.optional(),hideBranding:i.z.boolean().optional(),layout:lh.optional(),logo:ch.optional(),primaryColor:i.z.string().optional(),showProgressBar:i.z.boolean().optional(),submitButton:mh.optional(),text:uh.optional()}),Ah=i.z.object({language:i.z.string().describe(Vu.properties.language).optional(),logoAltText:i.z.string().optional()}),Sh=i.z.object({enabled:i.z.boolean().optional()}),Dh=i.z.object({afterSubmissionView:fh.optional(),ai_translate:Sh.optional(),closeDate:_h.optional(),draftSubmission:bh.optional(),monday:gh.optional(),password:yh.optional(),preSubmissionView:Ih.optional(),reCaptchaChallenge:i.z.boolean().optional(),requireLogin:wh.optional(),responseLimit:Th.optional(),is_anonymous:i.z.boolean().describe(Pu.properties.isAnonymous).optional()}),Nh=i.z.object({id:i.z.string().describe(Pu.inputs.questionId),page_block_id:i.z.string().describe(Mu.properties.pageBlockId).optional()}),Oh=i.z.object({appearance:Eh.describe(Pu.inputs.form.appearance).optional(),accessibility:Ah.describe(Pu.inputs.form.accessibility).optional(),features:Dh.describe(Pu.inputs.form.features).optional(),title:i.z.string().describe(Pu.inputs.title).optional(),description:i.z.string().describe(Pu.inputs.description).optional(),questions:i.z.array(Nh).describe(Pu.inputs.questions).optional()}),kh={formToken:i.z.string(),action:i.z.nativeEnum(sh).describe(Pu.operations.updateForm.action),formPassword:i.z.string().describe(Vu.operations.setFormPassword).optional(),tag:dh.describe(Pu.inputs.tag).optional(),form:Oh.describe(Pu.inputs.form.describe).optional()};class Rh{constructor(e){this.getMondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.getMondayApi().request(Au,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Su,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Du,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Nu,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}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 t={formToken:e.formToken,tag:{name:e.tag.name}},a=await this.getMondayApi().request(ku,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}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 t={formToken:e.formToken,tagId:e.tag.id};return await this.getMondayApi().request(Ou,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.getMondayApi().request(Ru,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.getMondayApi().request(Cu,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},n=await this.getMondayApi().request($u,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:n.update_form_settings?.features}}}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 t={formToken:e.formToken,questions:e.form.questions},a=await this.getMondayApi().request(xu,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}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 t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.getMondayApi().request(Lu,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const Ch={formToken:i.z.string()};const $h=Nc`
|
|
1072
1072
|
mutation CreateFormSubmission(
|
|
1073
1073
|
$form_token: String!
|
|
1074
1074
|
$answers: [FormAnswerInput!]!
|
|
@@ -1113,8 +1113,14 @@
|
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
`,Kh=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],Jh={boardId:i.z.string().describe("The ID of the board to create the group in"),groupName:i.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:i.z.enum(Kh).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${Kh.join(", ")}`),relativeTo:i.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:i.z.nativeEnum(hd).optional().describe("Whether to position the new group before or after the relativeTo group")};const Xh=Nc`
|
|
1116
|
-
mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
|
|
1117
|
-
duplicate_item(
|
|
1116
|
+
mutation duplicateItem($boardId: ID!, $itemId: ID!, $itemName: String, $groupId: ID, $withUpdates: Boolean) {
|
|
1117
|
+
duplicate_item(
|
|
1118
|
+
board_id: $boardId
|
|
1119
|
+
item_id: $itemId
|
|
1120
|
+
item_name: $itemName
|
|
1121
|
+
group_id: $groupId
|
|
1122
|
+
with_updates: $withUpdates
|
|
1123
|
+
) {
|
|
1118
1124
|
id
|
|
1119
1125
|
name
|
|
1120
1126
|
url
|
|
@@ -1141,7 +1147,7 @@
|
|
|
1141
1147
|
}
|
|
1142
1148
|
}
|
|
1143
1149
|
}
|
|
1144
|
-
`,ef={name:i.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").describe("The name of the new item to be created, must be relevant to the user's request. 1–255 characters."),groupId:i.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:i.z.string().describe(_m),createLabelsIfMissing:i.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure. Use when the caller specifies label names that may not yet exist on the board."),parentItemId:i.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:i.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},tf={boardId:i.z.number().describe("The id of the board to which the new item will be added"),...ef};class af extends ue{constructor(){super(...arguments),this.name="create_item",this.type=b.WRITE,this.annotations=me({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a single item or subitem on a monday.com board, or duplicate an existing item. [IMPORTANT] If you need to create multiple items in one call, use create_items instead of calling this tool in a loop. Otherwise: 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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?ef:tf}async executeInternal(e){const t={...e,columnValues:bm(e.columnValues)},a=this.context?.boardId??t.boardId;if(t.duplicateFromItemId&&t.parentItemId)throw new im("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.","INVALID_ARGUMENTS_COMBINATION");return t.duplicateFromItemId?await this.duplicateAndUpdateItem(t,a):t.parentItemId?await this.createSubitem(t):await this.createNewItem(t,a)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},
|
|
1150
|
+
`,ef={name:i.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").describe("The name of the new item to be created, must be relevant to the user's request. 1–255 characters."),groupId:i.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. Not supported when duplicateFromItemId is a subitem."),columnValues:i.z.string().describe(_m),createLabelsIfMissing:i.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure. Use when the caller specifies label names that may not yet exist on the board."),parentItemId:i.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:i.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},tf={boardId:i.z.number().describe("The id of the board to which the new item will be added"),...ef};class af extends ue{constructor(){super(...arguments),this.name="create_item",this.type=b.WRITE,this.annotations=me({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a single item or subitem on a monday.com board, or duplicate an existing item. [IMPORTANT] If you need to create multiple items in one call, use create_items instead of calling this tool in a loop. Otherwise: 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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?ef:tf}async executeInternal(e){const t={...e,columnValues:bm(e.columnValues)},a=this.context?.boardId??t.boardId;if(t.duplicateFromItemId&&t.parentItemId)throw new im("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.","INVALID_ARGUMENTS_COMBINATION");return t.duplicateFromItemId?await this.duplicateAndUpdateItem(t,a):t.parentItemId?await this.createSubitem(t):await this.createNewItem(t,a)}async duplicateAndUpdateItem(e,t){try{let a;try{a=JSON.parse(e.columnValues)}catch(e){throw new im("Invalid columnValues JSON: expected a JSON object keyed by column id","INVALID_COLUMN_VALUES_JSON")}if(null===a||"object"!=typeof a||Array.isArray(a))throw new im("Invalid columnValues JSON: expected a JSON object keyed by column id","INVALID_COLUMN_VALUES_JSON");const i={...a};delete i.name;const n={boardId:t.toString(),itemId:e.duplicateFromItemId.toString(),itemName:e.name,...e.groupId?{groupId:e.groupId}:{}},o=await this.mondayApi.request(Xh,n,{versionOverride:"2027-04"});if(!o.duplicate_item?.id)throw new im("Failed to duplicate item: no item duplicated","EMPTY_API_RESPONSE");const r=o.duplicate_item.name,s=r===`${e.name} (copy)`;if(s&&(i.name=e.name),Object.keys(i).length>0){const a=new wm(this.mondayApi,{boardId:t});await a.execute({itemId:parseInt(o.duplicate_item.id),columnValues:JSON.stringify(i),createLabelsIfMissing:e.createLabelsIfMissing})}return{content:{message:`Item ${o.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:o.duplicate_item.id,item_name:s?e.name:r,item_url:o.duplicate_item.url,board_id:t}}}catch(e){nm(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing};try{const a=await this.mondayApi.request(Zh,t);if(!a.create_subitem?.id)throw new im("Failed to create subitem: no subitem created","EMPTY_API_RESPONSE");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){nm(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing},i=await this.mondayApi.request(xc,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){nm(e,"create item")}}}const nf={items:i.z.array(i.z.object({name:i.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").optional().describe("Required. The name of the item to be created. 1-255 characters."),columnValues:i.z.string().default("{}").describe(`Column values for this item, keyed by column id. Defaults to "{}" (no column values). ${_m}`),groupId:i.z.string().optional().describe("The id of the group to add this item to. Ignored when parentItemId is set (subitems inherit their parent group). Not supported when duplicateFromItemId is a subitem. If neither is set, the board default group is used."),parentItemId:i.z.number().optional().describe("If provided, this item is created as a subitem of this parent (uses create_subitem mutation) and groupId is ignored. Mutually exclusive with duplicateFromItemId."),duplicateFromItemId:i.z.number().optional().describe("The id of an existing item to duplicate and then patch with this item name and columnValues. Use for bulk templating (e.g., duplicate a template item N times with different overrides). Mutually exclusive with parentItemId."),createLabelsIfMissing:i.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in this item's columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure.")})).min(1,"items must not be empty").max(20,"items must not exceed 20 per call").describe("The items to create, up to 20 per call. Each item returns its own item_id and item_url on success, or a raw error message on failure. Each item independently chooses its groupId, parentItemId, and createLabelsIfMissing.")},of={boardId:i.z.number().describe("The id of the board to which the new items will be added"),...nf};function rf(e){return e?.response?.errors?.[0]}function sf(e,t){const a=e instanceof Error?e.message:String(e);return void 0!==t&&function(e,t){const a=rf(e),i=`failed to acquire lock on '${t}|subitems__`;return"ColumnValueException"===a?.extensions?.code&&!0===a.message?.toLowerCase().startsWith(i.toLowerCase())}(e,t)?`${a}\nAn item-link update hit a temporary concurrency limit. Wait a few seconds, then retry only the failed items in one create_items call.`:a}function df(e,t){const a=rf(e),i=e instanceof Error?e.message:String(e);return{...e instanceof im?{code:e.code}:{},...a?.extensions??{},message:a?.message??i,path:["results",t]}}const pf={item_id:i.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:i.z.string().describe("The ID of the custom activity for the timeline item"),title:i.z.string().describe("The title of the new timeline item"),summary:i.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:i.z.string().optional().describe("The content of the new timeline item"),timestamp:i.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:i.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:i.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:i.z.string().optional().describe("The location to add to the new timeline item"),phone:i.z.string().optional().describe("The phone number to add to the new timeline item"),url:i.z.string().optional().describe("The URL to add to the new timeline item")};const lf=Nc`
|
|
1145
1151
|
mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention], $parentId: ID) {
|
|
1146
1152
|
create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList, parent_id: $parentId) {
|
|
1147
1153
|
id
|