@mondaydotcomorg/agent-toolkit 5.8.0 → 5.9.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.
@@ -7,6 +7,8 @@
7
7
  $page: Int
8
8
  $workspace_ids: [ID]
9
9
  $includeBlocks: Boolean = false
10
+ $blocksLimit: Int
11
+ $blocksPage: Int
10
12
  ) {
11
13
  docs(
12
14
  ids: $ids
@@ -34,7 +36,7 @@
34
36
  }
35
37
  workspace_id
36
38
  doc_folder_id
37
- blocks @include(if: $includeBlocks) {
39
+ blocks(limit: $blocksLimit, page: $blocksPage) @include(if: $includeBlocks) {
38
40
  id
39
41
  type
40
42
  parent_block_id
@@ -131,6 +133,7 @@
131
133
  id
132
134
  type
133
135
  title
136
+ revision
134
137
  }
135
138
  }
136
139
  }
@@ -198,6 +201,30 @@
198
201
  }
199
202
  }
200
203
  `,Np=cp`
204
+ mutation updateColumn(
205
+ $boardId: ID!
206
+ $columnId: String!
207
+ $columnType: ColumnType!
208
+ $revision: String!
209
+ $columnTitle: String
210
+ $columnDescription: String
211
+ $columnSettings: JSON
212
+ ) {
213
+ update_column(
214
+ board_id: $boardId
215
+ id: $columnId
216
+ column_type: $columnType
217
+ revision: $revision
218
+ title: $columnTitle
219
+ description: $columnDescription
220
+ settings: $columnSettings
221
+ ) {
222
+ id
223
+ title
224
+ revision
225
+ }
226
+ }
227
+ `,Sp=cp`
201
228
  query getGraphQLSchema {
202
229
  __schema {
203
230
  queryType {
@@ -250,7 +277,7 @@
250
277
  }
251
278
  }
252
279
  }
253
- `,Sp=cp`
280
+ `,Dp=cp`
254
281
  query IntrospectionQuery {
255
282
  __schema {
256
283
  queryType {
@@ -352,7 +379,7 @@
352
379
  }
353
380
  }
354
381
  }
355
- `,Dp=cp`
382
+ `,Ap=cp`
356
383
  mutation createCustomActivity($color: CustomActivityColor!, $icon_id: CustomActivityIcon!, $name: String!) {
357
384
  create_custom_activity(color: $color, icon_id: $icon_id, name: $name) {
358
385
  color
@@ -360,7 +387,7 @@
360
387
  name
361
388
  }
362
389
  }
363
- `,Ap=cp`
390
+ `,kp=cp`
364
391
  mutation createTimelineItem(
365
392
  $item_id: ID!
366
393
  $custom_activity_id: String!
@@ -393,7 +420,7 @@
393
420
  type
394
421
  }
395
422
  }
396
- `,kp=cp`
423
+ `,Op=cp`
397
424
  query fetchCustomActivity {
398
425
  custom_activity {
399
426
  color
@@ -403,7 +430,7 @@
403
430
  type
404
431
  }
405
432
  }
406
- `,Op=cp`
433
+ `,$p=cp`
407
434
  query exportMarkdownFromDoc($docId: ID!, $blockIds: [String!]) {
408
435
  export_markdown_from_doc(docId: $docId, blockIds: $blockIds) {
409
436
  success
@@ -411,7 +438,7 @@
411
438
  error
412
439
  }
413
440
  }
414
- `,$p=cp`
441
+ `,xp=cp`
415
442
  query getWorkspaceInfo($workspace_id: ID!) {
416
443
  workspaces(ids: [$workspace_id]) {
417
444
  id
@@ -442,7 +469,7 @@
442
469
  name
443
470
  }
444
471
  }
445
- `,xp={query:n.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:n.z.string().describe("JSON string containing the variables for the GraphQL operation")};class Cp extends ce{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=me({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 xp}async loadSchema(e){if(Cp.schemaCache[e])return Cp.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Sp),{data:a}=t,i=fn(a);return Cp.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,t){var a;return hn(await this.loadSchema(t),new pt(e,a).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;try{let e={};try{e=JSON.parse(a)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=await this.validateOperation(t,this.context?.apiVersion??j);if(i.length>0)return{content:i.join(", ")};return{content:await this.mondayApi.request(t,e)}}catch(e){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)return{content:t.response.errors.map((e=>e.message)).join(", ")}}return{content:t}}}}Cp.schemaCache={};const Rp={itemId:n.z.number().describe("The ID of the item to be updated"),columnValues:n.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),createLabelsIfMissing:n.z.boolean().optional().describe("If true, create missing Status/Dropdown labels when setting those columns. Requires permission to change board structure. Omit or false to only use existing labels.")},Lp={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Rp};class Vp extends ce{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=me({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. [REQUIRED PRECONDITION]: For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?Rp:Lp}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues,...void 0!==e.createLabelsIfMissing&&{createLabelsIfMissing:e.createLabelsIfMissing}},a=await this.mondayApi.request(yp,t);return{content:{message:`Item ${a.change_multiple_column_values?.id} successfully updated`,item_id:a.change_multiple_column_values?.id,item_name:a.change_multiple_column_values?.name,item_url:a.change_multiple_column_values?.url}}}}const Fp=cp`
472
+ `,Cp={query:n.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:n.z.string().describe("JSON string containing the variables for the GraphQL operation")};class Rp extends ce{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=me({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 Cp}async loadSchema(e){if(Rp.schemaCache[e])return Rp.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Dp),{data:a}=t,i=fn(a);return Rp.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,t){var a;return hn(await this.loadSchema(t),new pt(e,a).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;try{let e={};try{e=JSON.parse(a)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const i=await this.validateOperation(t,this.context?.apiVersion??j);if(i.length>0)return{content:i.join(", ")};return{content:await this.mondayApi.request(t,e)}}catch(e){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)return{content:t.response.errors.map((e=>e.message)).join(", ")}}return{content:t}}}}Rp.schemaCache={};const Lp={itemId:n.z.number().describe("The ID of the item to be updated"),columnValues:n.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),createLabelsIfMissing:n.z.boolean().optional().describe("If true, create missing Status/Dropdown labels when setting those columns. Requires permission to change board structure. Omit or false to only use existing labels.")},Vp={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Lp};class Fp extends ce{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=me({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. [REQUIRED PRECONDITION]: For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?Lp:Vp}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues,...void 0!==e.createLabelsIfMissing&&{createLabelsIfMissing:e.createLabelsIfMissing}},a=await this.mondayApi.request(yp,t);return{content:{message:`Item ${a.change_multiple_column_values?.id} successfully updated`,item_id:a.change_multiple_column_values?.id,item_name:a.change_multiple_column_values?.name,item_url:a.change_multiple_column_values?.url}}}}const Up=cp`
446
473
  query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
447
474
  get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
448
475
  id
@@ -454,7 +481,7 @@
454
481
  connected_boards_count
455
482
  }
456
483
  }
457
- `,Up={ids:n.z.array(n.z.string()).optional().describe("List of object schema IDs to retrieve. Mutually exclusive with names."),names:n.z.array(n.z.string()).optional().describe("List of object schema names to retrieve. Mutually exclusive with ids."),limit:n.z.number().optional().describe("Number of results per page. Default 25, max 100."),page:n.z.number().optional().describe("1-indexed page number. Default 1."),excludeCreatedByMonday:n.z.boolean().optional().describe("If true, returns only user-created schemas and excludes default monday.com schemas.")};const Pp=cp`
484
+ `,Pp={ids:n.z.array(n.z.string()).optional().describe("List of object schema IDs to retrieve. Mutually exclusive with names."),names:n.z.array(n.z.string()).optional().describe("List of object schema names to retrieve. Mutually exclusive with ids."),limit:n.z.number().optional().describe("Number of results per page. Default 25, max 100."),page:n.z.number().optional().describe("1-indexed page number. Default 1."),excludeCreatedByMonday:n.z.boolean().optional().describe("If true, returns only user-created schemas and excludes default monday.com schemas.")};const jp=cp`
458
485
  mutation CreateObjectSchema($name: String!, $parentId: ID, $description: String) {
459
486
  create_object_schema(name: $name, parent_id: $parentId, description: $description) {
460
487
  id
@@ -464,7 +491,7 @@
464
491
  revision
465
492
  }
466
493
  }
467
- `,jp={name:n.z.string().describe("A unique human-readable name for this object schema. Must be 3-15 characters, contain only lowercase letters, numbers, and underscores, and include at least one letter."),parentId:n.z.string().optional().describe("The ID of the parent object schema."),description:n.z.string().optional().describe("The description for this object schema.")};const zp=cp`
494
+ `,zp={name:n.z.string().describe("A unique human-readable name for this object schema. Must be 3-15 characters, contain only lowercase letters, numbers, and underscores, and include at least one letter."),parentId:n.z.string().optional().describe("The ID of the parent object schema."),description:n.z.string().optional().describe("The description for this object schema.")};const Bp=cp`
468
495
  mutation UpdateObjectSchema($id: ID!, $revision: Int!, $parentId: ID, $description: String) {
469
496
  update_object_schema(id: $id, revision: $revision, parent_id: $parentId, description: $description) {
470
497
  id
@@ -474,14 +501,14 @@
474
501
  revision
475
502
  }
476
503
  }
477
- `,Bp={id:n.z.string().describe("The ID of the object schema to update."),revision:n.z.number().describe("The current revision number for optimistic locking. Retrieve it first via get_object_schemas."),parentId:n.z.string().optional().describe("The ID of the parent object schema."),description:n.z.string().optional().describe("The new description for this object schema.")};const Mp=cp`
504
+ `,Mp={id:n.z.string().describe("The ID of the object schema to update."),revision:n.z.number().describe("The current revision number for optimistic locking. Retrieve it first via get_object_schemas."),parentId:n.z.string().optional().describe("The ID of the parent object schema."),description:n.z.string().optional().describe("The new description for this object schema.")};const qp=cp`
478
505
  mutation DeleteObjectSchema($id: ID, $name: String) {
479
506
  delete_object_schema(id: $id, name: $name) {
480
507
  id
481
508
  name
482
509
  }
483
510
  }
484
- `,qp={id:n.z.string().optional().describe("The ID of the object schema to delete. Either id or name must be provided."),name:n.z.string().optional().describe("The name of the object schema to delete. Either id or name must be provided.")};const Hp=cp`
511
+ `,Hp={id:n.z.string().optional().describe("The ID of the object schema to delete. Either id or name must be provided."),name:n.z.string().optional().describe("The name of the object schema to delete. Either id or name must be provided.")};const Gp=cp`
485
512
  mutation DeleteObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columnIds: [ID!]!) {
486
513
  delete_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, column_ids: $columnIds) {
487
514
  id
@@ -491,14 +518,14 @@
491
518
  revision
492
519
  }
493
520
  }
494
- `,Gp={objectSchemaId:n.z.string().optional().describe("The ID of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("The name of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),columnIds:n.z.array(n.z.string()).describe("IDs of the columns to permanently delete. Only allowed when no boards are connected to the schema.")};const Wp=cp`
521
+ `,Wp={objectSchemaId:n.z.string().optional().describe("The ID of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("The name of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),columnIds:n.z.array(n.z.string()).describe("IDs of the columns to permanently delete. Only allowed when no boards are connected to the schema.")};const Yp=cp`
495
522
  mutation ConnectBoardToObjectSchema($boardId: ID!, $objectSchemaId: ID, $objectSchemaName: String) {
496
523
  connect_board_to_object_schema(board_id: $boardId, object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName) {
497
524
  id
498
525
  object_schema_id
499
526
  }
500
527
  }
501
- `,Yp=cp`
528
+ `,Qp=cp`
502
529
  mutation DetachBoardsFromObjectSchema($boardIds: [ID!]!) {
503
530
  detach_boards_from_object_schema(board_ids: $boardIds) {
504
531
  board_id
@@ -506,7 +533,7 @@
506
533
  error
507
534
  }
508
535
  }
509
- `,Qp={action:n.z.enum(["connect","detach"]).describe("The operation to perform. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."),boardId:n.z.string().optional().describe("Required for action=connect. The ID of the board to connect."),boardIds:n.z.array(n.z.string()).optional().describe("Required for action=detach. The IDs of the boards to detach."),objectSchemaId:n.z.string().optional().describe("Required for action=connect. The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("Required for action=connect. The name of the object schema. Either objectSchemaId or objectSchemaName must be provided.")};const Kp=cp`
536
+ `,Kp={action:n.z.enum(["connect","detach"]).describe("The operation to perform. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."),boardId:n.z.string().optional().describe("Required for action=connect. The ID of the board to connect."),boardIds:n.z.array(n.z.string()).optional().describe("Required for action=detach. The IDs of the boards to detach."),objectSchemaId:n.z.string().optional().describe("Required for action=connect. The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("Required for action=connect. The name of the object schema. Either objectSchemaId or objectSchemaName must be provided.")};const Jp=cp`
510
537
  mutation CreateObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columns: [CreateObjectSchemaColumnInput!]!) {
511
538
  create_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, columns: $columns) {
512
539
  id
@@ -516,7 +543,7 @@
516
543
  revision
517
544
  }
518
545
  }
519
- `,Jp=cp`
546
+ `,Xp=cp`
520
547
  mutation UpdateObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columns: [UpdateObjectSchemaColumnInput!]!) {
521
548
  update_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, columns: $columns) {
522
549
  id
@@ -526,7 +553,7 @@
526
553
  revision
527
554
  }
528
555
  }
529
- `,Xp=n.z.object({can_override:n.z.array(n.z.enum(["title","description","settings"])).optional().describe("Fields that boards can override. Allowed values: title, description, settings."),cannot_delete:n.z.boolean().optional().describe("If true, the column cannot be deleted from boards.")}).optional().describe("Controls board-level permissions for this column. If omitted, defaults to: no field overrides allowed, column can be deleted by boards."),Zp=n.z.object({type:n.z.string().describe("Column type (e.g. text, status, numbers, date, dropdown, people). Use get_column_type_info to see available types."),title:n.z.string().describe("Column title."),description:n.z.string().optional().describe("Column description."),defaults:n.z.record(n.z.unknown()).optional().describe("Type-specific column settings. Call get_column_type_info with the column type before populating this field to understand the valid structure."),policy:Xp,opt_out_by_default:n.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema.")}),es=n.z.object({column_id:n.z.string().describe("The ID of the column to update."),title:n.z.string().optional().describe("New column title."),description:n.z.string().optional().describe("New column description."),defaults:n.z.record(n.z.unknown()).optional().describe("Type-specific column settings. Call get_column_type_info with the column type before populating this field."),opt_out_by_default:n.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema."),policy:Xp}),ts={action:n.z.enum(["create","update"]).describe("The operation to perform on columns. create: adds new columns to the schema. Each column requires type and title. Call get_column_type_info first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to opt a column out (stop auto-adding to boards), or opt_out_by_default=false to opt in (restore auto-adding)."),objectSchemaId:n.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columns:n.z.array(n.z.union([Zp,es])).describe("Array of columns to create or update.")};const as=cp`
556
+ `,Zp=n.z.object({can_override:n.z.array(n.z.enum(["title","description","settings"])).optional().describe("Fields that boards can override. Allowed values: title, description, settings."),cannot_delete:n.z.boolean().optional().describe("If true, the column cannot be deleted from boards.")}).optional().describe("Controls board-level permissions for this column. If omitted, defaults to: no field overrides allowed, column can be deleted by boards."),es=n.z.object({type:n.z.string().describe("Column type (e.g. text, status, numbers, date, dropdown, people). Use get_column_type_info to see available types."),title:n.z.string().describe("Column title."),description:n.z.string().optional().describe("Column description."),defaults:n.z.record(n.z.unknown()).optional().describe("Type-specific column settings. Call get_column_type_info with the column type before populating this field to understand the valid structure."),policy:Zp,opt_out_by_default:n.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema.")}),ts=n.z.object({column_id:n.z.string().describe("The ID of the column to update."),title:n.z.string().optional().describe("New column title."),description:n.z.string().optional().describe("New column description."),defaults:n.z.record(n.z.unknown()).optional().describe("Type-specific column settings. Call get_column_type_info with the column type before populating this field."),opt_out_by_default:n.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema."),policy:Zp}),as={action:n.z.enum(["create","update"]).describe("The operation to perform on columns. create: adds new columns to the schema. Each column requires type and title. Call get_column_type_info first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to opt a column out (stop auto-adding to boards), or opt_out_by_default=false to opt in (restore auto-adding)."),objectSchemaId:n.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columns:n.z.array(n.z.union([es,ts])).describe("Array of columns to create or update.")};const is=cp`
530
557
  mutation SetObjectSchemaColumnActiveState($objectSchemaId: ID, $objectSchemaName: String, $columnId: ID!, $action: ColumnActiveStateAction!) {
531
558
  set_object_schema_column_active_state(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, column_id: $columnId, action: $action) {
532
559
  id
@@ -536,7 +563,7 @@
536
563
  revision
537
564
  }
538
565
  }
539
- `,is={action:n.z.enum(["deactivate","reactivate"]).describe("The operation to perform on the column. deactivate: soft-disables the column. It is marked inactive but not deleted. Reversible. reactivate: re-enables a previously deactivated column."),objectSchemaId:n.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columnId:n.z.string().describe("The ID of the column to deactivate or reactivate.")};const ns={boardName:n.z.string().describe("The name of the board to create"),boardKind:n.z.nativeEnum(Vn).default(Vn.Public).describe("The kind of board to create"),boardDescription:n.z.string().optional().describe("The description of the board to create"),workspaceId:n.z.string().optional().describe("The ID of the workspace to create the board in")};const os=cp`
566
+ `,ns={action:n.z.enum(["deactivate","reactivate"]).describe("The operation to perform on the column. deactivate: soft-disables the column. It is marked inactive but not deleted. Reversible. reactivate: re-enables a previously deactivated column."),objectSchemaId:n.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:n.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columnId:n.z.string().describe("The ID of the column to deactivate or reactivate.")};const os={boardName:n.z.string().describe("The name of the board to create"),boardKind:n.z.nativeEnum(Vn).default(Vn.Public).describe("The kind of board to create"),boardDescription:n.z.string().optional().describe("The description of the board to create"),workspaceId:n.z.string().optional().describe("The ID of the workspace to create the board in")};const rs=cp`
540
567
  mutation createView(
541
568
  $boardId: ID!
542
569
  $type: ViewKind!
@@ -550,7 +577,7 @@
550
577
  type
551
578
  }
552
579
  }
553
- `,rs={boardId:n.z.string().describe("The board ID to create the view on"),type:n.z.nativeEnum(Ur).default(Ur.Table).describe("The type of board view to create. Use TABLE for standard board views."),name:n.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:n.z.object({rules:n.z.array(n.z.object({column_id:n.z.string().describe("The column ID to filter by"),compare_value:n.z.any().default([]).describe("The value(s) to compare against"),operator:n.z.nativeEnum(zo).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:n.z.nativeEnum(jo).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:n.z.array(n.z.object({column_id:n.z.string().describe("The column ID to sort by"),direction:n.z.nativeEnum(Po).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view")};const ds=cp`
580
+ `,ds={boardId:n.z.string().describe("The board ID to create the view on"),type:n.z.nativeEnum(Ur).default(Ur.Table).describe("The type of board view to create. Use TABLE for standard board views."),name:n.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:n.z.object({rules:n.z.array(n.z.object({column_id:n.z.string().describe("The column ID to filter by"),compare_value:n.z.any().default([]).describe("The value(s) to compare against"),operator:n.z.nativeEnum(zo).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:n.z.nativeEnum(jo).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:n.z.array(n.z.object({column_id:n.z.string().describe("The column ID to sort by"),direction:n.z.nativeEnum(Po).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view")};const ps=cp`
554
581
  fragment QuestionBasic on FormQuestion {
555
582
  id
556
583
  type
@@ -560,7 +587,7 @@
560
587
  required
561
588
  page_block_id
562
589
  }
563
- `,ps=cp`
590
+ `,ss=cp`
564
591
  fragment QuestionOptions on FormQuestion {
565
592
  options {
566
593
  label
@@ -569,7 +596,7 @@
569
596
  active
570
597
  }
571
598
  }
572
- `,ss=cp`
599
+ `,ls=cp`
573
600
  fragment QuestionSettings on FormQuestion {
574
601
  settings {
575
602
  prefill {
@@ -595,17 +622,17 @@
595
622
  default_answer
596
623
  }
597
624
  }
598
- `,ls=cp`
625
+ `,ms=cp`
599
626
  fragment QuestionComplete on FormQuestion {
600
627
  ...QuestionBasic
601
628
  ...QuestionOptions
602
629
  ...QuestionSettings
603
630
  showIfRules
604
631
  }
605
- ${ds}
606
632
  ${ps}
607
633
  ${ss}
608
- `,ms=cp`
634
+ ${ls}
635
+ `,cs=cp`
609
636
  fragment FormFeatures on FormFeatures {
610
637
  isInternal
611
638
  reCaptchaChallenge
@@ -661,7 +688,7 @@
661
688
  enabled
662
689
  }
663
690
  }
664
- `,cs=cp`
691
+ `,us=cp`
665
692
  fragment FormAppearance on FormAppearance {
666
693
  hideBranding
667
694
  showProgressBar
@@ -689,19 +716,19 @@
689
716
  text
690
717
  }
691
718
  }
692
- `,us=cp`
719
+ `,hs=cp`
693
720
  fragment FormAccessibility on FormAccessibility {
694
721
  language
695
722
  logoAltText
696
723
  }
697
- `,hs=cp`
724
+ `,fs=cp`
698
725
  fragment FormTag on FormTag {
699
726
  id
700
727
  name
701
728
  value
702
729
  columnId
703
730
  }
704
- `,fs=cp`
731
+ `,_s=cp`
705
732
  mutation createForm(
706
733
  $destination_workspace_id: ID!
707
734
  $destination_folder_id: ID
@@ -728,7 +755,7 @@
728
755
  token
729
756
  }
730
757
  }
731
- `,_s=cp`
758
+ `,vs=cp`
732
759
  query getForm($formToken: String!) {
733
760
  form(formToken: $formToken) {
734
761
  id
@@ -757,16 +784,16 @@
757
784
  }
758
785
  }
759
786
  }
760
- ${ls}
761
787
  ${ms}
762
788
  ${cs}
763
789
  ${us}
764
790
  ${hs}
765
- `,vs=cp`
791
+ ${fs}
792
+ `,bs=cp`
766
793
  mutation deleteFormQuestion($formToken: String!, $questionId: String!) {
767
794
  delete_question(formToken: $formToken, questionId: $questionId)
768
795
  }
769
- `,bs=cp`
796
+ `,gs=cp`
770
797
  mutation createFormQuestion($formToken: String!, $question: CreateQuestionInput!) {
771
798
  create_form_question(formToken: $formToken, question: $question) {
772
799
  ...QuestionBasic
@@ -774,10 +801,10 @@
774
801
  ...QuestionSettings
775
802
  }
776
803
  }
777
- ${ds}
778
804
  ${ps}
779
805
  ${ss}
780
- `,gs=cp`
806
+ ${ls}
807
+ `,ys=cp`
781
808
  mutation updateFormQuestion($formToken: String!, $questionId: String!, $question: UpdateQuestionInput!) {
782
809
  update_form_question(formToken: $formToken, questionId: $questionId, question: $question) {
783
810
  ...QuestionBasic
@@ -785,9 +812,9 @@
785
812
  ...QuestionSettings
786
813
  }
787
814
  }
788
- ${ds}
789
815
  ${ps}
790
816
  ${ss}
817
+ ${ls}
791
818
  `;cp`
792
819
  mutation updateForm($formToken: String!, $input: UpdateFormInput!) {
793
820
  update_form(formToken: $formToken, input: $input) {
@@ -812,46 +839,46 @@
812
839
  }
813
840
  }
814
841
  }
815
- ${ms}
816
842
  ${cs}
817
843
  ${us}
818
- `;const ys=cp`
844
+ ${hs}
845
+ `;const ws=cp`
819
846
  mutation setFormPassword($formToken: String!, $input: SetFormPasswordInput!) {
820
847
  set_form_password(formToken: $formToken, input: $input) {
821
848
  id
822
849
  }
823
850
  }
824
- `,ws=cp`
851
+ `,Ts=cp`
825
852
  mutation shortenFormUrl($formToken: String!) {
826
853
  shorten_form_url(formToken: $formToken) {
827
854
  enabled
828
855
  url
829
856
  }
830
857
  }
831
- `,Ts=cp`
858
+ `,Is=cp`
832
859
  mutation deactivateForm($formToken: String!) {
833
860
  deactivate_form(formToken: $formToken)
834
861
  }
835
- `,Is=cp`
862
+ `,Es=cp`
836
863
  mutation activateForm($formToken: String!) {
837
864
  activate_form(formToken: $formToken)
838
865
  }
839
- `,Es=cp`
866
+ `,Ns=cp`
840
867
  mutation deleteFormTag($formToken: String!, $tagId: String!) {
841
868
  delete_form_tag(formToken: $formToken, tagId: $tagId)
842
869
  }
843
- `,Ns=cp`
870
+ `,Ss=cp`
844
871
  mutation createFormTag($formToken: String!, $tag: CreateFormTagInput!) {
845
872
  create_form_tag(formToken: $formToken, tag: $tag) {
846
873
  ...FormTag
847
874
  }
848
875
  }
849
- ${hs}
850
- `,Ss=cp`
876
+ ${fs}
877
+ `,Ds=cp`
851
878
  mutation updateFormTag($formToken: String!, $tagId: String!, $tag: UpdateFormTagInput!) {
852
879
  update_form_tag(formToken: $formToken, tagId: $tagId, tag: $tag)
853
880
  }
854
- `,Ds=cp`
881
+ `,As=cp`
855
882
  mutation updateFormAppearance($formToken: String!, $appearance: FormAppearanceInput!) {
856
883
  update_form_settings(formToken: $formToken, settings: { appearance: $appearance }) {
857
884
  appearance {
@@ -859,8 +886,8 @@
859
886
  }
860
887
  }
861
888
  }
862
- ${cs}
863
- `,As=cp`
889
+ ${us}
890
+ `,ks=cp`
864
891
  mutation updateFormAccessibility($formToken: String!, $accessibility: FormAccessibilityInput!) {
865
892
  update_form_settings(formToken: $formToken, settings: { accessibility: $accessibility }) {
866
893
  accessibility {
@@ -868,8 +895,8 @@
868
895
  }
869
896
  }
870
897
  }
871
- ${us}
872
- `,ks=cp`
898
+ ${hs}
899
+ `,Os=cp`
873
900
  mutation updateFormFeatures($formToken: String!, $features: FormFeaturesInput!, $is_anonymous: Boolean) {
874
901
  update_form_settings(formToken: $formToken, settings: { features: $features, is_anonymous: $is_anonymous }) {
875
902
  features {
@@ -877,8 +904,8 @@
877
904
  }
878
905
  }
879
906
  }
880
- ${ms}
881
- `,Os=cp`
907
+ ${cs}
908
+ `,$s=cp`
882
909
  mutation updateFormQuestionOrder($formToken: String!, $questions: [QuestionOrderInput!]!) {
883
910
  update_form(formToken: $formToken, input: { questions: $questions }) {
884
911
  questions {
@@ -887,14 +914,14 @@
887
914
  }
888
915
  }
889
916
  }
