@mondaydotcomorg/agent-toolkit 2.19.0 → 2.19.1

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.
@@ -12,30 +12,19 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
12
12
  }
13
13
  }
14
14
  `,cw=dw`
15
- query GetBoardItemsByName($boardId: ID!, $term: CompareValue!) {
16
- boards(ids: [$boardId]) {
17
- items_page(query_params: { rules: [{ column_id: "name", operator: contains_text, compare_value: $term }] }) {
18
- items {
19
- id
20
- name
21
- }
22
- }
23
- }
24
- }
25
- `,mw=dw`
26
15
  mutation createItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {
27
16
  create_item(board_id: $boardId, item_name: $itemName, group_id: $groupId, column_values: $columnValues) {
28
17
  id
29
18
  name
30
19
  }
31
20
  }
32
- `,uw=dw`
21
+ `,mw=dw`
33
22
  mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention]) {
34
23
  create_update(item_id: $itemId, body: $body, mentions_list: $mentionsList) {
35
24
  id
36
25
  }
37
26
  }
38
- `,fw=dw`
27
+ `,uw=dw`
39
28
  query getBoardSchema($boardId: ID!) {
40
29
  boards(ids: [$boardId]) {
41
30
  groups {
@@ -49,7 +38,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
49
38
  }
50
39
  }
51
40
  }
52
- `,hw=dw`
41
+ `,fw=dw`
53
42
  query getUsersByName($name: String) {
54
43
  users(name: $name) {
55
44
  id
@@ -57,19 +46,19 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
57
46
  title
58
47
  }
59
48
  }
60
- `,vw=dw`
49
+ `,hw=dw`
61
50
  mutation changeItemColumnValues($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {
62
51
  change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {
63
52
  id
64
53
  }
65
54
  }
66
- `,gw=dw`
55
+ `,vw=dw`
67
56
  mutation moveItemToGroup($itemId: ID!, $groupId: String!) {
68
57
  move_item_to_group(item_id: $itemId, group_id: $groupId) {
69
58
  id
70
59
  }
71
60
  }
72
- `,bw=dw`
61
+ `,gw=dw`
73
62
  mutation createBoard($boardKind: BoardKind!, $boardName: String!, $boardDescription: String, $workspaceId: ID) {
74
63
  create_board(
75
64
  board_kind: $boardKind
@@ -81,7 +70,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
81
70
  id
82
71
  }
83
72
  }
84
- `,yw=dw`
73
+ `,bw=dw`
85
74
  mutation createColumn(
86
75
  $boardId: ID!
87
76
  $columnType: ColumnType!
@@ -99,13 +88,13 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
99
88
  id
100
89
  }
101
90
  }
102
- `,ww=dw`
91
+ `,yw=dw`
103
92
  mutation deleteColumn($boardId: ID!, $columnId: String!) {
104
93
  delete_column(board_id: $boardId, column_id: $columnId) {
105
94
  id
106
95
  }
107
96
  }
108
- `,xw=dw`
97
+ `,ww=dw`
109
98
  query getGraphQLSchema {
110
99
  __schema {
111
100
  queryType {
@@ -158,7 +147,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
158
147
  }
159
148
  }
160
149
  }
161
- `,_w=dw`
150
+ `,xw=dw`
162
151
  query IntrospectionQuery {
163
152
  __schema {
164
153
  queryType {
@@ -260,7 +249,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
260
249
  }
261
250
  }
262
251
  }
263
- `,Tw=dw`
252
+ `,_w=dw`
264
253
  mutation createCustomActivity($color: CustomActivityColor!, $icon_id: CustomActivityIcon!, $name: String!) {
265
254
  create_custom_activity(color: $color, icon_id: $icon_id, name: $name) {
266
255
  color
@@ -268,7 +257,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
268
257
  name
269
258
  }
270
259
  }
271
- `,Ew=dw`
260
+ `,Tw=dw`
272
261
  mutation createTimelineItem(
273
262
  $item_id: ID!
274
263
  $custom_activity_id: String!
@@ -301,7 +290,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
301
290
  type
302
291
  }
303
292
  }
304
- `,Iw=dw`
293
+ `,Ew=dw`
305
294
  query fetchCustomActivity {
306
295
  custom_activity {
307
296
  color
@@ -311,7 +300,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
311
300
  type
312
301
  }
313
302
  }
314
- `,Nw=dw`
303
+ `,Iw=dw`
315
304
  query getItemBoard($itemId: ID!) {
316
305
  items(ids: [$itemId]) {
317
306
  id
@@ -324,7 +313,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
324
313
  }
325
314
  }
326
315
  }
327
- `,Sw=dw`
316
+ `,Nw=dw`
328
317
  mutation createDoc($location: CreateDocInput!) {
329
318
  create_doc(location: $location) {
330
319
  id
@@ -332,7 +321,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
332
321
  name
333
322
  }
334
323
  }
335
- `,Aw=dw`
324
+ `,Sw=dw`
336
325
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
337
326
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
338
327
  success
@@ -340,11 +329,11 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
340
329
  error
341
330
  }
342
331
  }
343
- `,Dw=dw`
332
+ `,Aw=dw`
344
333
  mutation updateDocName($docId: ID!, $name: String!) {
345
334
  update_doc_name(docId: $docId, name: $name)
346
335
  }
347
- `,Ow=dw`
336
+ `,Dw=dw`
348
337
  query readDocs(
349
338
  $ids: [ID!]
350
339
  $object_ids: [ID!]
@@ -381,7 +370,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
381
370
  doc_folder_id
382
371
  }
383
372
  }
384
- `,kw=dw`
373
+ `,Ow=dw`
385
374
  query exportMarkdownFromDoc($docId: ID!, $blockIds: [String!]) {
386
375
  export_markdown_from_doc(docId: $docId, blockIds: $blockIds) {
387
376
  success
@@ -389,7 +378,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
389
378
  error
390
379
  }
391
380
  }
392
- `,Rw=dw`
381
+ `,kw=dw`
393
382
  query getWorkspaceInfo($workspace_id: ID!) {
394
383
  workspaces(ids: [$workspace_id]) {
395
384
  id
@@ -420,7 +409,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
420
409
  name
421
410
  }
422
411
  }
423
- `,Cw={query:a.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:a.string().describe("JSON string containing the variables for the GraphQL operation")};class $w extends Fm{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=y.ALL_API,this.annotations=Lm({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 Cw}async loadSchema(e){if($w.schemaCache[e])return $w.schemaCache[e];try{const a=await this.mondayApi.rawRequest(_w),{data:t}=a,i=Uv(t);return $w.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,a){var t;return Pv(await this.loadSchema(a),new Ru(e,t).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:a,variables:t}=e;try{let e={};try{e=JSON.parse(t)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=this.mondayApi.apiVersion,n=await this.validateOperation(a,i);if(n.length>0)return{content:n.join(", ")};const o=await this.mondayApi.request(a,e);return{content:JSON.stringify(o)}}catch(e){const a=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const a=e;if(a.response?.errors)return{content:a.response.errors.map((e=>e.message)).join(", ")}}return{content:a}}}}$w.schemaCache={};const Lw={itemId:a.number().describe("The ID of the item to be updated"),columnValues:a.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\\"}"')},Fw={boardId:a.number().describe("The ID of the board that contains the item to be updated"),...Lw};class jw extends Fm{constructor(){super(...arguments),this.name="change_item_column_values",this.type=y.WRITE,this.annotations=Lm({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?Lw:Fw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(vw,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}}const Vw={boardName:a.string().describe("The name of the board to create"),boardKind:a.nativeEnum(og).default(og.Public).describe("The kind of board to create"),boardDescription:a.string().optional().describe("The description of the board to create"),workspaceId:a.string().optional().describe("The ID of the workspace to create the board in")};const Pw=dw`
412
+ `,Rw={query:a.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:a.string().describe("JSON string containing the variables for the GraphQL operation")};class Cw extends Fm{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=y.ALL_API,this.annotations=Lm({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 Rw}async loadSchema(e){if(Cw.schemaCache[e])return Cw.schemaCache[e];try{const a=await this.mondayApi.rawRequest(xw),{data:t}=a,i=Uv(t);return Cw.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,a){var t;return Pv(await this.loadSchema(a),new Ru(e,t).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:a,variables:t}=e;try{let e={};try{e=JSON.parse(t)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=this.mondayApi.apiVersion,n=await this.validateOperation(a,i);if(n.length>0)return{content:n.join(", ")};const o=await this.mondayApi.request(a,e);return{content:JSON.stringify(o)}}catch(e){const a=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const a=e;if(a.response?.errors)return{content:a.response.errors.map((e=>e.message)).join(", ")}}return{content:a}}}}Cw.schemaCache={};const $w={itemId:a.number().describe("The ID of the item to be updated"),columnValues:a.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\\"}"')},Lw={boardId:a.number().describe("The ID of the board that contains the item to be updated"),...$w};class Fw extends Fm{constructor(){super(...arguments),this.name="change_item_column_values",this.type=y.WRITE,this.annotations=Lm({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?$w:Lw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(hw,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}}const jw={boardName:a.string().describe("The name of the board to create"),boardKind:a.nativeEnum(og).default(og.Public).describe("The kind of board to create"),boardDescription:a.string().optional().describe("The description of the board to create"),workspaceId:a.string().optional().describe("The ID of the workspace to create the board in")};const Vw=dw`
424
413
  fragment QuestionBasic on FormQuestion {
425
414
  id
426
415
  type
@@ -429,13 +418,13 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
429
418
  visible
430
419
  required
431
420
  }
432
- `,Uw=dw`
421
+ `,Pw=dw`
433
422
  fragment QuestionOptions on FormQuestion {
434
423
  options {
435
424
  label
436
425
  }
437
426
  }
438
- `,Bw=dw`
427
+ `,Uw=dw`
439
428
  fragment QuestionSettings on FormQuestion {
440
429
  settings {
441
430
  prefill {
@@ -458,17 +447,17 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
458
447
  skipValidation
459
448
  }
460
449
  }
461
- `,Mw=dw`
450
+ `,Bw=dw`
462
451
  fragment QuestionComplete on FormQuestion {
463
452
  ...QuestionBasic
464
453
  ...QuestionOptions
465
454
  ...QuestionSettings
466
455
  showIfRules
467
456
  }
457
+ ${Vw}
468
458
  ${Pw}
469
459
  ${Uw}
470
- ${Bw}
471
- `,qw=dw`
460
+ `,Mw=dw`
472
461
  fragment FormFeatures on FormFeatures {
473
462
  isInternal
474
463
  reCaptchaChallenge
@@ -521,7 +510,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
521
510
  syncQuestionAndColumnsTitles
522
511
  }
523
512
  }
524
- `,Gw=dw`
513
+ `,qw=dw`
525
514
  fragment FormAppearance on FormAppearance {
526
515
  hideBranding
527
516
  showProgressBar
@@ -549,19 +538,19 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
549
538
  text
550
539
  }
551
540
  }
552
- `,Hw=dw`
541
+ `,Gw=dw`
553
542
  fragment FormAccessibility on FormAccessibility {
554
543
  language
555
544
  logoAltText
556
545
  }
557
- `,zw=dw`
546
+ `,Hw=dw`
558
547
  fragment FormTag on FormTag {
559
548
  id
560
549
  name
561
550
  value
562
551
  columnId
563
552
  }
564
- `,Ww=dw`
553
+ `,zw=dw`
565
554
  mutation createForm(
566
555
  $destination_workspace_id: ID!
567
556
  $destination_folder_id: ID
@@ -588,7 +577,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
588
577
  token
589
578
  }
590
579
  }
591
- `,Yw=dw`
580
+ `,Ww=dw`
592
581
  query getForm($formToken: String!) {
593
582
  form(formToken: $formToken) {
594
583
  id
@@ -617,16 +606,16 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
617
606
  }
618
607
  }
619
608
  }
609
+ ${Bw}
620
610
  ${Mw}
621
611
  ${qw}
622
612
  ${Gw}
623
613
  ${Hw}
624
- ${zw}
625
- `,Kw=dw`
614
+ `,Yw=dw`
626
615
  mutation deleteFormQuestion($formToken: String!, $questionId: String!) {
627
616
  delete_question(formToken: $formToken, questionId: $questionId)
628
617
  }
629
- `,Jw=dw`
618
+ `,Kw=dw`
630
619
  mutation createFormQuestion($formToken: String!, $question: CreateQuestionInput!) {
631
620
  create_form_question(formToken: $formToken, question: $question) {
632
621
  ...QuestionBasic
@@ -634,10 +623,10 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
634
623
  ...QuestionSettings
635
624
  }
636
625
  }
626
+ ${Vw}
637
627
  ${Pw}
638
628
  ${Uw}
639
- ${Bw}
640
- `,Qw=dw`
629
+ `,Jw=dw`
641
630
  mutation updateFormQuestion($formToken: String!, $questionId: String!, $question: UpdateQuestionInput!) {
642
631
  update_form_question(formToken: $formToken, questionId: $questionId, question: $question) {
643
632
  ...QuestionBasic
@@ -645,9 +634,9 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
645
634
  ...QuestionSettings
646
635
  }
647
636
  }
637
+ ${Vw}
648
638
  ${Pw}
649
639
  ${Uw}
650
- ${Bw}
651
640
  `;dw`
652
641
  mutation updateForm($formToken: String!, $input: UpdateFormInput!) {
653
642
  update_form(formToken: $formToken, input: $input) {
@@ -672,46 +661,46 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
672
661
  }
673
662
  }
674
663
  }
664
+ ${Mw}
675
665
  ${qw}
676
666
  ${Gw}
677
- ${Hw}
678
- `;const Xw=dw`
667
+ `;const Qw=dw`
679
668
  mutation setFormPassword($formToken: String!, $input: SetFormPasswordInput!) {
680
669
  set_form_password(formToken: $formToken, input: $input) {
681
670
  id
682
671
  }
683
672
  }
684
- `,Zw=dw`
673
+ `,Xw=dw`
685
674
  mutation shortenFormUrl($formToken: String!) {
686
675
  shorten_form_url(formToken: $formToken) {
687
676
  enabled
688
677
  url
689
678
  }
690
679
  }
691
- `,ex=dw`
680
+ `,Zw=dw`
692
681
  mutation deactivateForm($formToken: String!) {
693
682
  deactivate_form(formToken: $formToken)
694
683
  }
695
- `,ax=dw`
684
+ `,ex=dw`
696
685
  mutation activateForm($formToken: String!) {
697
686
  activate_form(formToken: $formToken)
698
687
  }
699
- `,tx=dw`
688
+ `,ax=dw`
700
689
  mutation deleteFormTag($formToken: String!, $tagId: String!) {
701
690
  delete_form_tag(formToken: $formToken, tagId: $tagId)
702
691
  }
703
- `,ix=dw`
692
+ `,tx=dw`
704
693
  mutation createFormTag($formToken: String!, $tag: CreateFormTagInput!) {
705
694
  create_form_tag(formToken: $formToken, tag: $tag) {
706
695
  ...FormTag
707
696
  }
708
697
  }
709
- ${zw}
710
- `,nx=dw`
698
+ ${Hw}
699
+ `,ix=dw`
711
700
  mutation updateFormTag($formToken: String!, $tagId: String!, $tag: UpdateFormTagInput!) {
712
701
  update_form_tag(formToken: $formToken, tagId: $tagId, tag: $tag)
713
702
  }
714
- `,ox=dw`
703
+ `,nx=dw`
715
704
  mutation updateFormAppearance($formToken: String!, $appearance: FormAppearanceInput!) {
716
705
  update_form_settings(formToken: $formToken, settings: { appearance: $appearance }) {
717
706
  appearance {
@@ -719,8 +708,8 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
719
708
  }
720
709
  }
721
710
  }
722
- ${Gw}
723
- `,sx=dw`
711
+ ${qw}
712
+ `,ox=dw`
724
713
  mutation updateFormAccessibility($formToken: String!, $accessibility: FormAccessibilityInput!) {
725
714
  update_form_settings(formToken: $formToken, settings: { accessibility: $accessibility }) {
726
715
  accessibility {
@@ -728,8 +717,8 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
728
717
  }
729
718
  }
730
719
  }
