@mondaydotcomorg/agent-toolkit 3.0.14 → 3.0.16
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 +138 -114
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.js +134 -110
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +138 -114
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +139 -115
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.js +134 -110
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +137 -113
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/mcp/index.js
CHANGED
|
@@ -364,6 +364,20 @@
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
`,tS={query:e.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:e.z.string().describe("JSON string containing the variables for the GraphQL operation")};class aS extends ey{constructor(e,t,a){super(e,t,a),this.name="all_monday_api",this.type=an.ALL_API,this.annotations=Zg({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return tS}async loadSchema(e){if(aS.schemaCache[e])return aS.schemaCache[e];try{const t=await this.mondayApi.rawRequest(QI),{data:a}=t,i=ix(a);return aS.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,t){var a;return ax(await this.loadSchema(t),new Yy(e,a).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;try{let e={};try{e=JSON.parse(a)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=await this.validateOperation(t,this.context?.apiVersion??Ag);if(i.length>0)return{content:i.join(", ")};const n=await this.mondayApi.request(t,e);return{content:JSON.stringify(n)}}catch(e){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)return{content:t.response.errors.map((e=>e.message)).join(", ")}}return{content:t}}}}aS.schemaCache={};const iS={itemId:e.z.number().describe("The ID of the item to be updated"),columnValues:e.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"')},nS={boardId:e.z.number().describe("The ID of the board that contains the item to be updated"),...iS};class oS extends ey{constructor(){super(...arguments),this.name="change_item_column_values",this.type=an.WRITE,this.annotations=Zg({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board"}getInputSchema(){return this.context?.boardId?iS:nS}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},a=await this.mondayApi.request(BI,t);return{content:`Item ${a.change_multiple_column_values?.id} successfully updated with the new column values`}}}const rS={boardName:e.z.string().describe("The name of the board to create"),boardKind:e.z.nativeEnum(Ex).default(Ex.Public).describe("The kind of board to create"),boardDescription:e.z.string().optional().describe("The description of the board to create"),workspaceId:e.z.string().optional().describe("The ID of the workspace to create the board in")};const sS=LI`
|
|
367
|
+
mutation createView(
|
|
368
|
+
$boardId: ID!
|
|
369
|
+
$type: ViewKind!
|
|
370
|
+
$name: String
|
|
371
|
+
$filter: ItemsQueryGroup
|
|
372
|
+
$sort: [ItemsQueryOrderBy!]
|
|
373
|
+
) {
|
|
374
|
+
create_view(board_id: $boardId, type: $type, name: $name, filter: $filter, sort: $sort) {
|
|
375
|
+
id
|
|
376
|
+
name
|
|
377
|
+
type
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
`,pS={boardId:e.z.string().describe("The board ID to create the view on"),type:e.z.nativeEnum(mT).default(mT.Table).describe("The type of board view to create. Use TABLE for standard board views."),name:e.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:e.z.object({rules:e.z.array(e.z.object({column_id:e.z.string().describe("The column ID to filter by"),compare_value:e.z.any().default([]).describe("The value(s) to compare against"),operator:e.z.nativeEnum(_E).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:e.z.nativeEnum(wE).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:e.z.array(e.z.object({column_id:e.z.string().describe("The column ID to sort by"),direction:e.z.nativeEnum(bE).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view")};const dS=LI`
|
|
367
381
|
fragment QuestionBasic on FormQuestion {
|
|
368
382
|
id
|
|
369
383
|
type
|
|
@@ -372,13 +386,13 @@
|
|
|
372
386
|
visible
|
|
373
387
|
required
|
|
374
388
|
}
|
|
375
|
-
`,
|
|
389
|
+
`,lS=LI`
|
|
376
390
|
fragment QuestionOptions on FormQuestion {
|
|
377
391
|
options {
|
|
378
392
|
label
|
|
379
393
|
}
|
|
380
394
|
}
|
|
381
|
-
`,
|
|
395
|
+
`,cS=LI`
|
|
382
396
|
fragment QuestionSettings on FormQuestion {
|
|
383
397
|
settings {
|
|
384
398
|
prefill {
|
|
@@ -401,17 +415,17 @@
|
|
|
401
415
|
skipValidation
|
|
402
416
|
}
|
|
403
417
|
}
|
|
404
|
-
`,
|
|
418
|
+
`,mS=LI`
|
|
405
419
|
fragment QuestionComplete on FormQuestion {
|
|
406
420
|
...QuestionBasic
|
|
407
421
|
...QuestionOptions
|
|
408
422
|
...QuestionSettings
|
|
409
423
|
showIfRules
|
|
410
424
|
}
|
|
411
|
-
${sS}
|
|
412
|
-
${pS}
|
|
413
425
|
${dS}
|
|
414
|
-
|
|
426
|
+
${lS}
|
|
427
|
+
${cS}
|
|
428
|
+
`,uS=LI`
|
|
415
429
|
fragment FormFeatures on FormFeatures {
|
|
416
430
|
isInternal
|
|
417
431
|
reCaptchaChallenge
|
|
@@ -464,7 +478,7 @@
|
|
|
464
478
|
syncQuestionAndColumnsTitles
|
|
465
479
|
}
|
|
466
480
|
}
|
|
467
|
-
`,
|
|
481
|
+
`,hS=LI`
|
|
468
482
|
fragment FormAppearance on FormAppearance {
|
|
469
483
|
hideBranding
|
|
470
484
|
showProgressBar
|
|
@@ -492,19 +506,19 @@
|
|
|
492
506
|
text
|
|
493
507
|
}
|
|
494
508
|
}
|
|
495
|
-
`,
|
|
509
|
+
`,fS=LI`
|
|
496
510
|
fragment FormAccessibility on FormAccessibility {
|
|
497
511
|
language
|
|
498
512
|
logoAltText
|
|
499
513
|
}
|
|
500
|
-
`,
|
|
514
|
+
`,vS=LI`
|
|
501
515
|
fragment FormTag on FormTag {
|
|
502
516
|
id
|
|
503
517
|
name
|
|
504
518
|
value
|
|
505
519
|
columnId
|
|
506
520
|
}
|
|
507
|
-
`,
|
|
521
|
+
`,gS=LI`
|
|
508
522
|
mutation createForm(
|
|
509
523
|
$destination_workspace_id: ID!
|
|
510
524
|
$destination_folder_id: ID
|
|
@@ -531,7 +545,7 @@
|
|
|
531
545
|
token
|
|
532
546
|
}
|
|
533
547
|
}
|
|
534
|
-
`,
|
|
548
|
+
`,yS=LI`
|
|
535
549
|
query getForm($formToken: String!) {
|
|
536
550
|
form(formToken: $formToken) {
|
|
537
551
|
id
|
|
@@ -560,16 +574,16 @@
|
|
|
560
574
|
}
|
|
561
575
|
}
|
|
562
576
|
}
|
|
563
|
-
${lS}
|
|
564
|
-
${cS}
|
|
565
577
|
${mS}
|
|
566
578
|
${uS}
|
|
567
579
|
${hS}
|
|
568
|
-
|
|
580
|
+
${fS}
|
|
581
|
+
${vS}
|
|
582
|
+
`,bS=LI`
|
|
569
583
|
mutation deleteFormQuestion($formToken: String!, $questionId: String!) {
|
|
570
584
|
delete_question(formToken: $formToken, questionId: $questionId)
|
|
571
585
|
}
|
|
572
|
-
`,
|
|
586
|
+
`,wS=LI`
|
|
573
587
|
mutation createFormQuestion($formToken: String!, $question: CreateQuestionInput!) {
|
|
574
588
|
create_form_question(formToken: $formToken, question: $question) {
|
|
575
589
|
...QuestionBasic
|
|
@@ -577,10 +591,10 @@
|
|
|
577
591
|
...QuestionSettings
|
|
578
592
|
}
|
|
579
593
|
}
|
|
580
|
-
${sS}
|
|
581
|
-
${pS}
|
|
582
594
|
${dS}
|
|
583
|
-
|
|
595
|
+
${lS}
|
|
596
|
+
${cS}
|
|
597
|
+
`,_S=LI`
|
|
584
598
|
mutation updateFormQuestion($formToken: String!, $questionId: String!, $question: UpdateQuestionInput!) {
|
|
585
599
|
update_form_question(formToken: $formToken, questionId: $questionId, question: $question) {
|
|
586
600
|
...QuestionBasic
|
|
@@ -588,9 +602,9 @@
|
|
|
588
602
|
...QuestionSettings
|
|
589
603
|
}
|
|
590
604
|
}
|
|
591
|
-
${sS}
|
|
592
|
-
${pS}
|
|
593
605
|
${dS}
|
|
606
|
+
${lS}
|
|
607
|
+
${cS}
|
|
594
608
|
`;LI`
|
|
595
609
|
mutation updateForm($formToken: String!, $input: UpdateFormInput!) {
|
|
596
610
|
update_form(formToken: $formToken, input: $input) {
|
|
@@ -615,46 +629,46 @@
|
|
|
615
629
|
}
|
|
616
630
|
}
|
|
617
631
|
}
|
|
618
|
-
${cS}
|
|
619
|
-
${mS}
|
|
620
632
|
${uS}
|
|
621
|
-
|
|
633
|
+
${hS}
|
|
634
|
+
${fS}
|
|
635
|
+
`;const xS=LI`
|
|
622
636
|
mutation setFormPassword($formToken: String!, $input: SetFormPasswordInput!) {
|
|
623
637
|
set_form_password(formToken: $formToken, input: $input) {
|
|
624
638
|
id
|
|
625
639
|
}
|
|
626
640
|
}
|
|
627
|
-
`,
|
|
641
|
+
`,ES=LI`
|
|
628
642
|
mutation shortenFormUrl($formToken: String!) {
|
|
629
643
|
shorten_form_url(formToken: $formToken) {
|
|
630
644
|
enabled
|
|
631
645
|
url
|
|
632
646
|
}
|
|
633
647
|
}
|
|
634
|
-
`,
|
|
648
|
+
`,TS=LI`
|
|
635
649
|
mutation deactivateForm($formToken: String!) {
|
|
636
650
|
deactivate_form(formToken: $formToken)
|
|
637
651
|
}
|
|
638
|
-
`,
|
|
652
|
+
`,IS=LI`
|
|
639
653
|
mutation activateForm($formToken: String!) {
|
|
640
654
|
activate_form(formToken: $formToken)
|
|
641
655
|
}
|
|
642
|
-
`,
|
|
656
|
+
`,SS=LI`
|
|
643
657
|
mutation deleteFormTag($formToken: String!, $tagId: String!) {
|
|
644
658
|
delete_form_tag(formToken: $formToken, tagId: $tagId)
|
|
645
659
|
}
|
|
646
|
-
`,
|
|
660
|
+
`,NS=LI`
|
|
647
661
|
mutation createFormTag($formToken: String!, $tag: CreateFormTagInput!) {
|
|
648
662
|
create_form_tag(formToken: $formToken, tag: $tag) {
|
|
649
663
|
...FormTag
|
|
650
664
|
}
|
|
651
665
|
}
|
|
652
|
-
${
|
|
653
|
-
`,
|
|
666
|
+
${vS}
|
|
667
|
+
`,AS=LI`
|
|
654
668
|
mutation updateFormTag($formToken: String!, $tagId: String!, $tag: UpdateFormTagInput!) {
|
|
655
669
|
update_form_tag(formToken: $formToken, tagId: $tagId, tag: $tag)
|
|
656
670
|
}
|
|
657
|
-
`,
|
|
671
|
+
`,DS=LI`
|
|
658
672
|
mutation updateFormAppearance($formToken: String!, $appearance: FormAppearanceInput!) {
|
|
659
673
|
update_form_settings(formToken: $formToken, settings: { appearance: $appearance }) {
|
|
660
674
|
appearance {
|
|
@@ -662,8 +676,8 @@
|
|
|
662
676
|
}
|
|
663
677
|
}
|
|
664
678
|
}
|
|
665
|
-
${
|
|
666
|
-
`,
|
|
679
|
+
${hS}
|
|
680
|
+
`,OS=LI`
|
|
667
681
|
mutation updateFormAccessibility($formToken: String!, $accessibility: FormAccessibilityInput!) {
|
|
668
682
|
update_form_settings(formToken: $formToken, settings: { accessibility: $accessibility }) {
|
|
669
683
|
accessibility {
|
|
@@ -671,8 +685,8 @@
|
|
|
671
685
|
}
|
|
672
686
|
}
|
|
673
687
|
}
|
|
674
|
-
${
|
|
675
|
-
`,
|
|
688
|
+
${fS}
|
|
689
|
+
`,RS=LI`
|
|
676
690
|
mutation updateFormFeatures($formToken: String!, $features: FormFeaturesInput!) {
|
|
677
691
|
update_form_settings(formToken: $formToken, settings: { features: $features }) {
|
|
678
692
|
features {
|
|
@@ -680,8 +694,8 @@
|
|
|
680
694
|
}
|
|
681
695
|
}
|
|
682
696
|
}
|
|
683
|
-
${
|
|
684
|
-
`,
|
|
697
|
+
${uS}
|
|
698
|
+
`,kS=LI`
|
|
685
699
|
mutation updateFormQuestionOrder($formToken: String!, $questions: [QuestionOrderInput!]!) {
|
|
686
700
|
update_form(formToken: $formToken, input: { questions: $questions }) {
|
|
687
701
|
questions {
|
|
@@ -689,20 +703,20 @@
|
|
|
689
703
|
}
|
|
690
704
|
}
|
|
691
705
|
}
|
|
692
|
-
`,
|
|
706
|
+
`,PS=LI`
|
|
693
707
|
mutation updateFormHeader($formToken: String!, $title: String, $description: String) {
|
|
694
708
|
update_form(formToken: $formToken, input: { title: $title, description: $description }) {
|
|
695
709
|
title
|
|
696
710
|
description
|
|
697
711
|
}
|
|
698
712
|
}
|
|
699
|
-
`,kS={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."},PS={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."}},$S={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."}},CS={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."}},FS={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"}},jS={destination_workspace_id:e.z.string().describe(PS.args.destinationWorkspaceId),destination_folder_id:e.z.string().optional().describe(PS.args.destinationFolderId),destination_folder_name:e.z.string().optional().describe(PS.args.destinationFolderName),board_kind:e.z.nativeEnum(Ex).optional().describe(PS.args.boardKind),destination_name:e.z.string().optional().describe(PS.args.destinationName),board_owner_ids:e.z.array(e.z.string()).optional().describe(PS.args.boardOwnerIds),board_owner_team_ids:e.z.array(e.z.string()).optional().describe(PS.args.boardOwnerTeamIds),board_subscriber_ids:e.z.array(e.z.string()).optional().describe(PS.args.boardSubscriberIds),board_subscriber_teams_ids:e.z.array(e.z.string()).optional().describe(PS.args.boardSubscriberTeamsIds)};var LS,zS,VS,US,BS,qS,MS,HS,GS,WS,QS,KS,YS,JS,XS,ZS;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(LS||(LS={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(zS||(zS={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(VS||(VS={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(US||(US={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(BS||(BS={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(qS||(qS={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(MS||(MS={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(HS||(HS={})),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"}(GS||(GS={})),function(e){e.Account="account",e.QueryParam="queryParam"}(WS||(WS={})),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"}(QS||(QS={})),function(e){e.And="AND",e.Or="OR"}(KS||(KS={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(YS||(YS={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(JS||(JS={})),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"}(XS||(XS={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(ZS||(ZS={}));const eN=e.z.object({type:e.z.nativeEnum(fE).describe(CS.properties.type),title:e.z.string().describe(CS.properties.title).optional(),description:e.z.string().describe(CS.properties.description).optional(),visible:e.z.boolean().describe(CS.properties.visible).optional(),required:e.z.boolean().describe(CS.properties.required).optional(),options:e.z.array(e.z.object({label:e.z.string().describe(CS.properties.selectOptionsLabel)})).describe(CS.properties.selectOptions).optional(),settings:e.z.object({checkedByDefault:e.z.boolean().describe(FS.properties.checkedByDefault).optional(),defaultCurrentDate:e.z.boolean().describe(FS.properties.defaultCurrentDate).optional(),display:e.z.nativeEnum(uE).describe(FS.properties.display).optional(),includeTime:e.z.boolean().describe(FS.properties.includeTime).optional(),locationAutofilled:e.z.boolean().describe(FS.properties.locationAutofilled).optional(),optionsOrder:e.z.nativeEnum(hE).describe(FS.properties.optionsOrder).optional(),prefixAutofilled:e.z.boolean().describe(FS.properties.prefixAutofilled).optional(),prefixPredefined:e.z.object({enabled:e.z.boolean().describe(FS.properties.prefixPredefinedEnabled),prefix:e.z.string().describe(FS.properties.prefixPredefinedPrefix).optional()}).describe(FS.properties.prefixPredefined).optional(),skipValidation:e.z.boolean().describe(FS.properties.skipValidation).optional(),prefill:e.z.object({enabled:e.z.boolean().describe(FS.properties.prefillEnabled),lookup:e.z.string().describe(FS.properties.prefillLookup).optional(),source:e.z.nativeEnum(mE).describe(FS.properties.prefillSource).optional()}).describe(FS.properties.prefill).optional()}).optional()}),tN={action:e.z.nativeEnum(ZS).describe(CS.actions.type),formToken:e.z.string().describe(kS.formToken),questionId:e.z.string().describe(kS.questionId).optional(),question:eN.describe(CS.actions.question).optional()};class aN{constructor(e){this.mondayApi=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.mondayApi.request(gS,a),{content:`Form question with id ${t} deleted successfully.`}}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.mondayApi.request(bS,i),{content:`Form question with id ${t} updated successfully.`}}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.mondayApi.request(yS,a);return{content:`Form question created successfully. ID: ${i.create_form_question?.id}`}}}var iN;!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"}(iN||(iN={}));const nN=e.z.object({id:e.z.string().describe(PS.properties.tags.id).optional(),name:e.z.string().describe(PS.properties.tags.name).optional(),value:e.z.string().describe(PS.properties.tags.value).optional(),columnId:e.z.string().describe(PS.properties.tags.columnId).optional()}),oN=e.z.object({type:e.z.nativeEnum(US).describe($S.properties.backgroundType).optional(),value:e.z.string().describe($S.properties.backgroundValue).optional()}),rN=e.z.object({format:e.z.nativeEnum(qS).describe($S.properties.format).optional(),alignment:e.z.nativeEnum(MS).describe($S.properties.alignment).optional(),direction:e.z.nativeEnum(BS).describe($S.properties.direction).optional()}),sN=e.z.object({position:e.z.nativeEnum(VS).describe($S.properties.logoPosition).optional(),size:e.z.nativeEnum(zS).describe($S.properties.logoSize).optional()}),pN=e.z.object({text:e.z.string().describe($S.properties.submitButtonText).optional()}),dN=e.z.object({font:e.z.string().describe($S.properties.font).optional(),color:e.z.string().describe($S.properties.textColor).optional(),size:e.z.nativeEnum(HS).describe($S.properties.fontSize).optional()}),lN=e.z.object({enabled:e.z.boolean().describe($S.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:e.z.string().describe($S.properties.redirectUrl).optional()}),cN=e.z.object({allowEditSubmission:e.z.boolean().describe($S.properties.allowEditSubmission).optional(),allowResubmit:e.z.boolean().describe($S.properties.allowResubmit).optional(),allowViewSubmission:e.z.boolean().describe($S.properties.allowViewSubmission).optional(),description:e.z.string().describe($S.properties.postSubmissionDescription).optional(),redirectAfterSubmission:lN.describe($S.properties.redirectAfterSubmission).optional(),showSuccessImage:e.z.boolean().describe($S.properties.showSuccessImage).optional(),title:e.z.string().describe($S.properties.postSubmissionTitle).optional()}),mN=e.z.object({enabled:e.z.boolean().describe($S.properties.closeDateEnabled).optional(),date:e.z.string().describe($S.properties.closeDateValue).optional()}),uN=e.z.object({enabled:e.z.boolean().describe($S.properties.draftSubmissionEnabled).optional()}),hN=e.z.object({itemGroupId:e.z.string().describe($S.properties.itemGroupId).optional(),includeNameQuestion:e.z.boolean().describe($S.properties.includeNameQuestion).optional(),includeUpdateQuestion:e.z.boolean().describe($S.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:e.z.boolean().describe($S.properties.syncQuestionAndColumnsTitles).optional()}),fN=e.z.object({enabled:e.z.boolean().describe($S.properties.passwordEnabled).optional()}),vN=e.z.object({text:e.z.string().describe($S.properties.startButtonText).optional()}),gN=e.z.object({enabled:e.z.boolean().describe($S.properties.preSubmissionEnabled).optional(),title:e.z.string().describe($S.properties.preSubmissionTitle).optional(),description:e.z.string().describe($S.properties.preSubmissionDescription).optional(),startButton:vN.describe($S.properties.startButton).optional()}),yN=e.z.object({enabled:e.z.boolean().describe($S.properties.requireLoginEnabled).optional(),redirectToLogin:e.z.boolean().describe($S.properties.redirectToLogin).optional()}),bN=e.z.object({enabled:e.z.boolean().describe($S.properties.responseLimitEnabled).optional(),limit:e.z.number().describe($S.properties.responseLimitValue).optional()}),wN=e.z.object({background:oN.describe($S.properties.background).optional(),hideBranding:e.z.boolean().describe($S.properties.hideBranding).optional(),layout:rN.describe($S.properties.layout).optional(),logo:sN.describe($S.properties.logo).optional(),primaryColor:e.z.string().describe($S.properties.primaryColor).optional(),showProgressBar:e.z.boolean().describe($S.properties.showProgressBar).optional(),submitButton:pN.describe($S.properties.submitButton).optional(),text:dN.describe($S.properties.text).optional()}),_N=e.z.object({language:e.z.string().describe($S.properties.language).optional(),logoAltText:e.z.string().describe($S.properties.logoAltText).optional()}),xN=e.z.object({afterSubmissionView:cN.describe($S.properties.afterSubmissionView).optional(),closeDate:mN.describe($S.properties.closeDate).optional(),draftSubmission:uN.describe($S.properties.draftSubmission).optional(),monday:hN.describe($S.properties.monday).optional(),password:fN.describe($S.properties.password).optional(),preSubmissionView:gN.describe($S.properties.preSubmissionView).optional(),reCaptchaChallenge:e.z.boolean().describe($S.properties.reCaptchaChallenge).optional(),requireLogin:yN.describe($S.properties.requireLogin).optional(),responseLimit:bN.describe($S.properties.responseLimit).optional()}),EN=e.z.object({id:e.z.string().describe(PS.inputs.questionId)}),TN=e.z.object({appearance:wN.describe(PS.inputs.form.appearance).optional(),accessibility:_N.describe(PS.inputs.form.accessibility).optional(),features:xN.describe(PS.inputs.form.features).optional(),title:e.z.string().describe(PS.inputs.title).optional(),description:e.z.string().describe(PS.inputs.description).optional(),questions:e.z.array(EN).describe(PS.inputs.questions).optional()}),IN={formToken:e.z.string().describe(kS.formToken),action:e.z.nativeEnum(iN).describe(PS.operations.updateForm.action),formPassword:e.z.string().describe($S.operations.setFormPassword).optional(),tag:nN.describe(PS.inputs.tag).optional(),form:TN.describe(PS.inputs.form.describe).optional()};class SN{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 t={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(wS,t),{content:"Form password successfully set."}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.mondayApi.request(_S,t),{content:"Form URL successfully shortened."}}async deactivateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(xS,t),{content:"Form successfully deactivated."}}async activateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(ES,t),{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 t={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},a=await this.mondayApi.request(IS,t);return{content:`Tag successfully added: ${JSON.stringify(a.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 t={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(TS,t),{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 t={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(SS,t)).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 t={formToken:e.formToken,appearance:e.form.appearance},a=await this.mondayApi.request(NS,t);return{content:`Appearance successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.mondayApi.request(AS,t);return{content:`Accessibility successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,features:e.form.features},a=await this.mondayApi.request(DS,t);return{content:`Features successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,questions:e.form.questions},a=await this.mondayApi.request(OS,t);return{content:`Question order successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.mondayApi.request(RS,t);return{content:`Form header content successfully updated: ${JSON.stringify(a.update_form,null,2)}`}}}const NN={formToken:e.z.string().describe(kS.formToken)};const AN=Object.fromEntries(Object.entries(jx).filter((([e])=>"Person"!==e))),DN={columnType:e.z.nativeEnum(AN).describe("The type of the column to be created"),columnTitle:e.z.string().describe("The title of the column to be created"),columnDescription:e.z.string().optional().describe("The description of the column to be created"),columnSettings:e.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.")},ON={boardId:e.z.number().describe("The id of the board to which the new column will be added"),...DN};const RN={color:e.z.nativeEnum(Lx).describe("The color of the custom activity"),icon_id:e.z.nativeEnum(zx).describe("The icon ID of the custom activity"),name:e.z.string().describe("The name of the custom activity")};const kN=LI`
|
|
713
|
+
`,$S={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."},CS={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."}},FS={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."}},jS={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."}},LS={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"}},zS={destination_workspace_id:e.z.string().describe(CS.args.destinationWorkspaceId),destination_folder_id:e.z.string().optional().describe(CS.args.destinationFolderId),destination_folder_name:e.z.string().optional().describe(CS.args.destinationFolderName),board_kind:e.z.nativeEnum(Ex).optional().describe(CS.args.boardKind),destination_name:e.z.string().optional().describe(CS.args.destinationName),board_owner_ids:e.z.array(e.z.string()).optional().describe(CS.args.boardOwnerIds),board_owner_team_ids:e.z.array(e.z.string()).optional().describe(CS.args.boardOwnerTeamIds),board_subscriber_ids:e.z.array(e.z.string()).optional().describe(CS.args.boardSubscriberIds),board_subscriber_teams_ids:e.z.array(e.z.string()).optional().describe(CS.args.boardSubscriberTeamsIds)};var VS,US,BS,qS,MS,HS,GS,WS,QS,KS,YS,JS,XS,ZS,eN,tN;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(VS||(VS={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(US||(US={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(BS||(BS={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(qS||(qS={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(MS||(MS={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(HS||(HS={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(GS||(GS={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(WS||(WS={})),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"}(QS||(QS={})),function(e){e.Account="account",e.QueryParam="queryParam"}(KS||(KS={})),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"}(YS||(YS={})),function(e){e.And="AND",e.Or="OR"}(JS||(JS={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(XS||(XS={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(ZS||(ZS={})),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"}(eN||(eN={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(tN||(tN={}));const aN=e.z.object({type:e.z.nativeEnum(fE).describe(jS.properties.type),title:e.z.string().describe(jS.properties.title).optional(),description:e.z.string().describe(jS.properties.description).optional(),visible:e.z.boolean().describe(jS.properties.visible).optional(),required:e.z.boolean().describe(jS.properties.required).optional(),options:e.z.array(e.z.object({label:e.z.string().describe(jS.properties.selectOptionsLabel)})).describe(jS.properties.selectOptions).optional(),settings:e.z.object({checkedByDefault:e.z.boolean().describe(LS.properties.checkedByDefault).optional(),defaultCurrentDate:e.z.boolean().describe(LS.properties.defaultCurrentDate).optional(),display:e.z.nativeEnum(uE).describe(LS.properties.display).optional(),includeTime:e.z.boolean().describe(LS.properties.includeTime).optional(),locationAutofilled:e.z.boolean().describe(LS.properties.locationAutofilled).optional(),optionsOrder:e.z.nativeEnum(hE).describe(LS.properties.optionsOrder).optional(),prefixAutofilled:e.z.boolean().describe(LS.properties.prefixAutofilled).optional(),prefixPredefined:e.z.object({enabled:e.z.boolean().describe(LS.properties.prefixPredefinedEnabled),prefix:e.z.string().describe(LS.properties.prefixPredefinedPrefix).optional()}).describe(LS.properties.prefixPredefined).optional(),skipValidation:e.z.boolean().describe(LS.properties.skipValidation).optional(),prefill:e.z.object({enabled:e.z.boolean().describe(LS.properties.prefillEnabled),lookup:e.z.string().describe(LS.properties.prefillLookup).optional(),source:e.z.nativeEnum(mE).describe(LS.properties.prefillSource).optional()}).describe(LS.properties.prefill).optional()}).optional()}),iN={action:e.z.nativeEnum(tN).describe(jS.actions.type),formToken:e.z.string().describe($S.formToken),questionId:e.z.string().describe($S.questionId).optional(),question:aN.describe(jS.actions.question).optional()};class nN{constructor(e){this.mondayApi=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.mondayApi.request(bS,a),{content:`Form question with id ${t} deleted successfully.`}}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.mondayApi.request(_S,i),{content:`Form question with id ${t} updated successfully.`}}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.mondayApi.request(wS,a);return{content:`Form question created successfully. ID: ${i.create_form_question?.id}`}}}var oN;!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"}(oN||(oN={}));const rN=e.z.object({id:e.z.string().describe(CS.properties.tags.id).optional(),name:e.z.string().describe(CS.properties.tags.name).optional(),value:e.z.string().describe(CS.properties.tags.value).optional(),columnId:e.z.string().describe(CS.properties.tags.columnId).optional()}),sN=e.z.object({type:e.z.nativeEnum(qS).describe(FS.properties.backgroundType).optional(),value:e.z.string().describe(FS.properties.backgroundValue).optional()}),pN=e.z.object({format:e.z.nativeEnum(HS).describe(FS.properties.format).optional(),alignment:e.z.nativeEnum(GS).describe(FS.properties.alignment).optional(),direction:e.z.nativeEnum(MS).describe(FS.properties.direction).optional()}),dN=e.z.object({position:e.z.nativeEnum(BS).describe(FS.properties.logoPosition).optional(),size:e.z.nativeEnum(US).describe(FS.properties.logoSize).optional()}),lN=e.z.object({text:e.z.string().describe(FS.properties.submitButtonText).optional()}),cN=e.z.object({font:e.z.string().describe(FS.properties.font).optional(),color:e.z.string().describe(FS.properties.textColor).optional(),size:e.z.nativeEnum(WS).describe(FS.properties.fontSize).optional()}),mN=e.z.object({enabled:e.z.boolean().describe(FS.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:e.z.string().describe(FS.properties.redirectUrl).optional()}),uN=e.z.object({allowEditSubmission:e.z.boolean().describe(FS.properties.allowEditSubmission).optional(),allowResubmit:e.z.boolean().describe(FS.properties.allowResubmit).optional(),allowViewSubmission:e.z.boolean().describe(FS.properties.allowViewSubmission).optional(),description:e.z.string().describe(FS.properties.postSubmissionDescription).optional(),redirectAfterSubmission:mN.describe(FS.properties.redirectAfterSubmission).optional(),showSuccessImage:e.z.boolean().describe(FS.properties.showSuccessImage).optional(),title:e.z.string().describe(FS.properties.postSubmissionTitle).optional()}),hN=e.z.object({enabled:e.z.boolean().describe(FS.properties.closeDateEnabled).optional(),date:e.z.string().describe(FS.properties.closeDateValue).optional()}),fN=e.z.object({enabled:e.z.boolean().describe(FS.properties.draftSubmissionEnabled).optional()}),vN=e.z.object({itemGroupId:e.z.string().describe(FS.properties.itemGroupId).optional(),includeNameQuestion:e.z.boolean().describe(FS.properties.includeNameQuestion).optional(),includeUpdateQuestion:e.z.boolean().describe(FS.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:e.z.boolean().describe(FS.properties.syncQuestionAndColumnsTitles).optional()}),gN=e.z.object({enabled:e.z.boolean().describe(FS.properties.passwordEnabled).optional()}),yN=e.z.object({text:e.z.string().describe(FS.properties.startButtonText).optional()}),bN=e.z.object({enabled:e.z.boolean().describe(FS.properties.preSubmissionEnabled).optional(),title:e.z.string().describe(FS.properties.preSubmissionTitle).optional(),description:e.z.string().describe(FS.properties.preSubmissionDescription).optional(),startButton:yN.describe(FS.properties.startButton).optional()}),wN=e.z.object({enabled:e.z.boolean().describe(FS.properties.requireLoginEnabled).optional(),redirectToLogin:e.z.boolean().describe(FS.properties.redirectToLogin).optional()}),_N=e.z.object({enabled:e.z.boolean().describe(FS.properties.responseLimitEnabled).optional(),limit:e.z.number().describe(FS.properties.responseLimitValue).optional()}),xN=e.z.object({background:sN.describe(FS.properties.background).optional(),hideBranding:e.z.boolean().describe(FS.properties.hideBranding).optional(),layout:pN.describe(FS.properties.layout).optional(),logo:dN.describe(FS.properties.logo).optional(),primaryColor:e.z.string().describe(FS.properties.primaryColor).optional(),showProgressBar:e.z.boolean().describe(FS.properties.showProgressBar).optional(),submitButton:lN.describe(FS.properties.submitButton).optional(),text:cN.describe(FS.properties.text).optional()}),EN=e.z.object({language:e.z.string().describe(FS.properties.language).optional(),logoAltText:e.z.string().describe(FS.properties.logoAltText).optional()}),TN=e.z.object({afterSubmissionView:uN.describe(FS.properties.afterSubmissionView).optional(),closeDate:hN.describe(FS.properties.closeDate).optional(),draftSubmission:fN.describe(FS.properties.draftSubmission).optional(),monday:vN.describe(FS.properties.monday).optional(),password:gN.describe(FS.properties.password).optional(),preSubmissionView:bN.describe(FS.properties.preSubmissionView).optional(),reCaptchaChallenge:e.z.boolean().describe(FS.properties.reCaptchaChallenge).optional(),requireLogin:wN.describe(FS.properties.requireLogin).optional(),responseLimit:_N.describe(FS.properties.responseLimit).optional()}),IN=e.z.object({id:e.z.string().describe(CS.inputs.questionId)}),SN=e.z.object({appearance:xN.describe(CS.inputs.form.appearance).optional(),accessibility:EN.describe(CS.inputs.form.accessibility).optional(),features:TN.describe(CS.inputs.form.features).optional(),title:e.z.string().describe(CS.inputs.title).optional(),description:e.z.string().describe(CS.inputs.description).optional(),questions:e.z.array(IN).describe(CS.inputs.questions).optional()}),NN={formToken:e.z.string().describe($S.formToken),action:e.z.nativeEnum(oN).describe(CS.operations.updateForm.action),formPassword:e.z.string().describe(FS.operations.setFormPassword).optional(),tag:rN.describe(CS.inputs.tag).optional(),form:SN.describe(CS.inputs.form.describe).optional()};class AN{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 t={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(xS,t),{content:"Form password successfully set."}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.mondayApi.request(ES,t),{content:"Form URL successfully shortened."}}async deactivateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(TS,t),{content:"Form successfully deactivated."}}async activateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(IS,t),{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 t={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},a=await this.mondayApi.request(NS,t);return{content:`Tag successfully added: ${JSON.stringify(a.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 t={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(SS,t),{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 t={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(AS,t)).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 t={formToken:e.formToken,appearance:e.form.appearance},a=await this.mondayApi.request(DS,t);return{content:`Appearance successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.mondayApi.request(OS,t);return{content:`Accessibility successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,features:e.form.features},a=await this.mondayApi.request(RS,t);return{content:`Features successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,questions:e.form.questions},a=await this.mondayApi.request(kS,t);return{content:`Question order successfully updated: ${JSON.stringify(a.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 t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.mondayApi.request(PS,t);return{content:`Form header content successfully updated: ${JSON.stringify(a.update_form,null,2)}`}}}const DN={formToken:e.z.string().describe($S.formToken)};const ON=Object.fromEntries(Object.entries(jx).filter((([e])=>"Person"!==e))),RN={columnType:e.z.nativeEnum(ON).describe("The type of the column to be created"),columnTitle:e.z.string().describe("The title of the column to be created"),columnDescription:e.z.string().optional().describe("The description of the column to be created"),columnSettings:e.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.")},kN={boardId:e.z.number().describe("The id of the board to which the new column will be added"),...RN};const PN={color:e.z.nativeEnum(Lx).describe("The color of the custom activity"),icon_id:e.z.nativeEnum(zx).describe("The icon ID of the custom activity"),name:e.z.string().describe("The name of the custom activity")};const $N=LI`
|
|
700
714
|
mutation createNotification($user_id: ID!, $target_id: ID!, $text: String!, $target_type: NotificationTargetType!) {
|
|
701
715
|
create_notification(user_id: $user_id, target_id: $target_id, text: $text, target_type: $target_type) {
|
|
702
716
|
text
|
|
703
717
|
}
|
|
704
718
|
}
|
|
705
|
-
`,
|
|
719
|
+
`,CN={user_id:e.z.string().describe("The user ID to send the notification to"),target_id:e.z.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:e.z.string().describe("The notification text"),target_type:e.z.nativeEnum(OE).describe("The target type (Post for update/reply, Project for item/board)")};const FN=LI`
|
|
706
720
|
mutation createGroup(
|
|
707
721
|
$boardId: ID!
|
|
708
722
|
$groupName: String!
|
|
@@ -721,14 +735,14 @@
|
|
|
721
735
|
title
|
|
722
736
|
}
|
|
723
737
|
}
|
|
724
|
-
`,
|
|
738
|
+
`,jN=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],LN={boardId:e.z.string().describe("The ID of the board to create the group in"),groupName:e.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:e.z.enum(jN).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${jN.join(", ")}`),relativeTo:e.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:e.z.nativeEnum(FE).optional().describe("Whether to position the new group before or after the relativeTo group")};const zN=LI`
|
|
725
739
|
mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
|
|
726
740
|
duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
|
|
727
741
|
id
|
|
728
742
|
name
|
|
729
743
|
}
|
|
730
744
|
}
|
|
731
|
-
`,
|
|
745
|
+
`,VN=LI`
|
|
732
746
|
mutation createSubitem($parentItemId: ID!, $itemName: String!, $columnValues: JSON) {
|
|
733
747
|
create_subitem(parent_item_id: $parentItemId, item_name: $itemName, column_values: $columnValues) {
|
|
734
748
|
id
|
|
@@ -738,13 +752,13 @@
|
|
|
738
752
|
}
|
|
739
753
|
}
|
|
740
754
|
}
|
|
741
|
-
`,
|
|
755
|
+
`,UN=1e3;var BN,qN;!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"}(BN||(BN={})),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=UN]="SECOND"}(qN||(qN={}));const MN=10*qN.SECOND;function HN(e,t){const a=e?.response?.errors?.map((e=>e.message))?.join(", ");if(a)throw new Error(`Failed to ${t}: ${a}`);const i=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${t}: ${i}`)}function GN(e){if(e instanceof Error&&"AbortError"===e.name)throw new Error("Search has timed out, try providing alternative search term")}const WN={name:e.z.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:e.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:e.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:e.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:e.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},QN={boardId:e.z.number().describe("The id of the board to which the new item will be added"),...WN};const KN={item_id:e.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:e.z.string().describe("The ID of the custom activity for the timeline item"),title:e.z.string().describe("The title of the new timeline item"),summary:e.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:e.z.string().optional().describe("The content of the new timeline item"),timestamp:e.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:e.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:e.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:e.z.string().optional().describe("The location to add to the new timeline item"),phone:e.z.string().optional().describe("The phone number to add to the new timeline item"),url:e.z.string().optional().describe("The URL to add to the new timeline item")};const YN=LI`
|
|
742
756
|
mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention], $parentId: ID) {
|
|
743
757
|
create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList, parent_id: $parentId) {
|
|
744
758
|
id
|
|
745
759
|
}
|
|
746
760
|
}
|
|
747
|
-
`,
|
|
761
|
+
`,JN=e.z.object({id:e.z.string().describe("The ID of the entity to mention"),type:e.z.nativeEnum(AE).describe("The type of mention: User, Team, Board, or Project")}),XN=e.z.array(JN),ZN={itemId:e.z.number().describe("The id of the item to which the update will be added"),body:e.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead. use html tags to format the text, dont use markdown."),mentionsList:e.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'),parentId:e.z.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update")};const eA=LI`
|
|
748
762
|
query GetItemUpdates($itemId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
|
|
749
763
|
items(ids: [$itemId]) {
|
|
750
764
|
id
|
|
@@ -779,7 +793,7 @@
|
|
|
779
793
|
}
|
|
780
794
|
}
|
|
781
795
|
}
|
|
782
|
-
`,
|
|
796
|
+
`,tA=LI`
|
|
783
797
|
query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
|
|
784
798
|
boards(ids: [$boardId]) {
|
|
785
799
|
id
|
|
@@ -814,7 +828,7 @@
|
|
|
814
828
|
}
|
|
815
829
|
}
|
|
816
830
|
}
|
|
817
|
-
`;var
|
|
831
|
+
`;var aA;!function(e){e.Item="Item",e.Board="Board"}(aA||(aA={}));const iA={objectId:e.z.string().describe("The ID of the item or board to get updates from"),objectType:e.z.enum([aA.Item,aA.Board]).describe("Type of object for which objectId was provided"),limit:e.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:e.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:e.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:e.z.boolean().optional().default(!1).describe("Include file attachments in the response")};const nA={columnId:e.z.string().describe("The id of the column to be deleted")},oA={boardId:e.z.number().describe("The id of the board to which the new column will be added"),...nA};const rA={itemId:e.z.number()};const sA={};const pA=LI`
|
|
818
832
|
query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
|
|
819
833
|
boards(ids: [$boardId]) {
|
|
820
834
|
id
|
|
@@ -857,7 +871,7 @@
|
|
|
857
871
|
}
|
|
858
872
|
}
|
|
859
873
|
}
|
|
860
|
-
`,
|
|
874
|
+
`,dA=LI`
|
|
861
875
|
query getUsersByIds($userIds: [ID!]!) {
|
|
862
876
|
users(ids: $userIds) {
|
|
863
877
|
id
|
|
@@ -865,7 +879,7 @@
|
|
|
865
879
|
photo_tiny
|
|
866
880
|
}
|
|
867
881
|
}
|
|
868
|
-
`,
|
|
882
|
+
`,lA=e.z.array(e.z.object({columnId:e.z.string().describe("The id of the column to filter by"),compareAttribute:e.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:e.z.union([e.z.string(),e.z.number(),e.z.boolean(),e.z.array(e.z.union([e.z.string(),e.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:e.z.nativeEnum(_E).optional().default(_E.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.'),cA=e.z.nativeEnum(wE).optional().default(wE.And).describe("The operator to use for the filters"),mA={boardId:e.z.string().describe("The ID of the board to fetch complete data for"),filters:lA,filtersOperator:cA};const uA=LI`
|
|
869
883
|
query GetBoardAllActivity(
|
|
870
884
|
$boardId: ID!
|
|
871
885
|
$fromDate: ISO8601DateTime!
|
|
@@ -884,7 +898,7 @@
|
|
|
884
898
|
}
|
|
885
899
|
}
|
|
886
900
|
}
|
|
887
|
-
`,
|
|
901
|
+
`,hA={boardId:e.z.number().describe("The id of the board to get activity for"),fromDate:e.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:e.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:e.z.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const fA=LI`
|
|
888
902
|
query GetBoardInfo($boardId: ID!) {
|
|
889
903
|
boards(ids: [$boardId]) {
|
|
890
904
|
# Basic Board Metadata
|
|
@@ -959,9 +973,19 @@
|
|
|
959
973
|
top_group {
|
|
960
974
|
id
|
|
961
975
|
}
|
|
976
|
+
|
|
977
|
+
# Board Views (filters, sorts, and display configurations)
|
|
978
|
+
views {
|
|
979
|
+
id
|
|
980
|
+
name
|
|
981
|
+
type
|
|
982
|
+
settings
|
|
983
|
+
filter
|
|
984
|
+
sort
|
|
985
|
+
}
|
|
962
986
|
}
|
|
963
987
|
}
|
|
964
|
-
`,
|
|
988
|
+
`,vA=LI`
|
|
965
989
|
query GetBoardInfoJustColumns($boardId: ID!) {
|
|
966
990
|
boards(ids: [$boardId]) {
|
|
967
991
|
columns {
|
|
@@ -973,7 +997,7 @@
|
|
|
973
997
|
}
|
|
974
998
|
}
|
|
975
999
|
}
|
|
976
|
-
`,
|
|
1000
|
+
`,gA=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0},filteringGuidelines:_A(e.columns.filter(yA)),aggregationGuidelines:wA()});function yA(e){return!!e&&["id","type"].every((t=>t in e))}const bA={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'},wA=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${sx.CountItems} function. Do not use ${sx.Count} function for that purpose.\n `,_A=e=>{const t=e.reduce(((e,t)=>bA[t.type]?(e[t.type]||(e[t.type]=[]),e[t.type].push(t.id),e):e),{});return 0===Object.keys(t).length?"":`\n[MEMORY] Remember the filtering guidelines for subsequent requests for the same board.\n# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type Guidelines\n${Object.entries(t).map((([e,t])=>`- Column Type: ${e} (Column IDs: ${t.join(", ")}) - ${bA[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},xA={boardId:e.z.number().describe("The id of the board to get information for")};const EA=LI`
|
|
977
1001
|
fragment ItemDataFragment on Item {
|
|
978
1002
|
id
|
|
979
1003
|
name
|
|
@@ -1035,7 +1059,7 @@
|
|
|
1035
1059
|
}
|
|
1036
1060
|
}
|
|
1037
1061
|
}
|
|
1038
|
-
`,
|
|
1062
|
+
`,TA=LI`
|
|
1039
1063
|
query SearchItemsDev($query: String!, $limit: Int!, $filters: SearchFiltersInput!) {
|
|
1040
1064
|
search(query: $query, limit: $limit, filters: $filters) {
|
|
1041
1065
|
__typename
|
|
@@ -1046,11 +1070,11 @@
|
|
|
1046
1070
|
}
|
|
1047
1071
|
}
|
|
1048
1072
|
}
|
|
1049
|
-
`;var
|
|
1073
|
+
`;var IA,SA;!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={boardId:e.z.number().describe("The id of the board to get items from"),itemIds:e.z.array(e.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:e.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:e.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:e.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:e.z.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeItemDescription:e.z.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:e.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:e.z.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:lA,filtersOperator:cA,columnIds:e.z.array(e.z.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:e.z.array(e.z.object({columnId:e.z.string().describe("The id of the column to order by"),direction:e.z.nativeEnum(bE).optional().default(bE.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 AA={boardId:e.z.number().describe("The id of the board to get the schema of")};const DA=LI`
|
|
1050
1074
|
query GetColumnTypeSchema($type: ColumnType!) {
|
|
1051
1075
|
get_column_type_schema(type: $type)
|
|
1052
1076
|
}
|
|
1053
|
-
`,
|
|
1077
|
+
`,OA={columnType:e.z.nativeEnum(ON).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const RA={random_string:e.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:e.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const kA={typeName:e.z.string().describe("The name of the GraphQL type to get details for")};function PA(e){return e?"NON_NULL"===e.kind?`${PA(e.ofType)}!`:"LIST"===e.kind?`[${PA(e.ofType)}]`:e.name||"unknown":"unknown"}const $A=LI`
|
|
1054
1078
|
fragment UserDetails on User {
|
|
1055
1079
|
# Basic User Information
|
|
1056
1080
|
id
|
|
@@ -1082,31 +1106,31 @@
|
|
|
1082
1106
|
time_zone_identifier
|
|
1083
1107
|
utc_hours_diff
|
|
1084
1108
|
}
|
|
1085
|
-
`,
|
|
1109
|
+
`,CA=LI`
|
|
1086
1110
|
fragment UserTeamMembership on Team {
|
|
1087
1111
|
id
|
|
1088
1112
|
name
|
|
1089
1113
|
is_guest
|
|
1090
1114
|
picture_url
|
|
1091
1115
|
}
|
|
1092
|
-
|
|
1116
|
+
`,FA=LI`
|
|
1093
1117
|
fragment TeamBasicInfo on Team {
|
|
1094
1118
|
id
|
|
1095
1119
|
name
|
|
1096
1120
|
}
|
|
1097
|
-
`,
|
|
1121
|
+
`,jA=LI`
|
|
1098
1122
|
fragment TeamExtendedInfo on Team {
|
|
1099
1123
|
...TeamBasicInfo
|
|
1100
1124
|
is_guest
|
|
1101
1125
|
picture_url
|
|
1102
1126
|
}
|
|
1103
|
-
`,
|
|
1127
|
+
`,LA=LI`
|
|
1104
1128
|
fragment TeamOwner on User {
|
|
1105
1129
|
id
|
|
1106
1130
|
name
|
|
1107
1131
|
email
|
|
1108
1132
|
}
|
|
1109
|
-
`,
|
|
1133
|
+
`,zA=LI`
|
|
1110
1134
|
fragment TeamMember on User {
|
|
1111
1135
|
id
|
|
1112
1136
|
name
|
|
@@ -1126,7 +1150,7 @@
|
|
|
1126
1150
|
time_zone_identifier
|
|
1127
1151
|
utc_hours_diff
|
|
1128
1152
|
}
|
|
1129
|
-
`,
|
|
1153
|
+
`,VA=LI`
|
|
1130
1154
|
fragment TeamMemberSimplified on User {
|
|
1131
1155
|
id
|
|
1132
1156
|
name
|
|
@@ -1135,15 +1159,15 @@
|
|
|
1135
1159
|
is_admin
|
|
1136
1160
|
is_guest
|
|
1137
1161
|
}
|
|
1138
|
-
`,
|
|
1162
|
+
`,UA=LI`
|
|
1139
1163
|
fragment UserTeamMembershipSimplified on Team {
|
|
1140
1164
|
id
|
|
1141
1165
|
name
|
|
1142
1166
|
is_guest
|
|
1143
1167
|
}
|
|
1144
|
-
`,
|
|
1145
|
-
${
|
|
1146
|
-
${
|
|
1168
|
+
`,BA=LI`
|
|
1169
|
+
${$A}
|
|
1170
|
+
${CA}
|
|
1147
1171
|
|
|
1148
1172
|
query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
|
|
1149
1173
|
users(ids: $userIds, limit: $limit) {
|
|
@@ -1155,21 +1179,21 @@
|
|
|
1155
1179
|
}
|
|
1156
1180
|
}
|
|
1157
1181
|
}
|
|
1158
|
-
`,
|
|
1159
|
-
${
|
|
1182
|
+
`,qA=LI`
|
|
1183
|
+
${$A}
|
|
1160
1184
|
|
|
1161
1185
|
query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
|
|
1162
1186
|
users(ids: $userIds, limit: $limit) {
|
|
1163
1187
|
...UserDetails
|
|
1164
1188
|
}
|
|
1165
1189
|
}
|
|
1166
|
-
`,
|
|
1167
|
-
${kA}
|
|
1168
|
-
${zA}
|
|
1169
|
-
${CA}
|
|
1190
|
+
`,MA=LI`
|
|
1170
1191
|
${$A}
|
|
1192
|
+
${UA}
|
|
1193
|
+
${jA}
|
|
1171
1194
|
${FA}
|
|
1172
1195
|
${LA}
|
|
1196
|
+
${VA}
|
|
1173
1197
|
|
|
1174
1198
|
query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
|
|
1175
1199
|
users(ids: $userIds, limit: $limit) {
|
|
@@ -1195,19 +1219,19 @@
|
|
|
1195
1219
|
}
|
|
1196
1220
|
}
|
|
1197
1221
|
}
|
|
1198
|
-
`,
|
|
1199
|
-
${
|
|
1222
|
+
`,HA=LI`
|
|
1223
|
+
${FA}
|
|
1200
1224
|
|
|
1201
1225
|
query listTeamsOnly($teamIds: [ID!]) {
|
|
1202
1226
|
teams(ids: $teamIds) {
|
|
1203
1227
|
...TeamBasicInfo
|
|
1204
1228
|
}
|
|
1205
1229
|
}
|
|
1206
|
-
`,
|
|
1207
|
-
${CA}
|
|
1208
|
-
${$A}
|
|
1209
|
-
${FA}
|
|
1230
|
+
`,GA=LI`
|
|
1210
1231
|
${jA}
|
|
1232
|
+
${FA}
|
|
1233
|
+
${LA}
|
|
1234
|
+
${zA}
|
|
1211
1235
|
|
|
1212
1236
|
query listTeamsWithMembers($teamIds: [ID!]) {
|
|
1213
1237
|
teams(ids: $teamIds) {
|
|
@@ -1224,9 +1248,9 @@
|
|
|
1224
1248
|
}
|
|
1225
1249
|
}
|
|
1226
1250
|
}
|
|
1227
|
-
`,
|
|
1228
|
-
${
|
|
1229
|
-
${
|
|
1251
|
+
`,WA=LI`
|
|
1252
|
+
${$A}
|
|
1253
|
+
${CA}
|
|
1230
1254
|
|
|
1231
1255
|
query getUserByName($name: String) {
|
|
1232
1256
|
users(name: $name) {
|
|
@@ -1238,7 +1262,7 @@
|
|
|
1238
1262
|
}
|
|
1239
1263
|
}
|
|
1240
1264
|
}
|
|
1241
|
-
`,
|
|
1265
|
+
`,QA=LI`
|
|
1242
1266
|
query getCurrentUser {
|
|
1243
1267
|
me {
|
|
1244
1268
|
id
|
|
@@ -1250,7 +1274,7 @@
|
|
|
1250
1274
|
photo_thumb
|
|
1251
1275
|
}
|
|
1252
1276
|
}
|
|
1253
|
-
`;const
|
|
1277
|
+
`;const KA=[["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 YA(e,t=""){return KA.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const JA=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...YA(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...YA(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},XA=500,ZA=500,eD=1e3,tD={userIds:e.z.array(e.z.string()).max(XA).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:e.z.array(e.z.string()).max(ZA).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:e.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:e.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:e.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:e.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:e.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const aD={itemId:e.z.number().describe("The id of the item to which the update will be added"),groupId:e.z.string().describe("The id of the group to which the item will be moved")};const iD={type:e.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:e.z.array(e.z.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:e.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:e.z.nativeEnum(Kx).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:e.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 nD={workspace_id:e.z.number().describe("The ID of the workspace to get information for")};const oD=LI`
|
|
1254
1278
|
query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
|
|
1255
1279
|
workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
|
|
1256
1280
|
id
|
|
@@ -1258,7 +1282,7 @@
|
|
|
1258
1282
|
description
|
|
1259
1283
|
}
|
|
1260
1284
|
}
|
|
1261
|
-
`,
|
|
1285
|
+
`,rD=100,sD=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function pD(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function dD(e){return Array.isArray(e)&&e.length>0}const lD={searchTerm:e.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORTANT] Only alphanumeric characters are supported."),limit:e.z.number().min(1).max(rD).default(rD).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:e.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const cD=LI`
|
|
1262
1286
|
query getItemBoard($itemId: ID!) {
|
|
1263
1287
|
items(ids: [$itemId]) {
|
|
1264
1288
|
id
|
|
@@ -1271,7 +1295,7 @@
|
|
|
1271
1295
|
}
|
|
1272
1296
|
}
|
|
1273
1297
|
}
|
|
1274
|
-
`,
|
|
1298
|
+
`,mD=LI`
|
|
1275
1299
|
mutation createDoc($location: CreateDocInput!) {
|
|
1276
1300
|
create_doc(location: $location) {
|
|
1277
1301
|
id
|
|
@@ -1280,7 +1304,7 @@
|
|
|
1280
1304
|
name
|
|
1281
1305
|
}
|
|
1282
1306
|
}
|
|
1283
|
-
`,
|
|
1307
|
+
`,uD=LI`
|
|
1284
1308
|
mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
|
|
1285
1309
|
add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
|
|
1286
1310
|
success
|
|
@@ -1288,11 +1312,11 @@
|
|
|
1288
1312
|
error
|
|
1289
1313
|
}
|
|
1290
1314
|
}
|
|
1291
|
-
`,
|
|
1315
|
+
`,hD=LI`
|
|
1292
1316
|
mutation updateDocName($docId: ID!, $name: String!) {
|
|
1293
1317
|
update_doc_name(docId: $docId, name: $name)
|
|
1294
1318
|
}
|
|
1295
|
-
`,
|
|
1319
|
+
`,fD=e.z.enum(["workspace","item"]),vD=e.z.discriminatedUnion("type",[e.z.object({type:e.z.literal(fD.enum.workspace).describe("Create document in workspace"),workspace_id:e.z.number().describe("Workspace ID under which to create the new document"),doc_kind:e.z.nativeEnum(Ex).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:e.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),e.z.object({type:e.z.literal(fD.enum.item).describe("Create document attached to item"),item_id:e.z.number().describe("Item ID to attach the new document to"),column_id:e.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.")})]),gD={doc_name:e.z.string().describe("Name for the new document."),markdown:e.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:e.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:e.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:e.z.nativeEnum(Ex).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:e.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:e.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:e.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 yD=LI`
|
|
1296
1320
|
mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
|
|
1297
1321
|
add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
|
|
1298
1322
|
success
|
|
@@ -1300,13 +1324,13 @@
|
|
|
1300
1324
|
error
|
|
1301
1325
|
}
|
|
1302
1326
|
}
|
|
1303
|
-
`,
|
|
1327
|
+
`,bD=LI`
|
|
1304
1328
|
query getDocByObjectId($objectId: [ID!]) {
|
|
1305
1329
|
docs(object_ids: $objectId) {
|
|
1306
1330
|
id
|
|
1307
1331
|
}
|
|
1308
1332
|
}
|
|
1309
|
-
`,
|
|
1333
|
+
`,wD={doc_id:e.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:e.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:e.z.string().describe("Markdown content to add to the document."),after_block_id:e.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 _D=LI`
|
|
1310
1334
|
mutation CreateDashboard(
|
|
1311
1335
|
$name: String!
|
|
1312
1336
|
$workspace_id: ID!
|
|
@@ -1328,14 +1352,14 @@
|
|
|
1328
1352
|
board_folder_id
|
|
1329
1353
|
}
|
|
1330
1354
|
}
|
|
1331
|
-
`,
|
|
1355
|
+
`,xD=LI`
|
|
1332
1356
|
query GetAllWidgetsSchema {
|
|
1333
1357
|
all_widgets_schema {
|
|
1334
1358
|
widget_type
|
|
1335
1359
|
schema
|
|
1336
1360
|
}
|
|
1337
1361
|
}
|
|
1338
|
-
`,
|
|
1362
|
+
`,ED=LI`
|
|
1339
1363
|
mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
|
|
1340
1364
|
create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
|
|
1341
1365
|
id
|
|
@@ -1347,13 +1371,13 @@
|
|
|
1347
1371
|
}
|
|
1348
1372
|
}
|
|
1349
1373
|
}
|
|
1350
|
-
`,
|
|
1374
|
+
`,TD={name:e.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:e.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:e.z.array(e.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:e.z.nativeEnum(Ux).default(Ux.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:e.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const ID={parent_container_id:e.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.z.nativeEnum(fT).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.z.nativeEnum(Xx).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:e.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:e.z.record(e.z.unknown()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};const SD=LI`
|
|
1351
1375
|
mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
|
|
1352
1376
|
update_workspace(id: $id, attributes: $attributes) {
|
|
1353
1377
|
id
|
|
1354
1378
|
}
|
|
1355
1379
|
}
|
|
1356
|
-
`,
|
|
1380
|
+
`,ND={id:e.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:e.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:e.z.string().optional().describe("The description of the workspace to update"),attributeKind:e.z.nativeEnum(vT).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:e.z.string().optional().describe("The name of the workspace to update")};const AD=LI`
|
|
1357
1381
|
mutation updateFolder(
|
|
1358
1382
|
$folderId: ID!
|
|
1359
1383
|
$name: String
|
|
@@ -1379,7 +1403,7 @@
|
|
|
1379
1403
|
id
|
|
1380
1404
|
}
|
|
1381
1405
|
}
|
|
1382
|
-
`,
|
|
1406
|
+
`,DD={folderId:e.z.string().describe("The ID of the folder to update"),name:e.z.string().optional().describe("The new name of the folder"),color:e.z.nativeEnum(aE).optional().describe("The new color of the folder"),fontWeight:e.z.nativeEnum(nE).optional().describe("The new font weight of the folder"),customIcon:e.z.nativeEnum(iE).optional().describe("The new custom icon of the folder"),parentFolderId:e.z.string().optional().describe("The ID of the new parent folder"),workspaceId:e.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:e.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:e.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:e.z.nativeEnum(PE).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:e.z.boolean().optional().describe("Whether to position the folder after the object")};const OD=LI`
|
|
1383
1407
|
mutation createWorkspace(
|
|
1384
1408
|
$name: String!
|
|
1385
1409
|
$workspaceKind: WorkspaceKind!
|
|
@@ -1395,7 +1419,7 @@
|
|
|
1395
1419
|
id
|
|
1396
1420
|
}
|
|
1397
1421
|
}
|
|
1398
|
-
`,
|
|
1422
|
+
`,RD={name:e.z.string().describe("The name of the new workspace to be created"),workspaceKind:e.z.nativeEnum(vT).describe("The kind of workspace to create"),description:e.z.string().optional().describe("The description of the new workspace"),accountProductId:e.z.string().optional().describe("The account product ID associated with the workspace")};const kD=LI`
|
|
1399
1423
|
mutation createFolder(
|
|
1400
1424
|
$workspaceId: ID!
|
|
1401
1425
|
$name: String!
|
|
@@ -1415,7 +1439,7 @@
|
|
|
1415
1439
|
id
|
|
1416
1440
|
}
|
|
1417
1441
|
}
|
|
1418
|
-
`,
|
|
1442
|
+
`,PD={workspaceId:e.z.string().describe("The ID of the workspace where the folder will be created"),name:e.z.string().describe("The name of the folder to be created"),color:e.z.nativeEnum(aE).optional().describe("The color of the folder"),fontWeight:e.z.nativeEnum(nE).optional().describe("The font weight of the folder"),customIcon:e.z.nativeEnum(iE).optional().describe("The custom icon of the folder"),parentFolderId:e.z.string().optional().describe("The ID of the parent folder")};const $D=LI`
|
|
1419
1443
|
mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
|
|
1420
1444
|
update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
|
|
1421
1445
|
success
|
|
@@ -1425,7 +1449,7 @@
|
|
|
1425
1449
|
}
|
|
1426
1450
|
}
|
|
1427
1451
|
}
|
|
1428
|
-
`,
|
|
1452
|
+
`,CD=LI`
|
|
1429
1453
|
mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
|
|
1430
1454
|
update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
|
|
1431
1455
|
success
|
|
@@ -1435,7 +1459,7 @@
|
|
|
1435
1459
|
}
|
|
1436
1460
|
}
|
|
1437
1461
|
}
|
|
1438
|
-
|
|
1462
|
+
`,FD={objectType:e.z.nativeEnum(PE).describe("The type of object to move"),id:e.z.string().describe("The ID of the object to move"),position_object_id:e.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:e.z.nativeEnum(PE).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:e.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:e.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:e.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:e.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const jD=LI`
|
|
1439
1463
|
query aggregateBoardInsights($query: AggregateQueryInput!) {
|
|
1440
1464
|
aggregate(query: $query) {
|
|
1441
1465
|
results {
|
|
@@ -1453,7 +1477,7 @@
|
|
|
1453
1477
|
}
|
|
1454
1478
|
}
|
|
1455
1479
|
}
|
|
1456
|
-
`,
|
|
1480
|
+
`,LD=new Set([sx.Case,sx.Between,sx.Left,sx.Raw,sx.None,sx.CountKeys]),zD=Object.values(sx).filter((e=>!LD.has(e))),VD=new Set([sx.Left,sx.Trim,sx.Upper,sx.Lower,sx.DateTruncDay,sx.DateTruncWeek,sx.DateTruncMonth,sx.DateTruncQuarter,sx.DateTruncYear,sx.Color,sx.Label,sx.EndDate,sx.StartDate,sx.Hour,sx.PhoneCountryShortName,sx.Person,sx.Upper,sx.Lower,sx.Order,sx.Length,sx.Flatten,sx.IsDone]);function UD(e){return{column_id:e}}new Set([sx.Count,sx.CountDistinct,sx.CountSubitems,sx.CountItems,sx.First,sx.Sum,sx.Average,sx.Median,sx.Min,sx.Max,sx.MinMax]);const BD={boardId:e.z.number().describe("The id of the board to get insights for"),aggregations:e.z.array(e.z.object({function:e.z.enum(zD).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:e.z.string().describe("The id of the column to aggregate")})).describe('The aggregations to get. Before sending the aggregations, use get_board_info tool to check "aggregationGuidelines" key for information. Transformative functions and plain columns (no function) must be in group by.').optional(),groupBy:e.z.array(e.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:e.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:lA,filtersOperator:cA,orderBy:e.z.array(e.z.object({columnId:e.z.string().describe("The id of the column to order by"),direction:e.z.nativeEnum(bE).optional().default(bE.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 qD=LI`
|
|
1457
1481
|
query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1458
1482
|
boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1459
1483
|
id
|
|
@@ -1461,7 +1485,7 @@
|
|
|
1461
1485
|
url
|
|
1462
1486
|
}
|
|
1463
1487
|
}
|
|
1464
|
-
`,
|
|
1488
|
+
`,MD=LI`
|
|
1465
1489
|
query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1466
1490
|
docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1467
1491
|
id
|
|
@@ -1469,14 +1493,14 @@
|
|
|
1469
1493
|
url
|
|
1470
1494
|
}
|
|
1471
1495
|
}
|
|
1472
|
-
`,
|
|
1496
|
+
`,HD=LI`
|
|
1473
1497
|
query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1474
1498
|
folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1475
1499
|
id
|
|
1476
1500
|
name
|
|
1477
1501
|
}
|
|
1478
1502
|
}
|
|
1479
|
-
`,
|
|
1503
|
+
`,GD=LI`
|
|
1480
1504
|
query SearchDev($query: String!, $limit: Int!, $filters: SearchFiltersInput!) {
|
|
1481
1505
|
search(query: $query, limit: $limit, filters: $filters) {
|
|
1482
1506
|
__typename
|
|
@@ -1497,14 +1521,14 @@
|
|
|
1497
1521
|
}
|
|
1498
1522
|
}
|
|
1499
1523
|
}
|
|
1500
|
-
`,
|
|
1524
|
+
`,WD=100,QD={searchTerm:e.z.string().optional().describe("The search term to use for the search."),searchType:e.z.nativeEnum(SA).describe("The type of search to perform."),limit:e.z.number().max(WD).optional().default(WD).describe("The number of items to get. The max and default value is 100."),page:e.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:e.z.array(e.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 KD=e.z.object({id:e.z.string().describe("The ID of the entity to mention"),type:e.z.nativeEnum(AE).describe("The type of mention: User, Team, Board, or Project")}),YD=e.z.array(KD),JD={itemId:e.z.number().describe("The id of the item to which the update will be added"),body:e.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:e.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 XD=LI`
|
|
1501
1525
|
mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
|
|
1502
1526
|
update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
|
|
1503
1527
|
id
|
|
1504
1528
|
name
|
|
1505
1529
|
}
|
|
1506
1530
|
}
|
|
1507
|
-
`,
|
|
1531
|
+
`,ZD=e.z.object({fileType:e.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:e.z.string().describe("File display name"),linkToFile:e.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:e.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:e.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),eO={boardId:e.z.string().describe("The board's unique identifier"),itemId:e.z.string().describe("The item's unique identifier"),columnId:e.z.string().describe("The file or doc column's unique identifier"),files:e.z.array(ZD).describe("Array of file values to set on the column")};const tO=LI`
|
|
1508
1532
|
query getUserContext {
|
|
1509
1533
|
me {
|
|
1510
1534
|
id
|
|
@@ -1532,7 +1556,7 @@
|
|
|
1532
1556
|
}
|
|
1533
1557
|
}
|
|
1534
1558
|
}
|
|
1535
|
-
`,
|
|
1559
|
+
`,aO=LI`
|
|
1536
1560
|
query getFavoriteDetails(
|
|
1537
1561
|
$boardIds: [ID!]
|
|
1538
1562
|
$folderIds: [ID!]
|
|
@@ -1556,7 +1580,7 @@
|
|
|
1556
1580
|
name
|
|
1557
1581
|
}
|
|
1558
1582
|
}
|
|
1559
|
-
`,
|
|
1583
|
+
`,iO={[vE.Board]:"boardIds",[vE.Folder]:"folderIds",[vE.Workspace]:"workspaceIds",[vE.Dashboard]:"dashboardIds"},nO={[vE.Board]:"boards",[vE.Folder]:"folders",[vE.Workspace]:"workspaces",[vE.Dashboard]:"dashboards"};const oO=LI`
|
|
1560
1584
|
query GetNotetakerMeetings(
|
|
1561
1585
|
$limit: Int
|
|
1562
1586
|
$cursor: String
|
|
@@ -1609,7 +1633,7 @@
|
|
|
1609
1633
|
}
|
|
1610
1634
|
}
|
|
1611
1635
|
}
|
|
1612
|
-
`,
|
|
1636
|
+
`,rO={ids:e.z.array(e.z.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:e.z.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:e.z.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:e.z.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:e.z.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:e.z.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:e.z.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:e.z.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:e.z.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const sO={action:e.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'),toolName:e.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)")};class pO{constructor(){this.name="manage_tools",this.type=an.READ,this.enabledByDefault=!0,this.annotations={title:"Discover & Manage monday.com Tools",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1}}setToolkitManager(e){this.toolkitManager=e}getDescription(){return"Discover and manage available monday.com tools. Use this tool first to see what tools are available, check which ones are active/inactive, and enable any tools you need for your tasks. When enabling a tool, you will be asked for confirmation first. Essential for understanding your monday.com toolkit capabilities."}getInputSchema(){return sO}async execute(e){if(!this.toolkitManager)throw new Error("Toolkit manager not initialized");if(!e)throw new Error("Input parameters are required");const{action:t,toolName:a}=e;switch(t){case"enable":if(!a)throw new Error("Tool name is required for enable action");if(this.toolkitManager.isToolEnabled(a))return{content:`Tool '${a}' is already enabled`};return{content:this.toolkitManager.enableTool(a)?`✅ Tool '${a}' has been enabled and is now available for use`:`❌ Failed to enable tool '${a}' (tool not found)`};case"disable":if(!a)throw new Error("Tool name is required for disable action");return{content:this.toolkitManager.disableTool(a)?`Tool '${a}' has been disabled`:`Failed to disable tool '${a}' (tool not found)`};case"status":if(a){return{content:`Tool '${a}' is ${this.toolkitManager.isToolEnabled(a)?"enabled":"disabled"}`}}{const e=this.toolkitManager.getToolsStatus();return{content:`All tools status:\n${Object.entries(e).map((([e,t])=>`${e}: ${t?"enabled":"disabled"}`)).join("\n")}`}}case"detailed":{const e=this.toolkitManager.getDetailedToolsStatus(),t=Object.entries(e).filter((([,e])=>e.enabled)),a=Object.entries(e).filter((([,e])=>!e.enabled));let i="monday.com Tools Discovery:\n\n";return t.length>0&&(i+="✅ ACTIVE TOOLS (ready to use):\n",i+=t.map((([e,t])=>` • ${e} (default: ${t.enabledByDefault?"enabled":"disabled"})`)).join("\n")),a.length>0&&(i+="\n\n⚠️ INACTIVE TOOLS (need activation):\n",i+=a.map((([e,t])=>` • ${e} (default: ${t.enabledByDefault?"enabled":"disabled"}) - use {"action": "enable", "toolName": "${e}"} to activate`)).join("\n")),{content:i}}case"reset":{if(!a)throw new Error("Tool name is required for reset action");const e=this.toolkitManager.resetToolToDefault(a),t=this.toolkitManager.isToolEnabledByDefault(a);return{content:e?`Tool '${a}' has been reset to its default state (${t?"enabled":"disabled"})`:`Failed to reset tool '${a}' (tool not found)`}}case"list":{const e=this.toolkitManager.getToolsStatus();return{content:`Available tools: ${Object.entries(e).map((([e,t])=>`${e} (${t?"enabled":"disabled"})`)).join(", ")}`}}default:throw new Error("Invalid action. Use: enable, disable, status, list, detailed, or reset")}}}const dO=LI`
|
|
1613
1637
|
query getSprintsByIds($ids: [ID!]) {
|
|
1614
1638
|
items(ids: $ids) {
|
|
1615
1639
|
id
|
|
@@ -1644,7 +1668,7 @@
|
|
|
1644
1668
|
}
|
|
1645
1669
|
}
|
|
1646
1670
|
}
|
|
1647
|
-
`,
|
|
1671
|
+
`,lO={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"},cO={...lO,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},mO="BOARD_NOT_FOUND:",uO="SPRINT_NOT_FOUND:",hO="DOCUMENT_NOT_FOUND:",fO="DOCUMENT_INVALID:",vO="DOCUMENT_EMPTY:",gO="EXPORT_FAILED:",yO="INTERNAL_ERROR:",bO="VALIDATION_ERROR:",wO="task_sprint",_O={[cO.SPRINT_TASKS]:"Sprint Tasks",[cO.SPRINT_TIMELINE]:"Sprint Timeline",[cO.SPRINT_COMPLETION]:"Sprint Completion",[cO.SPRINT_START_DATE]:"Sprint Start Date",[cO.SPRINT_END_DATE]:"Sprint End Date",[cO.SPRINT_ACTIVATION]:"Sprint Activation",[cO.SPRINT_SUMMARY]:"Sprint Summary",[cO.SPRINT_CAPACITY]:"Sprint Capacity"},xO=WE,EO={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},TO=(e,t)=>e.column_values?.find((e=>e.id===t)),IO=(e,t)=>{const a=TO(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},SO=(e,t)=>{const a=TO(e,t);return"DateValue"===a?.__typename?a.date??null:null},NO=(e,t)=>{const a=TO(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},AO=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},DO=(e,t)=>{if(!e.columns)return!1;const a=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return t.every((e=>a.has(e)))},OO=e=>DO(e,Object.values(lO)),RO=e=>DO(e,Object.values(EO)),kO=e=>{if(!e?.settings)return null;const t=e.settings;return t.boardIds&&Array.isArray(t.boardIds)&&t.boardIds[0]?.toString()||t.boardId?.toString()||null},PO=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===ON.BoardRelation))||null,$O={sprintId:e.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const CO=LI`
|
|
1648
1672
|
query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
|
|
1649
1673
|
boards(ids: [$boardId]) {
|
|
1650
1674
|
items_page(limit: $limit) {
|
|
@@ -1680,7 +1704,7 @@
|
|
|
1680
1704
|
}
|
|
1681
1705
|
}
|
|
1682
1706
|
}
|
|
1683
|
-
|
|
1707
|
+
`,FO={sprintsBoardId:e.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:e.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const jO=LI`
|
|
1684
1708
|
query GetRecentBoards($limit: Int) {
|
|
1685
1709
|
boards(limit: $limit, order_by: used_at, state: active) {
|
|
1686
1710
|
id
|
|
@@ -1696,7 +1720,7 @@
|
|
|
1696
1720
|
}
|
|
1697
1721
|
}
|
|
1698
1722
|
}
|
|
1699
|
-
`,FO={};const jO=[class extends ey{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=an.READ,this.annotations=Zg({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 FO}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(CO,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${lO} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);if(0===a.length)return{content:this.generateNotFoundMessage(t.length)};return{content:this.generateReport(a)}}catch(e){return{content:`${vO} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}generateMultiplePairsWarning(e){return`## ⚠️ Multiple SprintsBoard Detected\n**${e}** different board pairs found. Each pair is isolated and workspace-specific.\n**AI Agent - REQUIRED:** Before ANY operation, confirm with user which pair and workspace to use.\n---\n`}generatePairDetails(e,t){return`### Pair ${t+1}\n**Sprints Board:**\n- ID: \`${e.sprintsBoard.id}\`\n- Name: ${e.sprintsBoard.name}\n- Workspace: ${e.sprintsBoard.workspaceName} (ID: ${e.sprintsBoard.workspaceId})\n\n**Tasks Board:**\n- ID: \`${e.tasksBoard.id}\`\n- Name: ${e.tasksBoard.name}\n- Workspace: ${e.tasksBoard.workspaceName} (ID: ${e.tasksBoard.workspaceId})\n---\n\n`}generateTechnicalReference(){return"## 📋 Technical Reference\n\n**Sprint Operations** (all require correct board pair):\n• Add to Sprint: Update `task_sprint` column with sprint item ID\n• Remove from Sprint: Clear `task_sprint` column (set to null)\n• Search in Sprint: Filter where `task_sprint` equals sprint item ID\n• Move Between Sprints: Update `task_sprint` with new sprint item ID\n• Backlog Tasks: `task_sprint` is empty/null\n\n**Critical:** `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}generateReport(e){const t=e.length>1?this.generateMultiplePairsWarning(e.length):"",a=e.map(((e,t)=>this.generatePairDetails(e,t))).join(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${t}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${a}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=RO(e,pO.SPRINT_TASKS);if(!i)return;const n=OO(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=RO(e,yO);if(!i)return;const n=OO(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(AO(i)&&this.processSprintsBoard(i,a,t),DO(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends ey{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=an.READ,this.annotations=Zg({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 $O}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(PO,a),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${vO} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(UI,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${lO} 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:`${gO} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${vO} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(pO),i=SO(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>bO[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let t="# Sprints Metadata Report\n\n";return t+=`**Total Sprints:** ${e.length}\n\n`,t+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",t+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const a=e.name||"Unknown",i=e.id,n=EO(e,dO.SPRINT_ACTIVATION),o=EO(e,dO.SPRINT_COMPLETION),r=TO(e,dO.SPRINT_START_DATE),s=TO(e,dO.SPRINT_END_DATE),p=((e,t)=>{const a=xO(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,dO.SPRINT_TIMELINE),d=IO(e,dO.SPRINT_SUMMARY);let l=wO.Planned;o?l=wO.Completed:(n||r)&&(l=wO.Active);const c=p?`${p.from} to ${p.to}`:"Not set";t+=`| ${a} | ${i} | ${l} | ${c} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),t+="\n## Status Definitions:\n",t+=`- **${wO.Planned}**: Sprint not yet started (no activation, no start date)\n`,t+=`- **${wO.Active}**: Sprint is active (activated but not completed)\n`,t+=`- **${wO.Completed}**: Sprint is finished\n\n`,t}},class extends ey{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=an.READ,this.annotations=Zg({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 kO}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${vO} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:a.content}:{content:a.error||`${vO} Unknown error occurred while reading document content`}}catch(e){return{content:`${vO} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(sO,t)).items||[];if(0===a.length)return{success:!1,error:`${cO} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${cO} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(pO),...t];return SO(a,i)})(i,[dO.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${gO} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=IO(i,dO.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${mO} 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:`${vO} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(XI,t)).docs||[];if(0===a.length)return{success:!1,error:`${mO} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${uO} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(ZI,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${fO} 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:`${hO} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${vO} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],LO=[class extends ey{constructor(){super(...arguments),this.name="delete_item",this.type=an.WRITE,this.annotations=Zg({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return nA}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(zI,t);return{content:`Item ${a.delete_item?.id} successfully deleted`}}},class extends ey{constructor(){super(...arguments),this.name="get_board_items_page",this.type=an.READ,this.annotations=Zg({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true. To retrieve an item's description (the rich-text body/details of a monday.com item), set 'includeItemDescription' to true — the response will include the item description's document blocks with their content, type, and id. Use this whenever the user asks about an item's description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available."}getInputSchema(){return IA}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){MN(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(_A,a),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:_E.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case AN.BoardRelation:return e.linked_items;case AN.Formula:return e.display_value;case AN.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:100,filters:{entities:[{items:{board_ids:[e.boardId.toString()]}}]}},a=await this.mondayApi.request(xA,t,{versionOverride:"dev",timeout:BN}),i=a.search?.filter((e=>"ItemSearchResult"===e.__typename))?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends ey{constructor(){super(...arguments),this.name="create_item",this.type=an.WRITE,this.annotations=Zg({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?HN:GN}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(jN,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new oS(this.mondayApi,this.apiToken,{boardId:t}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){qN(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(LN,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${a.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){qN(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(VI,a);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){qN(e,"create item")}}},class extends ey{constructor(){super(...arguments),this.name="create_update",this.type=an.WRITE,this.annotations=Zg({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return JN}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=YN.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(QN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){qN(e,"create update")}}},class extends ey{constructor(){super(...arguments),this.name="get_updates",this.type=an.READ,this.annotations=Zg({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return tA}async executeInternal(e){try{const t={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let a;a=e.objectType===eA.Item?await this.mondayApi.request(XN,{...t,itemId:e.objectId}):await this.mondayApi.request(ZN,{...t,boardId:e.objectId});const i=e.objectType===eA.Item?a.items?.[0]?.updates:a.boards?.[0]?.updates;if(!i||0===i.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const n=i.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),o={updates:n,pagination:{page:e.page??1,limit:e.limit??25,count:n.length}};return{content:JSON.stringify(o,null,2)}}catch(e){qN(e,"get updates")}}},class extends ey{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=an.WRITE,this.annotations=Zg({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 KD}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=QD.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(QN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){qN(e,"create update")}}},class extends ey{constructor(){super(...arguments),this.name="get_board_schema",this.type=an.READ,this.annotations=Zg({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 SA}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(UI,a);return{content:`The current schema of the board ${t} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends ey{constructor(){super(...arguments),this.name="get_board_activity",this.type=an.READ,this.annotations=Zg({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 mA}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-UN.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(cA,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=e.includeData??!1,d=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${p&&e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${d}`}}},class extends ey{constructor(){super(...arguments),this.name="get_board_info",this.type=an.READ,this.annotations=Zg({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return wA}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(uA,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(fA(i,n),null,2)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===AN.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(hA,{boardId:a});return i.boards?.[0]??null}},class extends ey{constructor(){super(...arguments),this.name="get_full_board_data",this.type=an.READ,this.annotations=Zg({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 lA}async executeInternal(e){try{const t={boardId:e.boardId,itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(rA,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(sA,e);r=t.users?.filter((e=>null!==e))||[]}const s=new Map(r.map((e=>[e.id,e]))),p={board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}};return{content:JSON.stringify(p,null,2)}}catch(e){qN(e,"get full board data")}}},class extends ey{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=an.READ,this.annotations=Zg({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 ZA}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(GA);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:KA(s)}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(HA,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>YA)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>JA)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(MA,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(qA,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:XA};s=await this.mondayApi.request(BA,t)}else if(t){const t={userIds:e.userIds,limit:XA};s=await this.mondayApi.request(VA,t)}else{const e={userIds:void 0,limit:XA};s=await this.mondayApi.request(UA,e)}return{content:KA(s)}}},oS,class extends ey{constructor(){super(...arguments),this.name="move_item_to_group",this.type=an.WRITE,this.annotations=Zg({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 eD}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(qI,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends ey{constructor(){super(...arguments),this.name="create_board",this.type=an.WRITE,this.annotations=Zg({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return rS}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(MI,t);return{content:`Board ${a.create_board?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_form",this.type=an.WRITE,this.annotations=Zg({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 jS}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(fS,t);return{content:`Form created successfully. Board ID: ${a.create_form?.boardId}, Token: ${a.create_form?.token}`}}},class extends ey{constructor(){super(...arguments),this.name="update_form",this.type=an.WRITE,this.annotations=Zg({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new SN(this.mondayApi),this.actionHandlers=new Map([[iN.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[iN.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[iN.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[iN.activate,this.helpers.activateForm.bind(this.helpers)],[iN.createTag,this.helpers.createTag.bind(this.helpers)],[iN.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[iN.updateTag,this.helpers.updateTag.bind(this.helpers)],[iN.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[iN.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[iN.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[iN.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[iN.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 IN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends ey{constructor(){super(...arguments),this.name="get_form",this.type=an.READ,this.annotations=Zg({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 NN}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(vS,t);return a.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(a.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends ey{constructor(){super(...arguments),this.name="form_questions_editor",this.type=an.WRITE,this.annotations=Zg({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new aN(this.mondayApi),this.actionHandlers=new Map([[ZS.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[ZS.Update,this.helpers.updateQuestion.bind(this.helpers)],[ZS.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return tN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends ey{constructor(){super(...arguments),this.name="create_column",this.type=an.WRITE,this.annotations=Zg({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?DN:ON}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(HI,a);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_group",this.type=an.WRITE,this.annotations=Zg({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 FN}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request($N,t);return{content:`Group "${a.create_group?.title}" (ID: ${a.create_group?.id}) successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="delete_column",this.type=an.WRITE,this.annotations=Zg({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?aA:iA}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(GI,t);return{content:`Column ${a.delete_column?.id} successfully deleted`}}},aS,class extends ey{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=an.ALL_API,this.annotations=Zg({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 DA}async executeInternal(e){try{const t=await this.mondayApi.request(WI),a=e?.operationType,i=t.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=t.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=t.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return a&&"read"!==a||(s+=`- Query Type: ${t.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),a&&"write"!==a||(s+=`- Mutation Type: ${t.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ey{constructor(){super(...arguments),this.name="get_column_type_info",this.type=an.READ,this.annotations=Zg({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 AA}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(NA,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="get_type_details",this.type=an.ALL_API,this.annotations=Zg({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 OA}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,LI`
|
|
1723
|
+
`,LO={};const zO=[class extends ey{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=an.READ,this.annotations=Zg({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 LO}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(jO,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${mO} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);if(0===a.length)return{content:this.generateNotFoundMessage(t.length)};return{content:this.generateReport(a)}}catch(e){return{content:`${yO} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}generateMultiplePairsWarning(e){return`## ⚠️ Multiple SprintsBoard Detected\n**${e}** different board pairs found. Each pair is isolated and workspace-specific.\n**AI Agent - REQUIRED:** Before ANY operation, confirm with user which pair and workspace to use.\n---\n`}generatePairDetails(e,t){return`### Pair ${t+1}\n**Sprints Board:**\n- ID: \`${e.sprintsBoard.id}\`\n- Name: ${e.sprintsBoard.name}\n- Workspace: ${e.sprintsBoard.workspaceName} (ID: ${e.sprintsBoard.workspaceId})\n\n**Tasks Board:**\n- ID: \`${e.tasksBoard.id}\`\n- Name: ${e.tasksBoard.name}\n- Workspace: ${e.tasksBoard.workspaceName} (ID: ${e.tasksBoard.workspaceId})\n---\n\n`}generateTechnicalReference(){return"## 📋 Technical Reference\n\n**Sprint Operations** (all require correct board pair):\n• Add to Sprint: Update `task_sprint` column with sprint item ID\n• Remove from Sprint: Clear `task_sprint` column (set to null)\n• Search in Sprint: Filter where `task_sprint` equals sprint item ID\n• Move Between Sprints: Update `task_sprint` with new sprint item ID\n• Backlog Tasks: `task_sprint` is empty/null\n\n**Critical:** `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}generateReport(e){const t=e.length>1?this.generateMultiplePairsWarning(e.length):"",a=e.map(((e,t)=>this.generatePairDetails(e,t))).join(""),i=this.generateTechnicalReference();return`# Monday-Dev Sprints Boards Discovery\n\n${t}## Boards\n\nFound **${e.length}** matched pair(s):\n\n${a}${i}`}generateNotFoundMessage(e){return`## No Monday-Dev Sprints Board Pairs Found\n\n**Boards Checked:** ${e} (recently used)\n\nNo board pairs with sprint relationships found in your recent boards.\n\n### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=PO(e,lO.SPRINT_TASKS);if(!i)return;const n=kO(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=PO(e,wO);if(!i)return;const n=kO(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(OO(i)&&this.processSprintsBoard(i,a,t),RO(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends ey{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=an.READ,this.annotations=Zg({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 FO}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(CO,a),n=i.boards?.[0],o=n?.items_page?.items||[];return{content:this.generateSprintsMetadataReport(o)}}catch(e){return{content:`${yO} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(UI,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${mO} 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:`${bO} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${yO} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(lO),i=AO(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>_O[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}generateSprintsMetadataReport(e){let t="# Sprints Metadata Report\n\n";return t+=`**Total Sprints:** ${e.length}\n\n`,t+="| Sprint Name | Sprint ID | Status | Timeline (Planned) | Start Date (Actual) | End Date (Actual) | Completion | Summary Document ObjectID |\n",t+="|-------------|-----------|--------|--------------------|---------------------|-------------------|------------|---------------------------|\n",e.forEach((e=>{const a=e.name||"Unknown",i=e.id,n=IO(e,cO.SPRINT_ACTIVATION),o=IO(e,cO.SPRINT_COMPLETION),r=SO(e,cO.SPRINT_START_DATE),s=SO(e,cO.SPRINT_END_DATE),p=((e,t)=>{const a=TO(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,cO.SPRINT_TIMELINE),d=NO(e,cO.SPRINT_SUMMARY);let l=xO.Planned;o?l=xO.Completed:(n||r)&&(l=xO.Active);const c=p?`${p.from} to ${p.to}`:"Not set";t+=`| ${a} | ${i} | ${l} | ${c} | ${r||"Not started"} | ${s||"Not ended"} | ${o?"Yes":"No"} | ${d||"No document"} |\n`})),t+="\n## Status Definitions:\n",t+=`- **${xO.Planned}**: Sprint not yet started (no activation, no start date)\n`,t+=`- **${xO.Active}**: Sprint is active (activated but not completed)\n`,t+=`- **${xO.Completed}**: Sprint is finished\n\n`,t}},class extends ey{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=an.READ,this.annotations=Zg({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 $O}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${yO} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:a.content}:{content:a.error||`${yO} Unknown error occurred while reading document content`}}catch(e){return{content:`${yO} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(dO,t)).items||[];if(0===a.length)return{success:!1,error:`${uO} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${uO} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(lO),...t];return AO(a,i)})(i,[cO.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${bO} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=NO(i,cO.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${hO} 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:`${yO} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(XI,t)).docs||[];if(0===a.length)return{success:!1,error:`${hO} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${fO} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(ZI,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${gO} 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:`${vO} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${yO} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],VO=[class extends ey{constructor(){super(...arguments),this.name="delete_item",this.type=an.WRITE,this.annotations=Zg({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return rA}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(zI,t);return{content:`Item ${a.delete_item?.id} successfully deleted`}}},class extends ey{constructor(){super(...arguments),this.name="get_board_items_page",this.type=an.READ,this.annotations=Zg({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true. To retrieve an item's description (the rich-text body/details of a monday.com item), set 'includeItemDescription' to true — the response will include the item description's document blocks with their content, type, and id. Use this whenever the user asks about an item's description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. \"show me items in the 'Overdue' view\"), first call get_board_info to get the board's views, find the matching view by name, then extract its filter field and pass it as the filters argument here."}getInputSchema(){return NA}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){GN(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(EA,a),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:_E.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case ON.BoardRelation:return e.linked_items;case ON.Formula:return e.display_value;case ON.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:100,filters:{entities:[{items:{board_ids:[e.boardId.toString()]}}]}},a=await this.mondayApi.request(TA,t,{versionOverride:"dev",timeout:MN}),i=a.search?.filter((e=>"ItemSearchResult"===e.__typename))?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends ey{constructor(){super(...arguments),this.name="create_item",this.type=an.WRITE,this.annotations=Zg({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?WN:QN}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(zN,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new oS(this.mondayApi,this.apiToken,{boardId:t}),s=await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(s.content.includes("Error"))throw new Error("Failed to update duplicated item: "+s.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){HN(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(VN,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${a.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){HN(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(VI,a);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){HN(e,"create item")}}},class extends ey{constructor(){super(...arguments),this.name="create_update",this.type=an.WRITE,this.annotations=Zg({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return ZN}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=XN.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(YN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}`}}catch(e){HN(e,"create update")}}},class extends ey{constructor(){super(...arguments),this.name="get_updates",this.type=an.READ,this.annotations=Zg({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return iA}async executeInternal(e){try{const t={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let a;a=e.objectType===aA.Item?await this.mondayApi.request(eA,{...t,itemId:e.objectId}):await this.mondayApi.request(tA,{...t,boardId:e.objectId});const i=e.objectType===aA.Item?a.items?.[0]?.updates:a.boards?.[0]?.updates;if(!i||0===i.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const n=i.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),o={updates:n,pagination:{page:e.page??1,limit:e.limit??25,count:n.length}};return{content:JSON.stringify(o,null,2)}}catch(e){HN(e,"get updates")}}},class extends ey{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=an.WRITE,this.annotations=Zg({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 JD}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=YD.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(YN,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:`Update ${i.create_update.id} successfully created on item ${e.itemId}. Now we want to show the updated data, so call the full board data tool to get data, and then immediately after that call the show table tool to show the data from that tool. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received.`}}catch(e){HN(e,"create update")}}},class extends ey{constructor(){super(...arguments),this.name="get_board_schema",this.type=an.READ,this.annotations=Zg({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 AA}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(UI,a);return{content:`The current schema of the board ${t} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends ey{constructor(){super(...arguments),this.name="get_board_activity",this.type=an.READ,this.annotations=Zg({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 hA}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-qN.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(uA,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=e.includeData??!1,d=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${p&&e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${d}`}}},class extends ey{constructor(){super(...arguments),this.name="get_board_info",this.type=an.READ,this.annotations=Zg({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured `filter` object. "}getInputSchema(){return xA}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(fA,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:JSON.stringify(gA(i,n),null,2)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===ON.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(vA,{boardId:a});return i.boards?.[0]??null}},class extends ey{constructor(){super(...arguments),this.name="get_full_board_data",this.type=an.READ,this.annotations=Zg({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 mA}async executeInternal(e){try{const t={boardId:e.boardId,itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(pA,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(dA,e);r=t.users?.filter((e=>null!==e))||[]}const s=new Map(r.map((e=>[e.id,e]))),p={board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}};return{content:JSON.stringify(p,null,2)}}catch(e){HN(e,"get full board data")}}},class extends ey{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=an.READ,this.annotations=Zg({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 tD}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(QA);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:JA(s)}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},s=await this.mondayApi.request(WA,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>XA)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>ZA)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(GA,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(HA,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:eD};s=await this.mondayApi.request(MA,t)}else if(t){const t={userIds:e.userIds,limit:eD};s=await this.mondayApi.request(BA,t)}else{const e={userIds:void 0,limit:eD};s=await this.mondayApi.request(qA,e)}return{content:JA(s)}}},oS,class extends ey{constructor(){super(...arguments),this.name="move_item_to_group",this.type=an.WRITE,this.annotations=Zg({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 aD}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(qI,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends ey{constructor(){super(...arguments),this.name="create_board",this.type=an.WRITE,this.annotations=Zg({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return rS}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(MI,t);return{content:`Board ${a.create_board?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_form",this.type=an.WRITE,this.annotations=Zg({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 zS}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(gS,t);return{content:`Form created successfully. Board ID: ${a.create_form?.boardId}, Token: ${a.create_form?.token}`}}},class extends ey{constructor(){super(...arguments),this.name="update_form",this.type=an.WRITE,this.annotations=Zg({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new AN(this.mondayApi),this.actionHandlers=new Map([[oN.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[oN.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[oN.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[oN.activate,this.helpers.activateForm.bind(this.helpers)],[oN.createTag,this.helpers.createTag.bind(this.helpers)],[oN.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[oN.updateTag,this.helpers.updateTag.bind(this.helpers)],[oN.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[oN.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[oN.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[oN.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[oN.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 NN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends ey{constructor(){super(...arguments),this.name="get_form",this.type=an.READ,this.annotations=Zg({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 DN}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(yS,t);return a.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(a.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends ey{constructor(){super(...arguments),this.name="form_questions_editor",this.type=an.WRITE,this.annotations=Zg({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new nN(this.mondayApi),this.actionHandlers=new Map([[tN.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[tN.Update,this.helpers.updateQuestion.bind(this.helpers)],[tN.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return iN}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends ey{constructor(){super(...arguments),this.name="create_column",this.type=an.WRITE,this.annotations=Zg({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?RN:kN}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(HI,a);return{content:`Column ${i.create_column?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_group",this.type=an.WRITE,this.annotations=Zg({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 LN}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(FN,t);return{content:`Group "${a.create_group?.title}" (ID: ${a.create_group?.id}) successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="delete_column",this.type=an.WRITE,this.annotations=Zg({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?nA:oA}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(GI,t);return{content:`Column ${a.delete_column?.id} successfully deleted`}}},aS,class extends ey{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=an.ALL_API,this.annotations=Zg({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 RA}async executeInternal(e){try{const t=await this.mondayApi.request(WI),a=e?.operationType,i=t.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=t.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=t.__schema,r=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return a&&"read"!==a||(s+=`- Query Type: ${t.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),a&&"write"!==a||(s+=`- Mutation Type: ${t.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${r}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ey{constructor(){super(...arguments),this.name="get_column_type_info",this.type=an.READ,this.annotations=Zg({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 OA}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(DA,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="get_type_details",this.type=an.ALL_API,this.annotations=Zg({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 kA}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,LI`
|
|
1700
1724
|
query getTypeDetails {
|
|
1701
1725
|
__type(name: "${t}") {
|
|
1702
1726
|
name
|
|
@@ -1784,5 +1808,5 @@
|
|
|
1784
1808
|
}
|
|
1785
1809
|
}
|
|
1786
1810
|
}
|
|
1787
|
-
`),i=await this.mondayApi.request(a);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const t=RA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const t=RA(e.type);n+=` - ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const t=RA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends ey{constructor(){super(...arguments),this.name="create_custom_activity",this.type=an.WRITE,this.annotations=Zg({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return RN}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(KI,t),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_notification",this.type=an.WRITE,this.annotations=Zg({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 PN}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(kN,t);return{content:`Notification successfully sent to user ${e.user_id}: "${e.text}"`}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends ey{constructor(){super(...arguments),this.name="create_timeline_item",this.type=an.WRITE,this.annotations=Zg({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return WN}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(YI,t);return{content:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends ey{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=an.READ,this.annotations=Zg({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return oA}async executeInternal(e){const t=await this.mondayApi.request(JI);if(!t.custom_activity||0===t.custom_activity.length)return{content:"No custom activities found"};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${a.length} custom activities: ${JSON.stringify(a,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="read_docs",this.type=an.READ,this.annotations=Zg({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 tD}async executeInternal(e){try{let t,a,i;switch(e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(XI,n);if((!o.docs||0===o.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request(XI,a)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,t,a){return e===t?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${t} documents, which suggests there may be more. Consider calling this tool again with page: ${a+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,t){const a=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t="";try{const a={docId:e.id},i=await this.mondayApi.request(ZI,a);t=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){t=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:t}}))),i=t.page||1,n=t.limit||25,o=a.length,r=o===n;return{content:`Successfully retrieved ${a.length} document${1===a.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(a,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="workspace_info",this.type=an.READ,this.annotations=Zg({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 aD}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(eS,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:t,boards:a,docs:i,folders:n}=e,o=t?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(a||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(r.values()),root_items:{boards:s,docs:p}}}(a);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,t)=>e+t.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,t)=>e+t.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="list_workspaces",this.type=an.READ,this.annotations=Zg({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 pD}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=oD(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=rD(await this.mondayApi.request(iD,n(gT.Member))),r=!sD(o)||i&&!function(e,t){return t.some((t=>oD(t.name).includes(e)))}(i,o);let s=o;if(r){s=rD(await this.mondayApi.request(iD,n(gT.All)))}if(!sD(s))return{content:"No workspaces found."};const p=i&&s?.length<=nD,d=function(e,t,a,i){if(!e||t.length<=nD)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>oD(t.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!sD(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const l=d.length===e.limit,c=function(e){return e.map((e=>{const t=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${t}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${c}\n${l?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends ey{constructor(){super(...arguments),this.name="create_doc",this.type=an.WRITE,this.annotations=Zg({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 fD}async executeInternal(e){const t=hD.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,n;if(a.type===uD.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||Ex.Public,folder_id:a.folder_id?.toString()}}},r=await this.mondayApi.request(lD,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===uD.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(dD,o),s=r.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const p=s.board?.id,d=s.board?.columns?.find((e=>e&&e.type===AN.Doc));let l=a.column_id;if(!l)if(d)l=d.id;else{const e={boardId:p.toString(),columnType:AN.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(HI,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}}},m=await this.mondayApi.request(lD,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(mD,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const o={docId:t,markdown:e.markdown},r=await this.mondayApi.request(cD,o),s=r?.add_content_to_doc_from_markdown?.success,p=r?.add_content_to_doc_from_markdown?.error;return s?{content:`✅ Document successfully created (id: ${t}, object_id: ${i}). ${n?`\n\nURL: ${n}`:""}`}:{content:`Document ${t} created, but failed to add markdown content: ${p||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ey{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=an.WRITE,this.annotations=Zg({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 yD}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(gD,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a={docId:t,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(vD,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:`Successfully added content to document ${t}. ${s} block${1===s?"":"s"} created.${o&&o.length>0?` Block IDs: ${o.join(", ")}`:""}`}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ey{constructor(){super(...arguments),this.name="update_workspace",this.type=an.WRITE,this.annotations=Zg({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return ID}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(TD,t);return{content:`Workspace ${a.update_workspace?.id} successfully updated`}}},class extends ey{constructor(){super(...arguments),this.name="update_folder",this.type=an.WRITE,this.annotations=Zg({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return ND}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(SD,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends ey{constructor(){super(...arguments),this.name="create_workspace",this.type=an.WRITE,this.annotations=Zg({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return DD}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(AD,t);return{content:`Workspace ${a.create_workspace?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_folder",this.type=an.WRITE,this.annotations=Zg({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return RD}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(OD,t);return{content:`Folder ${a.create_folder?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="move_object",this.type=an.WRITE,this.annotations=Zg({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 $D}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(SD,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(kD,p);return d.update_board_hierarchy?.success?{content:`Board ${d.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${d.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(PD,p);return d.update_overview_hierarchy?.success?{content:`Overview ${d.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${d.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case PE.Folder:return this.executeUpdateFolder(e);case PE.Board:return this.executeUpdateBoardHierarchy(e);case PE.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends ey{constructor(){super(...arguments),this.name="create_dashboard",this.type=an.WRITE,this.annotations=Zg({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 xD}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(bD,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===Ux.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends ey{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=an.READ,this.annotations=Zg({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(wD,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(a,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends ey{constructor(){super(...arguments),this.name="create_widget",this.type=an.WRITE,this.annotations=Zg({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 ED}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(_D,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget,n=i.parent?.kind===fT.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends ey{constructor(){super(...arguments),this.name="board_insights",this.type=an.READ,this.annotations=Zg({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 VD}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===sx.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:sx.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return LD.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:rx.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===sx.CountItems?[]:[{type:rx.Column,column:zD(n),as:n}]}),as:s}}var i,n;const o={type:rx.Column,column:zD(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:rx.Column,column:zD(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:ox.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit}},r=await this.mondayApi.request(CD,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends ey{constructor(){super(...arguments),this.name="search",this.type=an.READ,this.annotations=Zg({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 GD}async executeInternal(e){if(e.searchType!==TA.FOLDERS&&e.searchTerm)try{const t={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(t,null,2)}}catch(e){MN(e)}const t={[TA.BOARD]:this.searchBoardsAsync.bind(this),[TA.DOCUMENTS]:this.searchDocsAsync.bind(this),[TA.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e),i={disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:a.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const t={[TA.BOARD]:{entities:[{boards:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[TA.DOCUMENTS]:{entities:[{docs:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[TA.FOLDERS]:void 0}[e.searchType];if(!t)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const a={query:e.searchTerm,limit:e.limit,filters:t},i=(await this.mondayApi.request(MD,a,{versionOverride:"dev",timeout:BN})).search||[],n=[];for(const e of i)"BoardSearchResult"===e.__typename?n.push({id:EA.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"DocSearchResult"===e.__typename&&n.push({id:EA.DOCUMENT+e.data.id,title:e.data.name});return{items:n,wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&qN(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(qD,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:EA.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(BD,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:EA.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(UD,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:EA.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=HD)return{items:t,wasFiltered:!1};const i=oD(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>oD(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends ey{constructor(){super(...arguments),this.name="get_user_context",this.type=an.READ,this.annotations=Zg({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(ZD,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(t||[]),relevantBoards:this.extractRelevantBoards(a),relevantPeople:this.extractRelevantPeople(a)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[tO[e]]=t[e];const n=await this.mondayApi.request(eO,i),o=[];for(const e of a){const t=aO[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends ey{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=an.WRITE,this.annotations=Zg({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 XD}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(YD,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends ey{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=an.READ,this.annotations=Zg({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return nO}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(iO,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};const o={meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}};return{content:JSON.stringify(o,null,2)}}}];var zO;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(zO||(zO={}));const VO=(e,t)=>{let a=[];t?.mode===zO.APPS?a=[...Xg]:t?.mode!==zO.API&&t?.mode||(a=[...LO,...jO]);const i=a.map((t=>((e,t)=>e.prototype instanceof ey?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof Og?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==an.ALL_API;if(t.mode===zO.API&&"only"===t.enableDynamicApiTools)return e.type===an.ALL_API;let a=!1;return t.mode===zO.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===an.ALL_API),t.readOnlyMode&&(a=a||e.type!==an.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))};class UO{constructor(){this.dynamicTools=new Map}registerTool(e,t){const a=e.enabledByDefault??!0,i=a;this.dynamicTools.set(e.name,{instance:e,mcpTool:t,enabled:i,enabledByDefault:a}),a||t.disable()}enableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled||(t.mcpTool.enable(),t.enabled=!0),!0)}disableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled&&(t.mcpTool.disable(),t.enabled=!1),!0)}isToolEnabled(e){const t=this.dynamicTools.get(e);return!!t&&t.enabled}isToolEnabledByDefault(e){const t=this.dynamicTools.get(e);return!t||t.enabledByDefault}getToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]=t.enabled})),e}getDynamicToolNames(){return Array.from(this.dynamicTools.keys())}getDetailedToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]={enabled:t.enabled,enabledByDefault:t.enabledByDefault}})),e}resetToolToDefault(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabledByDefault&&!t.enabled?(t.mcpTool.enable(),t.enabled=!0,!0):!(!t.enabledByDefault&&t.enabled)||(t.mcpTool.disable(),t.enabled=!1,!0))}getAllDynamicTools(){return this.dynamicTools}clear(){this.dynamicTools.clear()}}exports.DynamicToolManager=UO,exports.MondayAgentToolkit=class extends Yi{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new UO,this.toolInstances=[],this.managementTool=null,this.mondayApiClient=this.createApiClient(e),this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??Ag},this.registerTools(e)}createApiClient(e){return new a.ApiClient({token:e.mondayApiToken,apiVersion:e.mondayApiVersion??Ag,endpoint:e.mondayApiEndpoint,requestConfig:{...e.mondayApiRequestConfig,headers:{...e.mondayApiRequestConfig?.headers||{},"user-agent":"monday-api-mcp"}}})}registerTools(e){try{this.toolInstances=this.initializeTools(e),this.toolInstances.forEach((e=>this.registerSingleTool(e))),!0===e.toolsConfiguration?.enableToolManager&&this.registerManagementTool()}catch(e){throw new Error(`Failed to initialize Monday Agent Toolkit: ${e instanceof Error?e.message:String(e)}`)}}registerManagementTool(){const e=new rO;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return VO(t,e.toolsConfiguration)}registerSingleTool(t){const a=t.getInputSchema(),i=this.registerTool(t.name,{...t,title:t.annotations?.title,description:t.getDescription(),inputSchema:a,annotations:t.annotations},(async(i,n)=>{try{let n;if(a){const o=e.z.object(a).safeParse(i);if(!o.success)throw new Error(`Invalid arguments: ${o.error.message}`);n=await t.execute(o.data)}else n=await t.execute();return this.formatToolResult(n.content)}catch(e){return this.handleToolError(e,t.name)}}));this.dynamicToolManager.registerTool(t,i)}enableTool(e){return this.dynamicToolManager.enableTool(e)}disableTool(e){return this.dynamicToolManager.disableTool(e)}isToolEnabled(e){return this.dynamicToolManager.isToolEnabled(e)}getToolsStatus(){return this.dynamicToolManager.getToolsStatus()}getDynamicToolNames(){return this.dynamicToolManager.getDynamicToolNames()}getServer(){return this}getTools(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createToolHandler(t)})))}getToolsForMcp(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createMcpToolHandler(t)})))}createToolHandler(t){return async a=>{const i=t.getInputSchema();if(i){const n=e.z.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);return(await t.execute(n.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const i=t.getInputSchema();if(i){const n=e.z.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data);return{content:[{type:"text",text:String(o.content)}]}}{const e=await t.execute();return{content:[{type:"text",text:String(e.content)}]}}}catch(e){return{content:[{type:"text",text:`Error: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}}getSchemaForTool(a,i){const n=a.getInputSchema();if(n)return"json"===i?.schemaFormat?t.zodToJsonSchema(e.z.object(n)):n}formatToolResult(e){return{content:[{type:"text",text:e}]}}handleToolError(e,t){return{content:[{type:"text",text:`Failed to execute tool ${t}: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}};
|
|
1811
|
+
`),i=await this.mondayApi.request(a);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const t=PA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const t=PA(e.type);n+=` - ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const t=PA(e.type);n+=`- ${e.name}: ${t}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends ey{constructor(){super(...arguments),this.name="create_custom_activity",this.type=an.WRITE,this.annotations=Zg({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return PN}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(KI,t),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_notification",this.type=an.WRITE,this.annotations=Zg({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 CN}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request($N,t);return{content:`Notification successfully sent to user ${e.user_id}: "${e.text}"`}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends ey{constructor(){super(...arguments),this.name="create_timeline_item",this.type=an.WRITE,this.annotations=Zg({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return KN}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(YI,t);return{content:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends ey{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=an.READ,this.annotations=Zg({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return sA}async executeInternal(e){const t=await this.mondayApi.request(JI);if(!t.custom_activity||0===t.custom_activity.length)return{content:"No custom activities found"};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${a.length} custom activities: ${JSON.stringify(a,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="read_docs",this.type=an.READ,this.annotations=Zg({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 iD}async executeInternal(e){try{let t,a,i;switch(e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(XI,n);if((!o.docs||0===o.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request(XI,a)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const r=await this.enrichDocsWithMarkdown(o.docs,n),s=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:r.content+s}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,t,a){return e===t?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${t} documents, which suggests there may be more. Consider calling this tool again with page: ${a+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,t){const a=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t="";try{const a={docId:e.id},i=await this.mondayApi.request(ZI,a);t=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){t=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:t}}))),i=t.page||1,n=t.limit||25,o=a.length,r=o===n;return{content:`Successfully retrieved ${a.length} document${1===a.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${r?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(a,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="workspace_info",this.type=an.READ,this.annotations=Zg({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 nD}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(eS,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:t,boards:a,docs:i,folders:n}=e,o=t?.[0];if(!o)throw new Error("No workspace found");const r=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(a||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&r.has(e.board_folder_id)?r.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&r.has(e.doc_folder_id)?r.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(r.values()),root_items:{boards:s,docs:p}}}(a);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,t)=>e+t.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,t)=>e+t.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends ey{constructor(){super(...arguments),this.name="list_workspaces",this.type=an.READ,this.annotations=Zg({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 lD}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=sD(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=pD(await this.mondayApi.request(oD,n(gT.Member))),r=!dD(o)||i&&!function(e,t){return t.some((t=>sD(t.name).includes(e)))}(i,o);let s=o;if(r){s=pD(await this.mondayApi.request(oD,n(gT.All)))}if(!dD(s))return{content:"No workspaces found."};const p=i&&s?.length<=rD,d=function(e,t,a,i){if(!e||t.length<=rD)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>sD(t.name).includes(e))).slice(n,o)}(i,s,e.page,e.limit);if(!dD(d))return{content:"No workspaces found matching the search term. Try using the tool without a search term"};const l=d.length===e.limit,c=function(e){return e.map((e=>{const t=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${t}`})).join("\n")}(d);return{content:`\n${p?"IMPORTANT: Search term not applied - returning all workspaces. Perform the filtering manually.":""}\n${r?"":"Showing workspaces you are a member of. "}${c}\n${l?`PAGINATION INFO: More results available - call the tool again with page: ${e.page+1}`:""}\n `}}},class extends ey{constructor(){super(...arguments),this.name="create_doc",this.type=an.WRITE,this.annotations=Zg({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 gD}async executeInternal(e){const t=vD.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,n;if(a.type===fD.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||Ex.Public,folder_id:a.folder_id?.toString()}}},r=await this.mondayApi.request(mD,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===fD.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(cD,o),s=r.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const p=s.board?.id,d=s.board?.columns?.find((e=>e&&e.type===ON.Doc));let l=a.column_id;if(!l)if(d)l=d.id;else{const e={boardId:p.toString(),columnType:ON.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(HI,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}}},m=await this.mondayApi.request(mD,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(hD,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const o={docId:t,markdown:e.markdown},r=await this.mondayApi.request(uD,o),s=r?.add_content_to_doc_from_markdown?.success,p=r?.add_content_to_doc_from_markdown?.error;return s?{content:`✅ Document successfully created (id: ${t}, object_id: ${i}). ${n?`\n\nURL: ${n}`:""}`}:{content:`Document ${t} created, but failed to add markdown content: ${p||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ey{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=an.WRITE,this.annotations=Zg({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 wD}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(bD,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a={docId:t,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(yD,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:`Successfully added content to document ${t}. ${s} block${1===s?"":"s"} created.${o&&o.length>0?` Block IDs: ${o.join(", ")}`:""}`}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ey{constructor(){super(...arguments),this.name="update_workspace",this.type=an.WRITE,this.annotations=Zg({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return ND}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(SD,t);return{content:`Workspace ${a.update_workspace?.id} successfully updated`}}},class extends ey{constructor(){super(...arguments),this.name="update_folder",this.type=an.WRITE,this.annotations=Zg({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return DD}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(AD,n);return{content:`Folder ${o.update_folder?.id} successfully updated`}}},class extends ey{constructor(){super(...arguments),this.name="create_workspace",this.type=an.WRITE,this.annotations=Zg({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return RD}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(OD,t);return{content:`Workspace ${a.create_workspace?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="create_folder",this.type=an.WRITE,this.annotations=Zg({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return PD}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(kD,t);return{content:`Folder ${a.create_folder?.id} successfully created`}}},class extends ey{constructor(){super(...arguments),this.name="move_object",this.type=an.WRITE,this.annotations=Zg({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 FD}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},d=await this.mondayApi.request(AD,p);return{content:`Object ${d.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request($D,p);return d.update_board_hierarchy?.success?{content:`Board ${d.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${d.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},d=await this.mondayApi.request(CD,p);return d.update_overview_hierarchy?.success?{content:`Overview ${d.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${d.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case PE.Folder:return this.executeUpdateFolder(e);case PE.Board:return this.executeUpdateBoardHierarchy(e);case PE.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends ey{constructor(){super(...arguments),this.name="create_dashboard",this.type=an.WRITE,this.annotations=Zg({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 TD}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(_D,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===Ux.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends ey{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=an.READ,this.annotations=Zg({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(xD,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(a,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends ey{constructor(){super(...arguments),this.name="create_widget",this.type=an.WRITE,this.annotations=Zg({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 ID}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(ED,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget,n=i.parent?.kind===fT.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends ey{constructor(){super(...arguments),this.name="board_insights",this.type=an.READ,this.annotations=Zg({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 BD}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===sx.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:sx.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return VD.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:rx.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===sx.CountItems?[]:[{type:rx.Column,column:UD(n),as:n}]}),as:s}}var i,n;const o={type:rx.Column,column:UD(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:rx.Column,column:UD(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:ox.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit}},r=await this.mondayApi.request(jD,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:`Board insights result (${s.length} rows):\n${JSON.stringify(s,null,2)}`}:{content:"No board insights found for the given query."}}},class extends ey{constructor(){super(...arguments),this.name="search",this.type=an.READ,this.annotations=Zg({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 QD}async executeInternal(e){if(e.searchType!==SA.FOLDERS&&e.searchTerm)try{const t={results:(await this.searchWithDevEndpointAsync(e)).items};return{content:JSON.stringify(t,null,2)}}catch(e){GN(e)}const t={[SA.BOARD]:this.searchBoardsAsync.bind(this),[SA.DOCUMENTS]:this.searchDocsAsync.bind(this),[SA.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e),i={disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",results:a.items};return{content:JSON.stringify(i,null,2)}}async searchWithDevEndpointAsync(e){const t={[SA.BOARD]:{entities:[{boards:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[SA.DOCUMENTS]:{entities:[{docs:{workspace_ids:e.workspaceIds?.map((e=>e.toString()))}}]},[SA.FOLDERS]:void 0}[e.searchType];if(!t)throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`);if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const a={query:e.searchTerm,limit:e.limit,filters:t},i=(await this.mondayApi.request(GD,a,{versionOverride:"dev",timeout:MN})).search||[],n=[];for(const e of i)"BoardSearchResult"===e.__typename?n.push({id:IA.BOARD+e.data.id,title:e.data.name,url:e.data.url}):"DocSearchResult"===e.__typename&&n.push({id:IA.DOCUMENT+e.data.id,title:e.data.name});return{items:n,wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&HN(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(HD,t),i=this.searchAndVirtuallyPaginate(e,a.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 t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(MD,t),i=this.searchAndVirtuallyPaginate(e,a.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 t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(qD,t),i=this.searchAndVirtuallyPaginate(e,a.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,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=WD)return{items:t,wasFiltered:!1};const i=sD(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>sD(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends ey{constructor(){super(...arguments),this.name="get_user_context",this.type=an.READ,this.annotations=Zg({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information and their relevant items (boards, folders, workspaces, dashboards).\n \n Use this tool at the beginning of conversations to:\n - Get context about who the current user is (id, name, title)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(tO,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i={user:e,favorites:await this.fetchFavorites(t||[]),relevantBoards:this.extractRelevantBoards(a),relevantPeople:this.extractRelevantPeople(a)};return{content:JSON.stringify(i,null,2)}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[iO[e]]=t[e];const n=await this.mondayApi.request(aO,i),o=[];for(const e of a){const t=nO[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends ey{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=an.WRITE,this.annotations=Zg({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 eO}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(XD,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends ey{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=an.READ,this.annotations=Zg({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return rO}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(oO,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};const o={meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}};return{content:JSON.stringify(o,null,2)}}},class extends ey{constructor(){super(...arguments),this.name="create_view",this.type=an.WRITE,this.annotations=Zg({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return pS}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort},a=await this.mondayApi.request(sS,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}}];var UO;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(UO||(UO={}));const BO=(e,t)=>{let a=[];t?.mode===UO.APPS?a=[...Xg]:t?.mode!==UO.API&&t?.mode||(a=[...VO,...zO]);const i=a.map((t=>((e,t)=>e.prototype instanceof ey?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof Og?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==an.ALL_API;if(t.mode===UO.API&&"only"===t.enableDynamicApiTools)return e.type===an.ALL_API;let a=!1;return t.mode===UO.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===an.ALL_API),t.readOnlyMode&&(a=a||e.type!==an.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))};class qO{constructor(){this.dynamicTools=new Map}registerTool(e,t){const a=e.enabledByDefault??!0,i=a;this.dynamicTools.set(e.name,{instance:e,mcpTool:t,enabled:i,enabledByDefault:a}),a||t.disable()}enableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled||(t.mcpTool.enable(),t.enabled=!0),!0)}disableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled&&(t.mcpTool.disable(),t.enabled=!1),!0)}isToolEnabled(e){const t=this.dynamicTools.get(e);return!!t&&t.enabled}isToolEnabledByDefault(e){const t=this.dynamicTools.get(e);return!t||t.enabledByDefault}getToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]=t.enabled})),e}getDynamicToolNames(){return Array.from(this.dynamicTools.keys())}getDetailedToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]={enabled:t.enabled,enabledByDefault:t.enabledByDefault}})),e}resetToolToDefault(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabledByDefault&&!t.enabled?(t.mcpTool.enable(),t.enabled=!0,!0):!(!t.enabledByDefault&&t.enabled)||(t.mcpTool.disable(),t.enabled=!1,!0))}getAllDynamicTools(){return this.dynamicTools}clear(){this.dynamicTools.clear()}}exports.DynamicToolManager=qO,exports.MondayAgentToolkit=class extends Yi{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new qO,this.toolInstances=[],this.managementTool=null,this.mondayApiClient=this.createApiClient(e),this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??Ag},this.registerTools(e)}createApiClient(e){return new a.ApiClient({token:e.mondayApiToken,apiVersion:e.mondayApiVersion??Ag,endpoint:e.mondayApiEndpoint,requestConfig:{...e.mondayApiRequestConfig,headers:{...e.mondayApiRequestConfig?.headers||{},"user-agent":"monday-api-mcp"}}})}registerTools(e){try{this.toolInstances=this.initializeTools(e),this.toolInstances.forEach((e=>this.registerSingleTool(e))),!0===e.toolsConfiguration?.enableToolManager&&this.registerManagementTool()}catch(e){throw new Error(`Failed to initialize Monday Agent Toolkit: ${e instanceof Error?e.message:String(e)}`)}}registerManagementTool(){const e=new pO;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return BO(t,e.toolsConfiguration)}registerSingleTool(t){const a=t.getInputSchema(),i=this.registerTool(t.name,{...t,title:t.annotations?.title,description:t.getDescription(),inputSchema:a,annotations:t.annotations},(async(i,n)=>{try{let n;if(a){const o=e.z.object(a).safeParse(i);if(!o.success)throw new Error(`Invalid arguments: ${o.error.message}`);n=await t.execute(o.data)}else n=await t.execute();return this.formatToolResult(n.content)}catch(e){return this.handleToolError(e,t.name)}}));this.dynamicToolManager.registerTool(t,i)}enableTool(e){return this.dynamicToolManager.enableTool(e)}disableTool(e){return this.dynamicToolManager.disableTool(e)}isToolEnabled(e){return this.dynamicToolManager.isToolEnabled(e)}getToolsStatus(){return this.dynamicToolManager.getToolsStatus()}getDynamicToolNames(){return this.dynamicToolManager.getDynamicToolNames()}getServer(){return this}getTools(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createToolHandler(t)})))}getToolsForMcp(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createMcpToolHandler(t)})))}createToolHandler(t){return async a=>{const i=t.getInputSchema();if(i){const n=e.z.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);return(await t.execute(n.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const i=t.getInputSchema();if(i){const n=e.z.object(i).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data);return{content:[{type:"text",text:String(o.content)}]}}{const e=await t.execute();return{content:[{type:"text",text:String(e.content)}]}}}catch(e){return{content:[{type:"text",text:`Error: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}}getSchemaForTool(a,i){const n=a.getInputSchema();if(n)return"json"===i?.schemaFormat?t.zodToJsonSchema(e.z.object(n)):n}formatToolResult(e){return{content:[{type:"text",text:e}]}}handleToolError(e,t){return{content:[{type:"text",text:`Failed to execute tool ${t}: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}};
|
|
1788
1812
|
//# sourceMappingURL=index.js.map
|