890
- `,$s=cp`
917
+ `,xs=cp`
891
918
  mutation updateFormHeader($formToken: String!, $title: String, $description: String) {
892
919
  update_form(formToken: $formToken, input: { title: $title, description: $description }) {
893
920
  title
894
921
  description
895
922
  }
896
923
  }
897
- `,xs={questionId:"Question ID. Required for update/delete."},Cs={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Hides submitter identity.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"Required for update/delete. Auto-generated.",name:"Required for create. Cannot be updated.",value:"Required for create/update.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/update/delete. Delete: id only. Create: name+value (id/columnId auto-generated). Update: id+new value.",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},Rs={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:"Required for setFormPassword action.",shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{passwordEnabled:"Can only be set to false. Use setFormPassword to enable.",closeDateValue:"ISO timestamp.",includeNameQuestion:"Adds name column as a form question.",includeUpdateQuestion:"Adds updates/comments field linked to the board item.",syncQuestionAndColumnsTitles:"Syncs question titles with board column names.",allowCreateItem:"Shows 'Create Item' button on the board to open this form.",backgroundValue:"Hex color or image URL (depends on type).",logoSize:"Logo size for the form header.",language:"Form locale, e.g. 'en', 'es', 'fr'."},inputs:{settings:"Complete form settings object containing all configuration options.",features:"Form features configuration including security, limits, and access controls.",appearance:"Visual styling configuration including colors, layout, and branding.",accessibility:"Accessibility configuration including language and reading direction.",password:"Password configuration for the form. Only setting enabled to false is supported. To enable a form to be password protected, please use the set_form_password mutation instead.",passwordValue:"The password to set for the form. Must be at least 1 character long."}},Ls={actions:{type:"Action to perform on the question of a form. create requires question. update requires questionId and question with type always included. delete requires questionId.",question:"The question to create or update. Always include type, then only the fields you want to set or change."},properties:{title:"Question text. Required when creating.",type:"Question type. Always required. Cannot be changed after creation — always send the existing type when updating.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Help text shown under the question.",placeholder:"Optional placeholder text shown in input fields to guide user input.",createdAt:"ISO timestamp when the question was created.",updatedAt:"ISO timestamp when the question was last modified.",selectOptions:"Options for select questions. Always include all options — omitting an existing option will delete it. To update safely, call get_form first to retrieve existing option values, then include all options you want to keep with their original value fields.",selectOptionsValue:"Unique identifier for the option. If this option was used in existing submissions, it must keep its original value to preserve data integrity.",blockType:"The kind of block to create. Includes all question types and content block types.",insertAfterQuestionId:"ID to insert after. Omit to append. Null for first position.",pageBlockId:"Page block ID to group this question within. Set to null to remove from page block. Omit to leave unchanged."},showIfRules:"Conditional visibility. All operators must be OR.",showIfConditionBuildingBlockId:"Question ID to evaluate.",showIfConditionValues:"Answer values that satisfy the condition.",inputs:{question:"Complete question object containing all properties for creation or update.",questionData:"Question configuration including type, title, and type-specific settings.",position:"Integer position where the question should be placed in the form sequence."}},Vs={properties:{validation:"Validation rules applied to the question response",prefill:"Auto-populates from account data or URL query params.",prefillLookup:"Field name (e.g. 'email') or URL param name.",prefixAutofilled:"Phone only. Auto-detects country prefix.",prefixPredefined:"Phone only. Sets a default country prefix.",prefixPredefinedPrefix:"Country code, e.g. 'US', 'IL'.",checkedByDefault:"Boolean question type only.",defaultCurrentDate:"Date question type only.",includeTime:"Date only. Adds time picker.",display:"SingleSelect/MultiSelect only.",optionsOrder:"SingleSelect/MultiSelect only.",locationAutofilled:"Location only. Auto-fills current location.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link only. Skips URL format validation.",labelLimitCount:"MultiSelect only. Max selections. Pair with labelLimitCountEnabled.",labelLimitCountEnabled:"MultiSelect only. Enables selection limit.",defaultAnswer:"ShortText/LongText/Name/Link only. Pre-filled default value."},inputs:{settings:"Question-specific configuration object that varies by question type.",validationRules:"Validation constraints and rules",choiceOptions:"List of available choices for selection questions",fileSettings:"File upload constraints and settings"}},Fs={destination_workspace_id:n.z.string(),destination_folder_id:n.z.string().optional(),destination_folder_name:n.z.string().optional(),board_kind:n.z.nativeEnum(Vn).optional(),destination_name:n.z.string().optional().describe(Cs.args.destinationName),board_owner_ids:n.z.array(n.z.string()).optional(),board_owner_team_ids:n.z.array(n.z.string()).optional(),board_subscriber_ids:n.z.array(n.z.string()).optional().describe(Cs.args.boardSubscriberIds),board_subscriber_teams_ids:n.z.array(n.z.string()).optional().describe(Cs.args.boardSubscriberTeamsIds)};var Us,Ps,js,zs,Bs,Ms,qs,Hs,Gs,Ws,Ys,Qs,Ks,Js,Xs,Zs;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(Us||(Us={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(Ps||(Ps={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(js||(js={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(zs||(zs={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Bs||(Bs={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Ms||(Ms={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(qs||(qs={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Hs||(Hs={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(Gs||(Gs={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ws||(Ws={})),function(e){e.Email="email",e.Name="name",e.Title="title",e.Phone="phone",e.FirstName="first_name",e.LastName="last_name",e.Location="location",e.Timezone="time_zone",e.ManagerName="manager_display_name"}(Ys||(Ys={})),function(e){e.Or="OR"}(Qs||(Qs={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Ks||(Ks={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Js||(Js={})),function(e){e.MultiSelect="multi-select",e.SingleSelect="single-select",e.People="people",e.Location="location",e.CountryCode="country-code",e.Country="country",e.ConnectedBoards="connected_boards"}(Xs||(Xs={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(Zs||(Zs={}));const el=n.z.object({type:n.z.nativeEnum(Co).describe(Ls.properties.type),title:n.z.string().describe(Ls.properties.title).optional(),description:n.z.string().describe(Ls.properties.description).optional(),visible:n.z.boolean().optional(),required:n.z.boolean().optional(),insert_after_question_id:n.z.string().nullish().describe(Ls.properties.insertAfterQuestionId),page_block_id:n.z.string().nullish().describe(Ls.properties.pageBlockId),show_if_rules:n.z.object({operator:n.z.nativeEnum(Zn),rules:n.z.array(n.z.object({operator:n.z.nativeEnum(Zn),conditions:n.z.array(n.z.object({building_block_id:n.z.string().describe(Ls.showIfConditionBuildingBlockId),operator:n.z.nativeEnum(Zn),values:n.z.array(n.z.string()).describe(Ls.showIfConditionValues)}))}))}).describe(Ls.showIfRules).optional(),options:n.z.array(n.z.object({label:n.z.string(),value:n.z.string().optional().describe(Ls.properties.selectOptionsValue),visible:n.z.boolean().optional()})).describe(Ls.properties.selectOptions).optional(),settings:n.z.object({checkedByDefault:n.z.boolean().describe(Vs.properties.checkedByDefault).optional(),defaultCurrentDate:n.z.boolean().describe(Vs.properties.defaultCurrentDate).optional(),display:n.z.nativeEnum($o).describe(Vs.properties.display).optional(),includeTime:n.z.boolean().describe(Vs.properties.includeTime).optional(),locationAutofilled:n.z.boolean().describe(Vs.properties.locationAutofilled).optional(),optionsOrder:n.z.nativeEnum(xo).describe(Vs.properties.optionsOrder).optional(),prefixAutofilled:n.z.boolean().describe(Vs.properties.prefixAutofilled).optional(),prefixPredefined:n.z.object({enabled:n.z.boolean(),prefix:n.z.string().describe(Vs.properties.prefixPredefinedPrefix).optional()}).describe(Vs.properties.prefixPredefined).optional(),skipValidation:n.z.boolean().describe(Vs.properties.skipValidation).optional(),labelLimitCount:n.z.number().int().describe(Vs.properties.labelLimitCount).optional(),label_limit_count_enabled:n.z.boolean().describe(Vs.properties.labelLimitCountEnabled).optional(),default_answer:n.z.string().describe(Vs.properties.defaultAnswer).optional(),prefill:n.z.object({enabled:n.z.boolean(),lookup:n.z.string().describe(Vs.properties.prefillLookup).optional(),source:n.z.nativeEnum(Oo).optional()}).describe(Vs.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),tl={action:n.z.nativeEnum(Zs).describe(Ls.actions.type),formToken:n.z.string(),questionId:n.z.string().describe(xs.questionId).optional(),question:el.describe(Ls.actions.question).optional()};class al{constructor(e){this.mondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.mondayApi.request(vs,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.mondayApi.request(gs,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.mondayApi.request(bs,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var il;!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"}(il||(il={}));const nl=n.z.object({id:n.z.string().describe(Cs.properties.tags.id).optional(),name:n.z.string().describe(Cs.properties.tags.name).optional(),value:n.z.string().describe(Cs.properties.tags.value).optional(),columnId:n.z.string().describe(Cs.properties.tags.columnId).optional()}),ol=n.z.object({type:n.z.nativeEnum(zs).optional(),value:n.z.string().describe(Rs.properties.backgroundValue).optional()}),rl=n.z.object({format:n.z.nativeEnum(Ms).optional(),alignment:n.z.nativeEnum(qs).optional(),direction:n.z.nativeEnum(Bs).optional()}),dl=n.z.object({position:n.z.nativeEnum(js).optional(),size:n.z.nativeEnum(Ps).describe(Rs.properties.logoSize).optional()}),pl=n.z.object({text:n.z.string().optional()}),sl=n.z.object({font:n.z.string().optional(),color:n.z.string().optional(),size:n.z.nativeEnum(Hs).optional()}),ll=n.z.object({enabled:n.z.boolean().optional(),redirectUrl:n.z.string().optional()}),ml=n.z.object({allowEditSubmission:n.z.boolean().optional(),allowResubmit:n.z.boolean().optional(),allowViewSubmission:n.z.boolean().optional(),description:n.z.string().optional(),redirectAfterSubmission:ll.optional(),showSuccessImage:n.z.boolean().optional(),title:n.z.string().optional()}),cl=n.z.object({enabled:n.z.boolean().optional(),date:n.z.string().describe(Rs.properties.closeDateValue).optional()}),ul=n.z.object({enabled:n.z.boolean().optional()}),hl=n.z.object({itemGroupId:n.z.string().optional(),includeNameQuestion:n.z.boolean().describe(Rs.properties.includeNameQuestion).optional(),includeUpdateQuestion:n.z.boolean().describe(Rs.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:n.z.boolean().describe(Rs.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:n.z.boolean().describe(Rs.properties.allowCreateItem).optional()}),fl=n.z.object({enabled:n.z.boolean().describe(Rs.properties.passwordEnabled).optional()}),_l=n.z.object({text:n.z.string().optional()}),vl=n.z.object({enabled:n.z.boolean().optional(),title:n.z.string().optional(),description:n.z.string().optional(),startButton:_l.optional()}),bl=n.z.object({enabled:n.z.boolean().optional(),redirectToLogin:n.z.boolean().optional()}),gl=n.z.object({enabled:n.z.boolean().optional(),limit:n.z.number().optional()}),yl=n.z.object({background:ol.optional(),hideBranding:n.z.boolean().optional(),layout:rl.optional(),logo:dl.optional(),primaryColor:n.z.string().optional(),showProgressBar:n.z.boolean().optional(),submitButton:pl.optional(),text:sl.optional()}),wl=n.z.object({language:n.z.string().describe(Rs.properties.language).optional(),logoAltText:n.z.string().optional()}),Tl=n.z.object({enabled:n.z.boolean().optional()}),Il=n.z.object({afterSubmissionView:ml.optional(),ai_translate:Tl.optional(),closeDate:cl.optional(),draftSubmission:ul.optional(),monday:hl.optional(),password:fl.optional(),preSubmissionView:vl.optional(),reCaptchaChallenge:n.z.boolean().optional(),requireLogin:bl.optional(),responseLimit:gl.optional(),is_anonymous:n.z.boolean().describe(Cs.properties.isAnonymous).optional()}),El=n.z.object({id:n.z.string().describe(Cs.inputs.questionId),page_block_id:n.z.string().describe(Ls.properties.pageBlockId).optional()}),Nl=n.z.object({appearance:yl.describe(Cs.inputs.form.appearance).optional(),accessibility:wl.describe(Cs.inputs.form.accessibility).optional(),features:Il.describe(Cs.inputs.form.features).optional(),title:n.z.string().describe(Cs.inputs.title).optional(),description:n.z.string().describe(Cs.inputs.description).optional(),questions:n.z.array(El).describe(Cs.inputs.questions).optional()}),Sl={formToken:n.z.string(),action:n.z.nativeEnum(il).describe(Cs.operations.updateForm.action),formPassword:n.z.string().describe(Rs.operations.setFormPassword).optional(),tag:nl.describe(Cs.inputs.tag).optional(),form:Nl.describe(Cs.inputs.form.describe).optional()};class Dl{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(ys,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.mondayApi.request(ws,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(Ts,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(Is,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const t={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},a=await this.mondayApi.request(Ns,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(Es,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(Ss,t)).update_form_tag?{content:{message:"Tag updated",form_token:e.formToken,tag_id:e.tag.id,action_name:"updateTag"}}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.mondayApi.request(Ds,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.mondayApi.request(As,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},n=await this.mondayApi.request(ks,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:n.update_form_settings?.features}}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const t={formToken:e.formToken,questions:e.form.questions},a=await this.mondayApi.request(Os,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.mondayApi.request($s,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const Al={formToken:n.z.string()};var kl;exports.ToolMode=void 0,(kl=exports.ToolMode||(exports.ToolMode={})).API="api",kl.APPS="apps",kl.ATP="atp";const Ol=1e3;var $l,xl;!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"}($l||($l={})),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=Ol]="SECOND"}(xl||(xl={}));const Cl=10*xl.SECOND;function Rl(e,t){const a=e?.response?.errors?.map((e=>e.message))?.join(", ");if(a)throw new Error(`Failed to ${t}: ${a}`);const i=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${t}: ${i}`)}function Ll(e){if(e instanceof Error&&"AbortError"===e.name)throw new Error("Search has timed out, try providing alternative search term")}const Vl=cp`
924
+ `,Cs={questionId:"Question ID. Required for update/delete."},Rs={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Hides submitter identity.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"Required for update/delete. Auto-generated.",name:"Required for create. Cannot be updated.",value:"Required for create/update.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/update/delete. Delete: id only. Create: name+value (id/columnId auto-generated). Update: id+new value.",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},Ls={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:"Required for setFormPassword action.",shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{passwordEnabled:"Can only be set to false. Use setFormPassword to enable.",closeDateValue:"ISO timestamp.",includeNameQuestion:"Adds name column as a form question.",includeUpdateQuestion:"Adds updates/comments field linked to the board item.",syncQuestionAndColumnsTitles:"Syncs question titles with board column names.",allowCreateItem:"Shows 'Create Item' button on the board to open this form.",backgroundValue:"Hex color or image URL (depends on type).",logoSize:"Logo size for the form header.",language:"Form locale, e.g. 'en', 'es', 'fr'."},inputs:{settings:"Complete form settings object containing all configuration options.",features:"Form features configuration including security, limits, and access controls.",appearance:"Visual styling configuration including colors, layout, and branding.",accessibility:"Accessibility configuration including language and reading direction.",password:"Password configuration for the form. Only setting enabled to false is supported. To enable a form to be password protected, please use the set_form_password mutation instead.",passwordValue:"The password to set for the form. Must be at least 1 character long."}},Vs={actions:{type:"Action to perform on the question of a form. create requires question. update requires questionId and question with type always included. delete requires questionId.",question:"The question to create or update. Always include type, then only the fields you want to set or change."},properties:{title:"Question text. Required when creating.",type:"Question type. Always required. Cannot be changed after creation — always send the existing type when updating.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Help text shown under the question.",placeholder:"Optional placeholder text shown in input fields to guide user input.",createdAt:"ISO timestamp when the question was created.",updatedAt:"ISO timestamp when the question was last modified.",selectOptions:"Options for select questions. Always include all options — omitting an existing option will delete it. To update safely, call get_form first to retrieve existing option values, then include all options you want to keep with their original value fields.",selectOptionsValue:"Unique identifier for the option. If this option was used in existing submissions, it must keep its original value to preserve data integrity.",blockType:"The kind of block to create. Includes all question types and content block types.",insertAfterQuestionId:"ID to insert after. Omit to append. Null for first position.",pageBlockId:"Page block ID to group this question within. Set to null to remove from page block. Omit to leave unchanged."},showIfRules:"Conditional visibility. All operators must be OR.",showIfConditionBuildingBlockId:"Question ID to evaluate.",showIfConditionValues:"Answer values that satisfy the condition.",inputs:{question:"Complete question object containing all properties for creation or update.",questionData:"Question configuration including type, title, and type-specific settings.",position:"Integer position where the question should be placed in the form sequence."}},Fs={properties:{validation:"Validation rules applied to the question response",prefill:"Auto-populates from account data or URL query params.",prefillLookup:"Field name (e.g. 'email') or URL param name.",prefixAutofilled:"Phone only. Auto-detects country prefix.",prefixPredefined:"Phone only. Sets a default country prefix.",prefixPredefinedPrefix:"Country code, e.g. 'US', 'IL'.",checkedByDefault:"Boolean question type only.",defaultCurrentDate:"Date question type only.",includeTime:"Date only. Adds time picker.",display:"SingleSelect/MultiSelect only.",optionsOrder:"SingleSelect/MultiSelect only.",locationAutofilled:"Location only. Auto-fills current location.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link only. Skips URL format validation.",labelLimitCount:"MultiSelect only. Max selections. Pair with labelLimitCountEnabled.",labelLimitCountEnabled:"MultiSelect only. Enables selection limit.",defaultAnswer:"ShortText/LongText/Name/Link only. Pre-filled default value."},inputs:{settings:"Question-specific configuration object that varies by question type.",validationRules:"Validation constraints and rules",choiceOptions:"List of available choices for selection questions",fileSettings:"File upload constraints and settings"}},Us={destination_workspace_id:n.z.string(),destination_folder_id:n.z.string().optional(),destination_folder_name:n.z.string().optional(),board_kind:n.z.nativeEnum(Vn).optional(),destination_name:n.z.string().optional().describe(Rs.args.destinationName),board_owner_ids:n.z.array(n.z.string()).optional(),board_owner_team_ids:n.z.array(n.z.string()).optional(),board_subscriber_ids:n.z.array(n.z.string()).optional().describe(Rs.args.boardSubscriberIds),board_subscriber_teams_ids:n.z.array(n.z.string()).optional().describe(Rs.args.boardSubscriberTeamsIds)};var Ps,js,zs,Bs,Ms,qs,Hs,Gs,Ws,Ys,Qs,Ks,Js,Xs,Zs,el;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(Ps||(Ps={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(js||(js={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(zs||(zs={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Bs||(Bs={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Ms||(Ms={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(qs||(qs={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Hs||(Hs={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Gs||(Gs={})),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"}(Ws||(Ws={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ys||(Ys={})),function(e){e.Email="email",e.Name="name",e.Title="title",e.Phone="phone",e.FirstName="first_name",e.LastName="last_name",e.Location="location",e.Timezone="time_zone",e.ManagerName="manager_display_name"}(Qs||(Qs={})),function(e){e.Or="OR"}(Ks||(Ks={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Js||(Js={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Xs||(Xs={})),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"}(Zs||(Zs={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(el||(el={}));const tl=n.z.object({type:n.z.nativeEnum(Co).describe(Vs.properties.type),title:n.z.string().describe(Vs.properties.title).optional(),description:n.z.string().describe(Vs.properties.description).optional(),visible:n.z.boolean().optional(),required:n.z.boolean().optional(),insert_after_question_id:n.z.string().nullish().describe(Vs.properties.insertAfterQuestionId),page_block_id:n.z.string().nullish().describe(Vs.properties.pageBlockId),show_if_rules:n.z.object({operator:n.z.nativeEnum(Zn),rules:n.z.array(n.z.object({operator:n.z.nativeEnum(Zn),conditions:n.z.array(n.z.object({building_block_id:n.z.string().describe(Vs.showIfConditionBuildingBlockId),operator:n.z.nativeEnum(Zn),values:n.z.array(n.z.string()).describe(Vs.showIfConditionValues)}))}))}).describe(Vs.showIfRules).optional(),options:n.z.array(n.z.object({label:n.z.string(),value:n.z.string().optional().describe(Vs.properties.selectOptionsValue),visible:n.z.boolean().optional()})).describe(Vs.properties.selectOptions).optional(),settings:n.z.object({checkedByDefault:n.z.boolean().describe(Fs.properties.checkedByDefault).optional(),defaultCurrentDate:n.z.boolean().describe(Fs.properties.defaultCurrentDate).optional(),display:n.z.nativeEnum($o).describe(Fs.properties.display).optional(),includeTime:n.z.boolean().describe(Fs.properties.includeTime).optional(),locationAutofilled:n.z.boolean().describe(Fs.properties.locationAutofilled).optional(),optionsOrder:n.z.nativeEnum(xo).describe(Fs.properties.optionsOrder).optional(),prefixAutofilled:n.z.boolean().describe(Fs.properties.prefixAutofilled).optional(),prefixPredefined:n.z.object({enabled:n.z.boolean(),prefix:n.z.string().describe(Fs.properties.prefixPredefinedPrefix).optional()}).describe(Fs.properties.prefixPredefined).optional(),skipValidation:n.z.boolean().describe(Fs.properties.skipValidation).optional(),labelLimitCount:n.z.number().int().describe(Fs.properties.labelLimitCount).optional(),label_limit_count_enabled:n.z.boolean().describe(Fs.properties.labelLimitCountEnabled).optional(),default_answer:n.z.string().describe(Fs.properties.defaultAnswer).optional(),prefill:n.z.object({enabled:n.z.boolean(),lookup:n.z.string().describe(Fs.properties.prefillLookup).optional(),source:n.z.nativeEnum(Oo).optional()}).describe(Fs.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),al={action:n.z.nativeEnum(el).describe(Vs.actions.type),formToken:n.z.string(),questionId:n.z.string().describe(Cs.questionId).optional(),question:tl.describe(Vs.actions.question).optional()};class il{constructor(e){this.mondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.mondayApi.request(bs,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.mondayApi.request(ys,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.mondayApi.request(gs,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var nl;!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"}(nl||(nl={}));const ol=n.z.object({id:n.z.string().describe(Rs.properties.tags.id).optional(),name:n.z.string().describe(Rs.properties.tags.name).optional(),value:n.z.string().describe(Rs.properties.tags.value).optional(),columnId:n.z.string().describe(Rs.properties.tags.columnId).optional()}),rl=n.z.object({type:n.z.nativeEnum(Bs).optional(),value:n.z.string().describe(Ls.properties.backgroundValue).optional()}),dl=n.z.object({format:n.z.nativeEnum(qs).optional(),alignment:n.z.nativeEnum(Hs).optional(),direction:n.z.nativeEnum(Ms).optional()}),pl=n.z.object({position:n.z.nativeEnum(zs).optional(),size:n.z.nativeEnum(js).describe(Ls.properties.logoSize).optional()}),sl=n.z.object({text:n.z.string().optional()}),ll=n.z.object({font:n.z.string().optional(),color:n.z.string().optional(),size:n.z.nativeEnum(Gs).optional()}),ml=n.z.object({enabled:n.z.boolean().optional(),redirectUrl:n.z.string().optional()}),cl=n.z.object({allowEditSubmission:n.z.boolean().optional(),allowResubmit:n.z.boolean().optional(),allowViewSubmission:n.z.boolean().optional(),description:n.z.string().optional(),redirectAfterSubmission:ml.optional(),showSuccessImage:n.z.boolean().optional(),title:n.z.string().optional()}),ul=n.z.object({enabled:n.z.boolean().optional(),date:n.z.string().describe(Ls.properties.closeDateValue).optional()}),hl=n.z.object({enabled:n.z.boolean().optional()}),fl=n.z.object({itemGroupId:n.z.string().optional(),includeNameQuestion:n.z.boolean().describe(Ls.properties.includeNameQuestion).optional(),includeUpdateQuestion:n.z.boolean().describe(Ls.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:n.z.boolean().describe(Ls.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:n.z.boolean().describe(Ls.properties.allowCreateItem).optional()}),_l=n.z.object({enabled:n.z.boolean().describe(Ls.properties.passwordEnabled).optional()}),vl=n.z.object({text:n.z.string().optional()}),bl=n.z.object({enabled:n.z.boolean().optional(),title:n.z.string().optional(),description:n.z.string().optional(),startButton:vl.optional()}),gl=n.z.object({enabled:n.z.boolean().optional(),redirectToLogin:n.z.boolean().optional()}),yl=n.z.object({enabled:n.z.boolean().optional(),limit:n.z.number().optional()}),wl=n.z.object({background:rl.optional(),hideBranding:n.z.boolean().optional(),layout:dl.optional(),logo:pl.optional(),primaryColor:n.z.string().optional(),showProgressBar:n.z.boolean().optional(),submitButton:sl.optional(),text:ll.optional()}),Tl=n.z.object({language:n.z.string().describe(Ls.properties.language).optional(),logoAltText:n.z.string().optional()}),Il=n.z.object({enabled:n.z.boolean().optional()}),El=n.z.object({afterSubmissionView:cl.optional(),ai_translate:Il.optional(),closeDate:ul.optional(),draftSubmission:hl.optional(),monday:fl.optional(),password:_l.optional(),preSubmissionView:bl.optional(),reCaptchaChallenge:n.z.boolean().optional(),requireLogin:gl.optional(),responseLimit:yl.optional(),is_anonymous:n.z.boolean().describe(Rs.properties.isAnonymous).optional()}),Nl=n.z.object({id:n.z.string().describe(Rs.inputs.questionId),page_block_id:n.z.string().describe(Vs.properties.pageBlockId).optional()}),Sl=n.z.object({appearance:wl.describe(Rs.inputs.form.appearance).optional(),accessibility:Tl.describe(Rs.inputs.form.accessibility).optional(),features:El.describe(Rs.inputs.form.features).optional(),title:n.z.string().describe(Rs.inputs.title).optional(),description:n.z.string().describe(Rs.inputs.description).optional(),questions:n.z.array(Nl).describe(Rs.inputs.questions).optional()}),Dl={formToken:n.z.string(),action:n.z.nativeEnum(nl).describe(Rs.operations.updateForm.action),formPassword:n.z.string().describe(Ls.operations.setFormPassword).optional(),tag:ol.describe(Rs.inputs.tag).optional(),form:Sl.describe(Rs.inputs.form.describe).optional()};class Al{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(ws,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.mondayApi.request(Ts,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(Is,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(Es,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const t={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},a=await this.mondayApi.request(Ss,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(Ns,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(Ds,t)).update_form_tag?{content:{message:"Tag updated",form_token:e.formToken,tag_id:e.tag.id,action_name:"updateTag"}}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.mondayApi.request(As,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.mondayApi.request(ks,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},n=await this.mondayApi.request(Os,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:n.update_form_settings?.features}}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const t={formToken:e.formToken,questions:e.form.questions},a=await this.mondayApi.request($s,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.mondayApi.request(xs,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const kl={formToken:n.z.string()};var Ol;exports.ToolMode=void 0,(Ol=exports.ToolMode||(exports.ToolMode={})).API="api",Ol.APPS="apps",Ol.ATP="atp";const $l=1e3;var xl,Cl;!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"}(xl||(xl={})),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=$l]="SECOND"}(Cl||(Cl={}));const Rl=10*Cl.SECOND;function Ll(e,t){const a=e?.response?.errors?.map((e=>e.message))?.join(", ");if(a)throw new Error(`Failed to ${t}: ${a}`);const i=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${t}: ${i}`)}function Vl(e){if(e instanceof Error&&"AbortError"===e.name)throw new Error("Search has timed out, try providing alternative search term")}const Fl=cp`
898
925
  mutation CreateFormSubmission(
899
926
  $form_token: String!
900
927
  $answers: [FormAnswerInput!]!
@@ -912,13 +939,13 @@
912
939
  id
913
940
  }
914
941
  }
915
- `,Fl=n.z.object({phone:n.z.string().describe("The phone number."),country_short_name:n.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Ul=n.z.object({country_name:n.z.string().describe('The full country name (e.g. "United States").'),country_code:n.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Pl=n.z.object({date:n.z.string().describe("The date in YYYY-MM-DD format."),zone_diff:n.z.number().int().optional().describe("UTC offset in minutes.")}),jl=n.z.object({from:n.z.string().describe("Start date in YYYY-MM-DD format."),to:n.z.string().describe("End date in YYYY-MM-DD format.")}),zl=n.z.object({lat:n.z.number().describe("Latitude."),lng:n.z.number().describe("Longitude."),place_id:n.z.string().describe("Google Maps place ID."),address:n.z.string().describe("Full formatted address."),country:n.z.object({long_name:n.z.string().describe("Full country name."),short_name:n.z.string().describe("ISO 3166-1 alpha-2 country code.")}),city:n.z.object({long_name:n.z.string().describe("Full city name."),short_name:n.z.string().describe("Abbreviated city name.")}),street:n.z.object({long_name:n.z.string().describe("Full street name."),short_name:n.z.string().describe("Abbreviated street name.")}),street_number:n.z.object({long_name:n.z.string().describe("Full street number."),short_name:n.z.string().describe("Abbreviated street number.")})}),Bl=n.z.object({id:n.z.string().describe("The file ID returned by the workforms upload endpoint."),name:n.z.string().describe('Original file name (e.g. "image.png").'),extension:n.z.string().optional().describe('File extension (e.g. "pdf", "png").'),is_image:n.z.boolean().optional().describe("Whether the file is an image.")}),Ml=n.z.object({question_id:n.z.string().describe("The ID of the question being answered."),name:n.z.string().optional().describe("Answer for name questions."),email:n.z.string().optional().describe("Answer for email questions."),short_text:n.z.string().optional().describe("Answer for short text questions."),long_text:n.z.string().optional().describe("Answer for long text questions."),link:n.z.string().optional().describe("Answer for link questions."),updates:n.z.string().optional().describe("Answer for updates questions."),boolean:n.z.boolean().optional().describe("Answer for boolean questions."),number:n.z.number().optional().describe("Answer for number questions."),rating:n.z.number().positive().optional().describe("Answer for rating questions. Must be a positive number within the question's configured limit."),single_select:n.z.string().optional().describe("Answer for single-select questions — the selected option ID."),multi_select:n.z.array(n.z.number()).optional().describe("Answer for multi-select questions — list of selected option IDs."),people:n.z.array(n.z.string()).optional().describe("Answer for people questions — list of user IDs. Obtain user IDs via the list_users_and_teams tool."),connected_boards:n.z.array(n.z.string()).optional().describe("Answer for connected boards questions — list of connected item IDs."),phone:Fl.optional().describe("Answer for phone questions."),country:Ul.optional().describe("Answer for country questions."),date:Pl.optional().describe("Answer for date questions."),date_range:jl.optional().describe("Answer for date range questions."),location:zl.optional().describe("Answer for location questions. Requires a Google Maps place ID and structured address components."),file:n.z.array(Bl).optional().describe("Answer for file questions. Each file must be uploaded first to obtain a file ID. Up to the question's configured limit."),signature:Bl.optional().describe("Answer for signature questions. The file must be uploaded first to obtain a file ID.")}).describe("An answer for a single form question. Set question_id and exactly one answer field matching the question type. Subitems questions are not supported."),ql={form_token:n.z.string().describe("The unique token identifying the WorkForm. Can be a bare token, a full WorkForm URL (e.g. https://forms.monday.com/forms/abc123?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t). Shortened URLs are automatically resolved by following the redirect."),answers:n.z.array(Ml).describe("Array of answers to submit. Each answer specifies a question_id and the value for that question type."),form_timezone_offset:n.z.number().int().min(-840).max(840).describe("The timezone offset of the submitter in minutes (e.g. -120 for UTC-2, 0 for UTC)."),password:n.z.string().optional().describe("The password for the WorkForm. Only required if the WorkForm has password protection enabled (check features.password.enabled from get_form). If required, ask the user for the password before submitting."),tags:n.z.array(n.z.object({column_id:n.z.string().describe("The column ID this tag maps to."),value:n.z.string().describe("The tag value to submit.")})).optional().describe("Tags to attach to the submission — each tag maps a value to a specific board column.")};const Hl=Object.fromEntries(Object.entries(Xn).filter((([e])=>"Person"!==e))),Gl={columnType:n.z.nativeEnum(Hl).describe("The type of the column to be created"),columnTitle:n.z.string().describe("The title of the column to be created"),columnDescription:n.z.string().optional().describe("The description of the column to be created"),columnSettings:n.z.string().optional().describe("Column-specific configuration settings as a JSON string. Use the get_column_type_info tool to fetch the JSON schema for the given column type.")},Wl={boardId:n.z.number().describe("The id of the board to which the new column will be added"),...Gl};const Yl={color:n.z.nativeEnum(eo).describe("The color of the custom activity"),icon_id:n.z.nativeEnum(to).describe("The icon ID of the custom activity"),name:n.z.string().describe("The name of the custom activity")};const Ql=cp`
942
+ `,Ul=n.z.object({phone:n.z.string().describe("The phone number."),country_short_name:n.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Pl=n.z.object({country_name:n.z.string().describe('The full country name (e.g. "United States").'),country_code:n.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),jl=n.z.object({date:n.z.string().describe("The date in YYYY-MM-DD format."),zone_diff:n.z.number().int().optional().describe("UTC offset in minutes.")}),zl=n.z.object({from:n.z.string().describe("Start date in YYYY-MM-DD format."),to:n.z.string().describe("End date in YYYY-MM-DD format.")}),Bl=n.z.object({lat:n.z.number().describe("Latitude."),lng:n.z.number().describe("Longitude."),place_id:n.z.string().describe("Google Maps place ID."),address:n.z.string().describe("Full formatted address."),country:n.z.object({long_name:n.z.string().describe("Full country name."),short_name:n.z.string().describe("ISO 3166-1 alpha-2 country code.")}),city:n.z.object({long_name:n.z.string().describe("Full city name."),short_name:n.z.string().describe("Abbreviated city name.")}),street:n.z.object({long_name:n.z.string().describe("Full street name."),short_name:n.z.string().describe("Abbreviated street name.")}),street_number:n.z.object({long_name:n.z.string().describe("Full street number."),short_name:n.z.string().describe("Abbreviated street number.")})}),Ml=n.z.object({id:n.z.string().describe("The file ID returned by the workforms upload endpoint."),name:n.z.string().describe('Original file name (e.g. "image.png").'),extension:n.z.string().optional().describe('File extension (e.g. "pdf", "png").'),is_image:n.z.boolean().optional().describe("Whether the file is an image.")}),ql=n.z.object({question_id:n.z.string().describe("The ID of the question being answered."),name:n.z.string().optional().describe("Answer for name questions."),email:n.z.string().optional().describe("Answer for email questions."),short_text:n.z.string().optional().describe("Answer for short text questions."),long_text:n.z.string().optional().describe("Answer for long text questions."),link:n.z.string().optional().describe("Answer for link questions."),updates:n.z.string().optional().describe("Answer for updates questions."),boolean:n.z.boolean().optional().describe("Answer for boolean questions."),number:n.z.number().optional().describe("Answer for number questions."),rating:n.z.number().positive().optional().describe("Answer for rating questions. Must be a positive number within the question's configured limit."),single_select:n.z.string().optional().describe("Answer for single-select questions — the selected option ID."),multi_select:n.z.array(n.z.number()).optional().describe("Answer for multi-select questions — list of selected option IDs."),people:n.z.array(n.z.string()).optional().describe("Answer for people questions — list of user IDs. Obtain user IDs via the list_users_and_teams tool."),connected_boards:n.z.array(n.z.string()).optional().describe("Answer for connected boards questions — list of connected item IDs."),phone:Ul.optional().describe("Answer for phone questions."),country:Pl.optional().describe("Answer for country questions."),date:jl.optional().describe("Answer for date questions."),date_range:zl.optional().describe("Answer for date range questions."),location:Bl.optional().describe("Answer for location questions. Requires a Google Maps place ID and structured address components."),file:n.z.array(Ml).optional().describe("Answer for file questions. Each file must be uploaded first to obtain a file ID. Up to the question's configured limit."),signature:Ml.optional().describe("Answer for signature questions. The file must be uploaded first to obtain a file ID.")}).describe("An answer for a single form question. Set question_id and exactly one answer field matching the question type. Subitems questions are not supported."),Hl={form_token:n.z.string().describe("The unique token identifying the WorkForm. Can be a bare token, a full WorkForm URL (e.g. https://forms.monday.com/forms/abc123?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t). Shortened URLs are automatically resolved by following the redirect."),answers:n.z.array(ql).describe("Array of answers to submit. Each answer specifies a question_id and the value for that question type."),form_timezone_offset:n.z.number().int().min(-840).max(840).describe("The timezone offset of the submitter in minutes (e.g. -120 for UTC-2, 0 for UTC)."),password:n.z.string().optional().describe("The password for the WorkForm. Only required if the WorkForm has password protection enabled (check features.password.enabled from get_form). If required, ask the user for the password before submitting."),tags:n.z.array(n.z.object({column_id:n.z.string().describe("The column ID this tag maps to."),value:n.z.string().describe("The tag value to submit.")})).optional().describe("Tags to attach to the submission — each tag maps a value to a specific board column.")};const Gl=Object.fromEntries(Object.entries(Xn).filter((([e])=>"Person"!==e))),Wl={columnType:n.z.nativeEnum(Gl).describe("The type of the column to be created"),columnTitle:n.z.string().describe("The title of the column to be created"),columnDescription:n.z.string().optional().describe("The description of the column to be created"),columnSettings:n.z.string().optional().describe("Column-specific configuration settings as a JSON string. Use the get_column_type_info tool to fetch the JSON schema for the given column type.")},Yl={boardId:n.z.number().describe("The id of the board to which the new column will be added"),...Wl};const Ql={columnId:n.z.string().describe("The id of the column to update"),columnType:n.z.nativeEnum(Gl).describe("The type of the column being updated. Must match the existing column type."),revision:n.z.string().describe("The current revision of the column, obtained from get_board_schema. Used for optimistic concurrency control: if the column changed since you read it, the request will fail and you should re-fetch the latest revision before retrying."),columnTitle:n.z.string().optional().describe("The new title of the column. If omitted, the title is unchanged."),columnDescription:n.z.string().optional().describe("The new description of the column. If omitted, the description is unchanged."),columnSettings:n.z.string().optional().describe("Type-specific configuration as a JSON string. Use the get_column_type_info tool to fetch the JSON schema for the given column type. If omitted, settings are unchanged.")},Kl={boardId:n.z.number().describe("The id of the board containing the column"),...Ql};const Jl={color:n.z.nativeEnum(eo).describe("The color of the custom activity"),icon_id:n.z.nativeEnum(to).describe("The icon ID of the custom activity"),name:n.z.string().describe("The name of the custom activity")};const Xl=cp`
916
943
  mutation createNotification($user_id: ID!, $target_id: ID!, $text: String!, $target_type: NotificationTargetType!) {
917
944
  create_notification(user_id: $user_id, target_id: $target_id, text: $text, target_type: $target_type) {
918
945
  text
919
946
  }
920
947
  }
921
- `,Kl={user_id:n.z.string().describe("The user ID to send the notification to"),target_id:n.z.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:n.z.string().describe("The notification text"),target_type:n.z.nativeEnum(Ko).describe("The target type (Post for update/reply, Project for item/board)")};const Jl=cp`
948
+ `,Zl={user_id:n.z.string().describe("The user ID to send the notification to"),target_id:n.z.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:n.z.string().describe("The notification text"),target_type:n.z.nativeEnum(Ko).describe("The target type (Post for update/reply, Project for item/board)")};const em=cp`
922
949
  mutation createGroup(
923
950
  $boardId: ID!
924
951
  $groupName: String!
@@ -937,7 +964,7 @@
937
964
  title
938
965
  }
939
966
  }
940
- `,Xl=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],Zl={boardId:n.z.string().describe("The ID of the board to create the group in"),groupName:n.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:n.z.enum(Xl).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${Xl.join(", ")}`),relativeTo:n.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:n.z.nativeEnum(ar).optional().describe("Whether to position the new group before or after the relativeTo group")};const em=cp`
967
+ `,tm=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],am={boardId:n.z.string().describe("The ID of the board to create the group in"),groupName:n.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:n.z.enum(tm).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${tm.join(", ")}`),relativeTo:n.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:n.z.nativeEnum(ar).optional().describe("Whether to position the new group before or after the relativeTo group")};const im=cp`
941
968
  mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
942
969
  duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
943
970
  id
@@ -945,7 +972,7 @@
945
972
  url
946
973
  }
947
974
  }
948
- `,tm=cp`
975
+ `,nm=cp`
949
976
  mutation createSubitem($parentItemId: ID!, $itemName: String!, $columnValues: JSON) {
950
977
  create_subitem(parent_item_id: $parentItemId, item_name: $itemName, column_values: $columnValues) {
951
978
  id
@@ -956,7 +983,7 @@
956
983
  }
957
984
  }
958
985
  }
959
- `,am={name:n.z.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:n.z.string().optional().describe("The id of the group id to which the new item will be added, if its not clearly specified, leave empty"),columnValues:n.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"},\\"dropdown_id\\":\\"value\\", \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),parentItemId:n.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:n.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},im={boardId:n.z.number().describe("The id of the board to which the new item will be added"),...am};const nm={item_id:n.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:n.z.string().describe("The ID of the custom activity for the timeline item"),title:n.z.string().describe("The title of the new timeline item"),summary:n.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:n.z.string().optional().describe("The content of the new timeline item"),timestamp:n.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:n.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:n.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:n.z.string().optional().describe("The location to add to the new timeline item"),phone:n.z.string().optional().describe("The phone number to add to the new timeline item"),url:n.z.string().optional().describe("The URL to add to the new timeline item")};const om=cp`
986
+ `,om={name:n.z.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:n.z.string().optional().describe("The id of the group id to which the new item will be added, if its not clearly specified, leave empty"),columnValues:n.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"},\\"dropdown_id\\":\\"value\\", \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),parentItemId:n.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:n.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},rm={boardId:n.z.number().describe("The id of the board to which the new item will be added"),...om};const dm={item_id:n.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:n.z.string().describe("The ID of the custom activity for the timeline item"),title:n.z.string().describe("The title of the new timeline item"),summary:n.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:n.z.string().optional().describe("The content of the new timeline item"),timestamp:n.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:n.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:n.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:n.z.string().optional().describe("The location to add to the new timeline item"),phone:n.z.string().optional().describe("The phone number to add to the new timeline item"),url:n.z.string().optional().describe("The URL to add to the new timeline item")};const pm=cp`
960
987
  mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention], $parentId: ID) {
961
988
  create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList, parent_id: $parentId) {
962
989
  id
@@ -967,7 +994,7 @@
967
994
  }
968
995
  }
969
996
  }
970
- `,rm=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Yo).describe("The type of mention: User, Team, Board, or Project")}),dm=n.z.array(rm),pm={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead. use html tags to format the text, dont use markdown."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project'),parentId:n.z.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update")};const sm=cp`
997
+ `,sm=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Yo).describe("The type of mention: User, Team, Board, or Project")}),lm=n.z.array(sm),mm={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead. use html tags to format the text, dont use markdown."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project'),parentId:n.z.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update")};const cm=cp`
971
998
  query GetItemUpdates($itemId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
972
999
  items(ids: [$itemId]) {
973
1000
  id
@@ -1003,7 +1030,7 @@
1003
1030
  }
1004
1031
  }
1005
1032
  }
1006
- `,lm=cp`
1033
+ `,um=cp`
1007
1034
  query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!, $fromDate: ISO8601DateTime, $toDate: ISO8601DateTime, $boardUpdatesOnly: Boolean) {
1008
1035
  boards(ids: [$boardId]) {
1009
1036
  id
@@ -1039,7 +1066,7 @@
1039
1066
  }
1040
1067
  }
1041
1068
  }
1042
- `;var mm;!function(e){e.Item="Item",e.Board="Board"}(mm||(mm={}));const cm={objectId:n.z.string().describe("The ID of the item or board to get updates from"),objectType:n.z.enum([mm.Item,mm.Board]).describe("Type of object for which objectId was provided"),limit:n.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:n.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:n.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:n.z.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:n.z.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:n.z.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:n.z.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function um(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const hm={columnId:n.z.string().describe("The id of the column to be deleted")},fm={boardId:n.z.number().describe("The id of the board to which the new column will be added"),...hm};const _m={itemId:n.z.number()};const vm={};const bm=cp`
1069
+ `;var hm;!function(e){e.Item="Item",e.Board="Board"}(hm||(hm={}));const fm={objectId:n.z.string().describe("The ID of the item or board to get updates from"),objectType:n.z.enum([hm.Item,hm.Board]).describe("Type of object for which objectId was provided"),limit:n.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:n.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:n.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:n.z.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:n.z.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:n.z.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:n.z.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function _m(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const vm={columnId:n.z.string().describe("The id of the column to be deleted")},bm={boardId:n.z.number().describe("The id of the board to which the new column will be added"),...vm};const gm={itemId:n.z.number()};const ym={};const wm=cp`
1043
1070
  query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
1044
1071
  boards(ids: [$boardId]) {
1045
1072
  id
@@ -1082,7 +1109,7 @@
1082
1109
  }
1083
1110
  }
1084
1111
  }
1085
- `,gm=cp`
1112
+ `,Tm=cp`
1086
1113
  query getUsersByIds($userIds: [ID!]!) {
1087
1114
  users(ids: $userIds) {
1088
1115
  id
@@ -1090,7 +1117,7 @@
1090
1117
  photo_tiny
1091
1118
  }
1092
1119
  }
1093
- `,ym=n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to filter by"),compareAttribute:n.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:n.z.union([n.z.string(),n.z.number(),n.z.boolean(),n.z.array(n.z.union([n.z.string(),n.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:n.z.nativeEnum(zo).optional().default(zo.AnyOf).describe("The operator to use for the filter")})).optional().describe('The configuration of filters to apply on the items. Before sending the filters, use get_board_info tool to check "filteringGuidelines" key for filtering by the column.'),wm=n.z.nativeEnum(jo).optional().default(jo.And).describe("The operator to use for the filters"),Tm={boardId:n.z.string().describe("The ID of the board to fetch complete data for"),filters:ym,filtersOperator:wm};const Im=cp`
1120
+ `,Im=n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to filter by"),compareAttribute:n.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:n.z.union([n.z.string(),n.z.number(),n.z.boolean(),n.z.array(n.z.union([n.z.string(),n.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:n.z.nativeEnum(zo).optional().default(zo.AnyOf).describe("The operator to use for the filter")})).optional().describe('The configuration of filters to apply on the items. Before sending the filters, use get_board_info tool to check "filteringGuidelines" key for filtering by the column.'),Em=n.z.nativeEnum(jo).optional().default(jo.And).describe("The operator to use for the filters"),Nm={boardId:n.z.string().describe("The ID of the board to fetch complete data for"),filters:Im,filtersOperator:Em};const Sm=cp`
1094
1121
  query GetBoardAllActivity(
1095
1122
  $boardId: ID!
1096
1123
  $fromDate: ISO8601DateTime!
@@ -1111,7 +1138,7 @@
1111
1138
  }
1112
1139
  }
1113
1140
  }
1114
- `,Em={boardId:n.z.number().describe("The id of the board to get activity for"),fromDate:n.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:n.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:n.z.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const Nm=cp`
1141
+ `,Dm={boardId:n.z.number().describe("The id of the board to get activity for"),fromDate:n.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:n.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:n.z.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const Am=cp`
1115
1142
  query GetBoardInfo($boardId: ID!) {
1116
1143
  boards(ids: [$boardId]) {
1117
1144
  # Basic Board Metadata
@@ -1155,6 +1182,7 @@
1155
1182
  description
1156
1183
  type
1157
1184
  settings
1185
+ revision
1158
1186
  }
1159
1187
 
1160
1188
  # All Groups with Metadata
@@ -1198,7 +1226,7 @@
1198
1226
  }
1199
1227
  }
1200
1228
  }
1201
- `,Sm=cp`
1229
+ `,km=cp`
1202
1230
  query GetBoardInfoJustColumns($boardId: ID!) {
1203
1231
  boards(ids: [$boardId]) {
1204
1232
  columns {
@@ -1207,10 +1235,11 @@
1207
1235
  description
1208
1236
  type
1209
1237
  settings
1238
+ revision
1210
1239
  }
1211
1240
  }
1212
1241
  }
1213
- `,Dm=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0},filteringGuidelines:$m(e.columns.filter(Am)),aggregationGuidelines:Om()});function Am(e){return!!e&&["id","type"].every((t=>t in e))}const km={last_updated:'Supported operators: any_of, not_any_of. CompareValue should be either:\n - "TODAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "YESTERDAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\nEXAMPLES:\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // using TODAY with correct compareAttribute\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of"} // missing required compareAttribute\n ❌ Wrong: {"columnId": "last_updated", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator',date:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue should be either:\n - Date in "YYYY-MM-DD" format must be passed along with "EXACT" string e.g. compareValue:["2025-01-01", "EXACT"]\n - "TODAY" - Item with today\'s date\n - "TOMORROW" - Item with tomorrow\'s date\n - "THIS_WEEK" - Item with this week\'s date\n - "ONE_WEEK_AGO" - Item with one week ago\'s date\nEXAMPLES:\n ✅ Correct: {"columnId": "date", "compareValue": ["2025-01-01", "EXACT"], "operator": "any_of"} // using exact date format with EXACT\n ✅ Correct: {"columnId": "date", "compareValue": "TODAY", "operator": "greater_than"} // using TODAY with greater_than\n ❌ Wrong: {"columnId": "date", "compareValue": "2025-01-01", "operator": "any_of"} // missing EXACT string for exact date\n ❌ Wrong: {"columnId": "date", "compareValue": ["TODAY"], "operator": "greater_than"} // using array with single value operator',email:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be:\n - empty string "" when searching for blank values\n - whole email address when searching for specific email\n - partial email when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "email", "compareValue": ["john@example.com"], "operator": "any_of"} // using array with any_of for specific email\n ✅ Correct: {"columnId": "email", "compareValue": "gmail", "operator": "contains_text"} // using partial email with contains_text\n ❌ Wrong: {"columnId": "email", "compareValue": "john@example.com", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "email", "compareValue": ["gmail"], "operator": "contains_text"} // using array with single value operator',long_text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "long_text", "compareValue": ["Complete project description"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "long_text", "compareValue": "urgent", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "long_text", "compareValue": "Complete project description", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "long_text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "text", "compareValue": ["Task Name"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "text", "compareValue": "bug", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "text", "compareValue": "Task Name", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',numbers:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue is a number or "$$$blank$$$" when searching for blank values\nEXAMPLES:\n ✅ Correct: {"columnId": "numbers", "compareValue": [100, 200], "operator": "any_of"} // using array with any_of for multiple numbers\n ✅ Correct: {"columnId": "numbers", "compareValue": 50, "operator": "greater_than"} // using single number with greater_than\n ❌ Wrong: {"columnId": "numbers", "compareValue": 100, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "numbers", "compareValue": ["50"], "operator": "greater_than"} // using array with single value operator',name:'Supported operators: "contains_text", "not_contains_text". CompareValue can be full or partial text\nEXAMPLES:\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "contains_text"} // using string with contains_text\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "not_contains_text"} // using string with not_contains_text',status:'Supported operators: any_of, not_any_of, contains_terms. CompareValue should be either:\n - id of label from column settings - when used with any_of, not_any_of operators\n - label\'s text - when use with contains_terms\nEXAMPLES:\n ✅ Correct: {"columnId": "status", "compareValue": [0, 1], "operator": "any_of"} // Using id values\n ✅ Correct: {"columnId": "status", "compareValue": "Done", "operator": "contains_terms"} // Using label text\n ❌ Wrong: {"columnId": "status", "compareValue": "Done", "operator": "any_of"} // Using label text with wrong operator\n ❌ Wrong: {"columnId": "status", "compareValue": [0, 1], "operator": "contains_terms"} // Using id with wrong operator',checkbox:'Supported operators: is_empty, is_not_empty. Compare value must be an empty array\nEXAMPLES:\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": null, "operator": "is_empty"} // not using empty array with is_empty operator',people:'Supported operators: any_of, not_any_of, is_empty, is_not_empty. **CRITICAL**: CompareValue MUST be in one of following:\n - "assigned_to_me" - when searching for current user\n - "person-123" - when searching for specific person with id 123\n - "team-456" - when searching for specific team with id 456\n - empty array when using is_empty, is_not_empty operators\nEXAMPLES: \n ❌ Wrong: {"columnId": "column_id", "compareValue": ["person—123"], "operator": "any_of"} // Using long hyphen \'—\' instead of short hyphen \'-\'\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ✅ Correct: {"columnId": "column_id", "compareValue": ["person-80120403"], "operator": "any_of"} // using person prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["team-9000"], "operator": "any_of"} // using team prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["assigned_to_me"], "operator": "any_of"} // using assigned_to_me value\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "is_empty"} // using id with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "any_of"} // not using person or team prefix'},Om=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${gn.CountItems} function. Do not use ${gn.Count} function for that purpose.\n `,$m=e=>{const t=e.reduce(((e,t)=>km[t.type]?(e[t.type]||(e[t.type]=[]),e[t.type].push(t.id),e):e),{});return 0===Object.keys(t).length?"":`\n[MEMORY] Remember the filtering guidelines for subsequent requests for the same board.\n# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type Guidelines\n${Object.entries(t).map((([e,t])=>`- Column Type: ${e} (Column IDs: ${t.join(", ")}) - ${km[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},xm={boardId:n.z.number().describe("The id of the board to get information for")};const Cm=cp`
1242
+ `,Om=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0},filteringGuidelines:Rm(e.columns.filter($m)),aggregationGuidelines:Cm()});function $m(e){return!!e&&["id","type"].every((t=>t in e))}const xm={last_updated:'Supported operators: any_of, not_any_of. CompareValue should be either:\n - "TODAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "YESTERDAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\nEXAMPLES:\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // using TODAY with correct compareAttribute\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of"} // missing required compareAttribute\n ❌ Wrong: {"columnId": "last_updated", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator',date:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue should be either:\n - Date in "YYYY-MM-DD" format must be passed along with "EXACT" string e.g. compareValue:["2025-01-01", "EXACT"]\n - "TODAY" - Item with today\'s date\n - "TOMORROW" - Item with tomorrow\'s date\n - "THIS_WEEK" - Item with this week\'s date\n - "ONE_WEEK_AGO" - Item with one week ago\'s date\nEXAMPLES:\n ✅ Correct: {"columnId": "date", "compareValue": ["2025-01-01", "EXACT"], "operator": "any_of"} // using exact date format with EXACT\n ✅ Correct: {"columnId": "date", "compareValue": "TODAY", "operator": "greater_than"} // using TODAY with greater_than\n ❌ Wrong: {"columnId": "date", "compareValue": "2025-01-01", "operator": "any_of"} // missing EXACT string for exact date\n ❌ Wrong: {"columnId": "date", "compareValue": ["TODAY"], "operator": "greater_than"} // using array with single value operator',email:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be:\n - empty string "" when searching for blank values\n - whole email address when searching for specific email\n - partial email when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "email", "compareValue": ["john@example.com"], "operator": "any_of"} // using array with any_of for specific email\n ✅ Correct: {"columnId": "email", "compareValue": "gmail", "operator": "contains_text"} // using partial email with contains_text\n ❌ Wrong: {"columnId": "email", "compareValue": "john@example.com", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "email", "compareValue": ["gmail"], "operator": "contains_text"} // using array with single value operator',long_text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "long_text", "compareValue": ["Complete project description"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "long_text", "compareValue": "urgent", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "long_text", "compareValue": "Complete project description", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "long_text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "text", "compareValue": ["Task Name"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "text", "compareValue": "bug", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "text", "compareValue": "Task Name", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',numbers:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue is a number or "$$$blank$$$" when searching for blank values\nEXAMPLES:\n ✅ Correct: {"columnId": "numbers", "compareValue": [100, 200], "operator": "any_of"} // using array with any_of for multiple numbers\n ✅ Correct: {"columnId": "numbers", "compareValue": 50, "operator": "greater_than"} // using single number with greater_than\n ❌ Wrong: {"columnId": "numbers", "compareValue": 100, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "numbers", "compareValue": ["50"], "operator": "greater_than"} // using array with single value operator',name:'Supported operators: "contains_text", "not_contains_text". CompareValue can be full or partial text\nEXAMPLES:\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "contains_text"} // using string with contains_text\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "not_contains_text"} // using string with not_contains_text',status:'Supported operators: any_of, not_any_of, contains_terms. CompareValue should be either:\n - id of label from column settings - when used with any_of, not_any_of operators\n - label\'s text - when use with contains_terms\nEXAMPLES:\n ✅ Correct: {"columnId": "status", "compareValue": [0, 1], "operator": "any_of"} // Using id values\n ✅ Correct: {"columnId": "status", "compareValue": "Done", "operator": "contains_terms"} // Using label text\n ❌ Wrong: {"columnId": "status", "compareValue": "Done", "operator": "any_of"} // Using label text with wrong operator\n ❌ Wrong: {"columnId": "status", "compareValue": [0, 1], "operator": "contains_terms"} // Using id with wrong operator',checkbox:'Supported operators: is_empty, is_not_empty. Compare value must be an empty array\nEXAMPLES:\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": null, "operator": "is_empty"} // not using empty array with is_empty operator',people:'Supported operators: any_of, not_any_of, is_empty, is_not_empty. **CRITICAL**: CompareValue MUST be in one of following:\n - "assigned_to_me" - when searching for current user\n - "person-123" - when searching for specific person with id 123\n - "team-456" - when searching for specific team with id 456\n - empty array when using is_empty, is_not_empty operators\nEXAMPLES: \n ❌ Wrong: {"columnId": "column_id", "compareValue": ["person—123"], "operator": "any_of"} // Using long hyphen \'—\' instead of short hyphen \'-\'\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ✅ Correct: {"columnId": "column_id", "compareValue": ["person-80120403"], "operator": "any_of"} // using person prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["team-9000"], "operator": "any_of"} // using team prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["assigned_to_me"], "operator": "any_of"} // using assigned_to_me value\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "is_empty"} // using id with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "any_of"} // not using person or team prefix'},Cm=()=>`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${gn.CountItems} function. Do not use ${gn.Count} function for that purpose.\n `,Rm=e=>{const t=e.reduce(((e,t)=>xm[t.type]?(e[t.type]||(e[t.type]=[]),e[t.type].push(t.id),e):e),{});return 0===Object.keys(t).length?"":`\n[MEMORY] Remember the filtering guidelines for subsequent requests for the same board.\n# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type Guidelines\n${Object.entries(t).map((([e,t])=>`- Column Type: ${e} (Column IDs: ${t.join(", ")}) - ${xm[e]}`)).join("\n\n")}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n `},Lm={boardId:n.z.number().describe("The id of the board to get information for")};const Vm=cp`
1214
1243
  fragment ItemDataFragment on Item {
1215
1244
  id
1216
1245
  name
@@ -1273,7 +1302,7 @@
1273
1302
  }
1274
1303
  }
1275
1304
  }
1276
- `,Rm=cp`
1305
+ `,Fm=cp`
1277
1306
  query SearchItemsDev($query: String!, $limit: Int, $boardIds: [ID!]) {
1278
1307
  search {
1279
1308
  items(query: $query, limit: $limit, board_ids: $boardIds) {
@@ -1283,11 +1312,11 @@
1283
1312
  }
1284
1313
  }
1285
1314
  }
1286
- `,Lm={boardId:n.z.number().describe("The id of the board to get items from"),itemIds:n.z.array(n.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:n.z.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:n.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:n.z.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:n.z.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeItemDescription:n.z.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:n.z.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:ym,filtersOperator:wm,columnIds:n.z.array(n.z.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to order by"),direction:n.z.nativeEnum(Po).optional().default(Po.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 Vm={boardId:n.z.number().describe("The id of the board to get the schema of")};const Fm=cp`
1315
+ `,Um={boardId:n.z.number().describe("The id of the board to get items from"),itemIds:n.z.array(n.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:n.z.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:n.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:n.z.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:n.z.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeItemDescription:n.z.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:n.z.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:Im,filtersOperator:Em,columnIds:n.z.array(n.z.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to order by"),direction:n.z.nativeEnum(Po).optional().default(Po.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 Pm={boardId:n.z.number().describe("The id of the board to get the schema of")};const jm=cp`
1287
1316
  query GetColumnTypeSchema($type: ColumnType!) {
1288
1317
  get_column_type_schema(type: $type)
1289
1318
  }
1290
- `,Um="https://developer.monday.com/api-reference",Pm={columnType:n.z.nativeEnum(Hl).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const jm={random_string:n.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:n.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const zm={typeName:n.z.string().describe("The name of the GraphQL type to get details for")};const Bm=cp`
1319
+ `,zm="https://developer.monday.com/api-reference",Bm={columnType:n.z.nativeEnum(Gl).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")')};const Mm={random_string:n.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:n.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const qm={typeName:n.z.string().describe("The name of the GraphQL type to get details for")};const Hm=cp`
1291
1320
  fragment UserDetails on User {
1292
1321
  # Basic User Information
1293
1322
  id
@@ -1319,31 +1348,31 @@
1319
1348
  time_zone_identifier
1320
1349
  utc_hours_diff
1321
1350
  }
1322
- `,Mm=cp`
1351
+ `,Gm=cp`
1323
1352
  fragment UserTeamMembership on Team {
1324
1353
  id
1325
1354
  name
1326
1355
  is_guest
1327
1356
  picture_url
1328
1357
  }
1329
- `,qm=cp`
1358
+ `,Wm=cp`
1330
1359
  fragment TeamBasicInfo on Team {
1331
1360
  id
1332
1361
  name
1333
1362
  }
1334
- `,Hm=cp`
1363
+ `,Ym=cp`
1335
1364
  fragment TeamExtendedInfo on Team {
1336
1365
  ...TeamBasicInfo
1337
1366
  is_guest
1338
1367
  picture_url
1339
1368
  }
1340
- `,Gm=cp`
1369
+ `,Qm=cp`
1341
1370
  fragment TeamOwner on User {
1342
1371
  id
1343
1372
  name
1344
1373
  email
1345
1374
  }
1346
- `,Wm=cp`
1375
+ `,Km=cp`
1347
1376
  fragment TeamMember on User {
1348
1377
  id
1349
1378
  name
@@ -1363,7 +1392,7 @@
1363
1392
  time_zone_identifier
1364
1393
  utc_hours_diff
1365
1394
  }
1366
- `,Ym=cp`
1395
+ `,Jm=cp`
1367
1396
  fragment TeamMemberSimplified on User {
1368
1397
  id
1369
1398
  name
@@ -1372,15 +1401,15 @@
1372
1401
  is_admin
1373
1402
  is_guest
1374
1403
  }
1375
- `,Qm=cp`
1404
+ `,Xm=cp`
1376
1405
  fragment UserTeamMembershipSimplified on Team {
1377
1406
  id
1378
1407
  name
1379
1408
  is_guest
1380
1409
  }
1381
- `,Km=cp`
1382
- ${Bm}
1383
- ${Mm}
1410
+ `,Zm=cp`
1411
+ ${Hm}
1412
+ ${Gm}
1384
1413
 
1385
1414
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1386
1415
  users(ids: $userIds, limit: $limit) {
@@ -1392,21 +1421,21 @@
1392
1421
  }
1393
1422
  }
1394
1423
  }
1395
- `,Jm=cp`
1396
- ${Bm}
1424
+ `,ec=cp`
1425
+ ${Hm}
1397
1426
 
1398
1427
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1399
1428
  users(ids: $userIds, limit: $limit) {
1400
1429
  ...UserDetails
1401
1430
  }
1402
1431
  }