731
- ${Hw}
732
- `,rx=dw`
720
+ ${Gw}
721
+ `,sx=dw`
733
722
  mutation updateFormFeatures($formToken: String!, $features: FormFeaturesInput!) {
734
723
  update_form_settings(formToken: $formToken, settings: { features: $features }) {
735
724
  features {
@@ -737,8 +726,8 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
737
726
  }
738
727
  }
739
728
  }
740
- ${qw}
741
- `,px=dw`
729
+ ${Mw}
730
+ `,rx=dw`
742
731
  mutation updateFormQuestionOrder($formToken: String!, $questions: [QuestionOrderInput!]!) {
743
732
  update_form(formToken: $formToken, input: { questions: $questions }) {
744
733
  questions {
@@ -746,14 +735,14 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
746
735
  }
747
736
  }
748
737
  }
749
- `,dx=dw`
738
+ `,px=dw`
750
739
  mutation updateFormHeader($formToken: String!, $title: String, $description: String) {
751
740
  update_form(formToken: $formToken, input: { title: $title, description: $description }) {
752
741
  title
753
742
  description
754
743
  }
755
744
  }
756
- `,lx={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."},cx={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."}},mx={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."}},ux={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."}},fx={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"}},hx={destination_workspace_id:a.string().describe(cx.args.destinationWorkspaceId),destination_folder_id:a.string().optional().describe(cx.args.destinationFolderId),destination_folder_name:a.string().optional().describe(cx.args.destinationFolderName),board_kind:a.nativeEnum(og).optional().describe(cx.args.boardKind),destination_name:a.string().optional().describe(cx.args.destinationName),board_owner_ids:a.array(a.string()).optional().describe(cx.args.boardOwnerIds),board_owner_team_ids:a.array(a.string()).optional().describe(cx.args.boardOwnerTeamIds),board_subscriber_ids:a.array(a.string()).optional().describe(cx.args.boardSubscriberIds),board_subscriber_teams_ids:a.array(a.string()).optional().describe(cx.args.boardSubscriberTeamsIds)};var vx,gx,bx,yx,wx,xx,_x,Tx,Ex,Ix,Nx,Sx,Ax,Dx,Ox,kx;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(vx||(vx={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(gx||(gx={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(bx||(bx={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(yx||(yx={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(wx||(wx={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(xx||(xx={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(_x||(_x={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Tx||(Tx={})),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"}(Ex||(Ex={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ix||(Ix={})),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"}(Nx||(Nx={})),function(e){e.And="AND",e.Or="OR"}(Sx||(Sx={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Ax||(Ax={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Dx||(Dx={})),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"}(Ox||(Ox={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(kx||(kx={}));const Rx=a.object({type:a.nativeEnum(Yg).describe(ux.properties.type),title:a.string().describe(ux.properties.title).optional(),description:a.string().describe(ux.properties.description).optional(),visible:a.boolean().describe(ux.properties.visible).optional(),required:a.boolean().describe(ux.properties.required).optional(),options:a.array(a.object({label:a.string().describe(ux.properties.selectOptionsLabel)})).describe(ux.properties.selectOptions).optional(),settings:a.object({checkedByDefault:a.boolean().describe(fx.properties.checkedByDefault).optional(),defaultCurrentDate:a.boolean().describe(fx.properties.defaultCurrentDate).optional(),display:a.nativeEnum(zg).describe(fx.properties.display).optional(),includeTime:a.boolean().describe(fx.properties.includeTime).optional(),locationAutofilled:a.boolean().describe(fx.properties.locationAutofilled).optional(),optionsOrder:a.nativeEnum(Wg).describe(fx.properties.optionsOrder).optional(),prefixAutofilled:a.boolean().describe(fx.properties.prefixAutofilled).optional(),prefixPredefined:a.object({enabled:a.boolean().describe(fx.properties.prefixPredefinedEnabled),prefix:a.string().describe(fx.properties.prefixPredefinedPrefix).optional()}).describe(fx.properties.prefixPredefined).optional(),skipValidation:a.boolean().describe(fx.properties.skipValidation).optional(),prefill:a.object({enabled:a.boolean().describe(fx.properties.prefillEnabled),lookup:a.string().describe(fx.properties.prefillLookup).optional(),source:a.nativeEnum(Hg).describe(fx.properties.prefillSource).optional()}).describe(fx.properties.prefill).optional()}).optional()}),Cx={action:a.nativeEnum(kx).describe(ux.actions.type),formToken:a.string().describe(lx.formToken),questionId:a.string().describe(lx.questionId).optional(),question:Rx.describe(ux.actions.question).optional()};class $x{constructor(e){this.mondayApi=e}async deleteQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when deleting a question."};const t={formToken:e.formToken,questionId:a};return await this.mondayApi.request(Kw,t),{content:`Form question with id ${a} deleted successfully.`}}async updateQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when updating a question."};const t=e.question;if(!t)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:a,question:t};return await this.mondayApi.request(Qw,i),{content:`Form question with id ${a} updated successfully.`}}async createQuestion(e){const a=e.question;if(!a)return{content:"Must provide a full question payload when creating a question."};if(!a.title)return{content:"Must provide a title for the question when creating a question."};const t={formToken:e.formToken,question:{...a,title:a.title}},i=await this.mondayApi.request(Jw,t);return{content:`Form question created successfully. ID: ${i.create_form_question?.id}`}}}var Lx;!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"}(Lx||(Lx={}));const Fx=a.object({id:a.string().describe(cx.properties.tags.id).optional(),name:a.string().describe(cx.properties.tags.name).optional(),value:a.string().describe(cx.properties.tags.value).optional(),columnId:a.string().describe(cx.properties.tags.columnId).optional()}),jx=a.object({type:a.nativeEnum(yx).describe(mx.properties.backgroundType).optional(),value:a.string().describe(mx.properties.backgroundValue).optional()}),Vx=a.object({format:a.nativeEnum(xx).describe(mx.properties.format).optional(),alignment:a.nativeEnum(_x).describe(mx.properties.alignment).optional(),direction:a.nativeEnum(wx).describe(mx.properties.direction).optional()}),Px=a.object({position:a.nativeEnum(bx).describe(mx.properties.logoPosition).optional(),size:a.nativeEnum(gx).describe(mx.properties.logoSize).optional()}),Ux=a.object({text:a.string().describe(mx.properties.submitButtonText).optional()}),Bx=a.object({font:a.string().describe(mx.properties.font).optional(),color:a.string().describe(mx.properties.textColor).optional(),size:a.nativeEnum(Tx).describe(mx.properties.fontSize).optional()}),Mx=a.object({enabled:a.boolean().describe(mx.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:a.string().describe(mx.properties.redirectUrl).optional()}),qx=a.object({allowEditSubmission:a.boolean().describe(mx.properties.allowEditSubmission).optional(),allowResubmit:a.boolean().describe(mx.properties.allowResubmit).optional(),allowViewSubmission:a.boolean().describe(mx.properties.allowViewSubmission).optional(),description:a.string().describe(mx.properties.postSubmissionDescription).optional(),redirectAfterSubmission:Mx.describe(mx.properties.redirectAfterSubmission).optional(),showSuccessImage:a.boolean().describe(mx.properties.showSuccessImage).optional(),title:a.string().describe(mx.properties.postSubmissionTitle).optional()}),Gx=a.object({enabled:a.boolean().describe(mx.properties.closeDateEnabled).optional(),date:a.string().describe(mx.properties.closeDateValue).optional()}),Hx=a.object({enabled:a.boolean().describe(mx.properties.draftSubmissionEnabled).optional()}),zx=a.object({itemGroupId:a.string().describe(mx.properties.itemGroupId).optional(),includeNameQuestion:a.boolean().describe(mx.properties.includeNameQuestion).optional(),includeUpdateQuestion:a.boolean().describe(mx.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:a.boolean().describe(mx.properties.syncQuestionAndColumnsTitles).optional()}),Wx=a.object({enabled:a.boolean().describe(mx.properties.passwordEnabled).optional()}),Yx=a.object({text:a.string().describe(mx.properties.startButtonText).optional()}),Kx=a.object({enabled:a.boolean().describe(mx.properties.preSubmissionEnabled).optional(),title:a.string().describe(mx.properties.preSubmissionTitle).optional(),description:a.string().describe(mx.properties.preSubmissionDescription).optional(),startButton:Yx.describe(mx.properties.startButton).optional()}),Jx=a.object({enabled:a.boolean().describe(mx.properties.requireLoginEnabled).optional(),redirectToLogin:a.boolean().describe(mx.properties.redirectToLogin).optional()}),Qx=a.object({enabled:a.boolean().describe(mx.properties.responseLimitEnabled).optional(),limit:a.number().describe(mx.properties.responseLimitValue).optional()}),Xx=a.object({background:jx.describe(mx.properties.background).optional(),hideBranding:a.boolean().describe(mx.properties.hideBranding).optional(),layout:Vx.describe(mx.properties.layout).optional(),logo:Px.describe(mx.properties.logo).optional(),primaryColor:a.string().describe(mx.properties.primaryColor).optional(),showProgressBar:a.boolean().describe(mx.properties.showProgressBar).optional(),submitButton:Ux.describe(mx.properties.submitButton).optional(),text:Bx.describe(mx.properties.text).optional()}),Zx=a.object({language:a.string().describe(mx.properties.language).optional(),logoAltText:a.string().describe(mx.properties.logoAltText).optional()}),e_=a.object({afterSubmissionView:qx.describe(mx.properties.afterSubmissionView).optional(),closeDate:Gx.describe(mx.properties.closeDate).optional(),draftSubmission:Hx.describe(mx.properties.draftSubmission).optional(),monday:zx.describe(mx.properties.monday).optional(),password:Wx.describe(mx.properties.password).optional(),preSubmissionView:Kx.describe(mx.properties.preSubmissionView).optional(),reCaptchaChallenge:a.boolean().describe(mx.properties.reCaptchaChallenge).optional(),requireLogin:Jx.describe(mx.properties.requireLogin).optional(),responseLimit:Qx.describe(mx.properties.responseLimit).optional()}),a_=a.object({id:a.string().describe(cx.inputs.questionId)}),t_=a.object({appearance:Xx.describe(cx.inputs.form.appearance).optional(),accessibility:Zx.describe(cx.inputs.form.accessibility).optional(),features:e_.describe(cx.inputs.form.features).optional(),title:a.string().describe(cx.inputs.title).optional(),description:a.string().describe(cx.inputs.description).optional(),questions:a.array(a_).describe(cx.inputs.questions).optional()}),i_={formToken:a.string().describe(lx.formToken),action:a.nativeEnum(Lx).describe(cx.operations.updateForm.action),formPassword:a.string().describe(mx.operations.setFormPassword).optional(),tag:Fx.describe(cx.inputs.tag).optional(),form:t_.describe(cx.inputs.form.describe).optional()};class n_{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const a={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(Xw,a),{content:"Form password successfully set."}}async shortenFormUrl(e){const a={formToken:e.formToken};return await this.mondayApi.request(Zw,a),{content:"Form URL successfully shortened."}}async deactivateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(ex,a),{content:"Form successfully deactivated."}}async activateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(ax,a),{content:"Form successfully activated."}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const a={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},t=await this.mondayApi.request(ix,a);return{content:`Tag successfully added: ${JSON.stringify(t.create_form_tag,null,2)}`}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(tx,a),{content:`Tag with id: ${e.tag.id} successfully deleted.`}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(nx,a)).update_form_tag?{content:`Tag with id: ${e.tag.id} successfully updated to value: ${e.tag.value}.`}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const a={formToken:e.formToken,appearance:e.form.appearance},t=await this.mondayApi.request(ox,a);return{content:`Appearance successfully updated: ${JSON.stringify(t.update_form_settings?.appearance,null,2)}`}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const a={formToken:e.formToken,accessibility:e.form.accessibility},t=await this.mondayApi.request(sx,a);return{content:`Accessibility successfully updated: ${JSON.stringify(t.update_form_settings?.accessibility,null,2)}`}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const a={formToken:e.formToken,features:e.form.features},t=await this.mondayApi.request(rx,a);return{content:`Features successfully updated: ${JSON.stringify(t.update_form_settings?.features,null,2)}`}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const a={formToken:e.formToken,questions:e.form.questions},t=await this.mondayApi.request(px,a);return{content:`Question order successfully updated: ${JSON.stringify(t.update_form?.questions,null,2)}`}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const a={formToken:e.formToken,title:e.form.title,description:e.form.description},t=await this.mondayApi.request(dx,a);return{content:`Form header content successfully updated: ${JSON.stringify(t.update_form,null,2)}`}}}const o_={formToken:a.string().describe(lx.formToken)};const s_={columnType:a.nativeEnum(gg).describe("The type of the column to be created"),columnTitle:a.string().describe("The title of the column to be created"),columnDescription:a.string().optional().describe("The description of the column to be created"),columnSettings:a.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.")},r_={boardId:a.number().describe("The id of the board to which the new column will be added"),...s_};const p_={color:a.nativeEnum(bg).describe("The color of the custom activity"),icon_id:a.nativeEnum(yg).describe("The icon ID of the custom activity"),name:a.string().describe("The name of the custom activity")};const d_=dw`
745
+ `,dx={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."},lx={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."}},cx={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."}},mx={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."}},ux={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"}},fx={destination_workspace_id:a.string().describe(lx.args.destinationWorkspaceId),destination_folder_id:a.string().optional().describe(lx.args.destinationFolderId),destination_folder_name:a.string().optional().describe(lx.args.destinationFolderName),board_kind:a.nativeEnum(og).optional().describe(lx.args.boardKind),destination_name:a.string().optional().describe(lx.args.destinationName),board_owner_ids:a.array(a.string()).optional().describe(lx.args.boardOwnerIds),board_owner_team_ids:a.array(a.string()).optional().describe(lx.args.boardOwnerTeamIds),board_subscriber_ids:a.array(a.string()).optional().describe(lx.args.boardSubscriberIds),board_subscriber_teams_ids:a.array(a.string()).optional().describe(lx.args.boardSubscriberTeamsIds)};var hx,vx,gx,bx,yx,wx,xx,_x,Tx,Ex,Ix,Nx,Sx,Ax,Dx,Ox;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(hx||(hx={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(vx||(vx={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(gx||(gx={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(bx||(bx={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(yx||(yx={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(wx||(wx={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(xx||(xx={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(_x||(_x={})),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"}(Tx||(Tx={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ex||(Ex={})),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"}(Ix||(Ix={})),function(e){e.And="AND",e.Or="OR"}(Nx||(Nx={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Sx||(Sx={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Ax||(Ax={})),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"}(Dx||(Dx={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(Ox||(Ox={}));const kx=a.object({type:a.nativeEnum(Yg).describe(mx.properties.type),title:a.string().describe(mx.properties.title).optional(),description:a.string().describe(mx.properties.description).optional(),visible:a.boolean().describe(mx.properties.visible).optional(),required:a.boolean().describe(mx.properties.required).optional(),options:a.array(a.object({label:a.string().describe(mx.properties.selectOptionsLabel)})).describe(mx.properties.selectOptions).optional(),settings:a.object({checkedByDefault:a.boolean().describe(ux.properties.checkedByDefault).optional(),defaultCurrentDate:a.boolean().describe(ux.properties.defaultCurrentDate).optional(),display:a.nativeEnum(zg).describe(ux.properties.display).optional(),includeTime:a.boolean().describe(ux.properties.includeTime).optional(),locationAutofilled:a.boolean().describe(ux.properties.locationAutofilled).optional(),optionsOrder:a.nativeEnum(Wg).describe(ux.properties.optionsOrder).optional(),prefixAutofilled:a.boolean().describe(ux.properties.prefixAutofilled).optional(),prefixPredefined:a.object({enabled:a.boolean().describe(ux.properties.prefixPredefinedEnabled),prefix:a.string().describe(ux.properties.prefixPredefinedPrefix).optional()}).describe(ux.properties.prefixPredefined).optional(),skipValidation:a.boolean().describe(ux.properties.skipValidation).optional(),prefill:a.object({enabled:a.boolean().describe(ux.properties.prefillEnabled),lookup:a.string().describe(ux.properties.prefillLookup).optional(),source:a.nativeEnum(Hg).describe(ux.properties.prefillSource).optional()}).describe(ux.properties.prefill).optional()}).optional()}),Rx={action:a.nativeEnum(Ox).describe(mx.actions.type),formToken:a.string().describe(dx.formToken),questionId:a.string().describe(dx.questionId).optional(),question:kx.describe(mx.actions.question).optional()};class Cx{constructor(e){this.mondayApi=e}async deleteQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when deleting a question."};const t={formToken:e.formToken,questionId:a};return await this.mondayApi.request(Yw,t),{content:`Form question with id ${a} deleted successfully.`}}async updateQuestion(e){const a=e.questionId;if(!a)return{content:"Question ID is required when updating a question."};const t=e.question;if(!t)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:a,question:t};return await this.mondayApi.request(Jw,i),{content:`Form question with id ${a} updated successfully.`}}async createQuestion(e){const a=e.question;if(!a)return{content:"Must provide a full question payload when creating a question."};if(!a.title)return{content:"Must provide a title for the question when creating a question."};const t={formToken:e.formToken,question:{...a,title:a.title}},i=await this.mondayApi.request(Kw,t);return{content:`Form question created successfully. ID: ${i.create_form_question?.id}`}}}var $x;!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"}($x||($x={}));const Lx=a.object({id:a.string().describe(lx.properties.tags.id).optional(),name:a.string().describe(lx.properties.tags.name).optional(),value:a.string().describe(lx.properties.tags.value).optional(),columnId:a.string().describe(lx.properties.tags.columnId).optional()}),Fx=a.object({type:a.nativeEnum(bx).describe(cx.properties.backgroundType).optional(),value:a.string().describe(cx.properties.backgroundValue).optional()}),jx=a.object({format:a.nativeEnum(wx).describe(cx.properties.format).optional(),alignment:a.nativeEnum(xx).describe(cx.properties.alignment).optional(),direction:a.nativeEnum(yx).describe(cx.properties.direction).optional()}),Vx=a.object({position:a.nativeEnum(gx).describe(cx.properties.logoPosition).optional(),size:a.nativeEnum(vx).describe(cx.properties.logoSize).optional()}),Px=a.object({text:a.string().describe(cx.properties.submitButtonText).optional()}),Ux=a.object({font:a.string().describe(cx.properties.font).optional(),color:a.string().describe(cx.properties.textColor).optional(),size:a.nativeEnum(_x).describe(cx.properties.fontSize).optional()}),Bx=a.object({enabled:a.boolean().describe(cx.properties.redirectAfterSubmissionEnabled).optional(),redirectUrl:a.string().describe(cx.properties.redirectUrl).optional()}),Mx=a.object({allowEditSubmission:a.boolean().describe(cx.properties.allowEditSubmission).optional(),allowResubmit:a.boolean().describe(cx.properties.allowResubmit).optional(),allowViewSubmission:a.boolean().describe(cx.properties.allowViewSubmission).optional(),description:a.string().describe(cx.properties.postSubmissionDescription).optional(),redirectAfterSubmission:Bx.describe(cx.properties.redirectAfterSubmission).optional(),showSuccessImage:a.boolean().describe(cx.properties.showSuccessImage).optional(),title:a.string().describe(cx.properties.postSubmissionTitle).optional()}),qx=a.object({enabled:a.boolean().describe(cx.properties.closeDateEnabled).optional(),date:a.string().describe(cx.properties.closeDateValue).optional()}),Gx=a.object({enabled:a.boolean().describe(cx.properties.draftSubmissionEnabled).optional()}),Hx=a.object({itemGroupId:a.string().describe(cx.properties.itemGroupId).optional(),includeNameQuestion:a.boolean().describe(cx.properties.includeNameQuestion).optional(),includeUpdateQuestion:a.boolean().describe(cx.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:a.boolean().describe(cx.properties.syncQuestionAndColumnsTitles).optional()}),zx=a.object({enabled:a.boolean().describe(cx.properties.passwordEnabled).optional()}),Wx=a.object({text:a.string().describe(cx.properties.startButtonText).optional()}),Yx=a.object({enabled:a.boolean().describe(cx.properties.preSubmissionEnabled).optional(),title:a.string().describe(cx.properties.preSubmissionTitle).optional(),description:a.string().describe(cx.properties.preSubmissionDescription).optional(),startButton:Wx.describe(cx.properties.startButton).optional()}),Kx=a.object({enabled:a.boolean().describe(cx.properties.requireLoginEnabled).optional(),redirectToLogin:a.boolean().describe(cx.properties.redirectToLogin).optional()}),Jx=a.object({enabled:a.boolean().describe(cx.properties.responseLimitEnabled).optional(),limit:a.number().describe(cx.properties.responseLimitValue).optional()}),Qx=a.object({background:Fx.describe(cx.properties.background).optional(),hideBranding:a.boolean().describe(cx.properties.hideBranding).optional(),layout:jx.describe(cx.properties.layout).optional(),logo:Vx.describe(cx.properties.logo).optional(),primaryColor:a.string().describe(cx.properties.primaryColor).optional(),showProgressBar:a.boolean().describe(cx.properties.showProgressBar).optional(),submitButton:Px.describe(cx.properties.submitButton).optional(),text:Ux.describe(cx.properties.text).optional()}),Xx=a.object({language:a.string().describe(cx.properties.language).optional(),logoAltText:a.string().describe(cx.properties.logoAltText).optional()}),Zx=a.object({afterSubmissionView:Mx.describe(cx.properties.afterSubmissionView).optional(),closeDate:qx.describe(cx.properties.closeDate).optional(),draftSubmission:Gx.describe(cx.properties.draftSubmission).optional(),monday:Hx.describe(cx.properties.monday).optional(),password:zx.describe(cx.properties.password).optional(),preSubmissionView:Yx.describe(cx.properties.preSubmissionView).optional(),reCaptchaChallenge:a.boolean().describe(cx.properties.reCaptchaChallenge).optional(),requireLogin:Kx.describe(cx.properties.requireLogin).optional(),responseLimit:Jx.describe(cx.properties.responseLimit).optional()}),e_=a.object({id:a.string().describe(lx.inputs.questionId)}),a_=a.object({appearance:Qx.describe(lx.inputs.form.appearance).optional(),accessibility:Xx.describe(lx.inputs.form.accessibility).optional(),features:Zx.describe(lx.inputs.form.features).optional(),title:a.string().describe(lx.inputs.title).optional(),description:a.string().describe(lx.inputs.description).optional(),questions:a.array(e_).describe(lx.inputs.questions).optional()}),t_={formToken:a.string().describe(dx.formToken),action:a.nativeEnum($x).describe(lx.operations.updateForm.action),formPassword:a.string().describe(cx.operations.setFormPassword).optional(),tag:Lx.describe(lx.inputs.tag).optional(),form:a_.describe(lx.inputs.form.describe).optional()};class i_{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const a={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(Qw,a),{content:"Form password successfully set."}}async shortenFormUrl(e){const a={formToken:e.formToken};return await this.mondayApi.request(Xw,a),{content:"Form URL successfully shortened."}}async deactivateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(Zw,a),{content:"Form successfully deactivated."}}async activateForm(e){const a={formToken:e.formToken};return await this.mondayApi.request(ex,a),{content:"Form successfully activated."}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const a={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},t=await this.mondayApi.request(tx,a);return{content:`Tag successfully added: ${JSON.stringify(t.create_form_tag,null,2)}`}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(ax,a),{content:`Tag with id: ${e.tag.id} successfully deleted.`}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const a={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(ix,a)).update_form_tag?{content:`Tag with id: ${e.tag.id} successfully updated to value: ${e.tag.value}.`}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const a={formToken:e.formToken,appearance:e.form.appearance},t=await this.mondayApi.request(nx,a);return{content:`Appearance successfully updated: ${JSON.stringify(t.update_form_settings?.appearance,null,2)}`}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const a={formToken:e.formToken,accessibility:e.form.accessibility},t=await this.mondayApi.request(ox,a);return{content:`Accessibility successfully updated: ${JSON.stringify(t.update_form_settings?.accessibility,null,2)}`}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const a={formToken:e.formToken,features:e.form.features},t=await this.mondayApi.request(sx,a);return{content:`Features successfully updated: ${JSON.stringify(t.update_form_settings?.features,null,2)}`}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const a={formToken:e.formToken,questions:e.form.questions},t=await this.mondayApi.request(rx,a);return{content:`Question order successfully updated: ${JSON.stringify(t.update_form?.questions,null,2)}`}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const a={formToken:e.formToken,title:e.form.title,description:e.form.description},t=await this.mondayApi.request(px,a);return{content:`Form header content successfully updated: ${JSON.stringify(t.update_form,null,2)}`}}}const n_={formToken:a.string().describe(dx.formToken)};const o_={columnType:a.nativeEnum(gg).describe("The type of the column to be created"),columnTitle:a.string().describe("The title of the column to be created"),columnDescription:a.string().optional().describe("The description of the column to be created"),columnSettings:a.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.")},s_={boardId:a.number().describe("The id of the board to which the new column will be added"),...o_};const r_={color:a.nativeEnum(bg).describe("The color of the custom activity"),icon_id:a.nativeEnum(yg).describe("The icon ID of the custom activity"),name:a.string().describe("The name of the custom activity")};const p_=dw`
757
746
  mutation createGroup(
758
747
  $boardId: ID!
759
748
  $groupName: String!
@@ -772,14 +761,14 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
772
761
  title
773
762
  }
774
763
  }
775
- `,l_=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],c_={boardId:a.string().describe("The ID of the board to create the group in"),groupName:a.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:a.enum(l_).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${l_.join(", ")}`),relativeTo:a.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:a.nativeEnum(mb).optional().describe("Whether to position the new group before or after the relativeTo group")};const m_=dw`
764
+ `,d_=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],l_={boardId:a.string().describe("The ID of the board to create the group in"),groupName:a.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:a.enum(d_).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${d_.join(", ")}`),relativeTo:a.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:a.nativeEnum(mb).optional().describe("Whether to position the new group before or after the relativeTo group")};const c_=dw`
776
765
  mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
777
766
  duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
778
767
  id
779
768
  name
780
769
  }
781
770
  }
782
- `,u_=dw`
771
+ `,m_=dw`
783
772
  mutation createSubitem($parentItemId: ID!, $itemName: String!, $columnValues: JSON) {
784
773
  create_subitem(parent_item_id: $parentItemId, item_name: $itemName, column_values: $columnValues) {
785
774
  id
@@ -789,7 +778,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
789
778
  }
790
779
  }
791
780
  }
792
- `,f_={name:a.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:a.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:a.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:a.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:a.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},h_={boardId:a.number().describe("The id of the board to which the new item will be added"),...f_};const v_={item_id:a.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:a.string().describe("The ID of the custom activity for the timeline item"),title:a.string().describe("The title of the new timeline item"),summary:a.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:a.string().optional().describe("The content of the new timeline item"),timestamp:a.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:a.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:a.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:a.string().optional().describe("The location to add to the new timeline item"),phone:a.string().optional().describe("The phone number to add to the new timeline item"),url:a.string().optional().describe("The URL to add to the new timeline item")};const g_={itemId:a.number().describe("The id of the item to which the update will be added"),body:a.string().describe("The update to be created, must be relevant to the user's request"),mentionsList:a.string().optional().describe('Optional JSON string containing an array of mention objects with "id" (string) and "type" (MentionType enum value). Example: \'[{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]\'')};const b_={columnId:a.string().describe("The id of the column to be deleted")},y_={boardId:a.number().describe("The id of the board to which the new column will be added"),...b_};const w_={itemId:a.number()};const x_={};const __=dw`
781
+ `,u_={name:a.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:a.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:a.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:a.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:a.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},f_={boardId:a.number().describe("The id of the board to which the new item will be added"),...u_};const h_={item_id:a.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:a.string().describe("The ID of the custom activity for the timeline item"),title:a.string().describe("The title of the new timeline item"),summary:a.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:a.string().optional().describe("The content of the new timeline item"),timestamp:a.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:a.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:a.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:a.string().optional().describe("The location to add to the new timeline item"),phone:a.string().optional().describe("The phone number to add to the new timeline item"),url:a.string().optional().describe("The URL to add to the new timeline item")};const v_={itemId:a.number().describe("The id of the item to which the update will be added"),body:a.string().describe("The update to be created, must be relevant to the user's request"),mentionsList:a.string().optional().describe('Optional JSON string containing an array of mention objects with "id" (string) and "type" (MentionType enum value). Example: \'[{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]\'')};const g_={columnId:a.string().describe("The id of the column to be deleted")},b_={boardId:a.number().describe("The id of the board to which the new column will be added"),...g_};const y_={itemId:a.number()};const w_={};const x_=dw`
793
782
  query GetBoardAllActivity(
794
783
  $boardId: ID!
795
784
  $fromDate: ISO8601DateTime!
@@ -807,7 +796,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
807
796
  }
808
797
  }
809
798
  }
810
- `,T_=1e3;var E_,I_;!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"}(E_||(E_={})),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=T_]="SECOND"}(I_||(I_={}));const N_={boardId:a.number().describe("The id of the board to get activity for"),fromDate:a.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:a.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now")};const S_=dw`
799
+ `,__=1e3;var T_,E_;!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"}(T_||(T_={})),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=__]="SECOND"}(E_||(E_={}));const I_={boardId:a.number().describe("The id of the board to get activity for"),fromDate:a.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:a.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now")};const N_=dw`
811
800
  query GetBoardInfo($boardId: ID!) {
812
801
  boards(ids: [$boardId]) {
813
802
  # Basic Board Metadata
@@ -884,7 +873,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
884
873
  }
885
874
  }
886
875
  }