1403
- `,Xm=cp`
1404
- ${Bm}
1405
- ${Qm}
1432
+ `,tc=cp`
1406
1433
  ${Hm}
1407
- ${qm}
1408
- ${Gm}
1434
+ ${Xm}
1409
1435
  ${Ym}
1436
+ ${Wm}
1437
+ ${Qm}
1438
+ ${Jm}
1410
1439
 
1411
1440
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1412
1441
  users(ids: $userIds, limit: $limit) {
@@ -1432,19 +1461,19 @@
1432
1461
  }
1433
1462
  }
1434
1463
  }
1435
- `,Zm=cp`
1436
- ${qm}
1464
+ `,ac=cp`
1465
+ ${Wm}
1437
1466
 
1438
1467
  query listTeamsOnly($teamIds: [ID!]) {
1439
1468
  teams(ids: $teamIds) {
1440
1469
  ...TeamBasicInfo
1441
1470
  }
1442
1471
  }
1443
- `,ec=cp`
1444
- ${Hm}
1445
- ${qm}
1446
- ${Gm}
1472
+ `,ic=cp`
1473
+ ${Ym}
1447
1474
  ${Wm}
1475
+ ${Qm}
1476
+ ${Km}
1448
1477
 
1449
1478
  query listTeamsWithMembers($teamIds: [ID!]) {
1450
1479
  teams(ids: $teamIds) {
@@ -1461,9 +1490,9 @@
1461
1490
  }
1462
1491
  }
1463
1492
  }
1464
- `,tc=cp`
1465
- ${Bm}
1466
- ${Mm}
1493
+ `,nc=cp`
1494
+ ${Hm}
1495
+ ${Gm}
1467
1496
 
1468
1497
  query getUserByName($name: String) {
1469
1498
  users(name: $name) {
@@ -1475,7 +1504,7 @@
1475
1504
  }
1476
1505
  }
1477
1506
  }
1478
- `,ac=cp`
1507
+ `,oc=cp`
1479
1508
  query getCurrentUser {
1480
1509
  me {
1481
1510
  id
@@ -1487,7 +1516,7 @@
1487
1516
  photo_thumb
1488
1517
  }
1489
1518
  }
1490
- `;const ic=[["is_pending","Pending"],["is_verified","Verified"],["is_view_only","View Only"],["join_date","Join Date"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["photo_thumb","Photo Thumb"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function nc(e,t=""){return ic.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const oc=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...nc(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...nc(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},rc=500,dc=500,pc=1e3,sc=cp`
1519
+ `;const rc=[["is_pending","Pending"],["is_verified","Verified"],["is_view_only","View Only"],["join_date","Join Date"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["photo_thumb","Photo Thumb"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function dc(e,t=""){return rc.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const pc=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...dc(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...dc(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},sc=500,lc=500,mc=1e3,cc=cp`
1491
1520
  query getAccountSlug {
1492
1521
  me {
1493
1522
  account {
@@ -1495,7 +1524,7 @@
1495
1524
  }
1496
1525
  }
1497
1526
  }
1498
- `;async function lc(e){const t=await e.request(sc);return t.me?.account?.slug??null}function mc(e,t){return`https://${e}.monday.com/workspaces/${t}`}const cc={userIds:n.z.array(n.z.string()).max(rc).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:n.z.array(n.z.string()).max(dc).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:n.z.string().optional().describe("Name-based USER search ONLY. STANDALONE parameter - cannot be combined with others. PREFERRED method for finding users when you know names. Performs fuzzy matching.\n CRITICAL: This parameter searches for USERS ONLY, NOT teams. To search for teams, use teamIds parameter instead."),getMe:n.z.boolean().optional().describe('[TOP PRIORITY] Use ALWAYS when requesting current user information. Examples of when it should be used: ["get my user" or "get my teams"].\n This parameter CONFLICTS with all others. '),includeTeams:n.z.boolean().optional().describe("[AVOID] This fetches all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get their team memberships."),teamsOnly:n.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:n.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const uc={itemId:n.z.number().describe("The id of the item to which the update will be added"),groupId:n.z.string().describe("The id of the group to which the item will be moved")};const hc="content",fc="version_history",_c=n.z.enum(["ids","object_ids","workspace_ids"]),vc={mode:n.z.enum([hc,fc]).optional().default(hc).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:_c.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:n.z.array(n.z.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:n.z.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:n.z.nativeEnum(co).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:n.z.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:n.z.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),include_comments:n.z.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:n.z.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:n.z.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:n.z.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:n.z.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:n.z.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const bc={workspace_id:n.z.number().describe("The ID of the workspace to get information for")};const gc=cp`
1527
+ `;async function uc(e){const t=await e.request(cc);return t.me?.account?.slug??null}function hc(e,t){return`https://${e}.monday.com/workspaces/${t}`}const fc={userIds:n.z.array(n.z.string()).max(sc).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:n.z.array(n.z.string()).max(lc).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:n.z.string().optional().describe("Name-based USER search ONLY. STANDALONE parameter - cannot be combined with others. PREFERRED method for finding users when you know names. Performs fuzzy matching.\n CRITICAL: This parameter searches for USERS ONLY, NOT teams. To search for teams, use teamIds parameter instead."),getMe:n.z.boolean().optional().describe('[TOP PRIORITY] Use ALWAYS when requesting current user information. Examples of when it should be used: ["get my user" or "get my teams"].\n This parameter CONFLICTS with all others. '),includeTeams:n.z.boolean().optional().describe("[AVOID] This fetches all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get their team memberships."),teamsOnly:n.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:n.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const _c={itemId:n.z.number().describe("The id of the item to which the update will be added"),groupId:n.z.string().describe("The id of the group to which the item will be moved")};const vc="content",bc="version_history",gc=n.z.enum(["ids","object_ids","workspace_ids"]),yc={mode:n.z.enum([vc,bc]).optional().default(vc).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:gc.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:n.z.array(n.z.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:n.z.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:n.z.nativeEnum(co).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:n.z.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:n.z.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),blocks_limit:n.z.number().optional().describe("Maximum number of blocks to return per document (default: 25). Only used in content mode when include_blocks is true."),blocks_page:n.z.number().optional().describe("Page number for block pagination, starting at 1. Omit to use the API default. Use with blocks_limit to page through documents with more than 25 blocks. Only used in content mode when include_blocks is true."),include_comments:n.z.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:n.z.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:n.z.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:n.z.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:n.z.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:n.z.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const wc={workspace_id:n.z.number().describe("The ID of the workspace to get information for")};const Tc=cp`
1499
1528
  query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
1500
1529
  workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
1501
1530
  id
@@ -1503,7 +1532,7 @@
1503
1532
  description
1504
1533
  }
1505
1534
  }
1506
- `,yc=100,wc=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function Tc(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function Ic(e){return Array.isArray(e)&&e.length>0}const Ec={searchTerm:n.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORTANT] Only alphanumeric characters are supported."),limit:n.z.number().min(1).max(yc).default(yc).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:n.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const Nc=cp`
1535
+ `,Ic=100,Ec=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function Nc(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function Sc(e){return Array.isArray(e)&&e.length>0}const Dc={searchTerm:n.z.string().optional().describe("Optional search term used to filter workspaces. [IMPORTANT] Only alphanumeric characters are supported."),limit:n.z.number().min(1).max(Ic).default(Ic).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:n.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const Ac=cp`
1507
1536
  query getItemBoard($itemId: ID!) {
1508
1537
  items(ids: [$itemId]) {
1509
1538
  id
@@ -1516,7 +1545,7 @@
1516
1545
  }
1517
1546
  }
1518
1547
  }
1519
- `,Sc=cp`
1548
+ `,kc=cp`
1520
1549
  mutation createDoc($location: CreateDocInput!) {
1521
1550
  create_doc(location: $location) {
1522
1551
  id
@@ -1525,7 +1554,7 @@
1525
1554
  name
1526
1555
  }
1527
1556
  }
1528
- `,Dc=cp`
1557
+ `,Oc=cp`
1529
1558
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1530
1559
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1531
1560
  success
@@ -1533,11 +1562,11 @@
1533
1562
  error
1534
1563
  }
1535
1564
  }
1536
- `,Ac=cp`
1565
+ `,$c=cp`
1537
1566
  mutation updateDocName($docId: ID!, $name: String!) {
1538
1567
  update_doc_name(docId: $docId, name: $name)
1539
1568
  }
1540
- `,kc=n.z.enum(["workspace","item"]),Oc=n.z.discriminatedUnion("type",[n.z.object({type:n.z.literal(kc.enum.workspace).describe("Create document in workspace"),workspace_id:n.z.number().describe("Workspace ID under which to create the new document"),doc_kind:n.z.nativeEnum(Vn).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:n.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),n.z.object({type:n.z.literal(kc.enum.item).describe("Create document attached to item"),item_id:n.z.number().describe("Item ID to attach the new document to"),column_id:n.z.string().optional().describe("ID of an existing 'doc' column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.")})]),$c={doc_name:n.z.string().describe("Name for the new document."),markdown:n.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:n.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:n.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:n.z.nativeEnum(Vn).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:n.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:n.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:n.z.string().optional().describe('[OPTIONAL - use only when location="item"] ID of an existing "doc" column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.')};const xc=cp`
1569
+ `,xc=n.z.enum(["workspace","item"]),Cc=n.z.discriminatedUnion("type",[n.z.object({type:n.z.literal(xc.enum.workspace).describe("Create document in workspace"),workspace_id:n.z.number().describe("Workspace ID under which to create the new document"),doc_kind:n.z.nativeEnum(Vn).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:n.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),n.z.object({type:n.z.literal(xc.enum.item).describe("Create document attached to item"),item_id:n.z.number().describe("Item ID to attach the new document to"),column_id:n.z.string().optional().describe("ID of an existing 'doc' column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.")})]),Rc={doc_name:n.z.string().describe("Name for the new document."),markdown:n.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:n.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),workspace_id:n.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:n.z.nativeEnum(Vn).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:n.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:n.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:n.z.string().optional().describe('[OPTIONAL - use only when location="item"] ID of an existing "doc" column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.')};const Lc=cp`
1541
1570
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1542
1571
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1543
1572
  success
@@ -1545,7 +1574,7 @@
1545
1574
  error
1546
1575
  }
1547
1576
  }
1548
- `,Cc=cp`
1577
+ `,Vc=cp`
1549
1578
  query getDocByObjectId($objectId: [ID!]) {
1550
1579
  docs(object_ids: $objectId) {
1551
1580
  id
@@ -1553,7 +1582,7 @@
1553
1582
  url
1554
1583
  }
1555
1584
  }
1556
- `,Rc=cp`
1585
+ `,Fc=cp`
1557
1586
  query getDocById($docId: [ID!]) {
1558
1587
  docs(ids: $docId) {
1559
1588
  id
@@ -1561,11 +1590,11 @@
1561
1590
  url
1562
1591
  }
1563
1592
  }
1564
- `,Lc={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:n.z.string().describe("Markdown content to add to the document."),after_block_id:n.z.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};const Vc=cp`
1593
+ `,Uc={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:n.z.string().describe("Markdown content to add to the document."),after_block_id:n.z.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};const Pc=cp`
1565
1594
  mutation updateDocName($docId: ID!, $name: String!) {
1566
1595
  update_doc_name(docId: $docId, name: $name)
1567
1596
  }
1568
- `,Fc=cp`
1597
+ `,jc=cp`
1569
1598
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1570
1599
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1571
1600
  success
@@ -1573,13 +1602,13 @@
1573
1602
  error
1574
1603
  }
1575
1604
  }
1576
- `,Uc=cp`
1605
+ `,zc=cp`
1577
1606
  query getDocIdByObjectId($objectId: [ID!]) {
1578
1607
  docs(object_ids: $objectId) {
1579
1608
  id
1580
1609
  }
1581
1610
  }
1582
- `,Pc=cp`
1611
+ `,Bc=cp`
1583
1612
  mutation updateDocBlock($blockId: String!, $content: JSON!) {
1584
1613
  update_doc_block(block_id: $blockId, content: $content) {
1585
1614
  id
@@ -1587,20 +1616,20 @@
1587
1616
  created_at
1588
1617
  }
1589
1618
  }
1590
- `,jc=cp`
1619
+ `,Mc=cp`
1591
1620
  mutation deleteDocBlock($blockId: String!) {
1592
1621
  delete_doc_block(block_id: $blockId) {
1593
1622
  id
1594
1623
  }
1595
1624
  }
1596
- `,zc=cp`
1625
+ `,qc=cp`
1597
1626
  query getDocObjectIdByDocId($docId: [ID!]) {
1598
1627
  docs(ids: $docId) {
1599
1628
  id
1600
1629
  object_id
1601
1630
  }
1602
1631
  }
1603
- `,Bc=cp`
1632
+ `,Hc=cp`
1604
1633
  query getDocBoardItem($boardId: ID!) {
1605
1634
  boards(ids: [$boardId]) {
1606
1635
  items_page(limit: 1) {
@@ -1610,7 +1639,7 @@
1610
1639
  }
1611
1640
  }
1612
1641
  }
1613
- `,Mc=cp`
1642
+ `,Gc=cp`
1614
1643
  query getDocBlockContent($docId: [ID!]) {
1615
1644
  docs(ids: $docId) {
1616
1645
  blocks {
@@ -1620,7 +1649,7 @@
1620
1649
  }
1621
1650
  }
1622
1651
  }
1623
- `,qc=cp`
1652
+ `,Wc=cp`
1624
1653
  mutation createDocComment($itemId: ID!, $body: String!, $parentId: ID, $mentionsList: [UpdateMention]) {
1625
1654
  create_update(body: $body, item_id: $itemId, parent_id: $parentId, mentions_list: $mentionsList) {
1626
1655
  id
@@ -1628,7 +1657,7 @@
1628
1657
  created_at
1629
1658
  }
1630
1659
  }
1631
- `,Hc=cp`
1660
+ `,Yc=cp`
1632
1661
  mutation createDocBlocks($docId: ID!, $afterBlockId: String, $blocksInput: [CreateBlockInput!]!) {
1633
1662
  create_doc_blocks(docId: $docId, afterBlockId: $afterBlockId, blocksInput: $blocksInput) {
1634
1663
  id
@@ -1696,7 +1725,7 @@
1696
1725
  }
1697
1726
  }
1698
1727
  }