887
- `,A_=e=>{const a=[];return a.push("# Board Information\n"),a.push(`**Name:** ${e?.name||"N/A"}`),a.push(`**ID:** ${e?.id||"N/A"}`),a.push(`**Description:** ${e?.description||"No description"}`),a.push(`**State:** ${e?.state||"N/A"}`),a.push(`**Kind:** ${e?.board_kind||"N/A"}`),a.push(`**URL:** ${e?.url||"N/A"}`),a.push(`**Updated:** ${e?.updated_at||"N/A"}`),a.push(`**Item Terminology:** ${e?.item_terminology||"items"}`),a.push(`**Items Count:** ${e?.items_count||0}`),a.push(`**Items Limit:** ${e?.items_limit||"No limit"}`),a.push(`**Board Folder ID:** ${e?.board_folder_id||"None"}`),e?.creator&&(a.push("\n## Creator"),a.push(`**Name:** ${e.creator.name||"N/A"}`),a.push(`**ID:** ${e.creator.id||"N/A"}`),a.push(`**Email:** ${e.creator.email||"N/A"}`)),e?.workspace&&(a.push("\n## Workspace"),a.push(`**Name:** ${e.workspace.name||"N/A"}`),a.push(`**ID:** ${e.workspace.id||"N/A"}`),a.push(`**Kind:** ${e.workspace.kind||"N/A"}`),a.push(`**Description:** ${e.workspace.description||"No description"}`)),e?.owners&&e.owners.length>0&&(a.push("\n## Board Owners"),e.owners.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.name||"N/A"}** (ID: ${e.id||"N/A"})`)}))),e?.team_owners&&e.team_owners.length>0&&(a.push("\n## Team Owners"),e.team_owners.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.name||"N/A"}** (ID: ${e.id||"N/A"})`)}))),e?.groups&&e.groups.length>0&&(a.push("\n## Groups"),e.groups.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.title||"Untitled"}** (ID: ${e.id||"N/A"})`)}))),e?.top_group&&(a.push("\n## Top Group"),a.push(`**ID:** ${e.top_group.id||"N/A"}`)),e?.columns&&e.columns.length>0&&(a.push("\n## Columns"),e.columns.forEach(((e,t)=>{e&&(a.push(`${t+1}. **${e.title||"Untitled"}** (${e.type||"unknown"})`),a.push(` - **ID:** ${e.id||"N/A"}`),e.description&&a.push(` - **Description:** ${e.description}`),e.settings_str&&a.push(` - **Settings:** ${e.settings_str}`))}))),e?.tags&&e.tags.length>0&&(a.push("\n## Tags"),e.tags.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.name||"N/A"}** (ID: ${e.id||"N/A"})`)}))),e?.permissions&&(a.push("\n## Permissions"),a.push(`${e.permissions}`)),e?.columns&&a.push(k_(e.columns.filter(D_))),a.join("\n")};function D_(e){return!!e&&["id","type"].every((a=>a in e))}const O_={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 - index 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 index 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 index 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 ✅ 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'},k_=e=>{const a=e.reduce(((e,a)=>O_[a.type]?(e[a.type]||(e[a.type]=[]),e[a.type].push(a.id),e):e),{});return 0===Object.keys(a).length?"":`\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## Column type Guidelines\n${Object.entries(a).map((([e,a])=>`- Column Type: ${e} (Column IDs: ${a.join(", ")}) - ${O_[e]}`)).join("\n\n")}\n `},R_={boardId:a.number().describe("The id of the board to get information for")};const C_={term:a.string()},$_={boardId:a.number(),...C_};const L_=dw`
876
+ `,S_=e=>{const a=[];return a.push("# Board Information\n"),a.push(`**Name:** ${e?.name||"N/A"}`),a.push(`**ID:** ${e?.id||"N/A"}`),a.push(`**Description:** ${e?.description||"No description"}`),a.push(`**State:** ${e?.state||"N/A"}`),a.push(`**Kind:** ${e?.board_kind||"N/A"}`),a.push(`**URL:** ${e?.url||"N/A"}`),a.push(`**Updated:** ${e?.updated_at||"N/A"}`),a.push(`**Item Terminology:** ${e?.item_terminology||"items"}`),a.push(`**Items Count:** ${e?.items_count||0}`),a.push(`**Items Limit:** ${e?.items_limit||"No limit"}`),a.push(`**Board Folder ID:** ${e?.board_folder_id||"None"}`),e?.creator&&(a.push("\n## Creator"),a.push(`**Name:** ${e.creator.name||"N/A"}`),a.push(`**ID:** ${e.creator.id||"N/A"}`),a.push(`**Email:** ${e.creator.email||"N/A"}`)),e?.workspace&&(a.push("\n## Workspace"),a.push(`**Name:** ${e.workspace.name||"N/A"}`),a.push(`**ID:** ${e.workspace.id||"N/A"}`),a.push(`**Kind:** ${e.workspace.kind||"N/A"}`),a.push(`**Description:** ${e.workspace.description||"No description"}`)),e?.owners&&e.owners.length>0&&(a.push("\n## Board Owners"),e.owners.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.name||"N/A"}** (ID: ${e.id||"N/A"})`)}))),e?.team_owners&&e.team_owners.length>0&&(a.push("\n## Team Owners"),e.team_owners.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.name||"N/A"}** (ID: ${e.id||"N/A"})`)}))),e?.groups&&e.groups.length>0&&(a.push("\n## Groups"),e.groups.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.title||"Untitled"}** (ID: ${e.id||"N/A"})`)}))),e?.top_group&&(a.push("\n## Top Group"),a.push(`**ID:** ${e.top_group.id||"N/A"}`)),e?.columns&&e.columns.length>0&&(a.push("\n## Columns"),e.columns.forEach(((e,t)=>{e&&(a.push(`${t+1}. **${e.title||"Untitled"}** (${e.type||"unknown"})`),a.push(` - **ID:** ${e.id||"N/A"}`),e.description&&a.push(` - **Description:** ${e.description}`),e.settings_str&&a.push(` - **Settings:** ${e.settings_str}`))}))),e?.tags&&e.tags.length>0&&(a.push("\n## Tags"),e.tags.forEach(((e,t)=>{e&&a.push(`${t+1}. **${e.name||"N/A"}** (ID: ${e.id||"N/A"})`)}))),e?.permissions&&(a.push("\n## Permissions"),a.push(`${e.permissions}`)),e?.columns&&a.push(O_(e.columns.filter(A_))),a.join("\n")};function A_(e){return!!e&&["id","type"].every((a=>a in e))}const D_={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 - index 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 index 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 index 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 ✅ 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'},O_=e=>{const a=e.reduce(((e,a)=>D_[a.type]?(e[a.type]||(e[a.type]=[]),e[a.type].push(a.id),e):e),{});return 0===Object.keys(a).length?"":`\n[MEMORY] Remember the filtering guidelines for subsequent requests for the same board.\n# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type Guidelines\n${Object.entries(a).map((([e,a])=>`- Column Type: ${e} (Column IDs: ${a.join(", ")}) - ${D_[e]}`)).join("\n\n")}\n `},k_={boardId:a.number().describe("The id of the board to get information for")};const R_=dw`
888
877
  query GetBoardItemsPage($boardId: ID!, $limit: Int, $cursor: String, $includeColumns: Boolean!, $columnIds: [String!], $queryParams: ItemsQuery) {
889
878
  boards(ids: [$boardId]) {
890
879
  id
@@ -905,7 +894,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
905
894
  }
906
895
  }
907
896
  }
908
- `,F_=dw`
897
+ `,C_=dw`
909
898
  query SmartSearchBoardItemIds($searchTerm: String!, $boardId: ID!) {
910
899
  search_items(boardId: $boardId, query: $searchTerm, searchType: LEXICAL, size: 100) {
911
900
  results {
@@ -915,11 +904,11 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
915
904
  }
916
905
  }
917
906
  }
918
- `,j_={boardId:a.number().describe("The id of the board to get items from"),itemIds:a.array(a.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:a.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:a.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:a.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:a.boolean().optional().default(!1).describe("Whether to include column values in the response"),filtersStringified:a.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. This is a stringified JSON object of "filters" field. Read "filters" field description for details how to use it.'),filters:a.array(a.object({columnId:a.string().describe("The id of the column to filter by"),compareAttribute:a.string().optional().describe("The attribute to compare the value to"),compareValue:a.any().describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:a.nativeEnum(eb).optional().default(eb.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 "Filtering Guidelines" section for filtering by the column.'),filtersOperator:a.nativeEnum(Zg).optional().default(Zg.And).describe("The operator to use for the filters"),columnIds:a.array(a.string()).optional().describe("The ids of the columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderByStringified:a.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. This is a stringified JSON object of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:a.array(a.object({columnId:a.string().describe("The id of the column to order by"),direction:a.nativeEnum(Xg).optional().default(Xg.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 V_={boardId:a.number().describe("The id of the board to get the schema of")};const P_=dw`
907
+ `,$_={boardId:a.number().describe("The id of the board to get items from"),itemIds:a.array(a.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:a.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:a.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:a.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:a.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."),filtersStringified:a.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The filters to apply on the items. Send this as a stringified JSON array of "filters" field. Read "filters" field description for details how to use it.'),filters:a.array(a.object({columnId:a.string().describe("The id of the column to filter by"),compareAttribute:a.string().optional().describe("The attribute to compare the value to"),compareValue:a.any().describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:a.nativeEnum(eb).optional().default(eb.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 "Filtering Guidelines" section for filtering by the column.'),filtersOperator:a.nativeEnum(Zg).optional().default(Zg.And).describe("The operator to use for the filters"),columnIds:a.array(a.string()).optional().describe("The ids of the columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderByStringified:a.string().optional().describe('**ONLY FOR MICROSOFT COPILOT**: The order by to apply on the items. Send this as a stringified JSON array of "orderBy" field. Read "orderBy" field description for details how to use it.'),orderBy:a.array(a.object({columnId:a.string().describe("The id of the column to order by"),direction:a.nativeEnum(Xg).optional().default(Xg.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 L_={boardId:a.number().describe("The id of the board to get the schema of")};const F_=dw`
919
908
  query GetColumnTypeSchema($type: ColumnType!) {
920
909
  get_column_type_schema(type: $type)
921
910
  }
922
- `,U_={columnType:a.nativeEnum(gg).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const B_={random_string:a.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:a.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const M_={typeName:a.string().describe("The name of the GraphQL type to get details for")};function q_(e){return e?"NON_NULL"===e.kind?`${q_(e.ofType)}!`:"LIST"===e.kind?`[${q_(e.ofType)}]`:e.name||"unknown":"unknown"}const G_={name:a.string().optional().describe("The name or partial name of the user to get")};const H_=dw`
911
+ `,j_={columnType:a.nativeEnum(gg).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const V_={random_string:a.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:a.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const P_={typeName:a.string().describe("The name of the GraphQL type to get details for")};function U_(e){return e?"NON_NULL"===e.kind?`${U_(e.ofType)}!`:"LIST"===e.kind?`[${U_(e.ofType)}]`:e.name||"unknown":"unknown"}const B_={name:a.string().optional().describe("The name or partial name of the user to get")};const M_=dw`
923
912
  fragment UserDetails on User {
924
913
  # Basic User Information
925
914
  id
@@ -947,31 +936,31 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
947
936
  time_zone_identifier
948
937
  utc_hours_diff
949
938
  }
950
- `,z_=dw`
939
+ `,q_=dw`
951
940
  fragment UserTeamMembership on Team {
952
941
  id
953
942
  name
954
943
  is_guest
955
944
  picture_url
956
945
  }
957
- `,W_=dw`
946
+ `,G_=dw`
958
947
  fragment TeamBasicInfo on Team {
959
948
  id
960
949
  name
961
950
  }
962
- `,Y_=dw`
951
+ `,H_=dw`
963
952
  fragment TeamExtendedInfo on Team {
964
953
  ...TeamBasicInfo
965
954
  is_guest
966
955
  picture_url
967
956
  }
968
- `,K_=dw`
957
+ `,z_=dw`
969
958
  fragment TeamOwner on User {
970
959
  id
971
960
  name
972
961
  email
973
962
  }
974
- `,J_=dw`
963
+ `,W_=dw`
975
964
  fragment TeamMember on User {
976
965
  id
977
966
  name
@@ -991,7 +980,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
991
980
  time_zone_identifier
992
981
  utc_hours_diff
993
982
  }
994
- `,Q_=dw`
983
+ `,Y_=dw`
995
984
  fragment TeamMemberSimplified on User {
996
985
  id
997
986
  name
@@ -1000,15 +989,15 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1000
989
  is_admin
1001
990
  is_guest
1002
991
  }
1003
- `,X_=dw`
992
+ `,K_=dw`
1004
993
  fragment UserTeamMembershipSimplified on Team {
1005
994
  id
1006
995
  name
1007
996
  is_guest
1008
997
  }
1009
- `,Z_=dw`
1010
- ${H_}
1011
- ${z_}
998
+ `,J_=dw`
999
+ ${M_}
1000
+ ${q_}
1012
1001
 
1013
1002
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1014
1003
  users(ids: $userIds, limit: $limit) {
@@ -1020,9 +1009,9 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1020
1009
  }
1021
1010
  }
1022
1011
  }
1023
- `,eT=dw`
1024
- ${H_}
1025
- ${z_}
1012
+ `,Q_=dw`
1013
+ ${M_}
1014
+ ${q_}
1026
1015
 
1027
1016
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1028
1017
  users(ids: $userIds, limit: $limit) {
@@ -1034,13 +1023,13 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1034
1023
  }
1035
1024
  }
1036
1025
  }
1037
- `,aT=dw`
1026
+ `,X_=dw`
1027
+ ${M_}
1028
+ ${K_}
1038
1029
  ${H_}
1039
- ${X_}
1030
+ ${G_}
1031
+ ${z_}
1040
1032
  ${Y_}
1041
- ${W_}
1042
- ${K_}
1043
- ${Q_}
1044
1033
 
1045
1034
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1046
1035
  users(ids: $userIds, limit: $limit) {
@@ -1066,19 +1055,19 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1066
1055
  }
1067
1056
  }
1068
1057
  }
1069
- `,tT=dw`
1070
- ${W_}
1058
+ `,Z_=dw`
1059
+ ${G_}
1071
1060
 
1072
1061
  query listTeamsOnly($teamIds: [ID!]) {
1073
1062
  teams(ids: $teamIds) {
1074
1063
  ...TeamBasicInfo
1075
1064
  }
1076
1065
  }
1077
- `,iT=dw`
1078
- ${Y_}
1066
+ `,eT=dw`
1067
+ ${H_}
1068
+ ${G_}
1069
+ ${z_}
1079
1070
  ${W_}
1080
- ${K_}
1081
- ${J_}
1082
1071
 
1083
1072
  query listTeamsWithMembers($teamIds: [ID!]) {
1084
1073
  teams(ids: $teamIds) {
@@ -1095,9 +1084,9 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1095
1084
  }
1096
1085
  }
1097
1086
  }
1098
- `,nT=dw`
1099
- ${H_}
1100
- ${z_}
1087
+ `,aT=dw`
1088
+ ${M_}
1089
+ ${q_}
1101
1090
 
1102
1091
  query getUserByName($name: String) {
1103
1092
  users(name: $name) {
@@ -1109,7 +1098,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1109
1098
  }
1110
1099
  }
1111
1100
  }
1112
- `,oT=dw`
1101
+ `,tT=dw`
1113
1102
  query getCurrentUser {
1114
1103
  me {
1115
1104
  id
@@ -1120,7 +1109,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1120
1109
  is_guest
1121
1110
  }
1122
1111
  }