1699
- `;function Gc(e){if(e)return e}function Wc(e){if(e)return e}function Yc(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Qc(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:Yc(e.attributes)}}))}function Kc(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:t.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Yc(e.attributes)}}))}function Jc(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function Xc(e,t,a,i){const n=a+i;let o=0;const r=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${o}: op has no 'insert' field. Block content may be from an unsupported block type.`);const d=o,p=d+("string"==typeof e?e.length:1),s=Math.max(d,a),l=Math.min(p,n);s>=l?r.push(i):"string"!=typeof e?r.push(Jc(i,t)):(s>d&&r.push({...i,insert:e.slice(0,s-d)}),r.push(Jc({...i,insert:e.slice(s-d,l-d)},t)),l<p&&r.push({...i,insert:e.slice(l-d)})),o=p}return r}const Zc=n.z.object({bold:n.z.boolean().optional(),italic:n.z.boolean().optional(),underline:n.z.boolean().optional(),strike:n.z.boolean().optional(),code:n.z.boolean().optional(),link:n.z.string().optional(),color:n.z.string().optional(),background:n.z.string().optional()}).optional(),eu=n.z.object({mention:n.z.object({id:n.z.union([n.z.string(),n.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:n.z.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),tu=n.z.object({column_value:n.z.object({item_id:n.z.union([n.z.string(),n.z.number()]).describe("The board item ID."),column_id:n.z.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),au=n.z.object({insert:n.z.union([n.z.object({text:n.z.string()}),eu,tu]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:Zc.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),iu=n.z.object({block_content_type:n.z.literal("text"),delta_format:n.z.array(au).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),nu=n.z.object({block_content_type:n.z.literal("code"),delta_format:n.z.array(au).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),ou=n.z.object({block_content_type:n.z.literal("list_item"),delta_format:n.z.array(au).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:n.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),ru=n.z.discriminatedUnion("block_content_type",[iu,nu,ou]),du=n.z.object({block_type:n.z.literal("text"),text_block_type:n.z.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:n.z.array(au).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),pu=n.z.object({block_type:n.z.literal("list_item"),list_block_type:n.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:n.z.array(au).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),su=n.z.object({block_type:n.z.literal("code"),delta_format:n.z.array(au).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),lu=n.z.object({block_type:n.z.literal("divider")}),mu=n.z.object({block_type:n.z.literal("page_break")}),cu=n.z.object({block_type:n.z.literal("image"),public_url:n.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:n.z.union([n.z.number().int(),n.z.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),uu=n.z.object({block_type:n.z.literal("video"),raw_url:n.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),hu=n.z.object({block_type:n.z.literal("notice_box"),theme:n.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),fu=n.z.object({block_type:n.z.literal("table"),row_count:n.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:n.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:n.z.number().int().optional().describe("Table width in pixels."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),_u=n.z.object({block_type:n.z.literal("layout"),column_count:n.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),vu=n.z.discriminatedUnion("block_type",[du,pu,su,lu,mu,cu,uu,hu,fu,_u]),bu=n.z.object({operation_type:n.z.literal("set_name"),name:n.z.string().min(1).describe("New document name.")}),gu=n.z.object({operation_type:n.z.literal("add_markdown_content"),markdown:n.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),yu=n.z.object({operation_type:n.z.literal("update_block"),block_id:n.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:ru.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),wu=n.z.object({operation_type:n.z.literal("create_block"),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:n.z.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:vu.describe("The block to create. Use block_type to select the block type.")}),Tu=n.z.object({operation_type:n.z.literal("delete_block"),block_id:n.z.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Iu=n.z.object({operation_type:n.z.literal("replace_block"),block_id:n.z.string().describe("ID of the block to delete."),after_block_id:n.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:n.z.string().optional().describe("Parent block ID for the replacement block."),block:vu.describe("The new block to create in place of the deleted one.")}),Eu=n.z.object({operation_type:n.z.literal("add_comment"),body:n.z.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:n.z.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:n.z.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:n.z.union([n.z.string(),n.z.array(n.z.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:n.z.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:n.z.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),Nu=n.z.discriminatedUnion("operation_type",[bu,gu,yu,wu,Tu,Iu,Eu]),Su={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:n.z.array(Nu).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const Du=cp`
1728
+ `;function Qc(e){if(e)return e}function Kc(e){if(e)return e}function Jc(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Xc(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:Jc(e.attributes)}}))}function Zc(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:t.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Jc(e.attributes)}}))}function eu(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function tu(e,t,a,i){const n=a+i;let o=0;const r=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${o}: op has no 'insert' field. Block content may be from an unsupported block type.`);const d=o,p=d+("string"==typeof e?e.length:1),s=Math.max(d,a),l=Math.min(p,n);s>=l?r.push(i):"string"!=typeof e?r.push(eu(i,t)):(s>d&&r.push({...i,insert:e.slice(0,s-d)}),r.push(eu({...i,insert:e.slice(s-d,l-d)},t)),l<p&&r.push({...i,insert:e.slice(l-d)})),o=p}return r}const au=n.z.object({bold:n.z.boolean().optional(),italic:n.z.boolean().optional(),underline:n.z.boolean().optional(),strike:n.z.boolean().optional(),code:n.z.boolean().optional(),link:n.z.string().optional(),color:n.z.string().optional(),background:n.z.string().optional()}).optional(),iu=n.z.object({mention:n.z.object({id:n.z.union([n.z.string(),n.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:n.z.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),nu=n.z.object({column_value:n.z.object({item_id:n.z.union([n.z.string(),n.z.number()]).describe("The board item ID."),column_id:n.z.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),ou=n.z.object({insert:n.z.union([n.z.object({text:n.z.string()}),iu,nu]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:au.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),ru=n.z.object({block_content_type:n.z.literal("text"),delta_format:n.z.array(ou).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),du=n.z.object({block_content_type:n.z.literal("code"),delta_format:n.z.array(ou).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),pu=n.z.object({block_content_type:n.z.literal("list_item"),delta_format:n.z.array(ou).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:n.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),su=n.z.discriminatedUnion("block_content_type",[ru,du,pu]),lu=n.z.object({block_type:n.z.literal("text"),text_block_type:n.z.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:n.z.array(ou).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),mu=n.z.object({block_type:n.z.literal("list_item"),list_block_type:n.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:n.z.array(ou).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),cu=n.z.object({block_type:n.z.literal("code"),delta_format:n.z.array(ou).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),uu=n.z.object({block_type:n.z.literal("divider")}),hu=n.z.object({block_type:n.z.literal("page_break")}),fu=n.z.object({block_type:n.z.literal("image"),public_url:n.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:n.z.union([n.z.number().int(),n.z.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),_u=n.z.object({block_type:n.z.literal("video"),raw_url:n.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),vu=n.z.object({block_type:n.z.literal("notice_box"),theme:n.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),bu=n.z.object({block_type:n.z.literal("table"),row_count:n.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:n.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:n.z.number().int().optional().describe("Table width in pixels."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),gu=n.z.object({block_type:n.z.literal("layout"),column_count:n.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),yu=n.z.discriminatedUnion("block_type",[lu,mu,cu,uu,hu,fu,_u,vu,bu,gu]),wu=n.z.object({operation_type:n.z.literal("set_name"),name:n.z.string().min(1).describe("New document name.")}),Tu=n.z.object({operation_type:n.z.literal("add_markdown_content"),markdown:n.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Iu=n.z.object({operation_type:n.z.literal("update_block"),block_id:n.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:su.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),Eu=n.z.object({operation_type:n.z.literal("create_block"),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:n.z.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:yu.describe("The block to create. Use block_type to select the block type.")}),Nu=n.z.object({operation_type:n.z.literal("delete_block"),block_id:n.z.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Su=n.z.object({operation_type:n.z.literal("replace_block"),block_id:n.z.string().describe("ID of the block to delete."),after_block_id:n.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:n.z.string().optional().describe("Parent block ID for the replacement block."),block:yu.describe("The new block to create in place of the deleted one.")}),Du=n.z.object({operation_type:n.z.literal("add_comment"),body:n.z.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:n.z.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:n.z.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:n.z.union([n.z.string(),n.z.array(n.z.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:n.z.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:n.z.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),Au=n.z.discriminatedUnion("operation_type",[wu,Tu,Iu,Eu,Nu,Su,Du]),ku={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:n.z.array(Au).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const Ou=cp`
1700
1729
  mutation CreateDashboard(
1701
1730
  $name: String!
1702
1731
  $workspace_id: ID!
@@ -1718,14 +1747,14 @@
1718
1747
  board_folder_id
1719
1748
  }
1720
1749
  }
1721
- `,Au=cp`
1750
+ `,$u=cp`
1722
1751
  query GetAllWidgetsSchema {
1723
1752
  all_widgets_schema {
1724
1753
  widget_type
1725
1754
  schema
1726
1755
  }
1727
1756
  }
1728
- `,ku=cp`
1757
+ `,xu=cp`
1729
1758
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1730
1759
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1731
1760
  id
@@ -1737,14 +1766,14 @@
1737
1766
  }
1738
1767
  }
1739
1768
  }
1740
- `,Ou={name:n.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:n.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:n.z.array(n.z.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:n.z.nativeEnum(io).default(io.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:n.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const $u={parent_container_id:n.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:n.z.nativeEnum(zr).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:n.z.nativeEnum(fo).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:n.z.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:n.z.record(n.z.unknown()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};const xu=cp`
1769
+ `,Cu={name:n.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:n.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:n.z.array(n.z.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:n.z.nativeEnum(io).default(io.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:n.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const Ru={parent_container_id:n.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:n.z.nativeEnum(zr).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:n.z.nativeEnum(fo).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:n.z.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:n.z.record(n.z.unknown()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};const Lu=cp`
1741
1770
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1742
1771
  update_workspace(id: $id, attributes: $attributes) {
1743
1772
  id
1744
1773
  name
1745
1774
  }
1746
1775
  }
1747
- `,Cu={id:n.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:n.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:n.z.string().optional().describe("The description of the workspace to update"),attributeKind:n.z.nativeEnum(Br).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:n.z.string().optional().describe("The name of the workspace to update")};const Ru=cp`
1776
+ `,Vu={id:n.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:n.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:n.z.string().optional().describe("The description of the workspace to update"),attributeKind:n.z.nativeEnum(Br).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:n.z.string().optional().describe("The name of the workspace to update")};const Fu=cp`
1748
1777
  mutation updateFolder(
1749
1778
  $folderId: ID!
1750
1779
  $name: String
@@ -1771,7 +1800,7 @@
1771
1800
  name
1772
1801
  }
1773
1802
  }
1774
- `,Lu={folderId:n.z.string().describe("The ID of the folder to update"),name:n.z.string().optional().describe("The new name of the folder"),color:n.z.nativeEnum(go).optional().describe("The new color of the folder"),fontWeight:n.z.nativeEnum(wo).optional().describe("The new font weight of the folder"),customIcon:n.z.nativeEnum(yo).optional().describe("The new custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder"),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:n.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:n.z.string().optional().describe("The ID of the object to position the folder relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(Zo).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the folder after the object")};const Vu=cp`
1803
+ `,Uu={folderId:n.z.string().describe("The ID of the folder to update"),name:n.z.string().optional().describe("The new name of the folder"),color:n.z.nativeEnum(go).optional().describe("The new color of the folder"),fontWeight:n.z.nativeEnum(wo).optional().describe("The new font weight of the folder"),customIcon:n.z.nativeEnum(yo).optional().describe("The new custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder"),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:n.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:n.z.string().optional().describe("The ID of the object to position the folder relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(Zo).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the folder after the object")};const Pu=cp`
1775
1804
  mutation createWorkspace(
1776
1805
  $name: String!
1777
1806
  $workspaceKind: WorkspaceKind!
@@ -1788,7 +1817,7 @@
1788
1817
  name
1789
1818
  }
1790
1819
  }
1791
- `,Fu={name:n.z.string().describe("The name of the new workspace to be created"),workspaceKind:n.z.nativeEnum(Br).describe("The kind of workspace to create"),description:n.z.string().optional().describe("The description of the new workspace"),accountProductId:n.z.string().optional().describe("The account product ID associated with the workspace")};const Uu=cp`
1820
+ `,ju={name:n.z.string().describe("The name of the new workspace to be created"),workspaceKind:n.z.nativeEnum(Br).describe("The kind of workspace to create"),description:n.z.string().optional().describe("The description of the new workspace"),accountProductId:n.z.string().optional().describe("The account product ID associated with the workspace")};const zu=cp`
1792
1821
  mutation createFolder(
1793
1822
  $workspaceId: ID!
1794
1823
  $name: String!
@@ -1809,7 +1838,7 @@
1809
1838
  name
1810
1839
  }
1811
1840
  }
1812
- `,Pu={workspaceId:n.z.string().describe("The ID of the workspace where the folder will be created"),name:n.z.string().describe("The name of the folder to be created"),color:n.z.nativeEnum(go).optional().describe("The color of the folder"),fontWeight:n.z.nativeEnum(wo).optional().describe("The font weight of the folder"),customIcon:n.z.nativeEnum(yo).optional().describe("The custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the parent folder")};const ju=cp`
1841
+ `,Bu={workspaceId:n.z.string().describe("The ID of the workspace where the folder will be created"),name:n.z.string().describe("The name of the folder to be created"),color:n.z.nativeEnum(go).optional().describe("The color of the folder"),fontWeight:n.z.nativeEnum(wo).optional().describe("The font weight of the folder"),customIcon:n.z.nativeEnum(yo).optional().describe("The custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the parent folder")};const Mu=cp`
1813
1842
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1814
1843
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1815
1844
  success
@@ -1819,7 +1848,7 @@
1819
1848
  }
1820
1849
  }
1821
1850
  }
1822
- `,zu=cp`
1851
+ `,qu=cp`
1823
1852
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
1824
1853
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
1825
1854
  success
@@ -1829,7 +1858,7 @@
1829
1858
  }
1830
1859
  }
1831
1860
  }
1832
- `,Bu={objectType:n.z.nativeEnum(Zo).describe("The type of object to move"),id:n.z.string().describe("The ID of the object to move"),position_object_id:n.z.string().optional().describe("The ID of the object to position the object relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(Zo).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:n.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const Mu=cp`
1861
+ `,Hu={objectType:n.z.nativeEnum(Zo).describe("The type of object to move"),id:n.z.string().describe("The ID of the object to move"),position_object_id:n.z.string().optional().describe("The ID of the object to position the object relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(Zo).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:n.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const Gu=cp`
1833
1862
  query aggregateBoardInsights($query: AggregateQueryInput!, $boardId: ID!) {
1834
1863
  boards(ids: [$boardId]) {
1835
1864
  name
@@ -1851,7 +1880,7 @@
1851
1880
  }
1852
1881
  }
1853
1882
  }
1854
- `,qu=new Set([gn.Case,gn.Between,gn.Left,gn.Raw,gn.None,gn.CountKeys]),Hu=Object.values(gn).filter((e=>!qu.has(e))),Gu=new Set([gn.Left,gn.Trim,gn.Upper,gn.Lower,gn.DateTruncDay,gn.DateTruncWeek,gn.DateTruncMonth,gn.DateTruncQuarter,gn.DateTruncYear,gn.Color,gn.Label,gn.EndDate,gn.StartDate,gn.Hour,gn.PhoneCountryShortName,gn.Person,gn.Upper,gn.Lower,gn.Order,gn.Length,gn.Flatten,gn.IsDone]);function Wu(e){return{column_id:e}}new Set([gn.Count,gn.CountDistinct,gn.CountSubitems,gn.CountItems,gn.First,gn.Sum,gn.Average,gn.Median,gn.Min,gn.Max,gn.MinMax]);const Yu={boardId:n.z.number().describe("The id of the board to get insights for"),aggregations:n.z.array(n.z.object({function:n.z.enum(Hu).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:n.z.string().describe("The id of the column to aggregate")})).describe('The aggregations to get. Before sending the aggregations, use get_board_info tool to check "aggregationGuidelines" key for information. Transformative functions and plain columns (no function) must be in group by.').optional(),groupBy:n.z.array(n.z.string()).describe("The columns to group by. All columns in the group by must be in the aggregations as well without a function.").optional(),limit:n.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:ym,filtersOperator:wm,orderBy:n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to order by"),direction:n.z.nativeEnum(Po).optional().default(Po.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 Qu=cp`
1883
+ `,Wu=new Set([gn.Case,gn.Between,gn.Left,gn.Raw,gn.None,gn.CountKeys]),Yu=Object.values(gn).filter((e=>!Wu.has(e))),Qu=new Set([gn.Left,gn.Trim,gn.Upper,gn.Lower,gn.DateTruncDay,gn.DateTruncWeek,gn.DateTruncMonth,gn.DateTruncQuarter,gn.DateTruncYear,gn.Color,gn.Label,gn.EndDate,gn.StartDate,gn.Hour,gn.PhoneCountryShortName,gn.Person,gn.Upper,gn.Lower,gn.Order,gn.Length,gn.Flatten,gn.IsDone]);function Ku(e){return{column_id:e}}new Set([gn.Count,gn.CountDistinct,gn.CountSubitems,gn.CountItems,gn.First,gn.Sum,gn.Average,gn.Median,gn.Min,gn.Max,gn.MinMax]);const Ju={boardId:n.z.number().describe("The id of the board to get insights for"),aggregations:n.z.array(n.z.object({function:n.z.enum(Yu).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:n.z.string().describe("The id of the column to aggregate")})).describe('The aggregations to get. Before sending the aggregations, use get_board_info tool to check "aggregationGuidelines" key for information. Transformative functions and plain columns (no function) must be in group by.').optional(),groupBy:n.z.array(n.z.string()).describe("The columns to group by. All columns in the group by must be in the aggregations as well without a function.").optional(),limit:n.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:Im,filtersOperator:Em,orderBy:n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to order by"),direction:n.z.nativeEnum(Po).optional().default(Po.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 Xu=cp`
1855
1884
  query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1856
1885
  boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1857
1886
  id
@@ -1859,7 +1888,7 @@
1859
1888
  url
1860
1889
  }
1861
1890
  }
1862
- `,Ku=cp`
1891
+ `,Zu=cp`
1863
1892
  query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1864
1893
  docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1865
1894
  id
@@ -1867,14 +1896,14 @@
1867
1896
  url
1868
1897
  }
1869
1898
  }
1870
- `,Ju=cp`
1899
+ `,eh=cp`
1871
1900
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
1872
1901
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
1873
1902
  id
1874
1903
  name
1875
1904
  }
1876
1905
  }
1877
- `,Xu=cp`
1906
+ `,th=cp`
1878
1907
  query SearchBoardsDev($query: String!, $limit: Int, $workspaceIds: [ID!]) {
1879
1908
  search {
1880
1909
  boards(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -1889,7 +1918,7 @@
1889
1918
  }
1890
1919
  }
1891
1920
  }
1892
- `,Zu=cp`
1921
+ `,ah=cp`
1893
1922
  query SearchDocsDev($query: String!, $limit: Int, $workspaceIds: [ID!]) {
1894
1923
  search {
1895
1924
  docs(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -1903,14 +1932,14 @@
1903
1932
  }
1904
1933
  }
1905
1934
  }
1906
- `;var eh,th;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(eh||(eh={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(th||(th={}));const ah={searchTerm:n.z.string().optional().describe("The search term to use for the search."),searchType:n.z.nativeEnum(th).describe("The type of search to perform."),limit:n.z.number().max(20).optional().default(20).describe("The number of items to get. The max and default value is 20."),page:n.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:n.z.array(n.z.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const ih=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Yo).describe("The type of mention: User, Team, Board, or Project")}),nh=n.z.array(ih),oh={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project')};const rh=cp`
1935
+ `;var ih,nh;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-"}(ih||(ih={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS"}(nh||(nh={}));const oh={searchTerm:n.z.string().optional().describe("The search term to use for the search."),searchType:n.z.nativeEnum(nh).describe("The type of search to perform."),limit:n.z.number().max(20).optional().default(20).describe("The number of items to get. The max and default value is 20."),page:n.z.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:n.z.array(n.z.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const rh=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Yo).describe("The type of mention: User, Team, Board, or Project")}),dh=n.z.array(rh),ph={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project')};const sh=cp`
1907
1936
  mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
1908
1937
  update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
1909
1938
  id
1910
1939
  name
1911
1940
  }
1912
1941
  }
1913
- `,dh=n.z.object({fileType:n.z.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:n.z.string().describe("File display name"),linkToFile:n.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:n.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:n.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),ph={boardId:n.z.string().describe("The board's unique identifier"),itemId:n.z.string().describe("The item's unique identifier"),columnId:n.z.string().describe("The file or doc column's unique identifier"),files:n.z.array(dh).describe("Array of file values to set on the column")};const sh=cp`
1942
+ `,lh=n.z.object({fileType:n.z.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:n.z.string().describe("File display name"),linkToFile:n.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:n.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:n.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),mh={boardId:n.z.string().describe("The board's unique identifier"),itemId:n.z.string().describe("The item's unique identifier"),columnId:n.z.string().describe("The file or doc column's unique identifier"),files:n.z.array(lh).describe("Array of file values to set on the column")};const ch=cp`
1914
1943
  query getAssets($ids: [ID!]!) {
1915
1944
  assets(ids: $ids) {
1916
1945
  id
@@ -1928,7 +1957,7 @@
1928
1957
  }
1929
1958
  }
1930
1959
  }
1931
- `,lh={ids:n.z.array(n.z.string()).min(1).describe("Array of asset IDs to fetch")};const mh=cp`
1960
+ `,uh={ids:n.z.array(n.z.string()).min(1).describe("Array of asset IDs to fetch")};const hh=cp`
1932
1961
  query getUserContext {
1933
1962
  me {
1934
1963
  id
@@ -1965,7 +1994,7 @@
1965
1994
  }
1966
1995
  }
1967
1996
  }
1968
- `,ch=cp`
1997
+ `,fh=cp`
1969
1998
  query getFavoriteDetails(
1970
1999
  $boardIds: [ID!]
1971
2000
  $folderIds: [ID!]
@@ -1989,7 +2018,7 @@
1989
2018
  name
1990
2019
  }
1991
2020
  }
1992
- `,uh={[Ro.Board]:"boardIds",[Ro.Folder]:"folderIds",[Ro.Workspace]:"workspaceIds",[Ro.Dashboard]:"dashboardIds"},hh={[Ro.Board]:"boards",[Ro.Folder]:"folders",[Ro.Workspace]:"workspaces",[Ro.Dashboard]:"dashboards"};const fh=cp`
2021
+ `,_h={[Ro.Board]:"boardIds",[Ro.Folder]:"folderIds",[Ro.Workspace]:"workspaceIds",[Ro.Dashboard]:"dashboardIds"},vh={[Ro.Board]:"boards",[Ro.Folder]:"folders",[Ro.Workspace]:"workspaces",[Ro.Dashboard]:"dashboards"};const bh=cp`
1993
2022
  query GetNotetakerMeetings(
1994
2023
  $limit: Int
1995
2024
  $cursor: String
@@ -2042,13 +2071,13 @@
2042
2071
  }
2043
2072
  }
2044
2073
  }
2045
- `,_h={ids:n.z.array(n.z.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:n.z.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:n.z.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:n.z.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:n.z.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:n.z.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:n.z.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:n.z.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:n.z.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const vh=cp`
2074
+ `,gh={ids:n.z.array(n.z.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:n.z.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:n.z.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:n.z.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:n.z.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:n.z.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:n.z.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:n.z.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:n.z.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const yh=cp`
2046
2075
  mutation BatchUndo($boardId: ID!, $undoRecordId: ID!) {
2047
2076
  batch_undo(board_id: $boardId, undo_record_id: $undoRecordId) {
2048
2077
  success
2049
2078
  }
2050
2079
  }
2051
- `,bh={boardId:n.z.number().describe("The id of the board where the action was performed"),undoRecordId:n.z.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const gh="\n**Board-relation linking — do in order**\n\n1. **Fetch (target board, one query)**\n- **has_more: true** (and under **~500** items / **~5** pages for this pass) → your **only** next action is\n **get_board_items_page** with **cursor=nextCursor**; same **boardId** and the same **searchTerm** / **filters**\n / **itemIds** — **do not** change **filters** on a cursor call. **No** user turn until **has_more** is false\n or you stop at the cap. The first page alone is never “the whole board” while **has_more** is still true.\n- **Shrink the query first** when you can: **columnIds**;\n **filters**; **searchTerm**; or **itemIds** (max **100** per call, split big lists). Search **timeout** or\n error → **narrower** **searchTerm** or smaller **limit** / columns, then continue with **nextCursor** as\n in the first bullet.\n\n2. **Match (after the fetch for that pass is done)**\n- Apply a **clear** rule to names/values you already loaded (e.g. same name as source, or value user gave).\n- One unambiguous match → link without asking. **No** vague “best” pick without a rule.\n\n3. **If the user must be involved (only after step 1 is done for that query)**\n- If step 1 is incomplete, **no** questions (see step 1’s first bullet).\n- **True tie** (2+ items match the rule equally) → show **only those tied rows** (or a tiny shortlist),\n not the full result set and never all ~500.\n- **No way to name a target yet** (not a tie) → ask **once** for a **name** or **search phrase** to use in\n **searchTerm** / **filters**, not a menu of the board.\n\n4. **Write** — On the owning board’s board-relation column using change_item_column_values\n".trim(),yh={};const wh=cp`
2080
+ `,wh={boardId:n.z.number().describe("The id of the board where the action was performed"),undoRecordId:n.z.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const Th="\n**Board-relation linking — do in order**\n\n1. **Fetch (target board, one query)**\n- **has_more: true** (and under **~500** items / **~5** pages for this pass) → your **only** next action is\n **get_board_items_page** with **cursor=nextCursor**; same **boardId** and the same **searchTerm** / **filters**\n / **itemIds** — **do not** change **filters** on a cursor call. **No** user turn until **has_more** is false\n or you stop at the cap. The first page alone is never “the whole board” while **has_more** is still true.\n- **Shrink the query first** when you can: **columnIds**;\n **filters**; **searchTerm**; or **itemIds** (max **100** per call, split big lists). Search **timeout** or\n error → **narrower** **searchTerm** or smaller **limit** / columns, then continue with **nextCursor** as\n in the first bullet.\n\n2. **Match (after the fetch for that pass is done)**\n- Apply a **clear** rule to names/values you already loaded (e.g. same name as source, or value user gave).\n- One unambiguous match → link without asking. **No** vague “best” pick without a rule.\n\n3. **If the user must be involved (only after step 1 is done for that query)**\n- If step 1 is incomplete, **no** questions (see step 1’s first bullet).\n- **True tie** (2+ items match the rule equally) → show **only those tied rows** (or a tiny shortlist),\n not the full result set and never all ~500.\n- **No way to name a target yet** (not a tie) → ask **once** for a **name** or **search phrase** to use in\n **searchTerm** / **filters**, not a menu of the board.\n\n4. **Write** — On the owning board’s board-relation column using change_item_column_values\n".trim(),Ih={};const Eh=cp`
2052
2081
  query GetItemAssets($itemId: [ID!]!, $columnId: [String!]!) {
2053
2082
  items(ids: $itemId) {
2054
2083
  assets(column_ids: $columnId) {
@@ -2058,7 +2087,7 @@
2058
2087
  }
2059
2088
  }
2060
2089
  }
2061
- `,Th=10485760,Ih=5e4,Eh=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Nh=new Set([".pdf"]),Sh=new Set([".docx"]),Dh=new Set([".xlsx"]),Ah=new Set([".xls"]),kh=new Set([".txt",".md",".csv",".json"]),Oh={item_id:n.z.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:n.z.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:n.z.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:n.z.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function $h(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function xh(e){if(null==e)return"";if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return String(e);if(e instanceof Date)return e.toISOString();if("object"==typeof e){if("result"in e)return xh(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Ch(e,t,a){const i=function(e,t){if(t){const e=$h(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:$h(e.name)}(e,a);try{if(Eh.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(Ah.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>Th)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),n=[];let o=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(o+=t.byteLength,o>Th)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");n.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(n)}(e.public_url);let n,o;Nh.has(i)?(n=await async function(e){const t=await c.getDocumentProxy(new Uint8Array(e)),{text:a}=await c.extractText(t,{mergePages:!0});return a}(a),o="pdf"):Sh.has(i)?(n=await async function(e){return(await k.default.extractRawText({buffer:e})).value}(a),o="word"):Dh.has(i)?(n=await async function(e){const t=new O.default.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(xh).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):kh.has(i)?(n=a.toString("utf-8"),o="text"):(n=a.toString("utf-8"),o="unknown");const r=n.slice(t,t+Ih),d=n.length>t+Ih;return{file_name:e.name,file_extension:i,content_type:o,text:r,total_length:n.length,...Nh.has(i)&&{public_url:e.public_url},...d&&{has_more:!0,next_offset:t+Ih}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}const Rh=cp`
2090
+ `,Nh=10485760,Sh=5e4,Dh=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Ah=new Set([".pdf"]),kh=new Set([".docx"]),Oh=new Set([".xlsx"]),$h=new Set([".xls"]),xh=new Set([".txt",".md",".csv",".json"]),Ch={item_id:n.z.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:n.z.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:n.z.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:n.z.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function Rh(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function Lh(e){if(null==e)return"";if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return String(e);if(e instanceof Date)return e.toISOString();if("object"==typeof e){if("result"in e)return Lh(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Vh(e,t,a){const i=function(e,t){if(t){const e=Rh(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Rh(e.name)}(e,a);try{if(Dh.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if($h.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>Nh)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),n=[];let o=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(o+=t.byteLength,o>Nh)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");n.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(n)}(e.public_url);let n,o;Ah.has(i)?(n=await async function(e){const t=await c.getDocumentProxy(new Uint8Array(e)),{text:a}=await c.extractText(t,{mergePages:!0});return a}(a),o="pdf"):kh.has(i)?(n=await async function(e){return(await k.default.extractRawText({buffer:e})).value}(a),o="word"):Oh.has(i)?(n=await async function(e){const t=new O.default.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(Lh).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):xh.has(i)?(n=a.toString("utf-8"),o="text"):(n=a.toString("utf-8"),o="unknown");const r=n.slice(t,t+Sh),d=n.length>t+Sh;return{file_name:e.name,file_extension:i,content_type:o,text:r,total_length:n.length,...Ah.has(i)&&{public_url:e.public_url},...d&&{has_more:!0,next_offset:t+Sh}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}const Fh=cp`
2062
2091
  fragment AgentFields on Agent {
2063
2092
  id
2064
2093
  kind
@@ -2077,47 +2106,47 @@
2077
2106
  created_at
2078
2107
  updated_at
2079
2108
  }
2080
- `,Lh=cp`
2081
- ${Rh}
2109
+ `,Uh=cp`
2110
+ ${Fh}
2082
2111
 
2083
2112
  query getAgent($id: ID!) {
2084
2113
  agent(id: $id) {
2085
2114
  ...AgentFields
2086
2115
  }
2087
2116
  }
2088
- `,Vh=cp`
2089
- ${Rh}
2117
+ `,Ph=cp`
2118
+ ${Fh}
2090
2119
 
2091
2120
  query listAgents {
2092
2121
  agents {
2093
2122
  ...AgentFields
2094
2123
  }
2095
2124
  }