1123
- `;const sT=e=>{const a=[];return"users"in e&&e.users&&e.users.length>0&&(a.push("Users:"),e.users.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),a.push(` Email: ${e.email}`),a.push(` Title: ${e.title||"N/A"}`),a.push(` Enabled: ${e.enabled}`),a.push(` Admin: ${e.is_admin||!1}`),a.push(` Guest: ${e.is_guest||!1}`),a.push(` Pending: ${e.is_pending||!1}`),a.push(` Verified: ${e.is_verified||!1}`),a.push(` View Only: ${e.is_view_only||!1}`),a.push(` Join Date: ${e.join_date||"N/A"}`),a.push(` Last Activity: ${e.last_activity||"N/A"}`),a.push(` Location: ${e.location||"N/A"}`),a.push(` Mobile Phone: ${e.mobile_phone||"N/A"}`),a.push(` Phone: ${e.phone||"N/A"}`),a.push(` Timezone: ${e.time_zone_identifier||"N/A"}`),a.push(` UTC Hours Diff: ${e.utc_hours_diff||"N/A"}`),e.teams&&e.teams.length>0&&(a.push(" Teams:"),e.teams.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}`)}))),a.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(a.push("Teams:"),e.teams.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(a.push(` Guest Team: ${e.is_guest||!1}`),a.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(a.push(" Owners:"),e.owners.forEach((e=>{a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(a.push(" Members:"),e.users.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}, Title: ${e.title||"N/A"}, Admin: ${e.is_admin||!1}, Guest: ${e.is_guest||!1}`)})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},rT=500,pT=500,dT=1e3,lT={userIds:a.array(a.string()).max(rT).optional().describe('[HIGH PRIORITY] Specific user IDs to fetch (max 500). ALWAYS use this when you have user IDs from board assignments, mentions, previous queries, or any context where user IDs are available.\n \n AI AGENT DIRECTIVE: This is the MOST EFFICIENT parameter. Use whenever you have specific user IDs - never use broad searches when IDs are available.\n \n RETURNS: Complete user profiles with team memberships. EXAMPLES: ["12345678", "87654321"]'),teamIds:a.array(a.string()).max(pT).optional().describe('[HIGH PRIORITY] Specific team IDs to fetch (max 500). ALWAYS use this when you have team IDs from board permissions, assignments, team context or elsewhere.\n \n AI AGENT DIRECTIVE: Use with teamsOnly: true for teams without user data, or includeTeamMembers: true for detailed member analysis. NEVER fetch all teams when specific IDs are available.\n \n RETURNS: Team details with owners and optional member data. EXAMPLES: ["98765432", "11223344"]'),name:a.string().optional().describe('[SECOND PRIORITY] Name-based user search. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ONLY when you have user names but no IDs. This is your PREFERRED method for finding users when you know names. Performs fuzzy matching.\n \n CRITICAL: This parameter CONFLICTS with all others. EXAMPLES: "John Smith", "john", "smith"'),getMe:a.boolean().optional().describe('[TOP PRIORITY] Current authenticated user lookup. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ALWAYS when requesting current user information. Returns basic profile: id, name, title, enabled, is_admin, is_guest. Should be used when a user asks to get "my user" or "me".\n \n CRITICAL: This parameter CONFLICTS with all others. Pass boolean value true (not string "true") for authenticated user\'s basic details.'),includeTeams:a.boolean().optional().describe("[AVOID UNLESS NECESSARY] Include general teams data alongside users. Creates dual query overhead. This does not fetch a specific user's teams rather all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get the team memberships.\n \n AI AGENT DIRECTIVE: AVOID this parameter unless you specifically need both users AND teams in one response. Use teamsOnly: true for teams-only queries instead.\n \n PERFORMANCE WARNING: Adds significant query overhead. Use sparingly."),teamsOnly:a.boolean().optional().describe("[RECOMMENDED FOR TEAMS] Fetch only teams, no users returned. Optimized single-purpose query.\n \n AI AGENT DIRECTIVE: Use teamsOnly: true when you only need team information. More efficient than includeTeams: true. Combine with includeTeamMembers for member details.\n \n USAGE: teamsOnly: true for team lists, add includeTeamMembers: true for member analysis."),includeTeamMembers:a.boolean().optional().describe("[CONDITIONAL] Control team member data inclusion. Use strategically for performance.\n \n AI AGENT DIRECTIVE: Set to false for simple team lists (faster), true only when you need member composition analysis. Default is false for better performance.\n \n DECISION LOGIC: false=team names/IDs only, true=full member details with roles and permissions.")};const cT={itemId:a.number().describe("The id of the item to which the update will be added"),groupId:a.string().describe("The id of the group to which the item will be moved")};const mT={type:a.enum(["ids","object_ids","workspace_ids"]).describe("Query type of ids parameter that is used query by: ids, object_ids, or workspace_ids"),ids:a.array(a.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:a.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:a.nativeEnum(Ag).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:a.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 uT={workspace_id:a.number().describe("The ID of the workspace to get information for")};const fT=dw`
1112
+ `;const iT=e=>{const a=[];return"users"in e&&e.users&&e.users.length>0&&(a.push("Users:"),e.users.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),a.push(` Email: ${e.email}`),a.push(` Title: ${e.title||"N/A"}`),a.push(` Enabled: ${e.enabled}`),a.push(` Admin: ${e.is_admin||!1}`),a.push(` Guest: ${e.is_guest||!1}`),a.push(` Pending: ${e.is_pending||!1}`),a.push(` Verified: ${e.is_verified||!1}`),a.push(` View Only: ${e.is_view_only||!1}`),a.push(` Join Date: ${e.join_date||"N/A"}`),a.push(` Last Activity: ${e.last_activity||"N/A"}`),a.push(` Location: ${e.location||"N/A"}`),a.push(` Mobile Phone: ${e.mobile_phone||"N/A"}`),a.push(` Phone: ${e.phone||"N/A"}`),a.push(` Timezone: ${e.time_zone_identifier||"N/A"}`),a.push(` UTC Hours Diff: ${e.utc_hours_diff||"N/A"}`),e.teams&&e.teams.length>0&&(a.push(" Teams:"),e.teams.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}`)}))),a.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(a.push("Teams:"),e.teams.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(a.push(` Guest Team: ${e.is_guest||!1}`),a.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(a.push(" Owners:"),e.owners.forEach((e=>{a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(a.push(" Members:"),e.users.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}, Title: ${e.title||"N/A"}, Admin: ${e.is_admin||!1}, Guest: ${e.is_guest||!1}`)})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},nT=500,oT=500,sT=1e3,rT={userIds:a.array(a.string()).max(nT).optional().describe('[HIGH PRIORITY] Specific user IDs to fetch (max 500). ALWAYS use this when you have user IDs from board assignments, mentions, previous queries, or any context where user IDs are available.\n \n AI AGENT DIRECTIVE: This is the MOST EFFICIENT parameter. Use whenever you have specific user IDs - never use broad searches when IDs are available.\n \n RETURNS: Complete user profiles with team memberships. EXAMPLES: ["12345678", "87654321"]'),teamIds:a.array(a.string()).max(oT).optional().describe('[HIGH PRIORITY] Specific team IDs to fetch (max 500). ALWAYS use this when you have team IDs from board permissions, assignments, team context or elsewhere.\n \n AI AGENT DIRECTIVE: Use with teamsOnly: true for teams without user data, or includeTeamMembers: true for detailed member analysis. NEVER fetch all teams when specific IDs are available.\n \n RETURNS: Team details with owners and optional member data. EXAMPLES: ["98765432", "11223344"]'),name:a.string().optional().describe('[SECOND PRIORITY] Name-based user search. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ONLY when you have user names but no IDs. This is your PREFERRED method for finding users when you know names. Performs fuzzy matching.\n \n CRITICAL: This parameter CONFLICTS with all others. EXAMPLES: "John Smith", "john", "smith"'),getMe:a.boolean().optional().describe('[TOP PRIORITY] Current authenticated user lookup. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ALWAYS when requesting current user information. Returns basic profile: id, name, title, enabled, is_admin, is_guest. Should be used when a user asks to get "my user" or "me".\n \n CRITICAL: This parameter CONFLICTS with all others. Pass boolean value true (not string "true") for authenticated user\'s basic details.'),includeTeams:a.boolean().optional().describe("[AVOID UNLESS NECESSARY] Include general teams data alongside users. Creates dual query overhead. This does not fetch a specific user's teams rather all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get the team memberships.\n \n AI AGENT DIRECTIVE: AVOID this parameter unless you specifically need both users AND teams in one response. Use teamsOnly: true for teams-only queries instead.\n \n PERFORMANCE WARNING: Adds significant query overhead. Use sparingly."),teamsOnly:a.boolean().optional().describe("[RECOMMENDED FOR TEAMS] Fetch only teams, no users returned. Optimized single-purpose query.\n \n AI AGENT DIRECTIVE: Use teamsOnly: true when you only need team information. More efficient than includeTeams: true. Combine with includeTeamMembers for member details.\n \n USAGE: teamsOnly: true for team lists, add includeTeamMembers: true for member analysis."),includeTeamMembers:a.boolean().optional().describe("[CONDITIONAL] Control team member data inclusion. Use strategically for performance.\n \n AI AGENT DIRECTIVE: Set to false for simple team lists (faster), true only when you need member composition analysis. Default is false for better performance.\n \n DECISION LOGIC: false=team names/IDs only, true=full member details with roles and permissions.")};const pT={itemId:a.number().describe("The id of the item to which the update will be added"),groupId:a.string().describe("The id of the group to which the item will be moved")};const dT={type:a.enum(["ids","object_ids","workspace_ids"]).describe("Query type of ids parameter that is used query by: ids, object_ids, or workspace_ids"),ids:a.array(a.string()).min(1).describe("Array of ID values for this query type (at least 1 required)"),limit:a.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:a.nativeEnum(Ag).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:a.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 lT={workspace_id:a.number().describe("The ID of the workspace to get information for")};const cT=dw`
1124
1113
  query listWorkspaces($limit: Int!) {
1125
1114
  workspaces(limit: $limit) {
1126
1115
  id
@@ -1128,7 +1117,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1128
1117
  description
1129
1118
  }
1130
1119
  }
1131
- `,hT={};const vT=a.enum(["workspace","item"]),gT={location:a.discriminatedUnion("type",[a.object({type:a.literal(vT.enum.workspace).describe("Create document in workspace"),workspace_id:a.number().describe("Workspace ID under which to create the new document"),doc_kind:a.nativeEnum(og).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:a.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),a.object({type:a.literal(vT.enum.item).describe("Create document attached to item"),item_id:a.number().describe("Item ID to attach the new document to"),column_id:a.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.")})]).describe("Location where the document should be created - either in a workspace or attached to an item"),doc_name:a.string().describe("Name for the new document."),markdown:a.string().describe("Markdown content that will be imported into the newly created document as blocks.")};const bT=dw`
1120
+ `,mT={};const uT=a.enum(["workspace","item"]),fT={location:a.discriminatedUnion("type",[a.object({type:a.literal(uT.enum.workspace).describe("Create document in workspace"),workspace_id:a.number().describe("Workspace ID under which to create the new document"),doc_kind:a.nativeEnum(og).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:a.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),a.object({type:a.literal(uT.enum.item).describe("Create document attached to item"),item_id:a.number().describe("Item ID to attach the new document to"),column_id:a.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.")})]).describe("Location where the document should be created - either in a workspace or attached to an item"),doc_name:a.string().describe("Name for the new document."),markdown:a.string().describe("Markdown content that will be imported into the newly created document as blocks.")};const hT=dw`
1132
1121
  mutation CreateDashboard(
1133
1122
  $name: String!
1134
1123
  $workspace_id: ID!
@@ -1150,14 +1139,14 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1150
1139
  board_folder_id
1151
1140
  }
1152
1141
  }
1153
- `,yT=dw`
1142
+ `,vT=dw`
1154
1143
  query GetAllWidgetsSchema {
1155
1144
  all_widgets_schema {
1156
1145
  widget_type
1157
1146
  schema
1158
1147
  }
1159
1148
  }
1160
- `,wT=dw`
1149
+ `,gT=dw`
1161
1150
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1162
1151
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1163
1152
  id
@@ -1169,13 +1158,13 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1169
1158
  }
1170
1159
  }
1171
1160
  }
1172
- `,xT={name:a.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:a.string().describe("ID of the workspace that will own the dashboard"),board_ids:a.array(a.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:a.nativeEnum(xg).default(xg.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:a.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const _T={parent_container_id:a.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:a.nativeEnum(Bb).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:a.nativeEnum(kg).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:a.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:a.record(a.unknown()).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 TT=dw`
1161
+ `,bT={name:a.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:a.string().describe("ID of the workspace that will own the dashboard"),board_ids:a.array(a.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:a.nativeEnum(xg).default(xg.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:a.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const yT={parent_container_id:a.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:a.nativeEnum(Bb).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:a.nativeEnum(kg).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:a.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:a.record(a.unknown()).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 wT=dw`
1173
1162
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1174
1163
  update_workspace(id: $id, attributes: $attributes) {
1175
1164
  id
1176
1165
  }
1177
1166
  }
1178
- `,ET={id:a.string().describe("The ID of the workspace to update"),attributes:a.object({accountProductId:a.number().optional(),description:a.string().optional(),kind:a.nativeEnum(Mb).optional(),name:a.string().optional()}).describe("Attributes to update in the workspace")};const IT=dw`
1167
+ `,xT={id:a.string().describe("The ID of the workspace to update"),attributes:a.object({accountProductId:a.number().optional(),description:a.string().optional(),kind:a.nativeEnum(Mb).optional(),name:a.string().optional()}).describe("Attributes to update in the workspace")};const _T=dw`
1179
1168
  mutation updateFolder(
1180
1169
  $folderId: ID!
1181
1170
  $name: String
@@ -1201,7 +1190,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1201
1190
  id
1202
1191
  }
1203
1192
  }
1204
- `,NT={folderId:a.string().describe("The ID of the folder to update"),name:a.string().optional().describe("The new name of the folder"),color:a.nativeEnum(Lg).optional().describe("The new color of the folder"),fontWeight:a.nativeEnum(jg).optional().describe("The new font weight of the folder"),customIcon:a.nativeEnum(Fg).optional().describe("The new custom icon of the folder"),parentFolderId:a.string().optional().describe("The ID of the new parent folder"),workspaceId:a.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:a.string().optional().describe("The account product ID associated with the folder"),position:a.object({object_id:a.string().describe("The ID of the object to position the folder relative to"),object_type:a.nativeEnum(lb).describe("The type of object to position the folder relative to"),is_after:a.boolean().optional().describe("Whether to position the folder after the object")}).optional().describe("The new position of the folder")};const ST=dw`
1193
+ `,TT={folderId:a.string().describe("The ID of the folder to update"),name:a.string().optional().describe("The new name of the folder"),color:a.nativeEnum(Lg).optional().describe("The new color of the folder"),fontWeight:a.nativeEnum(jg).optional().describe("The new font weight of the folder"),customIcon:a.nativeEnum(Fg).optional().describe("The new custom icon of the folder"),parentFolderId:a.string().optional().describe("The ID of the new parent folder"),workspaceId:a.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:a.string().optional().describe("The account product ID associated with the folder"),position:a.object({object_id:a.string().describe("The ID of the object to position the folder relative to"),object_type:a.nativeEnum(lb).describe("The type of object to position the folder relative to"),is_after:a.boolean().optional().describe("Whether to position the folder after the object")}).optional().describe("The new position of the folder")};const ET=dw`
1205
1194
  mutation createWorkspace(
1206
1195
  $name: String!
1207
1196
  $workspaceKind: WorkspaceKind!
@@ -1217,7 +1206,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1217
1206
  id
1218
1207
  }
1219
1208
  }
1220
- `,AT={name:a.string().describe("The name of the new workspace to be created"),workspaceKind:a.nativeEnum(Mb).describe("The kind of workspace to create"),description:a.string().optional().describe("The description of the new workspace"),accountProductId:a.string().optional().describe("The account product ID associated with the workspace")};const DT=dw`
1209
+ `,IT={name:a.string().describe("The name of the new workspace to be created"),workspaceKind:a.nativeEnum(Mb).describe("The kind of workspace to create"),description:a.string().optional().describe("The description of the new workspace"),accountProductId:a.string().optional().describe("The account product ID associated with the workspace")};const NT=dw`
1221
1210
  mutation createFolder(
1222
1211
  $workspaceId: ID!
1223
1212
  $name: String!
@@ -1237,7 +1226,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1237
1226
  id
1238
1227
  }
1239
1228
  }
1240
- `,OT={workspaceId:a.string().describe("The ID of the workspace where the folder will be created"),name:a.string().describe("The name of the folder to be created"),color:a.nativeEnum(Lg).optional().describe("The color of the folder"),fontWeight:a.nativeEnum(jg).optional().describe("The font weight of the folder"),customIcon:a.nativeEnum(Fg).optional().describe("The custom icon of the folder"),parentFolderId:a.string().optional().describe("The ID of the parent folder")};const kT=dw`
1229
+ `,ST={workspaceId:a.string().describe("The ID of the workspace where the folder will be created"),name:a.string().describe("The name of the folder to be created"),color:a.nativeEnum(Lg).optional().describe("The color of the folder"),fontWeight:a.nativeEnum(jg).optional().describe("The font weight of the folder"),customIcon:a.nativeEnum(Fg).optional().describe("The custom icon of the folder"),parentFolderId:a.string().optional().describe("The ID of the parent folder")};const AT=dw`
1241
1230
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1242
1231
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1243
1232
  success
@@ -1247,7 +1236,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1247
1236
  }
1248
1237
  }
1249
1238
  }
1250
- `,RT=dw`
1239
+ `,DT=dw`
1251
1240
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
1252
1241
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
1253
1242
  success
@@ -1257,7 +1246,7 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1257
1246
  }
1258
1247
  }
1259
1248
  }