2096
- `,Fh=cp`
2097
- ${Rh}
2125
+ `,jh=cp`
2126
+ ${Fh}
2098
2127
 
2099
2128
  mutation createAgent($input: CreateAgentInput!) {
2100
2129
  create_agent(input: $input) {
2101
2130
  ...AgentFields
2102
2131
  }
2103
2132
  }
2104
- `,Uh=cp`
2105
- ${Rh}
2133
+ `,zh=cp`
2134
+ ${Fh}
2106
2135
 
2107
2136
  mutation createBlankAgent($input: CreateBlankAgentInput) {
2108
2137
  create_blank_agent(input: $input) {
2109
2138
  ...AgentFields
2110
2139
  }
2111
2140
  }
2112
- `,Ph=cp`
2113
- ${Rh}
2141
+ `,Bh=cp`
2142
+ ${Fh}
2114
2143
 
2115
2144
  mutation deleteAgent($id: ID!) {
2116
2145
  delete_agent(id: $id) {
2117
2146
  ...AgentFields
2118
2147
  }
2119
2148
  }
2120
- `,jh={id:n.z.string().trim().min(1,"Agent id must be a non-empty string").optional().describe("Unique identifier of a monday platform agent. When provided, returns that single agent. When omitted, returns every non-deleted personal agent owned by the authenticated user.")};const zh={prompt:n.z.string().trim().min(1,"Prompt must be a non-empty string").optional().describe("Plain-language description of what the monday platform agent should do. When provided, the platform uses this prompt to generate the agent profile (name, role, avatar), goal, and execution plan via AI. Be specific about the domain and the tasks the agent should automate."),agent_model:n.z.string().optional().describe("STRONGLY DISCOURAGED — omit this field. Only set when the user explicitly names a monday-supported model. Do not invent or guess model identifiers (e.g. gpt-4o, claude-3-opus). Invalid values are rejected by the platform. When omitted the platform default is used, which is the right choice in almost every case."),name:n.z.string().trim().min(1,"Name must be a non-empty string").optional().describe("Display name of the agent."),role:n.z.string().trim().min(1,"Role must be a non-empty string").optional().describe("Role of the agent."),role_description:n.z.string().trim().min(1,"Role description must be a non-empty string").optional().describe("Description of the role."),avatar_url:n.z.string().trim().min(1,"Avatar URL must be a non-empty string").optional().describe("HTTPS URL of the avatar image. Prefer dapulse-res.cloudinary.com or cdn.monday.com for full renderer compatibility."),gender:n.z.enum(["male","female"]).optional().describe("Hint for generated avatar/name when profile fields are omitted."),background_color:n.z.string().trim().min(1,"Background color must be a non-empty string").optional().describe('Background color string, usually lowercase hex like "#9450fd".'),user_prompt:n.z.string().trim().min(1,"User prompt must be a non-empty string").optional().describe("Stored as metadata only. Not used for AI generation.")};const Bh={id:n.z.string().trim().min(1,"Agent id must be a non-empty string").describe("Unique identifier of the monday platform agent to delete.")};n.z.enum(["enable","disable","status","list","detailed","reset"]).describe('Action to perform: "list" or "detailed" to discover available tools, "status" to check current states, "enable" to activate needed tools, "disable" to deactivate tools, "reset" to restore defaults'),n.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const Mh=cp`
2149
+ `,Mh={id:n.z.string().trim().min(1,"Agent id must be a non-empty string").optional().describe("Unique identifier of a monday platform agent. When provided, returns that single agent. When omitted, returns every non-deleted personal agent owned by the authenticated user.")};const qh={prompt:n.z.string().trim().min(1,"Prompt must be a non-empty string").optional().describe("Plain-language description of what the monday platform agent should do. When provided, the platform uses this prompt to generate the agent profile (name, role, avatar), goal, and execution plan via AI. Be specific about the domain and the tasks the agent should automate."),agent_model:n.z.string().optional().describe("STRONGLY DISCOURAGED — omit this field. Only set when the user explicitly names a monday-supported model. Do not invent or guess model identifiers (e.g. gpt-4o, claude-3-opus). Invalid values are rejected by the platform. When omitted the platform default is used, which is the right choice in almost every case."),name:n.z.string().trim().min(1,"Name must be a non-empty string").optional().describe("Display name of the agent."),role:n.z.string().trim().min(1,"Role must be a non-empty string").optional().describe("Role of the agent."),role_description:n.z.string().trim().min(1,"Role description must be a non-empty string").optional().describe("Description of the role."),avatar_url:n.z.string().trim().min(1,"Avatar URL must be a non-empty string").optional().describe("HTTPS URL of the avatar image. Prefer dapulse-res.cloudinary.com or cdn.monday.com for full renderer compatibility."),gender:n.z.enum(["male","female"]).optional().describe("Hint for generated avatar/name when profile fields are omitted."),background_color:n.z.string().trim().min(1,"Background color must be a non-empty string").optional().describe('Background color string, usually lowercase hex like "#9450fd".'),user_prompt:n.z.string().trim().min(1,"User prompt must be a non-empty string").optional().describe("Stored as metadata only. Not used for AI generation.")};const Hh={id:n.z.string().trim().min(1,"Agent id must be a non-empty string").describe("Unique identifier of the monday platform agent to delete.")};n.z.enum(["enable","disable","status","list","detailed","reset"]).describe('Action to perform: "list" or "detailed" to discover available tools, "status" to check current states, "enable" to activate needed tools, "disable" to deactivate tools, "reset" to restore defaults'),n.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const Gh=cp`
2121
2150
  query getSprintsByIds($ids: [ID!]) {
2122
2151
  items(ids: $ids) {
2123
2152
  id
@@ -2152,7 +2181,7 @@
2152
2181
  }
2153
2182
  }
2154
2183
  }
2155
- `,qh={SPRINT_TASKS:"sprint_tasks",SPRINT_TIMELINE:"sprint_timeline",SPRINT_COMPLETION:"sprint_completion",SPRINT_START_DATE:"sprint_start_date",SPRINT_END_DATE:"sprint_end_date",SPRINT_ACTIVATION:"sprint_activation"},Hh={...qh,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},Gh="BOARD_NOT_FOUND:",Wh="SPRINT_NOT_FOUND:",Yh="DOCUMENT_NOT_FOUND:",Qh="DOCUMENT_INVALID:",Kh="DOCUMENT_EMPTY:",Jh="EXPORT_FAILED:",Xh="INTERNAL_ERROR:",Zh="VALIDATION_ERROR:",ef="task_sprint",tf={[Hh.SPRINT_TASKS]:"Sprint Tasks",[Hh.SPRINT_TIMELINE]:"Sprint Timeline",[Hh.SPRINT_COMPLETION]:"Sprint Completion",[Hh.SPRINT_START_DATE]:"Sprint Start Date",[Hh.SPRINT_END_DATE]:"Sprint End Date",[Hh.SPRINT_ACTIVATION]:"Sprint Activation",[Hh.SPRINT_SUMMARY]:"Sprint Summary",[Hh.SPRINT_CAPACITY]:"Sprint Capacity"},af=fr,nf={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},of=(e,t)=>e.column_values?.find((e=>e.id===t)),rf=(e,t)=>{const a=of(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},df=(e,t)=>{const a=of(e,t);return"DateValue"===a?.__typename?a.date??null:null},pf=(e,t)=>{const a=of(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},sf=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},lf=(e,t)=>{if(!e.columns)return!1;const a=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return t.every((e=>a.has(e)))},mf=e=>lf(e,Object.values(qh)),cf=e=>lf(e,Object.values(nf)),uf=e=>{if(!e?.settings)return null;const t=e.settings;return t.boardIds&&Array.isArray(t.boardIds)&&t.boardIds[0]?.toString()||t.boardId?.toString()||null},hf=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Hl.BoardRelation))||null,ff={sprintId:n.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const _f=cp`
2184
+ `,Wh={SPRINT_TASKS:"sprint_tasks",SPRINT_TIMELINE:"sprint_timeline",SPRINT_COMPLETION:"sprint_completion",SPRINT_START_DATE:"sprint_start_date",SPRINT_END_DATE:"sprint_end_date",SPRINT_ACTIVATION:"sprint_activation"},Yh={...Wh,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},Qh="BOARD_NOT_FOUND:",Kh="SPRINT_NOT_FOUND:",Jh="DOCUMENT_NOT_FOUND:",Xh="DOCUMENT_INVALID:",Zh="DOCUMENT_EMPTY:",ef="EXPORT_FAILED:",tf="INTERNAL_ERROR:",af="VALIDATION_ERROR:",nf="task_sprint",of={[Yh.SPRINT_TASKS]:"Sprint Tasks",[Yh.SPRINT_TIMELINE]:"Sprint Timeline",[Yh.SPRINT_COMPLETION]:"Sprint Completion",[Yh.SPRINT_START_DATE]:"Sprint Start Date",[Yh.SPRINT_END_DATE]:"Sprint End Date",[Yh.SPRINT_ACTIVATION]:"Sprint Activation",[Yh.SPRINT_SUMMARY]:"Sprint Summary",[Yh.SPRINT_CAPACITY]:"Sprint Capacity"},rf=fr,df={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},pf=(e,t)=>e.column_values?.find((e=>e.id===t)),sf=(e,t)=>{const a=pf(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},lf=(e,t)=>{const a=pf(e,t);return"DateValue"===a?.__typename?a.date??null:null},mf=(e,t)=>{const a=pf(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},cf=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},uf=(e,t)=>{if(!e.columns)return!1;const a=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return t.every((e=>a.has(e)))},hf=e=>uf(e,Object.values(Wh)),ff=e=>uf(e,Object.values(df)),_f=e=>{if(!e?.settings)return null;const t=e.settings;return t.boardIds&&Array.isArray(t.boardIds)&&t.boardIds[0]?.toString()||t.boardId?.toString()||null},vf=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Gl.BoardRelation))||null,bf={sprintId:n.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const gf=cp`
2156
2185
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
2157
2186
  boards(ids: [$boardId]) {
2158
2187
  items_page(limit: $limit) {
@@ -2188,7 +2217,7 @@
2188
2217
  }
2189
2218
  }
2190
2219
  }
2191
- `,vf={sprintsBoardId:n.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const bf=cp`
2220
+ `,yf={sprintsBoardId:n.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const wf=cp`
2192
2221
  query GetRecentBoards($limit: Int) {
2193
2222
  boards(limit: $limit, order_by: used_at, state: active) {
2194
2223
  id
@@ -2204,7 +2233,7 @@
2204
2233
  }
2205
2234
  }
2206
2235
  }
2207
- `,gf={};const yf=[class extends ce{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=exports.ToolType.READ,this.annotations=me({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return gf}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(bf,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${Gh} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);return 0===a.length?{content:{message:"No monday-dev sprints board pairs found. ### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`;",boards_checked:t.length,pairs:[]}}:{content:{message:`Found ${a.length} matched pair(s)`,...a.length>1?{warning:"Multiple board pairs detected. Confirm with user which pair and workspace to use before any operation."}:{},pairs:a.map((e=>({sprints_board:{id:e.sprintsBoard.id,name:e.sprintsBoard.name,workspace_id:e.sprintsBoard.workspaceId,workspace_name:e.sprintsBoard.workspaceName},tasks_board:{id:e.tasksBoard.id,name:e.tasksBoard.name,workspace_id:e.tasksBoard.workspaceId,workspace_name:e.tasksBoard.workspaceName}}))),technical_reference:"Sprint Operations (all require correct board pair): Add to Sprint: Update `task_sprint` column with sprint item ID. Remove from Sprint: Clear `task_sprint` column (set to null). Search in Sprint: Filter where `task_sprint` equals sprint item ID. Move Between Sprints: Update `task_sprint` with new sprint item ID. Backlog Tasks: `task_sprint` is empty/null. Critical: `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}}}catch(e){return{content:`${Xh} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=hf(e,qh.SPRINT_TASKS);if(!i)return;const n=uf(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=hf(e,ef);if(!i)return;const n=uf(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(mf(i)&&this.processSprintsBoard(i,a,t),cf(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends ce{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=exports.ToolType.READ,this.annotations=me({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return vf}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(_f,a),n=i.boards?.[0],o=n?.items_page?.items||[],r=this.buildSprintsMetadata(o);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:o.length,data:r}}}catch(e){return{content:`${Xh} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(gp,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${Gh} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${Zh} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${Xh} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(qh),i=sf(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>tf[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=rf(e,Hh.SPRINT_ACTIVATION),a=rf(e,Hh.SPRINT_COMPLETION),i=df(e,Hh.SPRINT_START_DATE),n=df(e,Hh.SPRINT_END_DATE),o=((e,t)=>{const a=of(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,Hh.SPRINT_TIMELINE),r=pf(e,Hh.SPRINT_SUMMARY);let d=af.Planned;return a?d=af.Completed:(t||i)&&(d=af.Active),{id:e.id,name:e.name||"Unknown",status:d,timeline:o?{from:o.from,to:o.to}:null,start_date:i||null,end_date:n||null,is_completed:a,document_object_id:r||null}}))}},class extends ce{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=exports.ToolType.READ,this.annotations=me({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return ff}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${Xh} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:{message:"Sprint summary retrieved",sprint_id:e.sprintId,sprint_name:t.sprintName,markdown:a.content}}:{content:a.error||`${Xh} Unknown error occurred while reading document content`}}catch(e){return{content:`${Xh} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(Mh,t)).items||[];if(0===a.length)return{success:!1,error:`${Wh} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${Wh} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(qh),...t];return sf(a,i)})(i,[Hh.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${Zh} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=pf(i,Hh.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${Yh} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${Xh} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(up,t)).docs||[];if(0===a.length)return{success:!1,error:`${Yh} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${Qh} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(Op,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${Jh} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${Kh} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${Xh} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],wf=[class extends ce{constructor(){super(...arguments),this.name="delete_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return _m}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(vp,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_items_page",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the nextCursor parameter from the response to get the next page of results when has_more is true. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board 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. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return Lm}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){Ll(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(Cm,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:zo.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case Hl.BoardRelation:return e.linked_items;case Hl.Formula:return e.display_value;case Hl.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(Rm,t,{versionOverride:"dev",timeout:Cl})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const n=new Set(i);return a.filter((e=>n.has(e)))}},class extends ce{constructor(){super(...arguments),this.name="create_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?am:im}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(em,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new Vp(this.mondayApi,{boardId:t});return await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){Rl(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(tm,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){Rl(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(bp,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){Rl(e,"create item")}}},class extends ce{constructor(){super(...arguments),this.name="create_update",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return pm}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=dm.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(om,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){Rl(e,"create update")}}},class extends ce{constructor(){super(...arguments),this.name="get_updates",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. For Board queries, you can filter by date range using fromDate and toDate (both required together, ISO8601 format). By default, Board queries return only board discussion. Set includeItemUpdates to true to also include updates on individual items. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return cm}async executeInternal(e){try{const t=void 0!==e.fromDate,a=void 0!==e.toDate;if(t!==a)throw new Error("Both fromDate and toDate must be provided together for date range filtering");if((t||a)&&e.objectType===mm.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let n;n=e.objectType===mm.Item?await this.mondayApi.request(sm,{...i,itemId:e.objectId}):await this.mondayApi.request(lm,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:um(e.fromDate),toDate:um(e.toDate)}:{}});const o=e.objectType===mm.Item?n.items?.[0]?.updates:n.boards?.[0]?.updates;if(!o||0===o.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const r=o.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),d=e.objectType===mm.Item?n.items?.[0]?.url:n.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:d,updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}}}}catch(e){Rl(e,"get updates")}}},class extends ce{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return oh}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=nh.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(om,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received."}}}catch(e){Rl(e,"create update")}}},class extends ce{constructor(){super(...arguments),this.name="get_board_schema",this.type=exports.ToolType.READ,this.annotations=me({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 Vm}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(gp,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_activity",this.type=exports.ToolType.READ,this.annotations=me({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 Em}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-xl.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(Im,o),d=r.boards?.[0]?.activity_logs;if(!d||0===d.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=r.boards?.[0],s=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:p?.name,board_url:p?.url,data:d.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...s&&e.data?{data:e.data}:{}})))}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_info",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return xm}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(Nm,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:Dm(i,n)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Hl.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(Sm,{boardId:a});return i.boards?.[0]??null}},class extends ce{constructor(){super(...arguments),this.name="get_full_board_data",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return Tm}async executeInternal(e){try{const t={boardId:e.boardId,itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(bm,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(gm,e);r=t.users?.filter((e=>null!==e))||[]}const d=new Map(r.map((e=>[e.id,e])));return{content:{board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){Rl(e,"get full board data")}}},class extends ce{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=exports.ToolType.READ,this.annotations=me({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return cc}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(ac);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const d={users:[e.me]},p=oc(d),s=await lc(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:s?`https://${s}.monday.com/teams/all`:void 0}}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},d=await this.mondayApi.request(tc,r);if(!d.users||0===d.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=d.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),s=`Found ${d.users.length} user(s) matching "${e.name}":\n\n${p}`,l=await lc(this.mondayApi);return{content:{data:s,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>rc)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>dc)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let d;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};d=await this.mondayApi.request(ec,t)}else{const t={teamIds:e.teamIds};d=await this.mondayApi.request(Zm,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:pc};d=await this.mondayApi.request(Xm,t)}else if(t){const t={userIds:e.userIds,limit:pc};d=await this.mondayApi.request(Km,t)}else{const e={userIds:void 0,limit:pc};d=await this.mondayApi.request(Jm,e)}const p=oc(d),s=await lc(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:s?`https://${s}.monday.com/teams/all`:void 0}}}},Vp,class extends ce{constructor(){super(...arguments),this.name="move_item_to_group",this.type=exports.ToolType.WRITE,this.annotations=me({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 uc}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(wp,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends ce{constructor(){super(...arguments),this.name="create_board",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return ns}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(Tp,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends ce{constructor(){super(...arguments),this.name="create_form",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. Also creates a backing board to store responses. Returns the formToken for future mutations."}getInputSchema(){return Fs}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(fs,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends ce{constructor(){super(...arguments),this.name="update_form",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Dl(this.mondayApi),this.actionHandlers=new Map([[il.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[il.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[il.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[il.activate,this.helpers.activateForm.bind(this.helpers)],[il.createTag,this.helpers.createTag.bind(this.helpers)],[il.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[il.updateTag,this.helpers.updateTag.bind(this.helpers)],[il.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[il.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[il.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[il.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[il.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Sl}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends ce{constructor(){super(...arguments),this.name="get_form",this.type=exports.ToolType.READ,this.annotations=me({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 formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return Al}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(_s,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends ce{constructor(){super(...arguments),this.name="form_questions_editor",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new al(this.mondayApi),this.actionHandlers=new Map([[Zs.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Zs.Update,this.helpers.updateQuestion.bind(this.helpers)],[Zs.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return tl}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends ce{constructor(){super(...arguments),this.name="create_form_submission",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create WorkForm Submission",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Submit a response to a monday.com WorkForm. Use get_form first to retrieve the WorkForm, then:\n- Inspect each question's showIfRules to determine which questions are conditionally shown based on previous answers.\n- Inspect each question's settings for any answer constraints (e.g. rating limits, select options, label limits).\n- Take note of any titles, descriptions, and content blocks to present the form naturally as you walk the user through it.\n- Take note of pages and question order to present questions in the correct sequence.\nGather all answers upfront before calling this tool — do not submit one question at a time. Accepts a bare form token, a full WorkForm URL (e.g. https://forms.monday.com/forms/{form_token}?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t) — shortened URLs are automatically resolved by following the redirect. Returns the submission ID."}getInputSchema(){return ql}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await g.default.head(e,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return t?this.extractTokenFromUrl(t):null}return e.startsWith("http://")||e.startsWith("https://")?this.extractTokenFromUrl(e):e}async executeInternal(e){const t=await this.resolveFormToken(e.form_token);if(!t)return{content:`Could not resolve a WorkForm token from "${e.form_token}". Please provide a valid WorkForm token or full WorkForm URL (e.g. https://forms.monday.com/forms/abc123).`};const a={form_token:t,answers:e.answers,form_timezone_offset:e.form_timezone_offset,password:e.password,tags:e.tags};try{const e=await this.mondayApi.request(Vl,a,{versionOverride:"dev"});return e.create_form_submission?{content:{message:"WorkForm submitted successfully",submission_id:e.create_form_submission.id}}:{content:`WorkForm with token ${t} was not found or is not accepting submissions. Verify the WorkForm token is correct, the WorkForm is active, and any required password was provided.`}}catch(e){Rl(e,"submit form")}}},class extends ce{constructor(){super(...arguments),this.name="create_column",this.type=exports.ToolType.WRITE,this.annotations=me({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?Gl:Wl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Ip,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends ce{constructor(){super(...arguments),this.name="create_group",this.type=exports.ToolType.WRITE,this.annotations=me({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 Zl}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(Jl,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends ce{constructor(){super(...arguments),this.name="delete_column",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?hm:fm}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(Ep,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},Cp,class extends ce{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=exports.ToolType.ALL_API,this.annotations=me({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 jm}async executeInternal(e){try{const t=await this.mondayApi.request(Np),a=e?.operationType,i=t.__schema,n="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,r=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==n&&{query_fields:n},...void 0!==o&&{mutation_fields:o},types:r}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="get_column_type_info",this.type=exports.ToolType.READ,this.annotations=me({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 Pm}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(Fm,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:{message:`Column type info for ${e.columnType}`,data:i,url:Um}}}},class extends ce{constructor(){super(...arguments),this.name="get_type_details",this.type=exports.ToolType.ALL_API,this.annotations=me({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 zm}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,cp`
2236
+ `,Tf={};const If=[class extends ce{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=exports.ToolType.READ,this.annotations=me({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return Tf}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(wf,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${Qh} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);return 0===a.length?{content:{message:"No monday-dev sprints board pairs found. ### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`;",boards_checked:t.length,pairs:[]}}:{content:{message:`Found ${a.length} matched pair(s)`,...a.length>1?{warning:"Multiple board pairs detected. Confirm with user which pair and workspace to use before any operation."}:{},pairs:a.map((e=>({sprints_board:{id:e.sprintsBoard.id,name:e.sprintsBoard.name,workspace_id:e.sprintsBoard.workspaceId,workspace_name:e.sprintsBoard.workspaceName},tasks_board:{id:e.tasksBoard.id,name:e.tasksBoard.name,workspace_id:e.tasksBoard.workspaceId,workspace_name:e.tasksBoard.workspaceName}}))),technical_reference:"Sprint Operations (all require correct board pair): Add to Sprint: Update `task_sprint` column with sprint item ID. Remove from Sprint: Clear `task_sprint` column (set to null). Search in Sprint: Filter where `task_sprint` equals sprint item ID. Move Between Sprints: Update `task_sprint` with new sprint item ID. Backlog Tasks: `task_sprint` is empty/null. Critical: `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}}}catch(e){return{content:`${tf} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=vf(e,Wh.SPRINT_TASKS);if(!i)return;const n=_f(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=vf(e,nf);if(!i)return;const n=_f(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(hf(i)&&this.processSprintsBoard(i,a,t),ff(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends ce{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=exports.ToolType.READ,this.annotations=me({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return yf}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(gf,a),n=i.boards?.[0],o=n?.items_page?.items||[],r=this.buildSprintsMetadata(o);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:o.length,data:r}}}catch(e){return{content:`${tf} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(gp,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${Qh} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${af} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${tf} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(Wh),i=cf(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>of[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=sf(e,Yh.SPRINT_ACTIVATION),a=sf(e,Yh.SPRINT_COMPLETION),i=lf(e,Yh.SPRINT_START_DATE),n=lf(e,Yh.SPRINT_END_DATE),o=((e,t)=>{const a=pf(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,Yh.SPRINT_TIMELINE),r=mf(e,Yh.SPRINT_SUMMARY);let d=rf.Planned;return a?d=rf.Completed:(t||i)&&(d=rf.Active),{id:e.id,name:e.name||"Unknown",status:d,timeline:o?{from:o.from,to:o.to}:null,start_date:i||null,end_date:n||null,is_completed:a,document_object_id:r||null}}))}},class extends ce{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=exports.ToolType.READ,this.annotations=me({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return bf}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${tf} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:{message:"Sprint summary retrieved",sprint_id:e.sprintId,sprint_name:t.sprintName,markdown:a.content}}:{content:a.error||`${tf} Unknown error occurred while reading document content`}}catch(e){return{content:`${tf} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(Gh,t)).items||[];if(0===a.length)return{success:!1,error:`${Kh} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${Kh} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(Wh),...t];return cf(a,i)})(i,[Yh.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${af} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=mf(i,Yh.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${Jh} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${tf} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(up,t)).docs||[];if(0===a.length)return{success:!1,error:`${Jh} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${Xh} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request($p,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${ef} Failed to export markdown from document: ${o.export_markdown_from_doc?.error||"Unknown error"}`};const r=o.export_markdown_from_doc.markdown;return r?{success:!0,content:r}:{success:!1,error:`${Zh} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${tf} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],Ef=[class extends ce{constructor(){super(...arguments),this.name="delete_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return gm}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(vp,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_items_page",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the nextCursor parameter from the response to get the next page of results when has_more is true. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board 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. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return Um}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){Vl(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(Vm,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:zo.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case Gl.BoardRelation:return e.linked_items;case Gl.Formula:return e.display_value;case Gl.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(Fm,t,{versionOverride:"dev",timeout:Rl})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const n=new Set(i);return a.filter((e=>n.has(e)))}},class extends ce{constructor(){super(...arguments),this.name="create_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?om:rm}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(im,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new Fp(this.mondayApi,{boardId:t});return await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){Ll(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(nm,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){Ll(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(bp,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){Ll(e,"create item")}}},class extends ce{constructor(){super(...arguments),this.name="create_update",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return mm}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=lm.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(pm,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){Ll(e,"create update")}}},class extends ce{constructor(){super(...arguments),this.name="get_updates",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. For Board queries, you can filter by date range using fromDate and toDate (both required together, ISO8601 format). By default, Board queries return only board discussion. Set includeItemUpdates to true to also include updates on individual items. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return fm}async executeInternal(e){try{const t=void 0!==e.fromDate,a=void 0!==e.toDate;if(t!==a)throw new Error("Both fromDate and toDate must be provided together for date range filtering");if((t||a)&&e.objectType===hm.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let n;n=e.objectType===hm.Item?await this.mondayApi.request(cm,{...i,itemId:e.objectId}):await this.mondayApi.request(um,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:_m(e.fromDate),toDate:_m(e.toDate)}:{}});const o=e.objectType===hm.Item?n.items?.[0]?.updates:n.boards?.[0]?.updates;if(!o||0===o.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const r=o.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),d=e.objectType===hm.Item?n.items?.[0]?.url:n.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:d,updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}}}}catch(e){Ll(e,"get updates")}}},class extends ce{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return ph}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=dh.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(pm,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received."}}}catch(e){Ll(e,"create update")}}},class extends ce{constructor(){super(...arguments),this.name="get_board_schema",this.type=exports.ToolType.READ,this.annotations=me({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 Pm}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(gp,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_activity",this.type=exports.ToolType.READ,this.annotations=me({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 Dm}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-Cl.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(Sm,o),d=r.boards?.[0]?.activity_logs;if(!d||0===d.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=r.boards?.[0],s=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:p?.name,board_url:p?.url,data:d.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...s&&e.data?{data:e.data}:{}})))}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_info",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return Lm}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(Am,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:Om(i,n)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Gl.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(km,{boardId:a});return i.boards?.[0]??null}},class extends ce{constructor(){super(...arguments),this.name="get_full_board_data",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return Nm}async executeInternal(e){try{const t={boardId:e.boardId,itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(wm,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(Tm,e);r=t.users?.filter((e=>null!==e))||[]}const d=new Map(r.map((e=>[e.id,e])));return{content:{board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){Ll(e,"get full board data")}}},class extends ce{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=exports.ToolType.READ,this.annotations=me({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return fc}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(oc);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const d={users:[e.me]},p=pc(d),s=await uc(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:s?`https://${s}.monday.com/teams/all`:void 0}}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},d=await this.mondayApi.request(nc,r);if(!d.users||0===d.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=d.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),s=`Found ${d.users.length} user(s) matching "${e.name}":\n\n${p}`,l=await uc(this.mondayApi);return{content:{data:s,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>sc)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>lc)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let d;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};d=await this.mondayApi.request(ic,t)}else{const t={teamIds:e.teamIds};d=await this.mondayApi.request(ac,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:mc};d=await this.mondayApi.request(tc,t)}else if(t){const t={userIds:e.userIds,limit:mc};d=await this.mondayApi.request(Zm,t)}else{const e={userIds:void 0,limit:mc};d=await this.mondayApi.request(ec,e)}const p=pc(d),s=await uc(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:s?`https://${s}.monday.com/teams/all`:void 0}}}},Fp,class extends ce{constructor(){super(...arguments),this.name="move_item_to_group",this.type=exports.ToolType.WRITE,this.annotations=me({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 _c}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(wp,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends ce{constructor(){super(...arguments),this.name="create_board",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return os}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},a=await this.mondayApi.request(Tp,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends ce{constructor(){super(...arguments),this.name="create_form",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. Also creates a backing board to store responses. Returns the formToken for future mutations."}getInputSchema(){return Us}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(_s,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends ce{constructor(){super(...arguments),this.name="update_form",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Al(this.mondayApi),this.actionHandlers=new Map([[nl.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[nl.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[nl.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[nl.activate,this.helpers.activateForm.bind(this.helpers)],[nl.createTag,this.helpers.createTag.bind(this.helpers)],[nl.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[nl.updateTag,this.helpers.updateTag.bind(this.helpers)],[nl.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[nl.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[nl.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[nl.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[nl.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Dl}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends ce{constructor(){super(...arguments),this.name="get_form",this.type=exports.ToolType.READ,this.annotations=me({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 formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return kl}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(vs,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends ce{constructor(){super(...arguments),this.name="form_questions_editor",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new il(this.mondayApi),this.actionHandlers=new Map([[el.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[el.Update,this.helpers.updateQuestion.bind(this.helpers)],[el.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return al}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends ce{constructor(){super(...arguments),this.name="create_form_submission",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create WorkForm Submission",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Submit a response to a monday.com WorkForm. Use get_form first to retrieve the WorkForm, then:\n- Inspect each question's showIfRules to determine which questions are conditionally shown based on previous answers.\n- Inspect each question's settings for any answer constraints (e.g. rating limits, select options, label limits).\n- Take note of any titles, descriptions, and content blocks to present the form naturally as you walk the user through it.\n- Take note of pages and question order to present questions in the correct sequence.\nGather all answers upfront before calling this tool — do not submit one question at a time. Accepts a bare form token, a full WorkForm URL (e.g. https://forms.monday.com/forms/{form_token}?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t) — shortened URLs are automatically resolved by following the redirect. Returns the submission ID."}getInputSchema(){return Hl}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await g.default.head(e,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return t?this.extractTokenFromUrl(t):null}return e.startsWith("http://")||e.startsWith("https://")?this.extractTokenFromUrl(e):e}async executeInternal(e){const t=await this.resolveFormToken(e.form_token);if(!t)return{content:`Could not resolve a WorkForm token from "${e.form_token}". Please provide a valid WorkForm token or full WorkForm URL (e.g. https://forms.monday.com/forms/abc123).`};const a={form_token:t,answers:e.answers,form_timezone_offset:e.form_timezone_offset,password:e.password,tags:e.tags};try{const e=await this.mondayApi.request(Fl,a,{versionOverride:"dev"});return e.create_form_submission?{content:{message:"WorkForm submitted successfully",submission_id:e.create_form_submission.id}}:{content:`WorkForm with token ${t} was not found or is not accepting submissions. Verify the WorkForm token is correct, the WorkForm is active, and any required password was provided.`}}catch(e){Ll(e,"submit form")}}},class extends ce{constructor(){super(...arguments),this.name="create_column",this.type=exports.ToolType.WRITE,this.annotations=me({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?Wl:Yl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Ip,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends ce{constructor(){super(...arguments),this.name="update_column",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?Ql:Kl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Np,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="create_group",this.type=exports.ToolType.WRITE,this.annotations=me({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 am}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(em,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends ce{constructor(){super(...arguments),this.name="delete_column",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?vm:bm}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(Ep,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},Rp,class extends ce{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=exports.ToolType.ALL_API,this.annotations=me({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 Mm}async executeInternal(e){try{const t=await this.mondayApi.request(Sp),a=e?.operationType,i=t.__schema,n="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,r=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==n&&{query_fields:n},...void 0!==o&&{mutation_fields:o},types:r}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="get_column_type_info",this.type=exports.ToolType.READ,this.annotations=me({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 Bm}async executeInternal(e){const t={type:e.columnType},a=await this.mondayApi.request(jm,t);if(!a?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:a.get_column_type_schema};return{content:{message:`Column type info for ${e.columnType}`,data:i,url:zm}}}},class extends ce{constructor(){super(...arguments),this.name="get_type_details",this.type=exports.ToolType.ALL_API,this.annotations=me({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 qm}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,cp`
2208
2237
  query getTypeDetails {
2209
2238
  __type(name: "${t}") {
2210
2239
  name
@@ -2292,5 +2321,5 @@
2292
2321
  }
2293
2322
  }
2294
2323
  }
2295
- `),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends ce{constructor(){super(...arguments),this.name="create_custom_activity",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return Yl}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Dp,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends ce{constructor(){super(...arguments),this.name="create_notification",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Kl}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Ql,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends ce{constructor(){super(...arguments),this.name="create_timeline_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return nm}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(Ap,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends ce{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=exports.ToolType.READ,this.annotations=me({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return vm}async executeInternal(e){const t=await this.mondayApi.request(kp);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:{message:`Found ${a.length} custom activities`,data:a}}}},class extends ce{constructor(){super(...arguments),this.name="read_docs",this.type=exports.ToolType.READ,this.annotations=me({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get information about monday.com documents. Supports two modes:\n\nMODE: "content" (default) — Fetch documents with their full markdown content.\n- Requires: type ("ids" | "object_ids" | "workspace_ids") and ids array\n- Supports pagination via page/limit. Check has_more_pages in response.\n- If type "ids" returns no results, automatically retries with object_ids.\n- Set include_blocks: true to include block IDs, types, and positions in the response — required before calling update_doc.\n- Set include_comments: true to fetch all comments and replies on the document. Use comments_limit to control how many comments per item (default 50).\n\nMODE: "version_history" — Fetch the edit history of a single document.\n- Requires: ids with the document\'s object_id (use the object_id field from content mode results, NOT the id field).\n- The object_id is the numeric ID visible in the document URL.\n- Returns restoring points sorted newest-first. Use version_history_limit to cap results (e.g., "last 3 changes" → version_history_limit: 3).\n- Use since/until to filter by time range. If omitted, returns full history.\n- Set include_diff: true to see what content changed between versions (fetches up to 10 diffs, may be slower).\n- Examples:\n - { mode: "version_history", ids: ["5001466606"], version_history_limit: 3 }\n - { mode: "version_history", ids: ["5001466606"], since: "2026-03-11T00:00:00Z", include_diff: true }'}getInputSchema(){return vc}async executeInternal(e){return e.mode===fc?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??hc,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n=e.include_blocks??!1,o={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n};let r=await this.mondayApi.request(up,o);if((!r.docs||0===r.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n};r=await this.mondayApi.request(up,a)}if(!r.docs||0===r.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const d=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:r.docs.flatMap((e=>e?[e.id]:[])),object_ids:r.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(r.docs,o,n,d,p)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:n}=e,o=e.ids?.[0];if(!o)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:fc,object_ids:[o]};try{const e={docId:o,since:a,until:i},r=await this.mondayApi.request(hp,e);let d=r?.doc_version_history?.restoring_points;if(!d||0===d.length)return{content:`No version history found for document ${o}${a?` from ${a}`:""}.`};if(!t)return n&&(d=d.slice(0,n)),{content:{doc_id:o,since:a,until:i,restoring_points:d}};const p=Math.min(n??10,10),s=d.slice(0,p+1),l=d.length>p,m=(await Promise.allSettled(s.map((async(e,t)=>{if(t===s.length-1||!e.date)return e;const a=s[t+1];if(!a?.date)return e;const i={docId:o,date:e.date,prevDate:a.date},n=await this.mondayApi.request(_p,i);return{...e,diff:n?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:s[t]))))).slice(0,p);return{content:{doc_id:o,since:a,until:i,restoring_points:m,...l&&{truncated:!0,total_count:d.length}}}}catch(e){return{content:`Error fetching version history for document ${o}: ${e instanceof Error?e.message:"Unknown error"}`}}}async fetchDocComments(e,t){try{const a={boardId:e,itemsLimit:100,updatesLimit:t},i=await this.mondayApi.request(fp,a),n=i.boards?.[0]?.items_page?.items;if(!n)return[];const o=[];for(const e of n)if(e.updates&&0!==e.updates.length)for(const t of e.updates)o.push({id:t.id,text_body:t.text_body,body:t.body,created_at:t.created_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:e.id,item_name:e.name,replies:(t.replies??[]).map((e=>({id:e.id,text_body:e.text_body,body:e.body,created_at:e.created_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))});return o}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,n=50){const o=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,o="";try{const t={docId:e.id},a=await this.mondayApi.request(Op,t);o=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){o=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,n)),{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,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content})))},blocks_as_markdown:o,...i&&{comments:t}}}))),r=t.page||1,d=t.limit||25,p=o.length,s=p===d;return{content:{message:`Documents retrieved (${o.length})`,pagination:{current_page:r,limit:d,count:p,has_more_pages:s},data:o}}}},class extends ce{constructor(){super(...arguments),this.name="workspace_info",this.type=exports.ToolType.READ,this.annotations=me({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 bc}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request($p,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:n,folders:o}=e,r=a?.[0];if(!r)throw new Error("No workspace found");const d=new Map((o||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),p=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&d.has(e.board_folder_id)?d.get(e.board_folder_id).boards.push(t):p.push(t)}));const s=[];return(n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&d.has(e.doc_folder_id)?d.get(e.doc_folder_id).docs.push(t):s.push(t)})),{workspace:{id:r.id,name:r.name,url:t?mc(t,r.id):void 0,description:r.description||"",kind:r.kind||"",created_at:r.created_at||"",state:r.state||"",is_default_workspace:r.is_default_workspace||!1,owners_subscribers:(r.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(d.values()),root_items:{boards:p,docs:s}}}(a,await lc(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends ce{constructor(){super(...arguments),this.name="list_workspaces",this.type=exports.ToolType.READ,this.annotations=me({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 Ec}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=wc(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=Tc(await this.mondayApi.request(gc,n(Mr.Member))),r=!Ic(o)||i&&!function(e,t){return t.some((t=>wc(t.name).includes(e)))}(i,o);let d=o;if(r){d=Tc(await this.mondayApi.request(gc,n(Mr.All)))}if(!Ic(d))return{content:{message:"No workspaces found.",data:[]}};const p=i&&d?.length<=yc,s=function(e,t,a,i){if(!e||t.length<=yc)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>wc(t.name).includes(e))).slice(n,o)}(i,d,e.page,e.limit);if(!Ic(s))return{content:{message:"No workspaces found matching the search term. Try using the tool without a search term",data:[]}};const l=s.length===e.limit,m=await lc(this.mondayApi),c=s.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:m&&e.id?mc(m,e.id):void 0})));return{content:{message:"Workspaces retrieved",...p?{disclaimer:"Search term not applied - returning all workspaces. Perform the filtering manually."}:{},...l?{next_page:e.page+1}:{},data:c}}}},class extends ce{constructor(){super(...arguments),this.name="create_doc",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return $c}async executeInternal(e){const t=Oc.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,n;if(a.type===kc.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||Vn.Public,folder_id:a.folder_id?.toString()}}},r=await this.mondayApi.request(Sc,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===kc.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(Nc,o),d=r.items?.[0];if(!d)return{content:`Error: Item with id ${a.item_id} not found.`};const p=d.board?.id,s=d.board?.columns?.find((e=>e&&e.type===Hl.Doc));let l=a.column_id;if(!l)if(s)l=s.id;else{const e={boardId:p.toString(),columnType:Hl.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(Ip,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const m={location:{board:{item_id:a.item_id.toString(),column_id:l}}},c=await this.mondayApi.request(Sc,m);if(t=c.create_doc?.id??void 0,i=c.create_doc?.object_id??void 0,n=c.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Ac,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const o={docId:t,markdown:e.markdown},r=await this.mondayApi.request(Dc,o),d=r?.add_content_to_doc_from_markdown?.success,p=r?.add_content_to_doc_from_markdown?.error;return d?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:n,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${p||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return Lc}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=null;if(e.doc_id){const a=await this.mondayApi.request(Rc,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Cc,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(xc,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const d=o?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${d} block${1===d?"":"s"} created.`,doc_id:t.id,block_ids:o,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="update_doc",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Su}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};this.sessionContext.metadata={...this.sessionContext.metadata,operation_types:e.operations?.map((e=>e.operation_type)),operation_count:e.operations?.length??0,...e.object_id&&{object_id:e.object_id}};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(Uc,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let n=0;n<e.operations.length;n++){const o=e.operations[n];try{const i=await this.executeOperation(t,o,e.object_id);a.push(`- [OK] ${o.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${o.operation_type}: ${t}`),i=n;break}}const n=null!==i?i:e.operations.length,o=e.operations.length,r=`Completed ${n}/${o} operation${1===o?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${r}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(Vc,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},n=await this.mondayApi.request(Fc,i),o=n?.add_content_to_doc_from_markdown;if(!o?.success)throw new Error(o?.error||"Failed to add markdown content");const r=o.block_ids?.length??0;return`${r} block${1===r?"":"s"} added${o.block_ids?.length?`. Block IDs: ${o.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Kc(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Kc(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Kc(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},n=await this.mondayApi.request(Pc,i);if(!n?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const n=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Qc(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:Gc(e.alignment),direction:Wc(e.direction)}};case"list_item":return{list_block:{delta_format:Qc(e.delta_format),list_block_type:e.list_block_type?e.list_block_type:void 0,indentation:e.indentation}};case"code":return{text_block:{delta_format:Qc(e.delta_format),text_block_type:Nr.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(n);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=n[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const o={docId:e,afterBlockId:a,blocksInput:[n]},r=await this.mondayApi.request(Hc,o),d=r?.create_doc_blocks;if(!d||0===d.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${d.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(jc,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(zc,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(Bc,{boardId:e}),a=t.boards?.[0]?.items_page?.items?.[0]?.id;if(!a)throw new Error(`No item found on the document backing board (object_id: ${e})`);return a}async fetchAllBlockContent(e){const t=await this.mondayApi.request(Mc,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,n,o,r,d){if((null!=r||null!=d)&&!o)throw new Error("selection_from and selection_length require block_id");if(null!=r!=(null!=d))throw new Error("selection_from and selection_length must both be provided together");const p=o?Array.isArray(o)?o:[o]:[];if((null!=r||null!=d)&&p.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const s=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(s);let m;if(n){const e=JSON.parse(n),t=dm.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);m=t.data}const c={itemId:l,body:a,parentId:i?.toString(),mentionsList:m},u=await this.mondayApi.request(qc,c);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(p.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of p){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const n=i.content.deltaFormat;if(!n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let o=0;for(const e of n)o+="string"==typeof e.insert?e.insert.length:1;if(0===o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const p=r??0,s=d??o;if(p+s>o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${p}, ${p+s}) is out of range for block ${a} (total length ${o})`);let l;try{l=Xc(n,f,p,s)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const m={...i.content,deltaFormat:l},c=await this.mondayApi.request(Pc,{blockId:a,content:JSON.stringify(m)});if(!c?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const v=p.length;return`${_} created${v>1?` across ${v} blocks`:1===v?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,n){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,n)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends ce{constructor(){super(...arguments),this.name="update_workspace",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return Cu}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(xu,t),i=await lc(this.mondayApi),n=i?mc(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:n}}}},class extends ce{constructor(){super(...arguments),this.name="update_folder",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Lu}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(Ru,n);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="create_workspace",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Fu}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Vu,t),i=await lc(this.mondayApi),n=i&&a.create_workspace?.id?mc(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:n}}}},class extends ce{constructor(){super(...arguments),this.name="create_folder",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Pu}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(Uu,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="move_object",this.type=exports.ToolType.WRITE,this.annotations=me({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 Bu}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:d},s=await this.mondayApi.request(Ru,p);return{content:{message:"Object moved",object_id:s.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},s=await this.mondayApi.request(ju,p);return s.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:s.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${s.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},s=await this.mondayApi.request(zu,p);return s.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:s.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${s.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case Zo.Folder:return this.executeUpdateFolder(e);case Zo.Board:return this.executeUpdateBoardHierarchy(e);case Zo.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_dashboard",this.type=exports.ToolType.WRITE,this.annotations=me({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 Ou}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(Du,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=exports.ToolType.READ,this.annotations=me({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(Au,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:Um}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_widget",this.type=exports.ToolType.WRITE,this.annotations=me({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 $u}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(ku,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===zr.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends ce{constructor(){super(...arguments),this.name="board_insights",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return Yu}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===gn.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:gn.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const d=`${o}_${r}`;return Gu.has(e.function)&&(a.some((e=>e.column_id===d))||a.push({column_id:d})),{type:bn.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===gn.CountItems?[]:[{type:bn.Column,column:Wu(n),as:n}]}),as:d}}var i,n;const o={type:bn.Column,column:Wu(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:bn.Column,column:Wu(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:vn.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},r=await this.mondayApi.request(Mu,o),d=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return d.length?{content:{message:"Board insights retrieved",board_name:r.boards?.[0]?.name,board_url:r.boards?.[0]?.url,data:d}}:{content:"No board insights found for the given query."}}},class extends ce{constructor(){super(...arguments),this.name="search",this.type=exports.ToolType.READ,this.annotations=me({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor searching/listing specific users and teams, use list_users_and_teams tool.\nFor account-level info (plan, member count, products), use get_user_context tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return ah}async executeInternal(e){if(e.searchType!==th.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.searchWithDevEndpointAsync(e)).items}}}catch(e){Ll(e)}const t={[th.BOARD]:this.searchBoardsAsync.bind(this),[th.DOCUMENTS]:this.searchDocsAsync.bind(this),[th.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async searchWithDevEndpointAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===th.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===th.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Xu,i,{versionOverride:"dev",timeout:Cl})).search.boards.results.map((e=>({id:eh.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Zu,i,{versionOverride:"dev",timeout:Cl})).search.docs.results.map((e=>({id:eh.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&Rl(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Ju,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:eh.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Ku,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:eh.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Qu,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:eh.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=wc(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>wc(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends ce{constructor(){super(...arguments),this.name="get_user_context",this.type=exports.ToolType.READ,this.annotations=me({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(mh,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),n=this.extractRelevantBoards(a),o=this.extractRelevantPeople(a),{account:r,...d}=e;return{content:{message:"User context",...{user:d,account:r?{tier:r.tier,active_members_count:r.active_members_count,is_during_trial:r.is_during_trial,products:r.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:n,relevantPeople:o}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[uh[e]]=t[e];const n=await this.mondayApi.request(ch,i),o=[];for(const e of a){const t=hh[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends ce{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return ph}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(rh,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends ce{constructor(){super(...arguments),this.name="get_assets",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Assets",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get assets (files) by their IDs. Returns file metadata including name, extension, size, public URL (valid for 1 hour), thumbnail URL, upload date, and who uploaded it."}getInputSchema(){return lh}async executeInternal(e){const t=await this.mondayApi.request(sh,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends ce{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return _h}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(fh,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}}}}}},class extends ce{constructor(){super(...arguments),this.name="create_view",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return rs}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort},a=await this.mondayApi.request(os,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends ce{constructor(){super(...arguments),this.name="undo_action",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Undo Action",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Undo a previous action on a board using its action_record_uuid. Supports undoing column changes, deletes, archives, moves, duplicates, and more. Use get_board_activity with includeData=true to find the action_record_uuid."}getInputSchema(){return bh}async executeInternal(e){return await this.mondayApi.request(vh,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends ce{constructor(){super(...arguments),this.name="get_object_schemas",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return Up}async executeInternal(e){const t={ids:e.ids,names:e.names,limit:e.limit,page:e.page,excludeCreatedByMonday:e.excludeCreatedByMonday},a=(await this.mondayApi.request(Fp,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends ce{constructor(){super(...arguments),this.name="create_object_schema",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return jp}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Pp,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="update_object_schema",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update an account-level object schema. Requires the current revision number for optimistic locking — retrieve it first via get_object_schemas."}getInputSchema(){return Bp}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(zp,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Object Schema",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an account-level object schema. Only allowed when no boards are connected to the schema. Provide either id or name."}getInputSchema(){return qp}async executeInternal(e){if(!e.id&&!e.name)throw new Error("Either id or name must be provided");const t={id:e.id,name:e.name},a=await this.mondayApi.request(Mp,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return Gp}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnIds:e.columnIds},a=await this.mondayApi.request(Hp,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Manage Object Schema Board Connection",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Connect or detach a board from an account-level object schema. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."}getInputSchema(){return Qp}async executeInternal(e){if("connect"===e.action){if(!e.boardId)throw new Error("boardId is required for action=connect");if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided for action=connect");const t={boardId:e.boardId,objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName},a=await this.mondayApi.request(Wp,t);return{content:{message:"Board successfully connected to object schema",connection_id:a.connect_board_to_object_schema?.id,schema_id:a.connect_board_to_object_schema?.object_schema_id}}}{if(!e.boardIds?.length)throw new Error("boardIds is required for action=detach");const t={boardIds:e.boardIds},a=(await this.mondayApi.request(Yp,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,n=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...n.length>0&&{failures:n}}}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Manage Object Schema Columns",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create or update columns on an account-level object schema. Column changes are propagated to all boards connected to the schema. create: adds new columns. Each column requires type and title. Call get_column_type_info first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in)."}getInputSchema(){return ts}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(Kp,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(Jp,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends ce{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return is}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:Qn.Deactivate,reactivate:Qn.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(as,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=exports.ToolType.READ,this.annotations=me({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return yh}async executeInternal(e){return{content:gh}}},class extends ce{constructor(){super(...arguments),this.name="fetch_file_content",this.type=exports.ToolType.READ,this.annotations=me({title:"Fetch File Content",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch and extract the text content from a file stored in a monday.com files column.\n\nUse this tool when you need to read, summarize, or analyze the content of files attached to board items. Provide the item ID and column ID from the get_board_items_page response — the column value will be a URL like \"https://monday.com/protected_static/...\" indicating a file is present (null means no file).\n\nPROACTIVE USE: If you retrieve board items and notice a files column with a non-null value (a URL), consider fetching its content if it could help answer the user's question — don't wait to be explicitly asked.\n\nSupported file types and what is returned:\n- Text files (.txt, .md, .csv, .json): raw text content\n- Word documents (.docx): extracted text content\n- PDF files (.pdf): extracted text content\n- Excel files (.xlsx, .xls): extracted text content per sheet\n- Images (.png, .jpg, .gif, .webp, .svg, .bmp, .ico): returns the public URL so you can view or analyze the image directly\n\nText responses include a total_length field. If has_more is true, the content was truncated — you can call this tool again with next_offset if you need the remaining content.\n\nWhen to use:\n- User asks to summarize, read, or analyze the content of a file in a files column\n- User asks questions about what is inside a file (e.g., \"what does the PDF say?\")\n- User wants to extract data from a CSV or Excel file attached to a board item\n- A board item has a files column with a non-null value and the user's question may be answered by its content — even if the user didn't explicitly ask to read the file\n\nWhen NOT to use:\n- The files column value is null (no file uploaded for that item)"}getInputSchema(){return Oh}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:n=0}=e,o=await this.mondayApi.request(wh,{itemId:[t],columnId:[a]}),r=o?.items?.[0]?.assets;if(!r||0===r.length)return{content:{message:`No file found for item ${t} in column ${a}. The column may be empty or the column ID may be incorrect.`}};return{content:{files:await Promise.all(r.map((e=>Ch(e,n,i))))}}}},class extends ce{constructor(){super(...arguments),this.name="get_agent",this.type=exports.ToolType.READ,this.annotations=me({title:"Get monday Platform Agent(s)",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Fetch one or more personal/custom agents on the monday.com platform.\n\nmonday platform agents are user-built work orchestrators and executors that live on the monday.com platform — each has a profile (name, role, avatar), a goal, and an execution plan in markdown describing capabilities and operating principles. Agents in state ACTIVE can be triggered to perform automated work on monday boards. They are NOT local LangChain or MCP agents — they are managed entities on the monday.com platform owned by a specific user.\n\nTerminology note: users might ask for "agent" in natural language (for example: "create me an agent"), but in this API context this refers to monday personal/custom agents.\n\nAgent state in get_agent results is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED agents are filtered from these queries — DELETED only appears as the return value of delete_agent. Agent kind is one of PERSONAL, ACCOUNT_LEVEL, or EXTERNAL.\n\nPass id to fetch one specific agent by its unique identifier. Omit id to list every non-deleted personal agent owned by the authenticated user. An empty list means the user owns no agents, which is not an error.\n\nUSAGE EXAMPLES:\n- Fetch one agent: { "id": "42" }\n- List all my agents: {}'}getInputSchema(){return jh}async executeInternal(e){if(void 0!==e.id)try{const{agent:t}=await this.mondayApi.request(Lh,{id:e.id},{versionOverride:"dev"});return t?{content:{message:"monday platform agent",agent:t}}:{content:`monday platform agent ${e.id} not found, or the authenticated user does not have access to it.`}}catch(e){Rl(e,"get monday platform agent")}try{const{agents:e}=await this.mondayApi.request(Vh,{},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user",count:t.length,agents:t}}}catch(e){Rl(e,"list monday platform agents")}}},class extends ce{constructor(){super(...arguments),this.name="create_agent",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create monday Platform Agent",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a personal/custom agent on the monday.com platform. See get_agent for what a monday platform agent is.\n\nTerminology note: users might ask for "agent" in natural language (for example: "create me an agent"), but in this API context this refers to monday personal/custom agents.\n\nTwo modes:\n- Prompt mode (recommended): pass prompt (and optional agent_model) and the platform generates profile + goal + plan via AI.\n- Manual mode: omit prompt and pass any of name/role/role_description/user_prompt to create a blank agent profile quickly.\n\nDo not mix prompt with manual profile fields in one request.\n\nCreated agents start in state INACTIVE and must be activated before they can be triggered. Instruct the user to activate from the monday.com agent settings UI.\n\ncreated_at and updated_at are null in the response — call get_agent with the returned id afterward to fetch them.\n\nUSAGE EXAMPLES:\n- AI-generated: { "prompt": "Run my daily standup — collect status updates, summarize blockers, and post recap every weekday at 9am." }\n- Blank/manual: { "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Blank/defaults: {}'}getInputSchema(){return zh}async executeInternal(e){const t=void 0!==e.prompt,a=void 0!==e.name||void 0!==e.role||void 0!==e.role_description||void 0!==e.avatar_url||void 0!==e.gender||void 0!==e.background_color||void 0!==e.user_prompt;if(t&&a)throw new Error("create_agent accepts either prompt mode or manual mode. Do not pass prompt together with manual profile fields.");if(!t&&void 0!==e.agent_model)throw new Error("agent_model can only be used when prompt is provided.");if(!t)try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(Uh,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — user must activate it from the monday.com UI before it can be triggered`,agent:i.create_blank_agent}}}catch(e){Rl(e,"create blank monday platform agent")}try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(Fh,t,{versionOverride:"dev"});if(!a.create_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${a.create_agent.id} created in state INACTIVE — user must activate it from the monday.com UI before it can be triggered`,agent:a.create_agent}}}catch(e){Rl(e,"create monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="delete_agent",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Permanently delete a personal/custom agent on the monday.com platform. Removes the agent and all of its versions. The agent stops appearing in get_agent results and can no longer be triggered. This action cannot be undone. Only the agent owner can delete it.\n\nTerminology note: users might ask for "agent" in natural language (for example: "delete my standup agent"), but in this API context this refers to monday personal/custom agents.\n\nVERIFY BEFORE DELETING: When the user refers to an agent by name or description (e.g. "delete my standup bot"), call get_agent (no id) first to list all the user\'s agents and confirm the correct id. Do not infer ids — pick the matching agent by inspecting profile.name / role / goal.\n\nUSAGE EXAMPLE:\n{ "id": "42" }'}getInputSchema(){return Bh}async executeInternal(e){try{const t={id:e.id},a=await this.mondayApi.request(Ph,t,{versionOverride:"dev"});if(!a.delete_agent?.id)throw new Error("monday platform agent delete returned no id");return{content:{message:`monday platform agent ${a.delete_agent.id} deleted`,agent:a.delete_agent}}}catch(e){Rl(e,"delete monday platform agent")}}}],Tf=[...wf,...yf,...le];exports.allGraphqlApiTools=wf,exports.allMondayAppsTools=le,exports.allMondayDevTools=yf,exports.allTools=Tf;
2324
+ `),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends ce{constructor(){super(...arguments),this.name="create_custom_activity",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return Jl}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Ap,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends ce{constructor(){super(...arguments),this.name="create_notification",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Zl}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Xl,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends ce{constructor(){super(...arguments),this.name="create_timeline_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return dm}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(kp,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends ce{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=exports.ToolType.READ,this.annotations=me({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return ym}async executeInternal(e){const t=await this.mondayApi.request(Op);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:{message:`Found ${a.length} custom activities`,data:a}}}},class extends ce{constructor(){super(...arguments),this.name="read_docs",this.type=exports.ToolType.READ,this.annotations=me({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get information about monday.com documents. Supports two modes:\n\nMODE: "content" (default) — Fetch documents with their full markdown content.\n- Requires: type ("ids" | "object_ids" | "workspace_ids") and ids array\n- Supports pagination via page/limit. Check has_more_pages in response.\n- If type "ids" returns no results, automatically retries with object_ids.\n- Set include_blocks: true to include block IDs, types, and positions in the response — required before calling update_doc.\n- Blocks default to 25 per page. Use blocks_limit and blocks_page to paginate through long documents.\n- Set include_comments: true to fetch all comments and replies on the document. Use comments_limit to control how many comments per item (default 50).\n\nMODE: "version_history" — Fetch the edit history of a single document.\n- Requires: ids with the document\'s object_id (use the object_id field from content mode results, NOT the id field).\n- The object_id is the numeric ID visible in the document URL.\n- Returns restoring points sorted newest-first. Use version_history_limit to cap results (e.g., "last 3 changes" → version_history_limit: 3).\n- Use since/until to filter by time range. If omitted, returns full history.\n- Set include_diff: true to see what content changed between versions (fetches up to 10 diffs, may be slower).\n- Examples:\n - { mode: "version_history", ids: ["5001466606"], version_history_limit: 3 }\n - { mode: "version_history", ids: ["5001466606"], since: "2026-03-11T00:00:00Z", include_diff: true }'}getInputSchema(){return yc}async executeInternal(e){return e.mode===bc?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??vc,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n=e.include_blocks??!1,o=n?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},r={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n,...o};let d=await this.mondayApi.request(up,r);if((!d.docs||0===d.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n,...o};d=await this.mondayApi.request(up,a)}if(!d.docs||0===d.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const p=e.include_comments??!1,s=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:d.docs.flatMap((e=>e?[e.id]:[])),object_ids:d.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(d.docs,r,n,p,s,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:n}=e,o=e.ids?.[0];if(!o)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:bc,object_ids:[o]};try{const e={docId:o,since:a,until:i},r=await this.mondayApi.request(hp,e);let d=r?.doc_version_history?.restoring_points;if(!d||0===d.length)return{content:`No version history found for document ${o}${a?` from ${a}`:""}.`};if(!t)return n&&(d=d.slice(0,n)),{content:{doc_id:o,since:a,until:i,restoring_points:d}};const p=Math.min(n??10,10),s=d.slice(0,p+1),l=d.length>p,m=(await Promise.allSettled(s.map((async(e,t)=>{if(t===s.length-1||!e.date)return e;const a=s[t+1];if(!a?.date)return e;const i={docId:o,date:e.date,prevDate:a.date},n=await this.mondayApi.request(_p,i);return{...e,diff:n?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:s[t]))))).slice(0,p);return{content:{doc_id:o,since:a,until:i,restoring_points:m,...l&&{truncated:!0,total_count:d.length}}}}catch(e){return{content:`Error fetching version history for document ${o}: ${e instanceof Error?e.message:"Unknown error"}`}}}async fetchDocComments(e,t){try{const a={boardId:e,itemsLimit:100,updatesLimit:t},i=await this.mondayApi.request(fp,a),n=i.boards?.[0]?.items_page?.items;if(!n)return[];const o=[];for(const e of n)if(e.updates&&0!==e.updates.length)for(const t of e.updates)o.push({id:t.id,text_body:t.text_body,body:t.body,created_at:t.created_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:e.id,item_name:e.name,replies:(t.replies??[]).map((e=>({id:e.id,text_body:e.text_body,body:e.body,created_at:e.created_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))});return o}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,n=50,o,r){const d=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,d="";try{const t={docId:e.id},a=await this.mondayApi.request($p,t);d=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){d=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,n)),{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,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==o||void 0!==r?{blocks_pagination:{current_page:r??1,limit:o??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(o??25)}}:{}},blocks_as_markdown:d,...i&&{comments:t}}}))),p=t.page||1,s=t.limit||25,l=d.length,m=l===s;return{content:{message:`Documents retrieved (${d.length})`,pagination:{current_page:p,limit:s,count:l,has_more_pages:m},data:d}}}},class extends ce{constructor(){super(...arguments),this.name="workspace_info",this.type=exports.ToolType.READ,this.annotations=me({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 wc}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(xp,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:n,folders:o}=e,r=a?.[0];if(!r)throw new Error("No workspace found");const d=new Map((o||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),p=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&d.has(e.board_folder_id)?d.get(e.board_folder_id).boards.push(t):p.push(t)}));const s=[];return(n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&d.has(e.doc_folder_id)?d.get(e.doc_folder_id).docs.push(t):s.push(t)})),{workspace:{id:r.id,name:r.name,url:t?hc(t,r.id):void 0,description:r.description||"",kind:r.kind||"",created_at:r.created_at||"",state:r.state||"",is_default_workspace:r.is_default_workspace||!1,owners_subscribers:(r.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(d.values()),root_items:{boards:p,docs:s}}}(a,await uc(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends ce{constructor(){super(...arguments),this.name="list_workspaces",this.type=exports.ToolType.READ,this.annotations=me({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 Dc}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=Ec(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const n=e=>({limit:t,page:a,membershipKind:e}),o=Nc(await this.mondayApi.request(Tc,n(Mr.Member))),r=!Sc(o)||i&&!function(e,t){return t.some((t=>Ec(t.name).includes(e)))}(i,o);let d=o;if(r){d=Nc(await this.mondayApi.request(Tc,n(Mr.All)))}if(!Sc(d))return{content:{message:"No workspaces found.",data:[]}};const p=i&&d?.length<=Ic,s=function(e,t,a,i){if(!e||t.length<=Ic)return t;const n=(a-1)*i,o=n+i;return t.filter((t=>Ec(t.name).includes(e))).slice(n,o)}(i,d,e.page,e.limit);if(!Sc(s))return{content:{message:"No workspaces found matching the search term. Try using the tool without a search term",data:[]}};const l=s.length===e.limit,m=await uc(this.mondayApi),c=s.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:m&&e.id?hc(m,e.id):void 0})));return{content:{message:"Workspaces retrieved",...p?{disclaimer:"Search term not applied - returning all workspaces. Perform the filtering manually."}:{},...l?{next_page:e.page+1}:{},data:c}}}},class extends ce{constructor(){super(...arguments),this.name="create_doc",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id)\n- item: Creates a document attached to an item (requires item_id, optional column_id)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, column_id: "doc_col_1" , markdown: "..." }'}getInputSchema(){return Rc}async executeInternal(e){const t=Cc.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,n;if(a.type===xc.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||Vn.Public,folder_id:a.folder_id?.toString()}}},r=await this.mondayApi.request(kc,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===xc.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(Ac,o),d=r.items?.[0];if(!d)return{content:`Error: Item with id ${a.item_id} not found.`};const p=d.board?.id,s=d.board?.columns?.find((e=>e&&e.type===Gl.Doc));let l=a.column_id;if(!l)if(s)l=s.id;else{const e={boardId:p.toString(),columnType:Gl.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(Ip,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const m={location:{board:{item_id:a.item_id.toString(),column_id:l}}},c=await this.mondayApi.request(kc,m);if(t=c.create_doc?.id??void 0,i=c.create_doc?.object_id??void 0,n=c.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request($c,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const o={docId:t,markdown:e.markdown},r=await this.mondayApi.request(Oc,o),d=r?.add_content_to_doc_from_markdown?.success,p=r?.add_content_to_doc_from_markdown?.error;return d?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:n,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${p||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return Uc}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=null;if(e.doc_id){const a=await this.mondayApi.request(Fc,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Vc,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(Lc,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const d=o?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${d} block${1===d?"":"s"} created.`,doc_id:t.id,block_ids:o,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="update_doc",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return ku}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};this.sessionContext.metadata={...this.sessionContext.metadata,operation_types:e.operations?.map((e=>e.operation_type)),operation_count:e.operations?.length??0,...e.object_id&&{object_id:e.object_id}};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(zc,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let n=0;n<e.operations.length;n++){const o=e.operations[n];try{const i=await this.executeOperation(t,o,e.object_id);a.push(`- [OK] ${o.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${o.operation_type}: ${t}`),i=n;break}}const n=null!==i?i:e.operations.length,o=e.operations.length,r=`Completed ${n}/${o} operation${1===o?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${r}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(Pc,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},n=await this.mondayApi.request(jc,i),o=n?.add_content_to_doc_from_markdown;if(!o?.success)throw new Error(o?.error||"Failed to add markdown content");const r=o.block_ids?.length??0;return`${r} block${1===r?"":"s"} added${o.block_ids?.length?`. Block IDs: ${o.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Zc(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Zc(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Zc(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},n=await this.mondayApi.request(Bc,i);if(!n?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const n=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Xc(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:Qc(e.alignment),direction:Kc(e.direction)}};case"list_item":return{list_block:{delta_format:Xc(e.delta_format),list_block_type:e.list_block_type?e.list_block_type:void 0,indentation:e.indentation}};case"code":return{text_block:{delta_format:Xc(e.delta_format),text_block_type:Nr.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(n);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=n[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const o={docId:e,afterBlockId:a,blocksInput:[n]},r=await this.mondayApi.request(Yc,o),d=r?.create_doc_blocks;if(!d||0===d.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${d.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(Mc,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(qc,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(Hc,{boardId:e}),a=t.boards?.[0]?.items_page?.items?.[0]?.id;if(!a)throw new Error(`No item found on the document backing board (object_id: ${e})`);return a}async fetchAllBlockContent(e){const t=await this.mondayApi.request(Gc,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,n,o,r,d){if((null!=r||null!=d)&&!o)throw new Error("selection_from and selection_length require block_id");if(null!=r!=(null!=d))throw new Error("selection_from and selection_length must both be provided together");const p=o?Array.isArray(o)?o:[o]:[];if((null!=r||null!=d)&&p.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const s=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(s);let m;if(n){const e=JSON.parse(n),t=lm.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);m=t.data}const c={itemId:l,body:a,parentId:i?.toString(),mentionsList:m},u=await this.mondayApi.request(Wc,c);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(p.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of p){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const n=i.content.deltaFormat;if(!n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let o=0;for(const e of n)o+="string"==typeof e.insert?e.insert.length:1;if(0===o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const p=r??0,s=d??o;if(p+s>o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${p}, ${p+s}) is out of range for block ${a} (total length ${o})`);let l;try{l=tu(n,f,p,s)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const m={...i.content,deltaFormat:l},c=await this.mondayApi.request(Bc,{blockId:a,content:JSON.stringify(m)});if(!c?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const v=p.length;return`${_} created${v>1?` across ${v} blocks`:1===v?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,n){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,n)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends ce{constructor(){super(...arguments),this.name="update_workspace",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return Vu}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(Lu,t),i=await uc(this.mondayApi),n=i?hc(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:n}}}},class extends ce{constructor(){super(...arguments),this.name="update_folder",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Uu}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(Fu,n);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="create_workspace",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return ju}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Pu,t),i=await uc(this.mondayApi),n=i&&a.create_workspace?.id?hc(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:n}}}},class extends ce{constructor(){super(...arguments),this.name="create_folder",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Bu}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(zu,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="move_object",this.type=exports.ToolType.WRITE,this.annotations=me({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 Hu}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:d},s=await this.mondayApi.request(Fu,p);return{content:{message:"Object moved",object_id:s.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},s=await this.mondayApi.request(Mu,p);return s.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:s.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${s.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const p={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},s=await this.mondayApi.request(qu,p);return s.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:s.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${s.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case Zo.Folder:return this.executeUpdateFolder(e);case Zo.Board:return this.executeUpdateBoardHierarchy(e);case Zo.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_dashboard",this.type=exports.ToolType.WRITE,this.annotations=me({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 Cu}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(Ou,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=exports.ToolType.READ,this.annotations=me({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request($u,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:zm}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_widget",this.type=exports.ToolType.WRITE,this.annotations=me({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 Ru}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(xu,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===zr.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends ce{constructor(){super(...arguments),this.name="board_insights",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return Ju}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===gn.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:gn.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const d=`${o}_${r}`;return Qu.has(e.function)&&(a.some((e=>e.column_id===d))||a.push({column_id:d})),{type:bn.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===gn.CountItems?[]:[{type:bn.Column,column:Ku(n),as:n}]}),as:d}}var i,n;const o={type:bn.Column,column:Ku(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),o}));return a.forEach((e=>{o.some((t=>t.as===e.column_id))||o.push({type:bn.Column,column:Ku(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:vn.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},r=await this.mondayApi.request(Gu,o),d=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return d.length?{content:{message:"Board insights retrieved",board_name:r.boards?.[0]?.name,board_url:r.boards?.[0]?.url,data:d}}:{content:"No board insights found for the given query."}}},class extends ce{constructor(){super(...arguments),this.name="search",this.type=exports.ToolType.READ,this.annotations=me({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, forms, folders.\nFor searching/listing specific users and teams, use list_users_and_teams tool.\nFor account-level info (plan, member count, products), use get_user_context tool.\nFor workspaces, use list_workspaces tool.\nFor items and groups, use get_board_items_page tool.\nFor groups, use get_board_info tool.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return oh}async executeInternal(e){if(e.searchType!==nh.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.searchWithDevEndpointAsync(e)).items}}}catch(e){Vl(e)}const t={[nh.BOARD]:this.searchBoardsAsync.bind(this),[nh.DOCUMENTS]:this.searchDocsAsync.bind(this),[nh.FOLDERS]:this.searchFoldersAsync.bind(this)}[e.searchType];if(!t)throw new Error(`Unsupported search type: ${e.searchType}`);const a=await t(e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async searchWithDevEndpointAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===nh.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===nh.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);throw new Error(`Unsupported search type for dev endpoint: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(th,i,{versionOverride:"dev",timeout:Rl})).search.boards.results.map((e=>({id:ih.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ah,i,{versionOverride:"dev",timeout:Rl})).search.docs.results.map((e=>({id:ih.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&Ll(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(eh,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:ih.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Zu,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:ih.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Xu,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:ih.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=Ec(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>Ec(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends ce{constructor(){super(...arguments),this.name="get_user_context",this.type=exports.ToolType.READ,this.annotations=me({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(hh,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),n=this.extractRelevantBoards(a),o=this.extractRelevantPeople(a),{account:r,...d}=e;return{content:{message:"User context",...{user:d,account:r?{tier:r.tier,active_members_count:r.active_members_count,is_during_trial:r.is_during_trial,products:r.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:n,relevantPeople:o}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[_h[e]]=t[e];const n=await this.mondayApi.request(fh,i),o=[];for(const e of a){const t=vh[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends ce{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return mh}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(sh,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends ce{constructor(){super(...arguments),this.name="get_assets",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Assets",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get assets (files) by their IDs. Returns file metadata including name, extension, size, public URL (valid for 1 hour), thumbnail URL, upload date, and who uploaded it."}getInputSchema(){return uh}async executeInternal(e){const t=await this.mondayApi.request(ch,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends ce{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return gh}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(bh,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}}}}}},class extends ce{constructor(){super(...arguments),this.name="create_view",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return ds}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort},a=await this.mondayApi.request(rs,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends ce{constructor(){super(...arguments),this.name="undo_action",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Undo Action",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Undo a previous action on a board using its action_record_uuid. Supports undoing column changes, deletes, archives, moves, duplicates, and more. Use get_board_activity with includeData=true to find the action_record_uuid."}getInputSchema(){return wh}async executeInternal(e){return await this.mondayApi.request(yh,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends ce{constructor(){super(...arguments),this.name="get_object_schemas",this.type=exports.ToolType.READ,this.annotations=me({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return Pp}async executeInternal(e){const t={ids:e.ids,names:e.names,limit:e.limit,page:e.page,excludeCreatedByMonday:e.excludeCreatedByMonday},a=(await this.mondayApi.request(Up,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends ce{constructor(){super(...arguments),this.name="create_object_schema",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return zp}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(jp,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="update_object_schema",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Update Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update an account-level object schema. Requires the current revision number for optimistic locking — retrieve it first via get_object_schemas."}getInputSchema(){return Mp}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Bp,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Object Schema",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an account-level object schema. Only allowed when no boards are connected to the schema. Provide either id or name."}getInputSchema(){return Hp}async executeInternal(e){if(!e.id&&!e.name)throw new Error("Either id or name must be provided");const t={id:e.id,name:e.name},a=await this.mondayApi.request(qp,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return Wp}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnIds:e.columnIds},a=await this.mondayApi.request(Gp,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Manage Object Schema Board Connection",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Connect or detach a board from an account-level object schema. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."}getInputSchema(){return Kp}async executeInternal(e){if("connect"===e.action){if(!e.boardId)throw new Error("boardId is required for action=connect");if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided for action=connect");const t={boardId:e.boardId,objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName},a=await this.mondayApi.request(Yp,t);return{content:{message:"Board successfully connected to object schema",connection_id:a.connect_board_to_object_schema?.id,schema_id:a.connect_board_to_object_schema?.object_schema_id}}}{if(!e.boardIds?.length)throw new Error("boardIds is required for action=detach");const t={boardIds:e.boardIds},a=(await this.mondayApi.request(Qp,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,n=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...n.length>0&&{failures:n}}}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Manage Object Schema Columns",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create or update columns on an account-level object schema. Column changes are propagated to all boards connected to the schema. create: adds new columns. Each column requires type and title. Call get_column_type_info first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in)."}getInputSchema(){return as}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(Jp,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(Xp,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends ce{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return ns}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:Qn.Deactivate,reactivate:Qn.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(is,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=exports.ToolType.READ,this.annotations=me({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Ih}async executeInternal(e){return{content:Th}}},class extends ce{constructor(){super(...arguments),this.name="fetch_file_content",this.type=exports.ToolType.READ,this.annotations=me({title:"Fetch File Content",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch and extract the text content from a file stored in a monday.com files column.\n\nUse this tool when you need to read, summarize, or analyze the content of files attached to board items. Provide the item ID and column ID from the get_board_items_page response — the column value will be a URL like \"https://monday.com/protected_static/...\" indicating a file is present (null means no file).\n\nPROACTIVE USE: If you retrieve board items and notice a files column with a non-null value (a URL), consider fetching its content if it could help answer the user's question — don't wait to be explicitly asked.\n\nSupported file types and what is returned:\n- Text files (.txt, .md, .csv, .json): raw text content\n- Word documents (.docx): extracted text content\n- PDF files (.pdf): extracted text content\n- Excel files (.xlsx, .xls): extracted text content per sheet\n- Images (.png, .jpg, .gif, .webp, .svg, .bmp, .ico): returns the public URL so you can view or analyze the image directly\n\nText responses include a total_length field. If has_more is true, the content was truncated — you can call this tool again with next_offset if you need the remaining content.\n\nWhen to use:\n- User asks to summarize, read, or analyze the content of a file in a files column\n- User asks questions about what is inside a file (e.g., \"what does the PDF say?\")\n- User wants to extract data from a CSV or Excel file attached to a board item\n- A board item has a files column with a non-null value and the user's question may be answered by its content — even if the user didn't explicitly ask to read the file\n\nWhen NOT to use:\n- The files column value is null (no file uploaded for that item)"}getInputSchema(){return Ch}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:n=0}=e,o=await this.mondayApi.request(Eh,{itemId:[t],columnId:[a]}),r=o?.items?.[0]?.assets;if(!r||0===r.length)return{content:{message:`No file found for item ${t} in column ${a}. The column may be empty or the column ID may be incorrect.`}};return{content:{files:await Promise.all(r.map((e=>Vh(e,n,i))))}}}},class extends ce{constructor(){super(...arguments),this.name="get_agent",this.type=exports.ToolType.READ,this.annotations=me({title:"Get monday Platform Agent(s)",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Fetch one or more personal/custom agents on the monday.com platform.\n\nmonday platform agents are user-built work orchestrators and executors that live on the monday.com platform — each has a profile (name, role, avatar), a goal, and an execution plan in markdown describing capabilities and operating principles. Agents in state ACTIVE can be triggered to perform automated work on monday boards. They are NOT local LangChain or MCP agents — they are managed entities on the monday.com platform owned by a specific user.\n\nTerminology note: users might ask for "agent" in natural language (for example: "create me an agent"), but in this API context this refers to monday personal/custom agents.\n\nAgent state in get_agent results is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED agents are filtered from these queries — DELETED only appears as the return value of delete_agent. Agent kind is one of PERSONAL, ACCOUNT_LEVEL, or EXTERNAL.\n\nPass id to fetch one specific agent by its unique identifier. Omit id to list every non-deleted personal agent owned by the authenticated user. An empty list means the user owns no agents, which is not an error.\n\nUSAGE EXAMPLES:\n- Fetch one agent: { "id": "42" }\n- List all my agents: {}'}getInputSchema(){return Mh}async executeInternal(e){if(void 0!==e.id)try{const{agent:t}=await this.mondayApi.request(Uh,{id:e.id},{versionOverride:"dev"});return t?{content:{message:"monday platform agent",agent:t}}:{content:`monday platform agent ${e.id} not found, or the authenticated user does not have access to it.`}}catch(e){Ll(e,"get monday platform agent")}try{const{agents:e}=await this.mondayApi.request(Ph,{},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user",count:t.length,agents:t}}}catch(e){Ll(e,"list monday platform agents")}}},class extends ce{constructor(){super(...arguments),this.name="create_agent",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Create monday Platform Agent",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a personal/custom agent on the monday.com platform. See get_agent for what a monday platform agent is.\n\nTerminology note: users might ask for "agent" in natural language (for example: "create me an agent"), but in this API context this refers to monday personal/custom agents.\n\nTwo modes:\n- Prompt mode (recommended): pass prompt (and optional agent_model) and the platform generates profile + goal + plan via AI.\n- Manual mode: omit prompt and pass any of name/role/role_description/user_prompt to create a blank agent profile quickly.\n\nDo not mix prompt with manual profile fields in one request.\n\nCreated agents start in state INACTIVE and must be activated before they can be triggered. Instruct the user to activate from the monday.com agent settings UI.\n\ncreated_at and updated_at are null in the response — call get_agent with the returned id afterward to fetch them.\n\nUSAGE EXAMPLES:\n- AI-generated: { "prompt": "Run my daily standup — collect status updates, summarize blockers, and post recap every weekday at 9am." }\n- Blank/manual: { "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Blank/defaults: {}'}getInputSchema(){return qh}async executeInternal(e){const t=void 0!==e.prompt,a=void 0!==e.name||void 0!==e.role||void 0!==e.role_description||void 0!==e.avatar_url||void 0!==e.gender||void 0!==e.background_color||void 0!==e.user_prompt;if(t&&a)throw new Error("create_agent accepts either prompt mode or manual mode. Do not pass prompt together with manual profile fields.");if(!t&&void 0!==e.agent_model)throw new Error("agent_model can only be used when prompt is provided.");if(!t)try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(zh,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — user must activate it from the monday.com UI before it can be triggered`,agent:i.create_blank_agent}}}catch(e){Ll(e,"create blank monday platform agent")}try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(jh,t,{versionOverride:"dev"});if(!a.create_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${a.create_agent.id} created in state INACTIVE — user must activate it from the monday.com UI before it can be triggered`,agent:a.create_agent}}}catch(e){Ll(e,"create monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="delete_agent",this.type=exports.ToolType.WRITE,this.annotations=me({title:"Delete monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Permanently delete a personal/custom agent on the monday.com platform. Removes the agent and all of its versions. The agent stops appearing in get_agent results and can no longer be triggered. This action cannot be undone. Only the agent owner can delete it.\n\nTerminology note: users might ask for "agent" in natural language (for example: "delete my standup agent"), but in this API context this refers to monday personal/custom agents.\n\nVERIFY BEFORE DELETING: When the user refers to an agent by name or description (e.g. "delete my standup bot"), call get_agent (no id) first to list all the user\'s agents and confirm the correct id. Do not infer ids — pick the matching agent by inspecting profile.name / role / goal.\n\nUSAGE EXAMPLE:\n{ "id": "42" }'}getInputSchema(){return Hh}async executeInternal(e){try{const t={id:e.id},a=await this.mondayApi.request(Bh,t,{versionOverride:"dev"});if(!a.delete_agent?.id)throw new Error("monday platform agent delete returned no id");return{content:{message:`monday platform agent ${a.delete_agent.id} deleted`,agent:a.delete_agent}}}catch(e){Ll(e,"delete monday platform agent")}}}],Nf=[...Ef,...If,...le];exports.allGraphqlApiTools=Ef,exports.allMondayAppsTools=le,exports.allMondayDevTools=If,exports.allTools=Nf;
2296
2325
  //# sourceMappingURL=index.js.map