1260
- `,CT={objectType:a.nativeEnum(lb).describe("The type of object to move"),id:a.string().describe("The ID of the object to move"),position:a.object({object_id:a.string().describe("The ID of the object to position the object relative to"),object_type:a.nativeEnum(lb).describe("The type of object to position the object relative to"),is_after:a.boolean().optional().describe("Whether to position the object after the object")}).optional().describe("The new position of the object. Required if changing the position based on another object."),parentFolderId:a.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:a.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:a.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};a.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'),a.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const $T=[class extends Fm{constructor(){super(...arguments),this.name="delete_item",this.type=y.WRITE,this.annotations=Lm({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return w_}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(lw,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_items_by_name",this.type=y.READ,this.annotations=Lm({title:"Get Board Items",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get items by board id and term"}getInputSchema(){return this.context?.boardId?C_:$_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),term:e.term},t=await this.mondayApi.request(cw,a);return{content:`Items ${t.boards?.[0]?.items_page?.items?.map((e=>`name: ${e.name}, id: ${e.id}`)).join(", ")} successfully fetched`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_items_page",this.type=y.READ,this.annotations=Lm({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true."}getInputSchema(){return j_}parseAndAssignJsonField(e,a,t){if(e[t]&&!e[a])try{e[a]=JSON.parse(e[t])}catch{throw new Error(`${t} is not a valid JSON`)}}async executeInternal(e){const a=!e.cursor;if(a&&e.searchTerm&&(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length))return{content:"No items found matching the specified searchTerm"};const t={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor,includeColumns:e.includeColumns,columnIds:e.columnIds};this.parseAndAssignJsonField(e,"filters","filtersStringified"),this.parseAndAssignJsonField(e,"orderBy","orderByStringified"),a&&(e.itemIds||e.filters||e.orderBy)&&(t.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(L_,t),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}mapResult(e,a){const t=e.boards?.[0],i=t?.items_page,n=i?.items||[];return{board:{id:t?.id,name:t?.name},items:n.map((e=>{const t={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};return a.includeColumns&&e.column_values&&(t.column_values={},e.column_values.forEach((e=>{if(e.value)try{t.column_values[e.id]=JSON.parse(e.value)}catch{t.column_values[e.id]=e.value}else t.column_values[e.id]=e.text||null}))),t})),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}async getItemIdsFromSmartSearchAsync(e){const a={boardId:e.boardId.toString(),searchTerm:e.searchTerm},t=await this.mondayApi.request(F_,a),i=t.search_items?.results?.map((e=>Number(e.data.id)))??[],n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Fm{constructor(){super(...arguments),this.name="create_item",this.type=y.WRITE,this.annotations=Lm({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."}getInputSchema(){return this.context?.boardId?f_:h_}async executeInternal(e){const a=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,a):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,a)}async duplicateAndUpdateItem(e,a){try{const t={boardId:a.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(m_,t);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},s=new jw(this.mondayApi,this.apiToken,{boardId:a}),r=await s.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(r.content.includes("Error"))throw new Error("Failed to update duplicated item: "+r.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){this.rethrowWrapped(e,"duplicate item")}}async createSubitem(e){const a={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const t=await this.mondayApi.request(u_,a);if(!t.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${t.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){this.rethrowWrapped(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(mw,t);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){this.rethrowWrapped(e,"create item")}}rethrowWrapped(e,a){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)throw new Error(`Failed to ${a}: ${t.response.errors.map((e=>e.message)).join(", ")}`)}throw new Error(`Failed to ${a}: ${t}`)}},class extends Fm{constructor(){super(...arguments),this.name="create_update",this.type=y.WRITE,this.annotations=Lm({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update in a monday.com board"}getInputSchema(){return g_}async executeInternal(e){let a;if(e.mentionsList)try{a=JSON.parse(e.mentionsList)}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e instanceof Error?e.message:"Unknown error"}`)}const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(uw,t);return{content:`Update ${i.create_update?.id} successfully created on item ${e.itemId}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_schema",this.type=y.READ,this.annotations=Lm({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 V_}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(fw,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_activity",this.type=y.READ,this.annotations=Lm({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 N_}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-I_.MONTH30Days),i=e?.fromDate||t.toISOString(),n=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},s=await this.mondayApi.request(__,o),r=s.boards?.[0]?.activity_logs;if(!r||0===r.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=r.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${r.length} entries):\n\n${p}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_info",this.type=y.READ,this.annotations=Lm({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return R_}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(S_,a),i=t.boards?.[0];return i?{content:A_(i)}:{content:`Board with id ${e.boardId} not found or you don't have access to it.`}}},class extends Fm{constructor(){super(...arguments),this.name="get_users_by_name",this.type=y.READ,this.annotations=Lm({title:"Get Users",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get users, can be filtered by name or partial name"}getInputSchema(){return G_}async executeInternal(e){const a={name:e.name},t=await this.mondayApi.request(hw,a);return{content:`Relevant users:\n ${t.users?.map((e=>` id: ${e?.id}, name: ${e?.name}, title: ${e?.title}`)).join("\n")}`}}},class extends Fm{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=y.READ,this.annotations=Lm({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'PRECISION-FIRST user and team retrieval tool. AI agents MUST prioritize specific queries over broad searches.\n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs when available (userIds, teamIds) - highest precision and performance\n 2. ALWAYS use name search when you have user names but no IDs \n 3. ALWAYS use boolean getMe: true when requesting current user information\n 4. AVOID broad queries (no parameters) - use only as absolute last resort\n 5. COMBINE parameters strategically to minimize API calls\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe: true (when requesting current user) - STANDALONE ONLY\n 2. name="exact_name" (when searching by name) - STANDALONE ONLY \n 3. userIds=["id1","id2"] (when you have specific user IDs)\n 4. teamIds=["id1","id2"] + teamsOnly: true (when you have specific team IDs)\n 5. No parameters (LAST RESORT - fetches up to 1000 users, avoid unless absolutely necessary)\n\n CRITICAL USAGE RULES:\n • getMe and name parameters CANNOT be combined with any other parameters\n • userIds + teamIds requires explicit includeTeams: true flag\n • teamsOnly: true prevents user data fetching (teams-only queries)\n • includeTeamMembers: true adds detailed member data to teams\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\n OPTIMIZATION DIRECTIVES:\n • NEVER fetch all users when specific IDs are available\n • NEVER use broad queries for single user/team lookups \n • ALWAYS prefer name search over ID-less queries for individual users\n • SET includeTeamMembers: false for team lists, true only for member analysis \n • AVOID includeTeams: true unless you specifically need both users AND teams\n • AVOID broad queries for single user/team, if you have specific IDs, use them. For example getting a user\'s teams, use that user\'s ID and fetch their team using the includeTeams flag.\n\n RESPONSE CONTENT:\n • Users: id, name, email, title, permissions, contact details, team memberships\n • Teams: id, name, owners, members (when includeTeamMembers: true)\n • Current user: id, name, title, enabled, is_admin, is_guest (basic profile only)'}getInputSchema(){return lT}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,s=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||s)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(oT);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const r={users:[e.me]};return{content:sT(r)}}if(s){if(a||t||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const s={name:e.name},r=await this.mondayApi.request(nT,s);if(!r.users||0===r.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=r.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${r.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>rT)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(t&&e.teamIds&&e.teamIds.length>pT)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let r;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};r=await this.mondayApi.request(iT,a)}else{const a={teamIds:e.teamIds};r=await this.mondayApi.request(tT,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:dT};r=await this.mondayApi.request(aT,a)}else if(a){const a={userIds:e.userIds,limit:dT};r=await this.mondayApi.request(Z_,a)}else{const e={userIds:void 0,limit:dT};r=await this.mondayApi.request(eT,e)}return{content:sT(r)}}},jw,class extends Fm{constructor(){super(...arguments),this.name="move_item_to_group",this.type=y.WRITE,this.annotations=Lm({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 cT}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(gw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Fm{constructor(){super(...arguments),this.name="create_board",this.type=y.WRITE,this.annotations=Lm({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Vw}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(bw,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_form",this.type=y.WRITE,this.annotations=Lm({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 hx}async executeInternal(e){const a={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},t=await this.mondayApi.request(Ww,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Fm{constructor(){super(...arguments),this.name="update_form",this.type=y.WRITE,this.annotations=Lm({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new n_(this.mondayApi),this.actionHandlers=new Map([[Lx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Lx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Lx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Lx.activate,this.helpers.activateForm.bind(this.helpers)],[Lx.createTag,this.helpers.createTag.bind(this.helpers)],[Lx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Lx.updateTag,this.helpers.updateTag.bind(this.helpers)],[Lx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Lx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Lx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Lx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Lx.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 i_}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:"Received an invalid action for the update form tool."}}},class extends Fm{constructor(){super(...arguments),this.name="get_form",this.type=y.READ,this.annotations=Lm({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 o_}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(Yw,a);return t.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(t.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Fm{constructor(){super(...arguments),this.name="form_questions_editor",this.type=y.WRITE,this.annotations=Lm({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new $x(this.mondayApi),this.actionHandlers=new Map([[kx.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[kx.Update,this.helpers.updateQuestion.bind(this.helpers)],[kx.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Cx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:`Unknown action: ${e.action}`}}},class extends Fm{constructor(){super(...arguments),this.name="create_column",this.type=y.WRITE,this.annotations=Lm({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?s_:r_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},t=await this.mondayApi.request(yw,a);return{content:`Column ${t.create_column?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_group",this.type=y.WRITE,this.annotations=Lm({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 c_}async executeInternal(e){const a={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},t=await this.mondayApi.request(d_,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="delete_column",this.type=y.WRITE,this.annotations=Lm({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?b_:y_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(ww,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},$w,class extends Fm{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=y.ALL_API,this.annotations=Lm({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 B_}async executeInternal(e){try{const a=await this.mondayApi.request(xw),t=e?.operationType,i=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,s=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let r="## GraphQL Schema\n";return t&&"read"!==t||(r+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,r+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(r+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,r+=`## Mutation Fields\n${n}\n\n`),r+=`## Available Types\n${s}\n\n`,r+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:r}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fm{constructor(){super(...arguments),this.name="get_column_type_info",this.type=y.READ,this.annotations=Lm({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 U_}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(P_,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_type_details",this.type=y.ALL_API,this.annotations=Lm({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 M_}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const t=(a=e.typeName,dw`
1249
+ `,OT={objectType:a.nativeEnum(lb).describe("The type of object to move"),id:a.string().describe("The ID of the object to move"),position:a.object({object_id:a.string().describe("The ID of the object to position the object relative to"),object_type:a.nativeEnum(lb).describe("The type of object to position the object relative to"),is_after:a.boolean().optional().describe("Whether to position the object after the object")}).optional().describe("The new position of the object. Required if changing the position based on another object."),parentFolderId:a.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:a.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:a.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};a.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'),a.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const kT=[class extends Fm{constructor(){super(...arguments),this.name="delete_item",this.type=y.WRITE,this.annotations=Lm({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return y_}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(lw,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_items_page",this.type=y.READ,this.annotations=Lm({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get all items from a monday.com board with pagination support and optional column values. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the 'nextCursor' parameter from the response to get the next page of results when 'has_more' is true.[REQUIRED PRECONDITION]: Before using this tool, if 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 $_}parseAndAssignJsonField(e,a,t){if(e[t]&&!e[a])try{e[a]=JSON.parse(e[t])}catch{throw new Error(`${t} is not a valid JSON`)}}async executeInternal(e){const a=!e.cursor;if(a&&e.searchTerm&&(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length))return{content:"No items found matching the specified searchTerm"};const t={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor,includeColumns:e.includeColumns,columnIds:e.columnIds};this.parseAndAssignJsonField(e,"filters","filtersStringified"),this.parseAndAssignJsonField(e,"orderBy","orderByStringified"),a&&(e.itemIds||e.filters||e.orderBy)&&(t.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(R_,t),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}mapResult(e,a){const t=e.boards?.[0],i=t?.items_page,n=i?.items||[];return{board:{id:t?.id,name:t?.name},items:n.map((e=>{const t={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};return a.includeColumns&&e.column_values&&(t.column_values={},e.column_values.forEach((e=>{if(e.value)try{t.column_values[e.id]=JSON.parse(e.value)}catch{t.column_values[e.id]=e.value}else t.column_values[e.id]=e.text||null}))),t})),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}async getItemIdsFromSmartSearchAsync(e){const a={boardId:e.boardId.toString(),searchTerm:e.searchTerm},t=await this.mondayApi.request(C_,a),i=t.search_items?.results?.map((e=>Number(e.data.id)))??[],n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends Fm{constructor(){super(...arguments),this.name="create_item",this.type=y.WRITE,this.annotations=Lm({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."}getInputSchema(){return this.context?.boardId?u_:f_}async executeInternal(e){const a=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,a):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,a)}async duplicateAndUpdateItem(e,a){try{const t={boardId:a.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(c_,t);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},s=new Fw(this.mondayApi,this.apiToken,{boardId:a}),r=await s.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(r.content.includes("Error"))throw new Error("Failed to update duplicated item: "+r.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){this.rethrowWrapped(e,"duplicate item")}}async createSubitem(e){const a={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const t=await this.mondayApi.request(m_,a);if(!t.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${t.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){this.rethrowWrapped(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(cw,t);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){this.rethrowWrapped(e,"create item")}}rethrowWrapped(e,a){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)throw new Error(`Failed to ${a}: ${t.response.errors.map((e=>e.message)).join(", ")}`)}throw new Error(`Failed to ${a}: ${t}`)}},class extends Fm{constructor(){super(...arguments),this.name="create_update",this.type=y.WRITE,this.annotations=Lm({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update in a monday.com board"}getInputSchema(){return v_}async executeInternal(e){let a;if(e.mentionsList)try{a=JSON.parse(e.mentionsList)}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e instanceof Error?e.message:"Unknown error"}`)}const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(mw,t);return{content:`Update ${i.create_update?.id} successfully created on item ${e.itemId}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_schema",this.type=y.READ,this.annotations=Lm({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 L_}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(uw,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_activity",this.type=y.READ,this.annotations=Lm({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 I_}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-E_.MONTH30Days),i=e?.fromDate||t.toISOString(),n=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},s=await this.mondayApi.request(x_,o),r=s.boards?.[0]?.activity_logs;if(!r||0===r.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=r.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${r.length} entries):\n\n${p}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_board_info",this.type=y.READ,this.annotations=Lm({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return k_}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(N_,a),i=t.boards?.[0];return i?{content:S_(i)}:{content:`Board with id ${e.boardId} not found or you don't have access to it.`}}},class extends Fm{constructor(){super(...arguments),this.name="get_users_by_name",this.type=y.READ,this.annotations=Lm({title:"Get Users",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get users, can be filtered by name or partial name"}getInputSchema(){return B_}async executeInternal(e){const a={name:e.name},t=await this.mondayApi.request(fw,a);return{content:`Relevant users:\n ${t.users?.map((e=>` id: ${e?.id}, name: ${e?.name}, title: ${e?.title}`)).join("\n")}`}}},class extends Fm{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=y.READ,this.annotations=Lm({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'PRECISION-FIRST user and team retrieval tool. AI agents MUST prioritize specific queries over broad searches.\n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs when available (userIds, teamIds) - highest precision and performance\n 2. ALWAYS use name search when you have user names but no IDs \n 3. ALWAYS use boolean getMe: true when requesting current user information\n 4. AVOID broad queries (no parameters) - use only as absolute last resort\n 5. COMBINE parameters strategically to minimize API calls\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe: true (when requesting current user) - STANDALONE ONLY\n 2. name="exact_name" (when searching by name) - STANDALONE ONLY \n 3. userIds=["id1","id2"] (when you have specific user IDs)\n 4. teamIds=["id1","id2"] + teamsOnly: true (when you have specific team IDs)\n 5. No parameters (LAST RESORT - fetches up to 1000 users, avoid unless absolutely necessary)\n\n CRITICAL USAGE RULES:\n • getMe and name parameters CANNOT be combined with any other parameters\n • userIds + teamIds requires explicit includeTeams: true flag\n • teamsOnly: true prevents user data fetching (teams-only queries)\n • includeTeamMembers: true adds detailed member data to teams\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\n OPTIMIZATION DIRECTIVES:\n • NEVER fetch all users when specific IDs are available\n • NEVER use broad queries for single user/team lookups \n • ALWAYS prefer name search over ID-less queries for individual users\n • SET includeTeamMembers: false for team lists, true only for member analysis \n • AVOID includeTeams: true unless you specifically need both users AND teams\n • AVOID broad queries for single user/team, if you have specific IDs, use them. For example getting a user\'s teams, use that user\'s ID and fetch their team using the includeTeams flag.\n\n RESPONSE CONTENT:\n • Users: id, name, email, title, permissions, contact details, team memberships\n • Teams: id, name, owners, members (when includeTeamMembers: true)\n • Current user: id, name, title, enabled, is_admin, is_guest (basic profile only)'}getInputSchema(){return rT}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,s=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||s)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(tT);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const r={users:[e.me]};return{content:iT(r)}}if(s){if(a||t||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const s={name:e.name},r=await this.mondayApi.request(aT,s);if(!r.users||0===r.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=r.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${r.users.length} user(s) matching "${e.name}":\n\n${p}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>nT)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(t&&e.teamIds&&e.teamIds.length>oT)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let r;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};r=await this.mondayApi.request(eT,a)}else{const a={teamIds:e.teamIds};r=await this.mondayApi.request(Z_,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:sT};r=await this.mondayApi.request(X_,a)}else if(a){const a={userIds:e.userIds,limit:sT};r=await this.mondayApi.request(J_,a)}else{const e={userIds:void 0,limit:sT};r=await this.mondayApi.request(Q_,e)}return{content:iT(r)}}},Fw,class extends Fm{constructor(){super(...arguments),this.name="move_item_to_group",this.type=y.WRITE,this.annotations=Lm({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 pT}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(vw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Fm{constructor(){super(...arguments),this.name="create_board",this.type=y.WRITE,this.annotations=Lm({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return jw}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(gw,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_form",this.type=y.WRITE,this.annotations=Lm({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 fx}async executeInternal(e){const a={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},t=await this.mondayApi.request(zw,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Fm{constructor(){super(...arguments),this.name="update_form",this.type=y.WRITE,this.annotations=Lm({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new i_(this.mondayApi),this.actionHandlers=new Map([[$x.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[$x.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[$x.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[$x.activate,this.helpers.activateForm.bind(this.helpers)],[$x.createTag,this.helpers.createTag.bind(this.helpers)],[$x.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[$x.updateTag,this.helpers.updateTag.bind(this.helpers)],[$x.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[$x.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[$x.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[$x.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[$x.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 t_}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:"Received an invalid action for the update form tool."}}},class extends Fm{constructor(){super(...arguments),this.name="get_form",this.type=y.READ,this.annotations=Lm({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 n_}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(Ww,a);return t.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(t.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Fm{constructor(){super(...arguments),this.name="form_questions_editor",this.type=y.WRITE,this.annotations=Lm({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new Cx(this.mondayApi),this.actionHandlers=new Map([[Ox.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Ox.Update,this.helpers.updateQuestion.bind(this.helpers)],[Ox.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Rx}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:`Unknown action: ${e.action}`}}},class extends Fm{constructor(){super(...arguments),this.name="create_column",this.type=y.WRITE,this.annotations=Lm({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?o_:s_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},t=await this.mondayApi.request(bw,a);return{content:`Column ${t.create_column?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_group",this.type=y.WRITE,this.annotations=Lm({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 l_}async executeInternal(e){const a={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},t=await this.mondayApi.request(p_,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="delete_column",this.type=y.WRITE,this.annotations=Lm({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?g_:b_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(yw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},Cw,class extends Fm{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=y.ALL_API,this.annotations=Lm({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 V_}async executeInternal(e){try{const a=await this.mondayApi.request(ww),t=e?.operationType,i=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,s=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let r="## GraphQL Schema\n";return t&&"read"!==t||(r+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,r+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(r+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,r+=`## Mutation Fields\n${n}\n\n`),r+=`## Available Types\n${s}\n\n`,r+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:r}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fm{constructor(){super(...arguments),this.name="get_column_type_info",this.type=y.READ,this.annotations=Lm({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 j_}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(F_,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="get_type_details",this.type=y.ALL_API,this.annotations=Lm({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 P_}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const t=(a=e.typeName,dw`
1261
1250
  query getTypeDetails {
1262
1251
  __type(name: "${a}") {
1263
1252
  name
@@ -1345,5 +1334,5 @@ import{ApiClient as e}from"@mondaydotcomorg/api";import{z as a}from"zod";import
1345
1334
  }
1346
1335
  }
1347
1336
  }
1348
- `),i=await this.mondayApi.request(t);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const a=q_(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const a=q_(e.type);n+=` - ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const a=q_(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const a=e instanceof Error?e.message:"Unknown error",t=a.includes("JSON");return{content:`Error fetching type details: ${a}${t?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var a}},class extends Fm{constructor(){super(...arguments),this.name="create_custom_activity",this.type=y.WRITE,this.annotations=Lm({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return p_}async executeInternal(e){const a={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Tw,a),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_timeline_item",this.type=y.WRITE,this.annotations=Lm({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return v_}async executeInternal(e){const a={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(a.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const t=await this.mondayApi.request(Ew,a);return{content:`Timeline item '${e.title}' with ID ${t.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Fm{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=y.READ,this.annotations=Lm({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return x_}async executeInternal(e){const a=await this.mondayApi.request(Iw);if(!a.custom_activity||0===a.custom_activity.length)return{content:"No custom activities found"};const t=a.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${t.length} custom activities: ${JSON.stringify(t,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="read_docs",this.type=y.READ,this.annotations=Lm({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 mT}async executeInternal(e){try{let a,t,i;switch(e.type){case"ids":a=e.ids;break;case"object_ids":t=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:a,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(Ow,n);if((!o.docs||0===o.docs.length)&&a){const t={ids:void 0,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request(Ow,t)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const s=await this.enrichDocsWithMarkdown(o.docs,n),r=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:s.content+r}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,a,t){return e===a?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${a} documents, which suggests there may be more. Consider calling this tool again with page: ${t+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,a){const t=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let a="";try{const t={docId:e.id},i=await this.mondayApi.request(kw,t);a=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){a=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:a}}))),i=a.page||1,n=a.limit||25,o=t.length,s=o===n;return{content:`Successfully retrieved ${t.length} document${1===t.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${s?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(t,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="workspace_info",this.type=y.READ,this.annotations=Lm({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 uT}async executeInternal(e){const a={workspace_id:e.workspace_id},t=await this.mondayApi.request(Rw,a);if(!t.workspaces||0===t.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:a,boards:t,docs:i,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=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:[]}]))),r=[];(t||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(a):r.push(a)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(a):p.push(a)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(s.values()),root_items:{boards:r,docs:p}}}(t);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,a)=>e+a.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,a)=>e+a.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="list_workspaces",this.type=y.READ,this.annotations=Lm({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 hT}async executeInternal(e){const a={limit:5e3},t=await this.mondayApi.request(fT,a);if(!t.workspaces||0===t.workspaces.length)return{content:"No workspaces found."};const i=t.workspaces.filter((e=>null!==e)).map((e=>{const a=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${a}`})).join("\n");return{content:`**Available Workspaces (${t.workspaces.length}):**\n\n${i}\n\n**Summary:**\nTotal workspaces found: ${t.workspaces.length}\n\n${JSON.stringify(t.workspaces,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="create_doc",this.type=y.WRITE,this.annotations=Lm({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: { type: "workspace", workspace_id: 123, doc_kind: "private" }, markdown: "..." }\n- Workspace doc in folder: { location: { type: "workspace", workspace_id: 123, folder_id: 17264196 }, markdown: "..." }\n- Item doc: { location: { type: "item", item_id: 456, column_id: "doc_col_1" }, markdown: "..." }'}getInputSchema(){return gT}async executeInternal(e){try{let a,t;if(e.location.type===vT.enum.workspace){const i={location:{workspace:{workspace_id:e.location.workspace_id.toString(),name:e.doc_name,kind:e.location.doc_kind||og.Public,folder_id:e.location.folder_id?.toString()}}},n=await this.mondayApi.request(Sw,i);a=n?.create_doc?.id??void 0,t=n?.create_doc?.url??void 0}else if(e.location.type===vT.enum.item){const i={itemId:e.location.item_id.toString()},n=await this.mondayApi.request(Nw,i),o=n.items?.[0];if(!o)return{content:`Error: Item with id ${e.location.item_id} not found.`};const s=o.board?.id,r=o.board?.columns?.find((e=>e&&e.type===gg.Doc));let p=e.location.column_id;if(!p)if(r)p=r.id;else{const e={boardId:s.toString(),columnType:gg.Doc,columnTitle:"Doc"},a=await this.mondayApi.request(yw,e);if(p=a?.create_column?.id,!p)return{content:"Error: Failed to create doc column."}}const d={location:{board:{item_id:e.location.item_id.toString(),column_id:p}}},l=await this.mondayApi.request(Sw,d);if(a=l.create_doc?.id??void 0,t=l.create_doc?.url??void 0,e.doc_name&&a)try{const t={docId:a,name:e.doc_name};await this.mondayApi.request(Dw,t)}catch(e){console.warn("Failed to update doc name:",e)}}if(!a)return{content:"Error: Failed to create document."};const i={docId:a,markdown:e.markdown},n=await this.mondayApi.request(Aw,i),o=n?.add_content_to_doc_from_markdown?.success,s=n?.add_content_to_doc_from_markdown?.error;return o?{content:`✅ Document successfully created (id: ${a}). ${t?`\n\nURL: ${t}`:""}`}:{content:`Document ${a} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fm{constructor(){super(...arguments),this.name="update_workspace",this.type=y.WRITE,this.annotations=Lm({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return ET}async executeInternal(e){const a={id:e.id,attributes:e.attributes},t=await this.mondayApi.request(TT,a);return{content:`Workspace ${t.update_workspace?.id} successfully updated`}}},class extends Fm{constructor(){super(...arguments),this.name="update_folder",this.type=y.WRITE,this.annotations=Lm({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return NT}async executeInternal(e){const a={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:e.position},t=await this.mondayApi.request(IT,a);return{content:`Folder ${t.update_folder?.id} successfully updated`}}},class extends Fm{constructor(){super(...arguments),this.name="create_workspace",this.type=y.WRITE,this.annotations=Lm({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return AT}async executeInternal(e){const a={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},t=await this.mondayApi.request(ST,a);return{content:`Workspace ${t.create_workspace?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_folder",this.type=y.WRITE,this.annotations=Lm({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return OT}async executeInternal(e){const a={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},t=await this.mondayApi.request(DT,a);return{content:`Folder ${t.create_folder?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="move_object",this.type=y.WRITE,this.annotations=Lm({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 CT}async executeUpdateFolder(e){const{id:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o}=e,s={folderId:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o},r=await this.mondayApi.request(IT,s);return{content:`Object ${r.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o}=e,s={boardId:a,attributes:{position:t,folder_id:i,workspace_id:n,account_product_id:o}},r=await this.mondayApi.request(kT,s);return r.update_board_hierarchy?.success?{content:`Board ${r.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${r.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o}=e,s={overviewId:a,attributes:{position:t,folder_id:i,workspace_id:n,account_product_id:o}},r=await this.mondayApi.request(RT,s);return r.update_overview_hierarchy?.success?{content:`Overview ${r.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${r.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:a}=e;switch(a){case lb.Folder:return this.executeUpdateFolder(e);case lb.Board:return this.executeUpdateBoardHierarchy(e);case lb.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${a}`)}}},class extends Fm{constructor(){super(...arguments),this.name="create_dashboard",this.type=y.WRITE,this.annotations=Lm({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 xT}async executeInternal(e){try{const a={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},t=await this.mondayApi.request(bT,a);if(!t.create_dashboard)throw new Error("Failed to create dashboard");const i=t.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===xg.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${a}`)}}},class extends Fm{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=y.READ,this.annotations=Lm({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},a=await this.mondayApi.request(yT,e);if(!a.all_widgets_schema||0===a.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const t={};let i=0;for(const e of a.all_widgets_schema)if(e?.widget_type&&e?.schema){const a="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=a?.description||a?.title||`${e.widget_type} widget for data visualization`;t[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(t).map((e=>`• **${e}**: ${t[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(t,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${a}`)}}},class extends Fm{constructor(){super(...arguments),this.name="create_widget",this.type=y.WRITE,this.annotations=Lm({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 _T}async executeInternal(e){try{const a={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},t=await this.mondayApi.request(wT,a);if(!t.create_widget)throw new Error("Failed to create widget");const i=t.create_widget,n=i.parent?.kind===Bb.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(a){const t=a instanceof Error?a.message:String(a);throw new Error(`Failed to create ${e.widget_kind} widget: ${t}`)}}}];var LT;!function(e){e.API="api",e.APPS="apps"}(LT||(LT={}));const FT=(e,a)=>{let t=[];a?.mode===LT.APPS?t=[...w]:a?.mode!==LT.API&&a?.mode||(t=[...$T]);const i=t.map((a=>((e,a)=>e.prototype instanceof Fm?new e(a.apiClient,a.apiToken):new e)(a,e)));return i.filter((e=>{if(!a)return e.type!==y.ALL_API;if(a.mode===LT.API&&"only"===a.enableDynamicApiTools)return e.type===y.ALL_API;let t=!1;return a.mode===LT.API&&!1===a.enableDynamicApiTools&&(t=t||e.type===y.ALL_API),a.readOnlyMode&&(t=t||e.type!==y.READ),a.include?t=t||!a.include?.includes(e.name):a.exclude&&(t=t||a.exclude?.includes(e.name)),!t}))};class jT{constructor(a){this.mondayApi=new e({token:a.mondayApiToken,apiVersion:a.mondayApiVersion,requestConfig:a.mondayApiRequestConfig}),this.mondayApiToken=a.mondayApiToken,this.tools=this.initializeTools(a)}initializeTools(e){const a={apiClient:this.mondayApi,apiToken:this.mondayApiToken};return FT(a,e.toolsConfiguration)}getTools(){return this.tools.map((e=>{const t=e.getInputSchema();return{type:"function",function:{name:e.name,description:e.getDescription(),parameters:t?b(a.object(t)):void 0}}}))}async handleToolCall(e){const{name:t,arguments:i}=e.function,n=JSON.parse(i),o=this.tools.find((e=>e.name===t));if(!o)throw new Error(`Unknown tool: ${t}`);const s=o.getInputSchema();if(s){const t=a.object(s).safeParse(n);if(!t.success)throw new Error(`Invalid arguments: ${t.error.message}`);const i=await o.execute(t.data);return{role:"tool",tool_call_id:e.id,content:i.content}}{const a=await o.execute();return{role:"tool",tool_call_id:e.id,content:a.content}}}}export{jT as MondayAgentToolkit};
1337
+ `),i=await this.mondayApi.request(t);if(!i.__type)return{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`};let n=`## Type: ${i.__type.name||"Unnamed"} ${e.typeName===i.__type.name?"":`(queried: ${e.typeName})`}\nKind: ${i.__type.kind}\n${i.__type.description?`Description: ${i.__type.description}`:""}\n\n`;return i.__type.fields&&i.__type.fields.length>0&&(n+="## Fields\n",i.__type.fields.forEach((e=>{const a=U_(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}\n`,e.args&&e.args.length>0&&(n+=" Arguments:\n",e.args.forEach((e=>{const a=U_(e.type);n+=` - ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})))})),n+="\n"),i.__type.inputFields&&i.__type.inputFields.length>0&&(n+="## Input Fields\n",i.__type.inputFields.forEach((e=>{const a=U_(e.type);n+=`- ${e.name}: ${a}${e.description?` - ${e.description}`:""}${e.defaultValue?` (default: ${e.defaultValue})`:""}\n`})),n+="\n"),i.__type.interfaces&&i.__type.interfaces.length>0&&(n+="## Implements\n",i.__type.interfaces.forEach((e=>{n+=`- ${e.name}\n`})),n+="\n"),i.__type.enumValues&&i.__type.enumValues.length>0&&(n+="## Enum Values\n",i.__type.enumValues.forEach((e=>{n+=`- ${e.name}${e.description?` - ${e.description}`:""}\n`})),n+="\n"),i.__type.possibleTypes&&i.__type.possibleTypes.length>0&&(n+="## Possible Types\n",i.__type.possibleTypes.forEach((e=>{n+=`- ${e.name}\n`}))),n+=`\n## Usage Examples\nIf this is a Query or Mutation field, you can use it in the all_monday_api tool.\n\nExample for query:\nall_monday_api(operation: "query", name: "getTypeData", variables: "{\\"typeName\\": \\"${i.__type.name}\\"}")\n\nExample for object field access:\nWhen querying objects that have this type, include these fields in your query.\n`,{content:n}}catch(e){const a=e instanceof Error?e.message:"Unknown error",t=a.includes("JSON");return{content:`Error fetching type details: ${a}${t?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var a}},class extends Fm{constructor(){super(...arguments),this.name="create_custom_activity",this.type=y.WRITE,this.annotations=Lm({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return r_}async executeInternal(e){const a={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(_w,a),{content:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_timeline_item",this.type=y.WRITE,this.annotations=Lm({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return h_}async executeInternal(e){const a={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(a.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const t=await this.mondayApi.request(Tw,a);return{content:`Timeline item '${e.title}' with ID ${t.create_timeline_item?.id} successfully created on item ${e.item_id}`}}},class extends Fm{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=y.READ,this.annotations=Lm({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return w_}async executeInternal(e){const a=await this.mondayApi.request(Ew);if(!a.custom_activity||0===a.custom_activity.length)return{content:"No custom activities found"};const t=a.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:`Found ${t.length} custom activities: ${JSON.stringify(t,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="read_docs",this.type=y.READ,this.annotations=Lm({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 dT}async executeInternal(e){try{let a,t,i;switch(e.type){case"ids":a=e.ids;break;case"object_ids":t=e.ids;break;case"workspace_ids":i=e.ids}const n={ids:a,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};let o=await this.mondayApi.request(Dw,n);if((!o.docs||0===o.docs.length)&&a){const t={ids:void 0,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i};o=await this.mondayApi.request(Dw,t)}if(!o.docs||0===o.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const s=await this.enrichDocsWithMarkdown(o.docs,n),r=this.shouldSuggestPagination(o.docs.length,n.limit||25,n.page||1);return{content:s.content+r}}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}shouldSuggestPagination(e,a,t){return e===a?`\n\n🔄 PAGINATION SUGGESTION: You received exactly ${a} documents, which suggests there may be more. Consider calling this tool again with page: ${t+1} to get additional documents.`:""}async enrichDocsWithMarkdown(e,a){const t=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let a="";try{const t={docId:e.id},i=await this.mondayApi.request(Ow,t);a=i.export_markdown_from_doc.success&&i.export_markdown_from_doc.markdown?i.export_markdown_from_doc.markdown:`Error getting markdown: ${i.export_markdown_from_doc.error||"Unknown error"}`}catch(e){a=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,blocks_as_markdown:a}}))),i=a.page||1,n=a.limit||25,o=t.length,s=o===n;return{content:`Successfully retrieved ${t.length} document${1===t.length?"":"s"}.\n\nPAGINATION INFO:\n- Current page: ${i}\n- Documents per page: ${n}\n- Documents in this response: ${o}\n- Has more pages: ${s?"YES - call again with page: "+(i+1):"NO"}\n\nDOCUMENTS:\n${JSON.stringify(t,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="workspace_info",this.type=y.READ,this.annotations=Lm({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 lT}async executeInternal(e){const a={workspace_id:e.workspace_id},t=await this.mondayApi.request(kw,a);if(!t.workspaces||0===t.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e){const{workspaces:a,boards:t,docs:i,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=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:[]}]))),r=[];(t||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(a):r.push(a)}));const p=[];return(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const a={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(a):p.push(a)})),{workspace:{id:o.id,name:o.name,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(s.values()),root_items:{boards:r,docs:p}}}(t);return{content:`Workspace Information:\n\n**Workspace:** ${i.workspace.name} (ID: ${i.workspace.id})\n- Description: ${i.workspace.description||"No description"}\n- Kind: ${i.workspace.kind}\n- State: ${i.workspace.state}\n- Default Workspace: ${i.workspace.is_default_workspace?"Yes":"No"}\n- Created: ${i.workspace.created_at}\n- Owners/Subscribers: ${i.workspace.owners_subscribers.length} users\n\n**Folders (${i.folders.length}):**\n${i.folders.map((e=>`\n📁 ${e.name} (ID: ${e.id})\n - Boards (${e.boards.length}): ${e.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n - Docs (${e.docs.length}): ${e.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}`)).join("\n")}\n\n**Root Level Items:**\n- Boards (${i.root_items.boards.length}): ${i.root_items.boards.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n- Docs (${i.root_items.docs.length}): ${i.root_items.docs.map((e=>`${e.name} (${e.id})`)).join(", ")||"None"}\n\n**Summary:**\n- Total Folders: ${i.folders.length}\n- Total Boards: ${i.folders.reduce(((e,a)=>e+a.boards.length),0)+i.root_items.boards.length}\n- Total Docs: ${i.folders.reduce(((e,a)=>e+a.docs.length),0)+i.root_items.docs.length}\n\n${JSON.stringify(i,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="list_workspaces",this.type=y.READ,this.annotations=Lm({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 mT}async executeInternal(e){const a={limit:5e3},t=await this.mondayApi.request(cT,a);if(!t.workspaces||0===t.workspaces.length)return{content:"No workspaces found."};const i=t.workspaces.filter((e=>null!==e)).map((e=>{const a=e.description?` - ${e.description}`:"";return`• **${e.name}** (ID: ${e.id})${a}`})).join("\n");return{content:`**Available Workspaces (${t.workspaces.length}):**\n\n${i}\n\n**Summary:**\nTotal workspaces found: ${t.workspaces.length}\n\n${JSON.stringify(t.workspaces,null,2)}`}}},class extends Fm{constructor(){super(...arguments),this.name="create_doc",this.type=y.WRITE,this.annotations=Lm({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: { type: "workspace", workspace_id: 123, doc_kind: "private" }, markdown: "..." }\n- Workspace doc in folder: { location: { type: "workspace", workspace_id: 123, folder_id: 17264196 }, markdown: "..." }\n- Item doc: { location: { type: "item", item_id: 456, column_id: "doc_col_1" }, markdown: "..." }'}getInputSchema(){return fT}async executeInternal(e){try{let a,t;if(e.location.type===uT.enum.workspace){const i={location:{workspace:{workspace_id:e.location.workspace_id.toString(),name:e.doc_name,kind:e.location.doc_kind||og.Public,folder_id:e.location.folder_id?.toString()}}},n=await this.mondayApi.request(Nw,i);a=n?.create_doc?.id??void 0,t=n?.create_doc?.url??void 0}else if(e.location.type===uT.enum.item){const i={itemId:e.location.item_id.toString()},n=await this.mondayApi.request(Iw,i),o=n.items?.[0];if(!o)return{content:`Error: Item with id ${e.location.item_id} not found.`};const s=o.board?.id,r=o.board?.columns?.find((e=>e&&e.type===gg.Doc));let p=e.location.column_id;if(!p)if(r)p=r.id;else{const e={boardId:s.toString(),columnType:gg.Doc,columnTitle:"Doc"},a=await this.mondayApi.request(bw,e);if(p=a?.create_column?.id,!p)return{content:"Error: Failed to create doc column."}}const d={location:{board:{item_id:e.location.item_id.toString(),column_id:p}}},l=await this.mondayApi.request(Nw,d);if(a=l.create_doc?.id??void 0,t=l.create_doc?.url??void 0,e.doc_name&&a)try{const t={docId:a,name:e.doc_name};await this.mondayApi.request(Aw,t)}catch(e){console.warn("Failed to update doc name:",e)}}if(!a)return{content:"Error: Failed to create document."};const i={docId:a,markdown:e.markdown},n=await this.mondayApi.request(Sw,i),o=n?.add_content_to_doc_from_markdown?.success,s=n?.add_content_to_doc_from_markdown?.error;return o?{content:`✅ Document successfully created (id: ${a}). ${t?`\n\nURL: ${t}`:""}`}:{content:`Document ${a} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Fm{constructor(){super(...arguments),this.name="update_workspace",this.type=y.WRITE,this.annotations=Lm({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return xT}async executeInternal(e){const a={id:e.id,attributes:e.attributes},t=await this.mondayApi.request(wT,a);return{content:`Workspace ${t.update_workspace?.id} successfully updated`}}},class extends Fm{constructor(){super(...arguments),this.name="update_folder",this.type=y.WRITE,this.annotations=Lm({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return TT}async executeInternal(e){const a={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:e.position},t=await this.mondayApi.request(_T,a);return{content:`Folder ${t.update_folder?.id} successfully updated`}}},class extends Fm{constructor(){super(...arguments),this.name="create_workspace",this.type=y.WRITE,this.annotations=Lm({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return IT}async executeInternal(e){const a={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},t=await this.mondayApi.request(ET,a);return{content:`Workspace ${t.create_workspace?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="create_folder",this.type=y.WRITE,this.annotations=Lm({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return ST}async executeInternal(e){const a={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},t=await this.mondayApi.request(NT,a);return{content:`Folder ${t.create_folder?.id} successfully created`}}},class extends Fm{constructor(){super(...arguments),this.name="move_object",this.type=y.WRITE,this.annotations=Lm({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 OT}async executeUpdateFolder(e){const{id:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o}=e,s={folderId:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o},r=await this.mondayApi.request(_T,s);return{content:`Object ${r.update_folder?.id} successfully moved`}}async executeUpdateBoardHierarchy(e){const{id:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o}=e,s={boardId:a,attributes:{position:t,folder_id:i,workspace_id:n,account_product_id:o}},r=await this.mondayApi.request(AT,s);return r.update_board_hierarchy?.success?{content:`Board ${r.update_board_hierarchy?.board?.id} position updated successfully`}:{content:`Board position updated failed: ${r.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:a,position:t,parentFolderId:i,workspaceId:n,accountProductId:o}=e,s={overviewId:a,attributes:{position:t,folder_id:i,workspace_id:n,account_product_id:o}},r=await this.mondayApi.request(DT,s);return r.update_overview_hierarchy?.success?{content:`Overview ${r.update_overview_hierarchy?.overview?.id} position updated successfully`}:{content:`Overview position updated failed: ${r.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:a}=e;switch(a){case lb.Folder:return this.executeUpdateFolder(e);case lb.Board:return this.executeUpdateBoardHierarchy(e);case lb.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${a}`)}}},class extends Fm{constructor(){super(...arguments),this.name="create_dashboard",this.type=y.WRITE,this.annotations=Lm({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 bT}async executeInternal(e){try{const a={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},t=await this.mondayApi.request(hT,a);if(!t.create_dashboard)throw new Error("Failed to create dashboard");const i=t.create_dashboard,n=i.board_folder_id?` in folder ${i.board_folder_id}`:" in workspace root",o=i.kind===xg.Public?"(visible to all workspace members)":"(private - visible only to invited users)";return{content:`✅ Dashboard "${i.name}" successfully created!\n\nDashboard Details:\n• ID: ${i.id}\n• Name: ${i.name}\n• Workspace ID: ${i.workspace_id}${n}\n• Visibility: ${i.kind} ${o}\n• Connected Boards: ${e.board_ids.length} board(s)\n\nNext Steps:\n1. Use 'all_widgets_schema' to understand available widget types\n2. Understand the connected boards structure, columns, and metadata. Map board ids to column ids\n3. Plan Domain-Beneficial Widgets - Strategic widget planning based on real data analysis\n4. Use 'create_widget' to add widgets to the dashboard`}}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${a}`)}}},class extends Fm{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=y.READ,this.annotations=Lm({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},a=await this.mondayApi.request(vT,e);if(!a.all_widgets_schema||0===a.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const t={};let i=0;for(const e of a.all_widgets_schema)if(e?.widget_type&&e?.schema){const a="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=a?.description||a?.title||`${e.widget_type} widget for data visualization`;t[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");return{content:`**Widget Schemas Retrieved Successfully!**\n\n🎯 **Available Widget Types** (${i} schemas found):\n${Object.keys(t).map((e=>`• **${e}**: ${t[e].description}`)).join("\n")}\n\n**Complete JSON Schema 7 Definitions:**\n\n${JSON.stringify(t,null,2)}\n\n**Schema Compliance Tips:**\n- All required fields MUST be provided in widget settings\n- Enum values must match exactly as specified in the schema\n- Data types must conform to the schema definitions\n- Nested objects must follow the exact structure\n\n⚡ **Next Steps:**\n- Use these schemas to validate widget settings before calling 'create_widget'\n- Reference the schema structure when planning widget configurations\n- Ensure 100% compliance with field requirements and data types`}}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${a}`)}}},class extends Fm{constructor(){super(...arguments),this.name="create_widget",this.type=y.WRITE,this.annotations=Lm({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 yT}async executeInternal(e){try{const a={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},t=await this.mondayApi.request(gT,a);if(!t.create_widget)throw new Error("Failed to create widget");const i=t.create_widget,n=i.parent?.kind===Bb.Dashboard?`dashboard ${i.parent.id}`:`board view ${i.parent?.id}`;return{content:`✅ Widget "${i.name}" successfully created!\n\n**Widget Details:**\n• **ID**: ${i.id}\n• **Name**: ${i.name}\n• **Type**: ${i.kind}\n• **Location**: Placed in ${n}\n\n**Widget Configuration:**\n• **Settings Applied**: ${JSON.stringify(e.settings,null,2)}`}}catch(a){const t=a instanceof Error?a.message:String(a);throw new Error(`Failed to create ${e.widget_kind} widget: ${t}`)}}}];var RT;!function(e){e.API="api",e.APPS="apps"}(RT||(RT={}));const CT=(e,a)=>{let t=[];a?.mode===RT.APPS?t=[...w]:a?.mode!==RT.API&&a?.mode||(t=[...kT]);const i=t.map((a=>((e,a)=>e.prototype instanceof Fm?new e(a.apiClient,a.apiToken):new e)(a,e)));return i.filter((e=>{if(!a)return e.type!==y.ALL_API;if(a.mode===RT.API&&"only"===a.enableDynamicApiTools)return e.type===y.ALL_API;let t=!1;return a.mode===RT.API&&!1===a.enableDynamicApiTools&&(t=t||e.type===y.ALL_API),a.readOnlyMode&&(t=t||e.type!==y.READ),a.include?t=t||!a.include?.includes(e.name):a.exclude&&(t=t||a.exclude?.includes(e.name)),!t}))};class $T{constructor(a){this.mondayApi=new e({token:a.mondayApiToken,apiVersion:a.mondayApiVersion,requestConfig:a.mondayApiRequestConfig}),this.mondayApiToken=a.mondayApiToken,this.tools=this.initializeTools(a)}initializeTools(e){const a={apiClient:this.mondayApi,apiToken:this.mondayApiToken};return CT(a,e.toolsConfiguration)}getTools(){return this.tools.map((e=>{const t=e.getInputSchema();return{type:"function",function:{name:e.name,description:e.getDescription(),parameters:t?b(a.object(t)):void 0}}}))}async handleToolCall(e){const{name:t,arguments:i}=e.function,n=JSON.parse(i),o=this.tools.find((e=>e.name===t));if(!o)throw new Error(`Unknown tool: ${t}`);const s=o.getInputSchema();if(s){const t=a.object(s).safeParse(n);if(!t.success)throw new Error(`Invalid arguments: ${t.error.message}`);const i=await o.execute(t.data);return{role:"tool",tool_call_id:e.id,content:i.content}}{const a=await o.execute();return{role:"tool",tool_call_id:e.id,content:a.content}}}}export{$T as MondayAgentToolkit};
1349
1338
  //# sourceMappingURL=index.js.map