@mondaydotcomorg/agent-toolkit 5.61.2 → 5.61.4

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.
@@ -521,7 +521,7 @@
521
521
  }
522
522
  }
523
523
  }
524
- `,pp="TOOL_EXECUTION_FAILED",lp="INVALID_OPERATION_TYPE",cp="EMPTY_API_RESPONSE";class mp extends Error{constructor(e,t){super(e),this.name="ToolValidationError",this.code=t}}function up(e,t){if(e instanceof mp)throw e;const a=e?.response?.errors?.map((e=>{const{code:t,error_data:a}=e.extensions??{},i=Object.fromEntries(Object.entries({code:t,error_data:a}).filter((([,e])=>void 0!==e)));return Object.keys(i).length>0?`${e.message} (details: ${JSON.stringify(i)})`:e.message}))?.join(", ");if(a){const i=new Error(`Failed to ${t}: ${a}`);throw i.response=e.response,i}const i=e instanceof Error?e.message:"Unknown error";throw new mp(`Failed to ${t}: ${i}`,pp)}function hp(e){if(e instanceof Error&&"AbortError"===e.name)throw new mp("Search has timed out, try providing alternative search term","SEARCH_TIMEOUT")}function fp(e){const t=e?.response;return 429===t?.status}function _p(t){if(!(t instanceof e.ApiClient))return t;const{token:a,defaultApiVersion:i,defaultEndpoint:n,requestConfig:o}=t;return new e.ApiClient({token:a,apiVersion:i,endpoint:n,requestConfig:{...o,headers:{...o?.headers,"x-api-schema":"public"}}})}const gp={query:o.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:o.z.string().describe("JSON string containing the variables for the GraphQL operation")};class bp extends he{constructor(e,t){super("function"==typeof e?()=>_p(e()):_p(e),t),this.name="all_monday_api",this.type=g.ALL_API,this.annotations=ue({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 gp}async loadSchema(e){if(bp.schemaCache[e])return bp.schemaCache[e];try{const t=await this.mondayApi.rawRequest(tp),{data:a}=t,i=vn(a);return bp.schemaCache[e]=i,i}catch(e){throw new mp(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`,"GRAPHQL_SCHEMA_LOAD_FAILED")}}countGraphqlOperations(e){const t={},a={};for(const i of e.definitions){if("OperationDefinition"!==i.kind)continue;const e=i.operation===ke.MUTATION?a:i.operation===ke.QUERY?t:null;if(e)for(const t of i.selectionSet.selections){if("Field"!==t.kind)continue;const a=t.name.value;e[a]=(e[a]??0)+1}}return{graphql_queries:t,graphql_mutations:a}}recordGraphqlOperationCounts(e){const{graphql_queries:t,graphql_mutations:a}=this.countGraphqlOperations(e);this.sessionContext.metadata??={},this.sessionContext.metadata.graphql_queries=t,this.sessionContext.metadata.graphql_mutations=a}async validateOperation(e,t){return gn(await this.loadSchema(t),e).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;let i={};try{i=JSON.parse(a)}catch(e){throw new mp(`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`,"INVALID_VARIABLES_JSON")}const n=lt(t);this.recordGraphqlOperationCounts(n);const o=await this.validateOperation(n,this.context?.apiVersion??z);if(o.length>0)throw new mp(o.join(", "),"GRAPHQL_VALIDATION_FAILED");try{return{content:await this.mondayApi.request(t,i)}}catch(e){up(e,"execute GraphQL operation")}}}bp.schemaCache={};const vp=1e3;var yp,Ip;!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"}(yp||(yp={})),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=vp]="SECOND"}(Ip||(Ip={}));const wp=10*Ip.SECOND;async function Tp(e,t){const a={value:!1},i=t.isRateLimitError??fp;return async function(e,t){const a=new Array(e.length);let i=0;const n=Math.min(t,e.length);return await Promise.allSettled(Array.from({length:n},(async()=>{for(;i<e.length;){const t=i++;a[t]=await e[t]()}}))),a}(e.map(((e,n)=>async()=>{if(a.value)return t.onSkipped(n);try{return await e()}catch(e){return i(e)&&(a.value=!0),t.onError(e,n)}})),t.limit)}const Ep={itemId:o.z.number().describe("The ID of the item to be updated"),columnValues:o.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:o.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.")},Ap={boardId:o.z.number().describe("The ID of the board that contains the item to be updated"),...Ep};class Sp extends he{constructor(){super(...arguments),this.name="change_item_column_values",this.type=g.WRITE,this.annotations=ue({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"[IMPORTANT] If you need to update multiple items in one call, use change_items_column_values instead of calling this tool in a loop. Otherwise: change the column values of a single item in a monday.com board. [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 valid column values. For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?Ep:Ap}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}};let a;try{a=JSON.parse(e.columnValues)}catch(e){throw new mp(`Invalid columnValues JSON: ${e.message}`,"INVALID_COLUMN_VALUES_JSON")}if(null===a||"object"!=typeof a||Array.isArray(a))throw new mp("Invalid columnValues JSON: expected a JSON object keyed by column id","INVALID_COLUMN_VALUES_JSON");const i=Object.keys(a);let n;try{n=await this.mondayApi.request(Yd,{...t,columnIds:i})}catch(e){up(e,"change column values")}const o=n.change_multiple_column_values?.column_values?.reduce(((e,t)=>(e[t.id]=t.value??null,e)),{});return{content:{message:`Item ${n.change_multiple_column_values?.id} successfully updated`,item_id:n.change_multiple_column_values?.id,item_name:n.change_multiple_column_values?.name,item_url:n.change_multiple_column_values?.url,column_values:o}}}}const Np=o.z.object({itemId:o.z.number().describe("The id of the item to update."),columnValues:o.z.string().describe('A JSON object string of the new column values for this item, keyed by column id. Status and dropdown columns use { "label": "..." } (or { "labels": ["..."] } for multi-select dropdown). Date columns use { "date": "YYYY-MM-DD" }. Text, number, email and phone use plain strings. Example: "{\\"text_col\\":\\"hello\\",\\"status_col\\":{\\"label\\":\\"Done\\"}}". To change the item name include a "name" key. If unfamiliar with the board columns or labels, call get_board_info first.'),boardId:o.z.number().optional().describe("Optional. The id of the board that contains this item. Provide it when this update targets a board other than the batch default or the board in context. When omitted, the batch boardId or the board in context is used."),createLabelsIfMissing:o.z.boolean().optional().describe("When true, missing status or dropdown labels referenced in this update columnValues are auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure.")}),Dp={updates:o.z.array(Np).min(1,"updates must not be empty").max(40,"updates must not exceed 40 per call").describe("The item updates to apply, up to 40 per call. Each entry updates one item and returns its own result on success or a raw error message on failure. Each entry independently chooses its boardId, columnValues, and createLabelsIfMissing.")},Op={boardId:o.z.number().optional().describe("Optional default board id used for any update that does not set its own boardId. Each update can override it with its own boardId, so a single call can span multiple boards."),...Dp};function kp(e,t){if(e instanceof mp)return{code:e.code,message:e.message,path:["results",t]};const a=e?.response?.errors?.[0],i=e instanceof Error?e.message:String(e),n=a?.extensions??{};return{...n,code:n.code??"GRAPHQL_ERROR",message:a?.message??i,path:["results",t]}}const Cp=Vd`
524
+ `,pp="TOOL_EXECUTION_FAILED",lp="INVALID_OPERATION_TYPE",cp="EMPTY_API_RESPONSE",mp="MISSING_REQUIRED_PARAMETER";class up extends Error{constructor(e,t){super(e),this.name="ToolValidationError",this.code=t}}function hp(e,t){if(e instanceof up)throw e;const a=e?.response?.errors?.map((e=>{const{code:t,error_data:a}=e.extensions??{},i=Object.fromEntries(Object.entries({code:t,error_data:a}).filter((([,e])=>void 0!==e)));return Object.keys(i).length>0?`${e.message} (details: ${JSON.stringify(i)})`:e.message}))?.join(", ");if(a){const i=new Error(`Failed to ${t}: ${a}`);throw i.response=e.response,i}const i=e instanceof Error?e.message:"Unknown error";throw new up(`Failed to ${t}: ${i}`,pp)}function fp(e){if(e instanceof Error&&"AbortError"===e.name)throw new up("Search has timed out, try providing alternative search term","SEARCH_TIMEOUT")}function _p(e){const t=e?.response;return 429===t?.status}function gp(t){if(!(t instanceof e.ApiClient))return t;const{token:a,defaultApiVersion:i,defaultEndpoint:n,requestConfig:o}=t;return new e.ApiClient({token:a,apiVersion:i,endpoint:n,requestConfig:{...o,headers:{...o?.headers,"x-api-schema":"public"}}})}const bp={query:o.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:o.z.string().describe("JSON string containing the variables for the GraphQL operation")};class vp extends he{constructor(e,t){super("function"==typeof e?()=>gp(e()):gp(e),t),this.name="all_monday_api",this.type=g.ALL_API,this.annotations=ue({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 bp}async loadSchema(e){if(vp.schemaCache[e])return vp.schemaCache[e];try{const t=await this.mondayApi.rawRequest(tp),{data:a}=t,i=vn(a);return vp.schemaCache[e]=i,i}catch(e){throw new up(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`,"GRAPHQL_SCHEMA_LOAD_FAILED")}}countGraphqlOperations(e){const t={},a={};for(const i of e.definitions){if("OperationDefinition"!==i.kind)continue;const e=i.operation===ke.MUTATION?a:i.operation===ke.QUERY?t:null;if(e)for(const t of i.selectionSet.selections){if("Field"!==t.kind)continue;const a=t.name.value;e[a]=(e[a]??0)+1}}return{graphql_queries:t,graphql_mutations:a}}recordGraphqlOperationCounts(e){const{graphql_queries:t,graphql_mutations:a}=this.countGraphqlOperations(e);this.sessionContext.metadata??={},this.sessionContext.metadata.graphql_queries=t,this.sessionContext.metadata.graphql_mutations=a}async validateOperation(e,t){return gn(await this.loadSchema(t),e).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;let i={};try{i=JSON.parse(a)}catch(e){throw new up(`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`,"INVALID_VARIABLES_JSON")}const n=lt(t);this.recordGraphqlOperationCounts(n);const o=await this.validateOperation(n,this.context?.apiVersion??z);if(o.length>0)throw new up(o.join(", "),"GRAPHQL_VALIDATION_FAILED");try{return{content:await this.mondayApi.request(t,i)}}catch(e){hp(e,"execute GraphQL operation")}}}vp.schemaCache={};const yp=1e3;var Ip,wp;!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"}(Ip||(Ip={})),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=yp]="SECOND"}(wp||(wp={}));const Tp=10*wp.SECOND;async function Ep(e,t){const a={value:!1},i=t.isRateLimitError??_p;return async function(e,t){const a=new Array(e.length);let i=0;const n=Math.min(t,e.length);return await Promise.allSettled(Array.from({length:n},(async()=>{for(;i<e.length;){const t=i++;a[t]=await e[t]()}}))),a}(e.map(((e,n)=>async()=>{if(a.value)return t.onSkipped(n);try{return await e()}catch(e){return i(e)&&(a.value=!0),t.onError(e,n)}})),t.limit)}const Ap={itemId:o.z.number().describe("The ID of the item to be updated"),columnValues:o.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:o.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.")},Sp={boardId:o.z.number().describe("The ID of the board that contains the item to be updated"),...Ap};class Np extends he{constructor(){super(...arguments),this.name="change_item_column_values",this.type=g.WRITE,this.annotations=ue({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"[IMPORTANT] If you need to update multiple items in one call, use update_items instead of calling this tool in a loop. Otherwise: change the column values of a single item in a monday.com board. [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 valid column values. For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?Ap:Sp}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}};let a;try{a=JSON.parse(e.columnValues)}catch(e){throw new up(`Invalid columnValues JSON: ${e.message}`,"INVALID_COLUMN_VALUES_JSON")}if(null===a||"object"!=typeof a||Array.isArray(a))throw new up("Invalid columnValues JSON: expected a JSON object keyed by column id","INVALID_COLUMN_VALUES_JSON");const i=Object.keys(a);let n;try{n=await this.mondayApi.request(Yd,{...t,columnIds:i})}catch(e){hp(e,"change column values")}const o=n.change_multiple_column_values?.column_values?.reduce(((e,t)=>(e[t.id]=t.value??null,e)),{});return{content:{message:`Item ${n.change_multiple_column_values?.id} successfully updated`,item_id:n.change_multiple_column_values?.id,item_name:n.change_multiple_column_values?.name,item_url:n.change_multiple_column_values?.url,column_values:o}}}}const Dp=o.z.object({itemId:o.z.number().describe("The id of the item to update."),columnValues:o.z.string().describe('A JSON object string of the new column values for this item, keyed by column id. Status and dropdown columns use { "label": "..." } (or { "labels": ["..."] } for multi-select dropdown). Date columns use { "date": "YYYY-MM-DD" }. Text, number, email and phone use plain strings. Example: "{\\"text_col\\":\\"hello\\",\\"status_col\\":{\\"label\\":\\"Done\\"}}". To change the item name include a "name" key. If unfamiliar with the board columns or labels, call get_board_info first.'),boardId:o.z.number().optional().describe("Optional. The id of the board that contains this item. Provide it when this update targets a board other than the batch default or the board in context. When omitted, the batch boardId or the board in context is used."),createLabelsIfMissing:o.z.boolean().optional().describe("When true, missing status or dropdown labels referenced in this update columnValues are auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure.")}),Op={updates:o.z.array(Dp).min(1,"updates must not be empty").max(40,"updates must not exceed 40 per call").describe("The item updates to apply, up to 40 per call. Each entry updates one item and returns its own result on success or a raw error message on failure. Each entry independently chooses its boardId, columnValues, and createLabelsIfMissing.")},kp={boardId:o.z.number().optional().describe("Optional default board id used for any update that does not set its own boardId. Each update can override it with its own boardId, so a single call can span multiple boards."),...Op};function Cp(e,t){if(e instanceof up)return{code:e.code,message:e.message,path:["results",t]};const a=e?.response?.errors?.[0],i=e instanceof Error?e.message:String(e),n=a?.extensions??{};return{...n,code:n.code??"GRAPHQL_ERROR",message:a?.message??i,path:["results",t]}}const Rp=Vd`
525
525
  query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
526
526
  get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
527
527
  id
@@ -533,7 +533,7 @@
533
533
  connected_boards_count
534
534
  }
535
535
  }
536
- `,Rp={ids:o.z.array(o.z.string()).optional().describe("List of object schema IDs to retrieve. Mutually exclusive with names."),names:o.z.array(o.z.string()).optional().describe("List of object schema names to retrieve. Mutually exclusive with ids."),limit:o.z.number().optional().describe("Number of results per page. Default 25, max 100."),page:o.z.number().optional().describe("1-indexed page number. Default 1."),excludeCreatedByMonday:o.z.boolean().optional().describe("If true, returns only user-created schemas and excludes default monday.com schemas.")};const $p=Vd`
536
+ `,$p={ids:o.z.array(o.z.string()).optional().describe("List of object schema IDs to retrieve. Mutually exclusive with names."),names:o.z.array(o.z.string()).optional().describe("List of object schema names to retrieve. Mutually exclusive with ids."),limit:o.z.number().optional().describe("Number of results per page. Default 25, max 100."),page:o.z.number().optional().describe("1-indexed page number. Default 1."),excludeCreatedByMonday:o.z.boolean().optional().describe("If true, returns only user-created schemas and excludes default monday.com schemas.")};const Lp=Vd`
537
537
  mutation CreateObjectSchema($name: String!, $parentId: ID, $description: String) {
538
538
  create_object_schema(name: $name, parent_id: $parentId, description: $description) {
539
539
  id
@@ -543,7 +543,7 @@
543
543
  revision
544
544
  }
545
545
  }
546
- `,Lp={name:o.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:o.z.string().optional().describe("The ID of the parent object schema."),description:o.z.string().optional().describe("The description for this object schema.")};const xp=Vd`
546
+ `,xp={name:o.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:o.z.string().optional().describe("The ID of the parent object schema."),description:o.z.string().optional().describe("The description for this object schema.")};const Up=Vd`
547
547
  mutation UpdateObjectSchema($id: ID!, $revision: Int!, $parentId: ID, $description: String) {
548
548
  update_object_schema(id: $id, revision: $revision, parent_id: $parentId, description: $description) {
549
549
  id
@@ -553,14 +553,14 @@
553
553
  revision
554
554
  }
555
555
  }
556
- `,Up={id:o.z.string().describe("The ID of the object schema to update."),revision:o.z.number().describe("The current revision number for optimistic locking. Retrieve it first via get_object_schemas."),parentId:o.z.string().optional().describe("The ID of the parent object schema."),description:o.z.string().optional().describe("The new description for this object schema.")};const Pp=Vd`
556
+ `,Pp={id:o.z.string().describe("The ID of the object schema to update."),revision:o.z.number().describe("The current revision number for optimistic locking. Retrieve it first via get_object_schemas."),parentId:o.z.string().optional().describe("The ID of the parent object schema."),description:o.z.string().optional().describe("The new description for this object schema.")};const Fp=Vd`
557
557
  mutation DeleteObjectSchema($id: ID, $name: String) {
558
558
  delete_object_schema(id: $id, name: $name) {
559
559
  id
560
560
  name
561
561
  }
562
562
  }
563
- `,Fp={id:o.z.string().optional().describe("The ID of the object schema to delete. Either id or name must be provided."),name:o.z.string().optional().describe("The name of the object schema to delete. Either id or name must be provided.")};const Mp=Vd`
563
+ `,Mp={id:o.z.string().optional().describe("The ID of the object schema to delete. Either id or name must be provided."),name:o.z.string().optional().describe("The name of the object schema to delete. Either id or name must be provided.")};const Vp=Vd`
564
564
  mutation DeleteObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columnIds: [ID!]!) {
565
565
  delete_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, column_ids: $columnIds) {
566
566
  id
@@ -570,14 +570,14 @@
570
570
  revision
571
571
  }
572
572
  }
573
- `,Vp={objectSchemaId:o.z.string().optional().describe("The ID of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("The name of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),columnIds:o.z.array(o.z.string()).describe("IDs of the columns to permanently delete. Only allowed when no boards are connected to the schema.")};const Bp=Vd`
573
+ `,Bp={objectSchemaId:o.z.string().optional().describe("The ID of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("The name of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),columnIds:o.z.array(o.z.string()).describe("IDs of the columns to permanently delete. Only allowed when no boards are connected to the schema.")};const zp=Vd`
574
574
  mutation ConnectBoardToObjectSchema($boardId: ID!, $objectSchemaId: ID, $objectSchemaName: String) {
575
575
  connect_board_to_object_schema(board_id: $boardId, object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName) {
576
576
  id
577
577
  object_schema_id
578
578
  }
579
579
  }
580
- `,zp=Vd`
580
+ `,jp=Vd`
581
581
  mutation DetachBoardsFromObjectSchema($boardIds: [ID!]!) {
582
582
  detach_boards_from_object_schema(board_ids: $boardIds) {
583
583
  board_id
@@ -585,7 +585,7 @@
585
585
  error
586
586
  }
587
587
  }
588
- `,jp={action:o.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:o.z.string().optional().describe("Required for action=connect. The ID of the board to connect."),boardIds:o.z.array(o.z.string()).optional().describe("Required for action=detach. The IDs of the boards to detach."),objectSchemaId:o.z.string().optional().describe("Required for action=connect. The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("Required for action=connect. The name of the object schema. Either objectSchemaId or objectSchemaName must be provided.")};var qp;!function(e){e.Schema="schema",e.Guidelines="guidelines"}(qp||(qp={}));const Gp=Vd`
588
+ `,qp={action:o.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:o.z.string().optional().describe("Required for action=connect. The ID of the board to connect."),boardIds:o.z.array(o.z.string()).optional().describe("Required for action=detach. The IDs of the boards to detach."),objectSchemaId:o.z.string().optional().describe("Required for action=connect. The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("Required for action=connect. The name of the object schema. Either objectSchemaId or objectSchemaName must be provided.")};var Gp;!function(e){e.Schema="schema",e.Guidelines="guidelines"}(Gp||(Gp={}));const Hp=Vd`
589
589
  mutation CreateObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columns: [CreateObjectSchemaColumnInput!]!) {
590
590
  create_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, columns: $columns) {
591
591
  id
@@ -595,7 +595,7 @@
595
595
  revision
596
596
  }
597
597
  }
598
- `,Hp=Vd`
598
+ `,Wp=Vd`
599
599
  mutation UpdateObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columns: [UpdateObjectSchemaColumnInput!]!) {
600
600
  update_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, columns: $columns) {
601
601
  id
@@ -605,7 +605,7 @@
605
605
  revision
606
606
  }
607
607
  }
608
- `,Wp=o.z.object({can_override:o.z.array(o.z.enum(["title","description","settings"])).optional().describe("Fields that boards can override. Allowed values: title, description, settings."),cannot_delete:o.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."),Yp=o.z.object({type:o.z.string().describe(`Column type (e.g. text, status, numbers, date, dropdown, people). Call get_column_type_info with fetchMode "${qp.Schema}" for a type's settings schema.`),title:o.z.string().describe("Column title."),description:o.z.string().optional().describe("Column description."),defaults:o.z.record(o.z.unknown()).optional().describe(`Type-specific column settings. Call get_column_type_info with fetchMode "${qp.Schema}" before populating this field to understand the valid structure.`),policy:Wp,opt_out_by_default:o.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema.")}),Kp=o.z.object({column_id:o.z.string().describe("The ID of the column to update."),title:o.z.string().optional().describe("New column title."),description:o.z.string().optional().describe("New column description."),defaults:o.z.record(o.z.unknown()).optional().describe(`Type-specific column settings. Call get_column_type_info with fetchMode "${qp.Schema}" before populating this field.`),opt_out_by_default:o.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema."),policy:Wp}),Qp={action:o.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 with fetchMode "${qp.Schema}" 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:o.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columns:o.z.array(o.z.union([Yp,Kp])).describe("Array of columns to create or update.")};const Jp=Vd`
608
+ `,Yp=o.z.object({can_override:o.z.array(o.z.enum(["title","description","settings"])).optional().describe("Fields that boards can override. Allowed values: title, description, settings."),cannot_delete:o.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."),Kp=o.z.object({type:o.z.string().describe(`Column type (e.g. text, status, numbers, date, dropdown, people). Call get_column_type_info with fetchMode "${Gp.Schema}" for a type's settings schema.`),title:o.z.string().describe("Column title."),description:o.z.string().optional().describe("Column description."),defaults:o.z.record(o.z.unknown()).optional().describe(`Type-specific column settings. Call get_column_type_info with fetchMode "${Gp.Schema}" before populating this field to understand the valid structure.`),policy:Yp,opt_out_by_default:o.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema.")}),Qp=o.z.object({column_id:o.z.string().describe("The ID of the column to update."),title:o.z.string().optional().describe("New column title."),description:o.z.string().optional().describe("New column description."),defaults:o.z.record(o.z.unknown()).optional().describe(`Type-specific column settings. Call get_column_type_info with fetchMode "${Gp.Schema}" before populating this field.`),opt_out_by_default:o.z.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema."),policy:Yp}),Jp={action:o.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 with fetchMode "${Gp.Schema}" 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:o.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columns:o.z.array(o.z.union([Kp,Qp])).describe("Array of columns to create or update.")};const Xp=Vd`
609
609
  mutation SetObjectSchemaColumnActiveState($objectSchemaId: ID, $objectSchemaName: String, $columnId: ID!, $action: ColumnActiveStateAction!) {
610
610
  set_object_schema_column_active_state(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, column_id: $columnId, action: $action) {
611
611
  id
@@ -615,7 +615,7 @@
615
615
  revision
616
616
  }
617
617
  }
618
- `,Xp={action:o.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:o.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columnId:o.z.string().describe("The ID of the column to deactivate or reactivate.")};const Zp={boardName:o.z.string().describe("The name of the board to create"),boardKind:o.z.nativeEnum(Kn).default(Kn.Public).describe("The kind of board to create"),boardDescription:o.z.string().optional().describe("The description of the board to create"),workspaceId:o.z.string().optional().describe("The ID of the workspace to create the board in"),boardOwnerIds:o.z.array(o.z.string()).optional().describe("Optional list of user IDs to set as board owners")};const el={templateId:o.z.coerce.number().int().positive().describe("The template ID to apply."),destinationWorkspaceId:o.z.coerce.number().int().positive().optional().describe("Target workspace ID."),destinationName:o.z.string().optional().describe("Name for the created instance or folder."),boardKind:o.z.nativeEnum(Kn).optional().describe("Visibility applied to all boards created by the template. public = visible to all account members (API default). private = visible only to owner and explicitly added members. share = accessible to guests outside the account via a link. For workspace templates this setting applies to every board in the installation. Omit to use the API default (public).")};const tl={processId:o.z.string().describe("The process_id returned by use_template.")};const al=Vd`
618
+ `,Zp={action:o.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:o.z.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:o.z.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columnId:o.z.string().describe("The ID of the column to deactivate or reactivate.")};const el={boardName:o.z.string().describe("The name of the board to create"),boardKind:o.z.nativeEnum(Kn).default(Kn.Public).describe("The kind of board to create"),boardDescription:o.z.string().optional().describe("The description of the board to create"),workspaceId:o.z.string().optional().describe("The ID of the workspace to create the board in"),boardOwnerIds:o.z.array(o.z.string()).optional().describe("Optional list of user IDs to set as board owners")};const tl={templateId:o.z.coerce.number().int().positive().describe("The template ID to apply."),destinationWorkspaceId:o.z.coerce.number().int().positive().optional().describe("Target workspace ID."),destinationName:o.z.string().optional().describe("Name for the created instance or folder."),boardKind:o.z.nativeEnum(Kn).optional().describe("Visibility applied to all boards created by the template. public = visible to all account members (API default). private = visible only to owner and explicitly added members. share = accessible to guests outside the account via a link. For workspace templates this setting applies to every board in the installation. Omit to use the API default (public).")};const al={processId:o.z.string().describe("The process_id returned by use_template.")};const il=Vd`
619
619
  mutation createView(
620
620
  $boardId: ID!
621
621
  $type: ViewKind!
@@ -637,7 +637,7 @@
637
637
  type
638
638
  }
639
639
  }
640
- `,il={boardId:o.z.string().describe("The board ID to create the view on"),type:o.z.nativeEnum(ms).default(ms.Table).describe("The type of board view to create. Use TABLE for standard board views."),name:o.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),settings:o.z.any().optional().describe("Type-specific view settings as a JSON object (e.g. column visibility, group_by for TABLE). The shape varies by view type — call get_view_schema_by_type with the same ViewKind to discover the supported structure. For TABLE views, prefer the dedicated create_view_table tool which exposes a strongly-typed settings field.")};const nl=Vd`
640
+ `,nl={boardId:o.z.string().describe("The board ID to create the view on"),type:o.z.nativeEnum(ms).default(ms.Table).describe("The type of board view to create. Use TABLE for standard board views."),name:o.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),settings:o.z.any().optional().describe("Type-specific view settings as a JSON object (e.g. column visibility, group_by for TABLE). The shape varies by view type — call get_view_schema_by_type with the same ViewKind to discover the supported structure. For TABLE views, prefer the dedicated create_view_table tool which exposes a strongly-typed settings field.")};const ol=Vd`
641
641
  mutation updateView(
642
642
  $viewId: ID!
643
643
  $boardId: ID!
@@ -661,7 +661,7 @@
661
661
  type
662
662
  }
663
663
  }
664
- `,ol={viewId:o.z.string().describe("The ID of the view to update"),boardId:o.z.string().describe("The board ID the view belongs to"),type:o.z.nativeEnum(ms).default(ms.Table).describe("The type of the board view being updated. Use TABLE for standard board views."),name:o.z.string().optional().describe("New name for the view (omit to leave unchanged)"),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration to apply to the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),settings:o.z.any().optional().describe("Type-specific view settings as a JSON object (e.g. column visibility, group_by for TABLE). The shape varies by view type — call get_view_schema_by_type with the same ViewKind to discover the supported structure. For TABLE views, prefer the dedicated update_view_table tool which exposes a strongly-typed settings field.")};const rl=Vd`
664
+ `,rl={viewId:o.z.string().describe("The ID of the view to update"),boardId:o.z.string().describe("The board ID the view belongs to"),type:o.z.nativeEnum(ms).default(ms.Table).describe("The type of the board view being updated. Use TABLE for standard board views."),name:o.z.string().optional().describe("New name for the view (omit to leave unchanged)"),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration to apply to the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),settings:o.z.any().optional().describe("Type-specific view settings as a JSON object (e.g. column visibility, group_by for TABLE). The shape varies by view type — call get_view_schema_by_type with the same ViewKind to discover the supported structure. For TABLE views, prefer the dedicated update_view_table tool which exposes a strongly-typed settings field.")};const sl=Vd`
665
665
  mutation createViewTable(
666
666
  $boardId: ID!
667
667
  $name: String
@@ -683,7 +683,7 @@
683
683
  type
684
684
  }
685
685
  }
686
- `,sl=o.z.object({column_id:o.z.string().describe("The ID of the column"),visible:o.z.boolean().describe("Whether the column is visible")}),dl=o.z.object({columns:o.z.object({column_properties:o.z.array(sl).optional().describe("Visibility configuration for main board columns"),subitems_column_properties:o.z.array(sl).optional().describe("Visibility configuration for subitem columns"),floating_columns_count:o.z.number().int().optional().describe("Number of floating columns to display"),column_order:o.z.array(o.z.string()).optional().describe("Ordered list of column IDs")}).optional().describe("Column visibility and order configuration"),group_by:o.z.object({conditions:o.z.array(o.z.object({columnId:o.z.string().describe("ID of the column to group by"),config:o.z.object({sortSettings:o.z.object({direction:o.z.nativeEnum(Fr).describe("Sort direction (ASC or DESC)"),type:o.z.string().optional().describe("Type of sorting to apply")}).optional()}).optional()})).describe("Group-by conditions"),hideEmptyGroups:o.z.boolean().optional().describe("Whether to hide groups with no items")}).optional().describe("Group-by configuration for the table view")}).optional().describe("Table-specific view settings (column visibility/order, group-by)"),pl={boardId:o.z.string().describe("The board ID to create the table view on"),name:o.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),tags:o.z.array(o.z.string()).optional().describe("Tags to apply to the view"),settings:dl};const ll=Vd`
686
+ `,dl=o.z.object({column_id:o.z.string().describe("The ID of the column"),visible:o.z.boolean().describe("Whether the column is visible")}),pl=o.z.object({columns:o.z.object({column_properties:o.z.array(dl).optional().describe("Visibility configuration for main board columns"),subitems_column_properties:o.z.array(dl).optional().describe("Visibility configuration for subitem columns"),floating_columns_count:o.z.number().int().optional().describe("Number of floating columns to display"),column_order:o.z.array(o.z.string()).optional().describe("Ordered list of column IDs")}).optional().describe("Column visibility and order configuration"),group_by:o.z.object({conditions:o.z.array(o.z.object({columnId:o.z.string().describe("ID of the column to group by"),config:o.z.object({sortSettings:o.z.object({direction:o.z.nativeEnum(Fr).describe("Sort direction (ASC or DESC)"),type:o.z.string().optional().describe("Type of sorting to apply")}).optional()}).optional()})).describe("Group-by conditions"),hideEmptyGroups:o.z.boolean().optional().describe("Whether to hide groups with no items")}).optional().describe("Group-by configuration for the table view")}).optional().describe("Table-specific view settings (column visibility/order, group-by)"),ll={boardId:o.z.string().describe("The board ID to create the table view on"),name:o.z.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),tags:o.z.array(o.z.string()).optional().describe("Tags to apply to the view"),settings:pl};const cl=Vd`
687
687
  mutation updateViewTable(
688
688
  $viewId: ID!
689
689
  $boardId: ID!
@@ -707,7 +707,7 @@
707
707
  type
708
708
  }
709
709
  }
710
- `,cl=o.z.object({column_id:o.z.string().describe("The ID of the column"),visible:o.z.boolean().describe("Whether the column is visible")}),ml=o.z.object({columns:o.z.object({column_properties:o.z.array(cl).optional().describe("Visibility configuration for main board columns"),subitems_column_properties:o.z.array(cl).optional().describe("Visibility configuration for subitem columns"),floating_columns_count:o.z.number().int().optional().describe("Number of floating columns to display"),column_order:o.z.array(o.z.string()).optional().describe("Ordered list of column IDs")}).optional().describe("Column visibility and order configuration"),group_by:o.z.object({conditions:o.z.array(o.z.object({columnId:o.z.string().describe("ID of the column to group by"),config:o.z.object({sortSettings:o.z.object({direction:o.z.nativeEnum(Fr).describe("Sort direction (ASC or DESC)"),type:o.z.string().optional().describe("Type of sorting to apply")}).optional()}).optional()})).describe("Group-by conditions"),hideEmptyGroups:o.z.boolean().optional().describe("Whether to hide groups with no items")}).optional().describe("Group-by configuration for the table view")}).optional().describe("Table-specific view settings (column visibility/order, group-by)"),ul={viewId:o.z.string().describe("The ID of the table view to update"),boardId:o.z.string().describe("The board ID the view belongs to"),name:o.z.string().optional().describe("New name for the view (omit to leave unchanged)"),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration to apply to the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),tags:o.z.array(o.z.string()).optional().describe("Tags to apply to the view"),settings:ml};const hl=Vd`
710
+ `,ml=o.z.object({column_id:o.z.string().describe("The ID of the column"),visible:o.z.boolean().describe("Whether the column is visible")}),ul=o.z.object({columns:o.z.object({column_properties:o.z.array(ml).optional().describe("Visibility configuration for main board columns"),subitems_column_properties:o.z.array(ml).optional().describe("Visibility configuration for subitem columns"),floating_columns_count:o.z.number().int().optional().describe("Number of floating columns to display"),column_order:o.z.array(o.z.string()).optional().describe("Ordered list of column IDs")}).optional().describe("Column visibility and order configuration"),group_by:o.z.object({conditions:o.z.array(o.z.object({columnId:o.z.string().describe("ID of the column to group by"),config:o.z.object({sortSettings:o.z.object({direction:o.z.nativeEnum(Fr).describe("Sort direction (ASC or DESC)"),type:o.z.string().optional().describe("Type of sorting to apply")}).optional()}).optional()})).describe("Group-by conditions"),hideEmptyGroups:o.z.boolean().optional().describe("Whether to hide groups with no items")}).optional().describe("Group-by configuration for the table view")}).optional().describe("Table-specific view settings (column visibility/order, group-by)"),hl={viewId:o.z.string().describe("The ID of the table view to update"),boardId:o.z.string().describe("The board ID the view belongs to"),name:o.z.string().optional().describe("New name for the view (omit to leave unchanged)"),filter:o.z.object({rules:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to filter by"),compare_value:o.z.any().default([]).describe("The value(s) to compare against"),operator:o.z.nativeEnum(lr).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:o.z.nativeEnum(pr).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration to apply to the view"),sort:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID to sort by"),direction:o.z.nativeEnum(dr).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),tags:o.z.array(o.z.string()).optional().describe("Tags to apply to the view"),settings:ul};const fl=Vd`
711
711
  fragment QuestionBasic on FormQuestion {
712
712
  id
713
713
  type
@@ -717,7 +717,7 @@
717
717
  required
718
718
  page_block_id
719
719
  }
720
- `,fl=Vd`
720
+ `,_l=Vd`
721
721
  fragment QuestionOptions on FormQuestion {
722
722
  options {
723
723
  label
@@ -726,7 +726,7 @@
726
726
  active
727
727
  }
728
728
  }
729
- `,_l=Vd`
729
+ `,gl=Vd`
730
730
  fragment QuestionSettings on FormQuestion {
731
731
  settings {
732
732
  prefill {
@@ -752,17 +752,17 @@
752
752
  default_answer
753
753
  }
754
754
  }
755
- `,gl=Vd`
755
+ `,bl=Vd`
756
756
  fragment QuestionComplete on FormQuestion {
757
757
  ...QuestionBasic
758
758
  ...QuestionOptions
759
759
  ...QuestionSettings
760
760
  show_if_rules
761
761
  }
762
- ${hl}
763
762
  ${fl}
764
763
  ${_l}
765
- `,bl=Vd`
764
+ ${gl}
765
+ `,vl=Vd`
766
766
  fragment FormFeatures on FormFeatures {
767
767
  isInternal
768
768
  reCaptchaChallenge
@@ -818,7 +818,7 @@
818
818
  enabled
819
819
  }
820
820
  }
821
- `,vl=Vd`
821
+ `,yl=Vd`
822
822
  fragment FormAppearance on FormAppearance {
823
823
  hideBranding
824
824
  showProgressBar
@@ -846,18 +846,18 @@
846
846
  text
847
847
  }
848
848
  }
849
- `,yl=Vd`
849
+ `,Il=Vd`
850
850
  fragment FormAccessibility on FormAccessibility {
851
851
  language
852
852
  logoAltText
853
853
  }
854
- `,Il=Vd`
854
+ `,wl=Vd`
855
855
  fragment FormTag on FormTag {
856
856
  id
857
857
  name
858
858
  columnId
859
859
  }
860
- `,wl=Vd`
860
+ `,Tl=Vd`
861
861
  mutation createForm(
862
862
  $destination_workspace_id: ID!
863
863
  $destination_folder_id: ID
@@ -884,7 +884,7 @@
884
884
  token
885
885
  }
886
886
  }
887
- `,Tl=Vd`
887
+ `,El=Vd`
888
888
  query getForm($formToken: String!) {
889
889
  form(formToken: $formToken) {
890
890
  id
@@ -913,16 +913,16 @@
913
913
  }
914
914
  }
915
915
  }
916
- ${gl}
917
916
  ${bl}
918
917
  ${vl}
919
918
  ${yl}
920
919
  ${Il}
921
- `,El=Vd`
920
+ ${wl}
921
+ `,Al=Vd`
922
922
  mutation deleteFormQuestion($formToken: String!, $questionId: String!) {
923
923
  delete_question(formToken: $formToken, questionId: $questionId)
924
924
  }
925
- `,Al=Vd`
925
+ `,Sl=Vd`
926
926
  mutation createFormQuestion($formToken: String!, $question: CreateQuestionInput!) {
927
927
  create_form_question(formToken: $formToken, question: $question) {
928
928
  ...QuestionBasic
@@ -930,10 +930,10 @@
930
930
  ...QuestionSettings
931
931
  }
932
932
  }
933
- ${hl}
934
933
  ${fl}
935
934
  ${_l}
936
- `,Sl=Vd`
935
+ ${gl}
936
+ `,Nl=Vd`
937
937
  mutation updateFormQuestion($formToken: String!, $questionId: String!, $question: UpdateQuestionInput!) {
938
938
  update_form_question(formToken: $formToken, questionId: $questionId, question: $question) {
939
939
  ...QuestionBasic
@@ -941,9 +941,9 @@
941
941
  ...QuestionSettings
942
942
  }
943
943
  }
944
- ${hl}
945
944
  ${fl}
946
945
  ${_l}
946
+ ${gl}
947
947
  `;Vd`
948
948
  mutation updateForm($formToken: String!, $input: UpdateFormInput!) {
949
949
  update_form(formToken: $formToken, input: $input) {
@@ -968,42 +968,42 @@
968
968
  }
969
969
  }
970
970
  }
971
- ${bl}
972
971
  ${vl}
973
972
  ${yl}
974
- `;const Nl=Vd`
973
+ ${Il}
974
+ `;const Dl=Vd`
975
975
  mutation setFormPassword($formToken: String!, $input: SetFormPasswordInput!) {
976
976
  set_form_password(formToken: $formToken, input: $input) {
977
977
  id
978
978
  }
979
979
  }
980
- `,Dl=Vd`
980
+ `,Ol=Vd`
981
981
  mutation shortenFormUrl($formToken: String!) {
982
982
  shorten_form_url(formToken: $formToken) {
983
983
  enabled
984
984
  url
985
985
  }
986
986
  }
987
- `,Ol=Vd`
987
+ `,kl=Vd`
988
988
  mutation deactivateForm($formToken: String!) {
989
989
  deactivate_form(formToken: $formToken)
990
990
  }
991
- `,kl=Vd`
991
+ `,Cl=Vd`
992
992
  mutation activateForm($formToken: String!) {
993
993
  activate_form(formToken: $formToken)
994
994
  }
995
- `,Cl=Vd`
995
+ `,Rl=Vd`
996
996
  mutation deleteFormTag($formToken: String!, $tagId: String!) {
997
997
  delete_form_tag(formToken: $formToken, tagId: $tagId)
998
998
  }
999
- `,Rl=Vd`
999
+ `,$l=Vd`
1000
1000
  mutation createFormTag($formToken: String!, $tag: CreateFormTagInput!) {
1001
1001
  create_form_tag(formToken: $formToken, tag: $tag) {
1002
1002
  ...FormTag
1003
1003
  }
1004
1004
  }
1005
- ${Il}
1006
- `,$l=Vd`
1005
+ ${wl}
1006
+ `,Ll=Vd`
1007
1007
  mutation updateFormAppearance($formToken: String!, $appearance: FormAppearanceInput!) {
1008
1008
  update_form_settings(formToken: $formToken, settings: { appearance: $appearance }) {
1009
1009
  appearance {
@@ -1011,8 +1011,8 @@
1011
1011
  }
1012
1012
  }
1013
1013
  }
1014
- ${vl}
1015
- `,Ll=Vd`
1014
+ ${yl}
1015
+ `,xl=Vd`
1016
1016
  mutation updateFormAccessibility($formToken: String!, $accessibility: FormAccessibilityInput!) {
1017
1017
  update_form_settings(formToken: $formToken, settings: { accessibility: $accessibility }) {
1018
1018
  accessibility {
@@ -1020,8 +1020,8 @@
1020
1020
  }
1021
1021
  }
1022
1022
  }
1023
- ${yl}
1024
- `,xl=Vd`
1023
+ ${Il}
1024
+ `,Ul=Vd`
1025
1025
  mutation updateFormFeatures($formToken: String!, $features: FormFeaturesInput!, $is_anonymous: Boolean) {
1026
1026
  update_form_settings(formToken: $formToken, settings: { features: $features, is_anonymous: $is_anonymous }) {
1027
1027
  features {
@@ -1029,8 +1029,8 @@
1029
1029
  }
1030
1030
  }
1031
1031
  }
1032
- ${bl}
1033
- `,Ul=Vd`
1032
+ ${vl}
1033
+ `,Pl=Vd`
1034
1034
  mutation updateFormQuestionOrder($formToken: String!, $questions: [QuestionOrderInput!]!) {
1035
1035
  update_form(formToken: $formToken, input: { questions: $questions }) {
1036
1036
  questions {
@@ -1039,14 +1039,14 @@
1039
1039
  }
1040
1040
  }
1041
1041
  }
1042
- `,Pl=Vd`
1042
+ `,Fl=Vd`
1043
1043
  mutation updateFormHeader($formToken: String!, $title: String, $description: String) {
1044
1044
  update_form(formToken: $formToken, input: { title: $title, description: $description }) {
1045
1045
  title
1046
1046
  description
1047
1047
  }
1048
1048
  }
1049
- `,Fl={questionId:"Question ID. Required for update/delete."},Ml={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Hides submitter identity.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"Required for delete. Auto-generated.",name:"Required for create. Cannot be updated.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/delete. Delete: id only. Create: name (id/columnId auto-generated).",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},Vl={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."}},Bl={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."}},zl={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"}},jl={destination_workspace_id:o.z.string(),destination_folder_id:o.z.string().optional(),destination_folder_name:o.z.string().optional(),board_kind:o.z.nativeEnum(Kn).optional(),destination_name:o.z.string().optional().describe(Ml.args.destinationName),board_owner_ids:o.z.array(o.z.string()).optional(),board_owner_team_ids:o.z.array(o.z.string()).optional(),board_subscriber_ids:o.z.array(o.z.string()).optional().describe(Ml.args.boardSubscriberIds),board_subscriber_teams_ids:o.z.array(o.z.string()).optional().describe(Ml.args.boardSubscriberTeamsIds)};var ql,Gl,Hl,Wl,Yl,Kl,Ql,Jl,Xl,Zl,ec,tc,ac,ic,nc,oc;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(ql||(ql={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(Gl||(Gl={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(Hl||(Hl={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Wl||(Wl={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Yl||(Yl={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Kl||(Kl={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Ql||(Ql={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Jl||(Jl={})),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"}(Xl||(Xl={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Zl||(Zl={})),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"}(ec||(ec={})),(tc||(tc={})).Or="OR",function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(ac||(ac={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(ic||(ic={})),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"}(nc||(nc={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(oc||(oc={}));const rc=o.z.object({type:o.z.nativeEnum(ar).describe(Bl.properties.type),title:o.z.string().describe(Bl.properties.title).optional(),description:o.z.string().describe(Bl.properties.description).optional(),visible:o.z.boolean().optional(),required:o.z.boolean().optional(),insert_after_question_id:o.z.string().nullish().describe(Bl.properties.insertAfterQuestionId),page_block_id:o.z.string().nullish().describe(Bl.properties.pageBlockId),show_if_rules:o.z.object({operator:o.z.nativeEnum(To),rules:o.z.array(o.z.object({operator:o.z.nativeEnum(To),conditions:o.z.array(o.z.object({building_block_id:o.z.string().describe(Bl.showIfConditionBuildingBlockId),operator:o.z.nativeEnum(To),values:o.z.array(o.z.string()).describe(Bl.showIfConditionValues)}))}))}).describe(Bl.showIfRules).optional(),options:o.z.array(o.z.object({label:o.z.string(),value:o.z.string().optional().describe(Bl.properties.selectOptionsValue),visible:o.z.boolean().optional()})).describe(Bl.properties.selectOptions).optional(),settings:o.z.object({checkedByDefault:o.z.boolean().describe(zl.properties.checkedByDefault).optional(),defaultCurrentDate:o.z.boolean().describe(zl.properties.defaultCurrentDate).optional(),display:o.z.nativeEnum(er).describe(zl.properties.display).optional(),includeTime:o.z.boolean().describe(zl.properties.includeTime).optional(),locationAutofilled:o.z.boolean().describe(zl.properties.locationAutofilled).optional(),optionsOrder:o.z.nativeEnum(tr).describe(zl.properties.optionsOrder).optional(),prefixAutofilled:o.z.boolean().describe(zl.properties.prefixAutofilled).optional(),prefixPredefined:o.z.object({enabled:o.z.boolean(),prefix:o.z.string().describe(zl.properties.prefixPredefinedPrefix).optional()}).describe(zl.properties.prefixPredefined).optional(),skipValidation:o.z.boolean().describe(zl.properties.skipValidation).optional(),labelLimitCount:o.z.number().int().describe(zl.properties.labelLimitCount).optional(),label_limit_count_enabled:o.z.boolean().describe(zl.properties.labelLimitCountEnabled).optional(),default_answer:o.z.string().describe(zl.properties.defaultAnswer).optional(),prefill:o.z.object({enabled:o.z.boolean(),lookup:o.z.string().describe(zl.properties.prefillLookup).optional(),source:o.z.nativeEnum(Zo).optional()}).describe(zl.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),sc={action:o.z.nativeEnum(oc).describe(Bl.actions.type),formToken:o.z.string(),questionId:o.z.string().describe(Fl.questionId).optional(),question:rc.describe(Bl.actions.question).optional()};class dc{constructor(e){this.getMondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.getMondayApi().request(El,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.getMondayApi().request(Sl,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.getMondayApi().request(Al,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var pc;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(pc||(pc={}));const lc=o.z.object({id:o.z.string().describe(Ml.properties.tags.id).optional(),name:o.z.string().describe(Ml.properties.tags.name).optional(),columnId:o.z.string().describe(Ml.properties.tags.columnId).optional()}),cc=o.z.object({type:o.z.nativeEnum(Wl).optional(),value:o.z.string().describe(Vl.properties.backgroundValue).optional()}),mc=o.z.object({format:o.z.nativeEnum(Kl).optional(),alignment:o.z.nativeEnum(Ql).optional(),direction:o.z.nativeEnum(Yl).optional()}),uc=o.z.object({position:o.z.nativeEnum(Hl).optional(),size:o.z.nativeEnum(Gl).describe(Vl.properties.logoSize).optional()}),hc=o.z.object({text:o.z.string().optional()}),fc=o.z.object({font:o.z.string().optional(),color:o.z.string().optional(),size:o.z.nativeEnum(Jl).optional()}),_c=o.z.object({enabled:o.z.boolean().optional(),redirectUrl:o.z.string().optional()}),gc=o.z.object({allowEditSubmission:o.z.boolean().optional(),allowResubmit:o.z.boolean().optional(),allowViewSubmission:o.z.boolean().optional(),description:o.z.string().optional(),redirectAfterSubmission:_c.optional(),showSuccessImage:o.z.boolean().optional(),title:o.z.string().optional()}),bc=o.z.object({enabled:o.z.boolean().optional(),date:o.z.string().describe(Vl.properties.closeDateValue).optional()}),vc=o.z.object({enabled:o.z.boolean().optional()}),yc=o.z.object({itemGroupId:o.z.string().optional(),includeNameQuestion:o.z.boolean().describe(Vl.properties.includeNameQuestion).optional(),includeUpdateQuestion:o.z.boolean().describe(Vl.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:o.z.boolean().describe(Vl.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:o.z.boolean().describe(Vl.properties.allowCreateItem).optional()}),Ic=o.z.object({enabled:o.z.boolean().describe(Vl.properties.passwordEnabled).optional()}),wc=o.z.object({text:o.z.string().optional()}),Tc=o.z.object({enabled:o.z.boolean().optional(),title:o.z.string().optional(),description:o.z.string().optional(),startButton:wc.optional()}),Ec=o.z.object({enabled:o.z.boolean().optional(),redirectToLogin:o.z.boolean().optional()}),Ac=o.z.object({enabled:o.z.boolean().optional(),limit:o.z.number().optional()}),Sc=o.z.object({background:cc.optional(),hideBranding:o.z.boolean().optional(),layout:mc.optional(),logo:uc.optional(),primaryColor:o.z.string().optional(),showProgressBar:o.z.boolean().optional(),submitButton:hc.optional(),text:fc.optional()}),Nc=o.z.object({language:o.z.string().describe(Vl.properties.language).optional(),logoAltText:o.z.string().optional()}),Dc=o.z.object({enabled:o.z.boolean().optional()}),Oc=o.z.object({afterSubmissionView:gc.optional(),ai_translate:Dc.optional(),closeDate:bc.optional(),draftSubmission:vc.optional(),monday:yc.optional(),password:Ic.optional(),preSubmissionView:Tc.optional(),reCaptchaChallenge:o.z.boolean().optional(),requireLogin:Ec.optional(),responseLimit:Ac.optional(),is_anonymous:o.z.boolean().describe(Ml.properties.isAnonymous).optional()}),kc=o.z.object({id:o.z.string().describe(Ml.inputs.questionId),page_block_id:o.z.string().describe(Bl.properties.pageBlockId).optional()}),Cc=o.z.object({appearance:Sc.describe(Ml.inputs.form.appearance).optional(),accessibility:Nc.describe(Ml.inputs.form.accessibility).optional(),features:Oc.describe(Ml.inputs.form.features).optional(),title:o.z.string().describe(Ml.inputs.title).optional(),description:o.z.string().describe(Ml.inputs.description).optional(),questions:o.z.array(kc).describe(Ml.inputs.questions).optional()}),Rc={formToken:o.z.string(),action:o.z.nativeEnum(pc).describe(Ml.operations.updateForm.action),formPassword:o.z.string().describe(Vl.operations.setFormPassword).optional(),tag:lc.describe(Ml.inputs.tag).optional(),form:Cc.describe(Ml.inputs.form.describe).optional()};class $c{constructor(e){this.getMondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.getMondayApi().request(Nl,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Dl,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Ol,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(kl,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const t={formToken:e.formToken,tag:{name:e.tag.name}},a=await this.getMondayApi().request(Rl,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id};return await this.getMondayApi().request(Cl,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.getMondayApi().request($l,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.getMondayApi().request(Ll,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},n=await this.getMondayApi().request(xl,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:n.update_form_settings?.features}}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const t={formToken:e.formToken,questions:e.form.questions},a=await this.getMondayApi().request(Ul,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.getMondayApi().request(Pl,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const Lc={formToken:o.z.string()};const xc=Vd`
1049
+ `,Ml={questionId:"Question ID. Required for update/delete."},Vl={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Hides submitter identity.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"Required for delete. Auto-generated.",name:"Required for create. Cannot be updated.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/delete. Delete: id only. Create: name (id/columnId auto-generated).",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},Bl={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."}},zl={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."}},jl={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"}},ql={destination_workspace_id:o.z.string(),destination_folder_id:o.z.string().optional(),destination_folder_name:o.z.string().optional(),board_kind:o.z.nativeEnum(Kn).optional(),destination_name:o.z.string().optional().describe(Vl.args.destinationName),board_owner_ids:o.z.array(o.z.string()).optional(),board_owner_team_ids:o.z.array(o.z.string()).optional(),board_subscriber_ids:o.z.array(o.z.string()).optional().describe(Vl.args.boardSubscriberIds),board_subscriber_teams_ids:o.z.array(o.z.string()).optional().describe(Vl.args.boardSubscriberTeamsIds)};var Gl,Hl,Wl,Yl,Kl,Ql,Jl,Xl,Zl,ec,tc,ac,ic,nc,oc,rc;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(Gl||(Gl={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(Hl||(Hl={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(Wl||(Wl={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(Yl||(Yl={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Kl||(Kl={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Ql||(Ql={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Jl||(Jl={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Xl||(Xl={})),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"}(Zl||(Zl={})),function(e){e.Account="account",e.QueryParam="queryParam"}(ec||(ec={})),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"}(tc||(tc={})),(ac||(ac={})).Or="OR",function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(ic||(ic={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(nc||(nc={})),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"}(oc||(oc={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(rc||(rc={}));const sc=o.z.object({type:o.z.nativeEnum(ar).describe(zl.properties.type),title:o.z.string().describe(zl.properties.title).optional(),description:o.z.string().describe(zl.properties.description).optional(),visible:o.z.boolean().optional(),required:o.z.boolean().optional(),insert_after_question_id:o.z.string().nullish().describe(zl.properties.insertAfterQuestionId),page_block_id:o.z.string().nullish().describe(zl.properties.pageBlockId),show_if_rules:o.z.object({operator:o.z.nativeEnum(To),rules:o.z.array(o.z.object({operator:o.z.nativeEnum(To),conditions:o.z.array(o.z.object({building_block_id:o.z.string().describe(zl.showIfConditionBuildingBlockId),operator:o.z.nativeEnum(To),values:o.z.array(o.z.string()).describe(zl.showIfConditionValues)}))}))}).describe(zl.showIfRules).optional(),options:o.z.array(o.z.object({label:o.z.string(),value:o.z.string().optional().describe(zl.properties.selectOptionsValue),visible:o.z.boolean().optional()})).describe(zl.properties.selectOptions).optional(),settings:o.z.object({checkedByDefault:o.z.boolean().describe(jl.properties.checkedByDefault).optional(),defaultCurrentDate:o.z.boolean().describe(jl.properties.defaultCurrentDate).optional(),display:o.z.nativeEnum(er).describe(jl.properties.display).optional(),includeTime:o.z.boolean().describe(jl.properties.includeTime).optional(),locationAutofilled:o.z.boolean().describe(jl.properties.locationAutofilled).optional(),optionsOrder:o.z.nativeEnum(tr).describe(jl.properties.optionsOrder).optional(),prefixAutofilled:o.z.boolean().describe(jl.properties.prefixAutofilled).optional(),prefixPredefined:o.z.object({enabled:o.z.boolean(),prefix:o.z.string().describe(jl.properties.prefixPredefinedPrefix).optional()}).describe(jl.properties.prefixPredefined).optional(),skipValidation:o.z.boolean().describe(jl.properties.skipValidation).optional(),labelLimitCount:o.z.number().int().describe(jl.properties.labelLimitCount).optional(),label_limit_count_enabled:o.z.boolean().describe(jl.properties.labelLimitCountEnabled).optional(),default_answer:o.z.string().describe(jl.properties.defaultAnswer).optional(),prefill:o.z.object({enabled:o.z.boolean(),lookup:o.z.string().describe(jl.properties.prefillLookup).optional(),source:o.z.nativeEnum(Zo).optional()}).describe(jl.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),dc={action:o.z.nativeEnum(rc).describe(zl.actions.type),formToken:o.z.string(),questionId:o.z.string().describe(Ml.questionId).optional(),question:sc.describe(zl.actions.question).optional()};class pc{constructor(e){this.getMondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.getMondayApi().request(Al,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.getMondayApi().request(Nl,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.getMondayApi().request(Sl,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var lc;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(lc||(lc={}));const cc=o.z.object({id:o.z.string().describe(Vl.properties.tags.id).optional(),name:o.z.string().describe(Vl.properties.tags.name).optional(),columnId:o.z.string().describe(Vl.properties.tags.columnId).optional()}),mc=o.z.object({type:o.z.nativeEnum(Yl).optional(),value:o.z.string().describe(Bl.properties.backgroundValue).optional()}),uc=o.z.object({format:o.z.nativeEnum(Ql).optional(),alignment:o.z.nativeEnum(Jl).optional(),direction:o.z.nativeEnum(Kl).optional()}),hc=o.z.object({position:o.z.nativeEnum(Wl).optional(),size:o.z.nativeEnum(Hl).describe(Bl.properties.logoSize).optional()}),fc=o.z.object({text:o.z.string().optional()}),_c=o.z.object({font:o.z.string().optional(),color:o.z.string().optional(),size:o.z.nativeEnum(Xl).optional()}),gc=o.z.object({enabled:o.z.boolean().optional(),redirectUrl:o.z.string().optional()}),bc=o.z.object({allowEditSubmission:o.z.boolean().optional(),allowResubmit:o.z.boolean().optional(),allowViewSubmission:o.z.boolean().optional(),description:o.z.string().optional(),redirectAfterSubmission:gc.optional(),showSuccessImage:o.z.boolean().optional(),title:o.z.string().optional()}),vc=o.z.object({enabled:o.z.boolean().optional(),date:o.z.string().describe(Bl.properties.closeDateValue).optional()}),yc=o.z.object({enabled:o.z.boolean().optional()}),Ic=o.z.object({itemGroupId:o.z.string().optional(),includeNameQuestion:o.z.boolean().describe(Bl.properties.includeNameQuestion).optional(),includeUpdateQuestion:o.z.boolean().describe(Bl.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:o.z.boolean().describe(Bl.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:o.z.boolean().describe(Bl.properties.allowCreateItem).optional()}),wc=o.z.object({enabled:o.z.boolean().describe(Bl.properties.passwordEnabled).optional()}),Tc=o.z.object({text:o.z.string().optional()}),Ec=o.z.object({enabled:o.z.boolean().optional(),title:o.z.string().optional(),description:o.z.string().optional(),startButton:Tc.optional()}),Ac=o.z.object({enabled:o.z.boolean().optional(),redirectToLogin:o.z.boolean().optional()}),Sc=o.z.object({enabled:o.z.boolean().optional(),limit:o.z.number().optional()}),Nc=o.z.object({background:mc.optional(),hideBranding:o.z.boolean().optional(),layout:uc.optional(),logo:hc.optional(),primaryColor:o.z.string().optional(),showProgressBar:o.z.boolean().optional(),submitButton:fc.optional(),text:_c.optional()}),Dc=o.z.object({language:o.z.string().describe(Bl.properties.language).optional(),logoAltText:o.z.string().optional()}),Oc=o.z.object({enabled:o.z.boolean().optional()}),kc=o.z.object({afterSubmissionView:bc.optional(),ai_translate:Oc.optional(),closeDate:vc.optional(),draftSubmission:yc.optional(),monday:Ic.optional(),password:wc.optional(),preSubmissionView:Ec.optional(),reCaptchaChallenge:o.z.boolean().optional(),requireLogin:Ac.optional(),responseLimit:Sc.optional(),is_anonymous:o.z.boolean().describe(Vl.properties.isAnonymous).optional()}),Cc=o.z.object({id:o.z.string().describe(Vl.inputs.questionId),page_block_id:o.z.string().describe(zl.properties.pageBlockId).optional()}),Rc=o.z.object({appearance:Nc.describe(Vl.inputs.form.appearance).optional(),accessibility:Dc.describe(Vl.inputs.form.accessibility).optional(),features:kc.describe(Vl.inputs.form.features).optional(),title:o.z.string().describe(Vl.inputs.title).optional(),description:o.z.string().describe(Vl.inputs.description).optional(),questions:o.z.array(Cc).describe(Vl.inputs.questions).optional()}),$c={formToken:o.z.string(),action:o.z.nativeEnum(lc).describe(Vl.operations.updateForm.action),formPassword:o.z.string().describe(Bl.operations.setFormPassword).optional(),tag:cc.describe(Vl.inputs.tag).optional(),form:Rc.describe(Vl.inputs.form.describe).optional()};class Lc{constructor(e){this.getMondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.getMondayApi().request(Dl,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Ol,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(kl,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.getMondayApi().request(Cl,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const t={formToken:e.formToken,tag:{name:e.tag.name}},a=await this.getMondayApi().request($l,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id};return await this.getMondayApi().request(Rl,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.getMondayApi().request(Ll,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.getMondayApi().request(xl,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},n=await this.getMondayApi().request(Ul,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:n.update_form_settings?.features}}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const t={formToken:e.formToken,questions:e.form.questions},a=await this.getMondayApi().request(Pl,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.getMondayApi().request(Fl,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const xc={formToken:o.z.string()};const Uc=Vd`
1050
1050
  mutation CreateFormSubmission(
1051
1051
  $form_token: String!
1052
1052
  $answers: [FormAnswerInput!]!
@@ -1064,13 +1064,13 @@
1064
1064
  id
1065
1065
  }
1066
1066
  }
1067
- `,Uc=o.z.object({phone:o.z.string().describe("The phone number."),country_short_name:o.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Pc=o.z.object({country_name:o.z.string().describe('The full country name (e.g. "United States").'),country_code:o.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Fc=o.z.object({date:o.z.string().describe("The date in YYYY-MM-DD format."),zone_diff:o.z.number().int().optional().describe("UTC offset in minutes.")}),Mc=o.z.object({from:o.z.string().describe("Start date in YYYY-MM-DD format."),to:o.z.string().describe("End date in YYYY-MM-DD format.")}),Vc=o.z.object({lat:o.z.number().describe("Latitude."),lng:o.z.number().describe("Longitude."),place_id:o.z.string().describe("Google Maps place ID."),address:o.z.string().describe("Full formatted address."),country:o.z.object({long_name:o.z.string().describe("Full country name."),short_name:o.z.string().describe("ISO 3166-1 alpha-2 country code.")}),city:o.z.object({long_name:o.z.string().describe("Full city name."),short_name:o.z.string().describe("Abbreviated city name.")}),street:o.z.object({long_name:o.z.string().describe("Full street name."),short_name:o.z.string().describe("Abbreviated street name.")}),street_number:o.z.object({long_name:o.z.string().describe("Full street number."),short_name:o.z.string().describe("Abbreviated street number.")})}),Bc=o.z.object({id:o.z.string().describe("The file ID returned by the workforms upload endpoint."),name:o.z.string().describe('Original file name (e.g. "image.png").'),extension:o.z.string().optional().describe('File extension (e.g. "pdf", "png").'),is_image:o.z.boolean().optional().describe("Whether the file is an image.")}),zc=o.z.object({question_id:o.z.string().describe("The ID of the question being answered."),name:o.z.string().optional().describe("Answer for name questions."),email:o.z.string().optional().describe("Answer for email questions."),short_text:o.z.string().optional().describe("Answer for short text questions."),long_text:o.z.string().optional().describe("Answer for long text questions."),link:o.z.string().optional().describe("Answer for link questions."),updates:o.z.string().optional().describe("Answer for updates questions."),boolean:o.z.boolean().optional().describe("Answer for boolean questions."),number:o.z.number().optional().describe("Answer for number questions."),rating:o.z.number().min(1).optional().describe("Answer for rating questions. Must be a positive number within the question's configured limit."),single_select:o.z.string().optional().describe("Answer for single-select questions — the selected option ID."),multi_select:o.z.array(o.z.number()).optional().describe("Answer for multi-select questions — list of selected option IDs."),people:o.z.array(o.z.string()).optional().describe("Answer for people questions — list of user IDs. Obtain user IDs via the list_users_and_teams tool."),connected_boards:o.z.array(o.z.string()).optional().describe("Answer for connected boards questions — list of connected item IDs."),phone:Uc.optional().describe("Answer for phone questions."),country:Pc.optional().describe("Answer for country questions."),date:Fc.optional().describe("Answer for date questions."),date_range:Mc.optional().describe("Answer for date range questions."),location:Vc.optional().describe("Answer for location questions. Requires a Google Maps place ID and structured address components."),file:o.z.array(Bc).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:Bc.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."),jc={form_token:o.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:o.z.array(zc).describe("Array of answers to submit. Each answer specifies a question_id and the value for that question type."),form_timezone_offset:o.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:o.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:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID this tag maps to."),value:o.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 qc=Object.fromEntries(Object.entries(wo).filter((([e])=>"Person"!==e))),Gc={columnType:o.z.nativeEnum(qc).describe("The type of the column to be created"),columnTitle:o.z.string().describe("The title of the column to be created"),columnDescription:o.z.string().optional().describe("The description of the column to be created"),columnSettings:o.z.string().optional().describe(`Column-specific configuration settings as a JSON string. Use get_column_type_info with fetchMode "${qp.Schema}" for the JSON schema for the given column type.`)},Hc={boardId:o.z.number().describe("The id of the board to which the new column will be added"),...Gc};const Wc={columnId:o.z.string().describe("The id of the column to update"),columnType:o.z.nativeEnum(qc).describe("The type of the column being updated. Must match the existing column type."),revision:o.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:o.z.string().optional().describe("The new title of the column. If omitted, the title is unchanged."),columnDescription:o.z.string().optional().describe("The new description of the column. If omitted, the description is unchanged."),columnSettings:o.z.string().optional().describe(`Type-specific configuration as a JSON string. Use get_column_type_info with fetchMode "${qp.Schema}" for the JSON schema for the given column type. If omitted, settings are unchanged.`)},Yc={boardId:o.z.number().describe("The id of the board containing the column"),...Wc};const Kc={color:o.z.nativeEnum(Eo).describe("The color of the custom activity"),icon_id:o.z.nativeEnum(Ao).describe("The icon ID of the custom activity"),name:o.z.string().describe("The name of the custom activity")};const Qc=Vd`
1067
+ `,Pc=o.z.object({phone:o.z.string().describe("The phone number."),country_short_name:o.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Fc=o.z.object({country_name:o.z.string().describe('The full country name (e.g. "United States").'),country_code:o.z.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),Mc=o.z.object({date:o.z.string().describe("The date in YYYY-MM-DD format."),zone_diff:o.z.number().int().optional().describe("UTC offset in minutes.")}),Vc=o.z.object({from:o.z.string().describe("Start date in YYYY-MM-DD format."),to:o.z.string().describe("End date in YYYY-MM-DD format.")}),Bc=o.z.object({lat:o.z.number().describe("Latitude."),lng:o.z.number().describe("Longitude."),place_id:o.z.string().describe("Google Maps place ID."),address:o.z.string().describe("Full formatted address."),country:o.z.object({long_name:o.z.string().describe("Full country name."),short_name:o.z.string().describe("ISO 3166-1 alpha-2 country code.")}),city:o.z.object({long_name:o.z.string().describe("Full city name."),short_name:o.z.string().describe("Abbreviated city name.")}),street:o.z.object({long_name:o.z.string().describe("Full street name."),short_name:o.z.string().describe("Abbreviated street name.")}),street_number:o.z.object({long_name:o.z.string().describe("Full street number."),short_name:o.z.string().describe("Abbreviated street number.")})}),zc=o.z.object({id:o.z.string().describe("The file ID returned by the workforms upload endpoint."),name:o.z.string().describe('Original file name (e.g. "image.png").'),extension:o.z.string().optional().describe('File extension (e.g. "pdf", "png").'),is_image:o.z.boolean().optional().describe("Whether the file is an image.")}),jc=o.z.object({question_id:o.z.string().describe("The ID of the question being answered."),name:o.z.string().optional().describe("Answer for name questions."),email:o.z.string().optional().describe("Answer for email questions."),short_text:o.z.string().optional().describe("Answer for short text questions."),long_text:o.z.string().optional().describe("Answer for long text questions."),link:o.z.string().optional().describe("Answer for link questions."),updates:o.z.string().optional().describe("Answer for updates questions."),boolean:o.z.boolean().optional().describe("Answer for boolean questions."),number:o.z.number().optional().describe("Answer for number questions."),rating:o.z.number().min(1).optional().describe("Answer for rating questions. Must be a positive number within the question's configured limit."),single_select:o.z.string().optional().describe("Answer for single-select questions — the selected option ID."),multi_select:o.z.array(o.z.number()).optional().describe("Answer for multi-select questions — list of selected option IDs."),people:o.z.array(o.z.string()).optional().describe("Answer for people questions — list of user IDs. Obtain user IDs via the list_users_and_teams tool."),connected_boards:o.z.array(o.z.string()).optional().describe("Answer for connected boards questions — list of connected item IDs."),phone:Pc.optional().describe("Answer for phone questions."),country:Fc.optional().describe("Answer for country questions."),date:Mc.optional().describe("Answer for date questions."),date_range:Vc.optional().describe("Answer for date range questions."),location:Bc.optional().describe("Answer for location questions. Requires a Google Maps place ID and structured address components."),file:o.z.array(zc).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:zc.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."),qc={form_token:o.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:o.z.array(jc).describe("Array of answers to submit. Each answer specifies a question_id and the value for that question type."),form_timezone_offset:o.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:o.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:o.z.array(o.z.object({column_id:o.z.string().describe("The column ID this tag maps to."),value:o.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 Gc=Object.fromEntries(Object.entries(wo).filter((([e])=>"Person"!==e))),Hc={columnType:o.z.nativeEnum(Gc).describe("The type of the column to be created"),columnTitle:o.z.string().describe("The title of the column to be created"),columnDescription:o.z.string().optional().describe("The description of the column to be created"),columnSettings:o.z.string().optional().describe(`Column-specific configuration settings as a JSON string. Use get_column_type_info with fetchMode "${Gp.Schema}" for the JSON schema for the given column type.`)},Wc={boardId:o.z.number().describe("The id of the board to which the new column will be added"),...Hc};const Yc={columnId:o.z.string().describe("The id of the column to update"),columnType:o.z.nativeEnum(Gc).describe("The type of the column being updated. Must match the existing column type."),revision:o.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:o.z.string().optional().describe("The new title of the column. If omitted, the title is unchanged."),columnDescription:o.z.string().optional().describe("The new description of the column. If omitted, the description is unchanged."),columnSettings:o.z.string().optional().describe(`Type-specific configuration as a JSON string. Use get_column_type_info with fetchMode "${Gp.Schema}" for the JSON schema for the given column type. If omitted, settings are unchanged.`)},Kc={boardId:o.z.number().describe("The id of the board containing the column"),...Yc};const Qc={color:o.z.nativeEnum(Eo).describe("The color of the custom activity"),icon_id:o.z.nativeEnum(Ao).describe("The icon ID of the custom activity"),name:o.z.string().describe("The name of the custom activity")};const Jc=Vd`
1068
1068
  mutation createNotification($user_id: ID!, $target_id: ID!, $text: String!, $target_type: NotificationTargetType!) {
1069
1069
  create_notification(user_id: $user_id, target_id: $target_id, text: $text, target_type: $target_type) {
1070
1070
  text
1071
1071
  }
1072
1072
  }
1073
- `,Jc={user_id:o.z.string().describe("The user ID to send the notification to"),target_id:o.z.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:o.z.string().describe("The notification text"),target_type:o.z.nativeEnum(yr).describe("The target type (Post for update/reply, Project for item/board)")};const Xc=Vd`
1073
+ `,Xc={user_id:o.z.string().describe("The user ID to send the notification to"),target_id:o.z.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:o.z.string().describe("The notification text"),target_type:o.z.nativeEnum(yr).describe("The target type (Post for update/reply, Project for item/board)")};const Zc=Vd`
1074
1074
  mutation createGroup(
1075
1075
  $boardId: ID!
1076
1076
  $groupName: String!
@@ -1089,7 +1089,7 @@
1089
1089
  title
1090
1090
  }
1091
1091
  }
1092
- `,Zc=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],em={boardId:o.z.string().describe("The ID of the board to create the group in"),groupName:o.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:o.z.enum(Zc).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${Zc.join(", ")}`),relativeTo:o.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:o.z.nativeEnum(Nr).optional().describe("Whether to position the new group before or after the relativeTo group")};const tm=Vd`
1092
+ `,em=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],tm={boardId:o.z.string().describe("The ID of the board to create the group in"),groupName:o.z.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:o.z.enum(em).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${em.join(", ")}`),relativeTo:o.z.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:o.z.nativeEnum(Nr).optional().describe("Whether to position the new group before or after the relativeTo group")};const am=Vd`
1093
1093
  mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
1094
1094
  duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
1095
1095
  id
@@ -1097,7 +1097,7 @@
1097
1097
  url
1098
1098
  }
1099
1099
  }
1100
- `,am=Vd`
1100
+ `,im=Vd`
1101
1101
  mutation createSubitem(
1102
1102
  $parentItemId: ID!
1103
1103
  $itemName: String!
@@ -1118,7 +1118,7 @@
1118
1118
  }
1119
1119
  }
1120
1120
  }
1121
- `,im={name:o.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").describe("The name of the new item to be created, must be relevant to the user's request. 1–255 characters."),groupId:o.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:o.z.string().describe('A JSON string of column values, keyed by column id. Status and dropdown columns must use { "label": "..." } (or { "labels": ["...", "..."] } for multi-select dropdown). Date columns use { "date": "YYYY-MM-DD" }. Text/number/email/phone use plain strings. Example: "{\\"text_col\\":\\"hello\\", \\"status_col\\":{\\"label\\":\\"Done\\"}, \\"date_col\\":{\\"date\\":\\"2023-05-25\\"}, \\"dropdown_col\\":{\\"labels\\":[\\"A\\",\\"B\\"]}, \\"phone_col\\":\\"123-456-7890\\", \\"email_col\\":\\"test@example.com\\"}". If you don\'t know the exact label values or column ids, call get_board_info first.'),createLabelsIfMissing:o.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure. Use when the caller specifies label names that may not yet exist on the board."),parentItemId:o.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:o.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},nm={boardId:o.z.number().describe("The id of the board to which the new item will be added"),...im};class om extends he{constructor(){super(...arguments),this.name="create_item",this.type=g.WRITE,this.annotations=ue({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"[IMPORTANT] If you need to create multiple items in one call, use create_items instead of calling this tool in a loop. Otherwise: create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?im:nm}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new mp("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.","INVALID_ARGUMENTS_COMBINATION");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(tm,a);if(!i.duplicate_item?.id)throw new mp("Failed to duplicate item: no item duplicated","EMPTY_API_RESPONSE");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new mp("Invalid JSON in columnValues","INVALID_COLUMN_VALUES_JSON")}const o={...n,name:e.name},r=new Sp(this.mondayApi,{boardId:t});return await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o),createLabelsIfMissing:e.createLabelsIfMissing}),{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){up(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing};try{const a=await this.mondayApi.request(am,t);if(!a.create_subitem?.id)throw new mp("Failed to create subitem: no subitem created","EMPTY_API_RESPONSE");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){up(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing},i=await this.mondayApi.request(Hd,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){up(e,"create item")}}}const rm={items:o.z.array(o.z.object({name:o.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").describe("The name of the item to be created. 1-255 characters."),columnValues:o.z.string().describe('A JSON string of column values for this item, keyed by column id. Same shape as create_item.columnValues (status/dropdown use { "label": "..." } or { "labels": [...] }, date uses { "date": "YYYY-MM-DD" }, text/number/email/phone are plain strings). Example: "{\\"status_col\\":{\\"label\\":\\"Done\\"}}". Pass "{}" if no column values should be set. If unfamiliar with the board columns/labels, call get_board_info first.'),groupId:o.z.string().optional().describe("The id of the group to add this item to. Ignored when parentItemId is set (subitems inherit their parent group). If neither is set, the board default group is used."),parentItemId:o.z.number().optional().describe("If provided, this item is created as a subitem of this parent (uses create_subitem mutation) and groupId is ignored. Mutually exclusive with duplicateFromItemId."),duplicateFromItemId:o.z.number().optional().describe("The id of an existing item to duplicate and then patch with this item name and columnValues. Use for bulk templating (e.g., duplicate a template item N times with different overrides). Mutually exclusive with parentItemId."),createLabelsIfMissing:o.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in this item's columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure.")})).min(1,"items must not be empty").max(20,"items must not exceed 20 per call").describe("The items to create, up to 20 per call. Each item returns its own item_id and item_url on success, or a raw error message on failure. Each item independently chooses its groupId, parentItemId, and createLabelsIfMissing.")},sm={boardId:o.z.number().describe("The id of the board to which the new items will be added"),...rm};function dm(e,t){const a=e?.response?.errors?.[0],i=e instanceof Error?e.message:String(e);return{...a?.extensions??{},message:a?.message??i,path:["results",t]}}const pm={item_id:o.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:o.z.string().describe("The ID of the custom activity for the timeline item"),title:o.z.string().describe("The title of the new timeline item"),summary:o.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:o.z.string().optional().describe("The content of the new timeline item"),timestamp:o.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:o.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:o.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:o.z.string().optional().describe("The location to add to the new timeline item"),phone:o.z.string().optional().describe("The phone number to add to the new timeline item"),url:o.z.string().optional().describe("The URL to add to the new timeline item")};const lm=Vd`
1121
+ `,nm={name:o.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").describe("The name of the new item to be created, must be relevant to the user's request. 1–255 characters."),groupId:o.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:o.z.string().describe('A JSON string of column values, keyed by column id. Status and dropdown columns must use { "label": "..." } (or { "labels": ["...", "..."] } for multi-select dropdown). Date columns use { "date": "YYYY-MM-DD" }. Text/number/email/phone use plain strings. Example: "{\\"text_col\\":\\"hello\\", \\"status_col\\":{\\"label\\":\\"Done\\"}, \\"date_col\\":{\\"date\\":\\"2023-05-25\\"}, \\"dropdown_col\\":{\\"labels\\":[\\"A\\",\\"B\\"]}, \\"phone_col\\":\\"123-456-7890\\", \\"email_col\\":\\"test@example.com\\"}". If you don\'t know the exact label values or column ids, call get_board_info first.'),createLabelsIfMissing:o.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure. Use when the caller specifies label names that may not yet exist on the board."),parentItemId:o.z.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:o.z.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},om={boardId:o.z.number().describe("The id of the board to which the new item will be added"),...nm};class rm extends he{constructor(){super(...arguments),this.name="create_item",this.type=g.WRITE,this.annotations=ue({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"[IMPORTANT] If you need to create multiple items in one call, use create_items instead of calling this tool in a loop. Otherwise: create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?nm:om}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new up("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.","INVALID_ARGUMENTS_COMBINATION");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(am,a);if(!i.duplicate_item?.id)throw new up("Failed to duplicate item: no item duplicated","EMPTY_API_RESPONSE");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new up("Invalid JSON in columnValues","INVALID_COLUMN_VALUES_JSON")}const o={...n,name:e.name},r=new Np(this.mondayApi,{boardId:t});return await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o),createLabelsIfMissing:e.createLabelsIfMissing}),{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){hp(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing};try{const a=await this.mondayApi.request(im,t);if(!a.create_subitem?.id)throw new up("Failed to create subitem: no subitem created","EMPTY_API_RESPONSE");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){hp(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing},i=await this.mondayApi.request(Hd,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){hp(e,"create item")}}}const sm={items:o.z.array(o.z.object({name:o.z.string().min(1,"Item name cannot be empty").max(255,"Item name must be 255 characters or fewer").describe("The name of the item to be created. 1-255 characters."),columnValues:o.z.string().describe('A JSON string of column values for this item, keyed by column id. Same shape as create_item.columnValues (status/dropdown use { "label": "..." } or { "labels": [...] }, date uses { "date": "YYYY-MM-DD" }, text/number/email/phone are plain strings). Example: "{\\"status_col\\":{\\"label\\":\\"Done\\"}}". Pass "{}" if no column values should be set. If unfamiliar with the board columns/labels, call get_board_info first.'),groupId:o.z.string().optional().describe("The id of the group to add this item to. Ignored when parentItemId is set (subitems inherit their parent group). If neither is set, the board default group is used."),parentItemId:o.z.number().optional().describe("If provided, this item is created as a subitem of this parent (uses create_subitem mutation) and groupId is ignored. Mutually exclusive with duplicateFromItemId."),duplicateFromItemId:o.z.number().optional().describe("The id of an existing item to duplicate and then patch with this item name and columnValues. Use for bulk templating (e.g., duplicate a template item N times with different overrides). Mutually exclusive with parentItemId."),createLabelsIfMissing:o.z.boolean().optional().describe("When true, missing status/dropdown labels referenced in this item's columnValues will be auto-created on the board instead of erroring with ColumnValueException. Requires permission to change board structure.")})).min(1,"items must not be empty").max(20,"items must not exceed 20 per call").describe("The items to create, up to 20 per call. Each item returns its own item_id and item_url on success, or a raw error message on failure. Each item independently chooses its groupId, parentItemId, and createLabelsIfMissing.")},dm={boardId:o.z.number().describe("The id of the board to which the new items will be added"),...sm};function pm(e,t){const a=e?.response?.errors?.[0],i=e instanceof Error?e.message:String(e);return{...a?.extensions??{},message:a?.message??i,path:["results",t]}}const lm={item_id:o.z.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:o.z.string().describe("The ID of the custom activity for the timeline item"),title:o.z.string().describe("The title of the new timeline item"),summary:o.z.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:o.z.string().optional().describe("The content of the new timeline item"),timestamp:o.z.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:o.z.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:o.z.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:o.z.string().optional().describe("The location to add to the new timeline item"),phone:o.z.string().optional().describe("The phone number to add to the new timeline item"),url:o.z.string().optional().describe("The URL to add to the new timeline item")};const cm=Vd`
1122
1122
  mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention], $parentId: ID) {
1123
1123
  create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList, parent_id: $parentId) {
1124
1124
  id
@@ -1129,13 +1129,13 @@
1129
1129
  }
1130
1130
  }
1131
1131
  }
1132
- `,cm=o.z.object({id:o.z.string().describe("The ID of the entity to mention"),type:o.z.nativeEnum(br).describe("The type of mention: User, Team, Board, or Project")}),mm=o.z.array(cm),um={itemId:o.z.number().describe("The id of the item to which the update will be added"),body:o.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:o.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:o.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 hm=Vd`
1132
+ `,mm=o.z.object({id:o.z.string().describe("The ID of the entity to mention"),type:o.z.nativeEnum(br).describe("The type of mention: User, Team, Board, or Project")}),um=o.z.array(mm),hm={itemId:o.z.number().describe("The id of the item to which the update will be added"),body:o.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:o.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:o.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 fm=Vd`
1133
1133
  mutation DeleteUpdate($id: ID!) {
1134
1134
  delete_update(id: $id) {
1135
1135
  id
1136
1136
  }
1137
1137
  }
1138
- `,fm={id:o.z.number().describe("The unique identifier of the update to delete")};const _m=Vd`
1138
+ `,_m={id:o.z.number().describe("The unique identifier of the update to delete")};const gm=Vd`
1139
1139
  query GetItemUpdates($itemId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
1140
1140
  items(ids: [$itemId]) {
1141
1141
  id
@@ -1171,7 +1171,7 @@
1171
1171
  }
1172
1172
  }
1173
1173
  }
1174
- `,gm=Vd`
1174
+ `,bm=Vd`
1175
1175
  query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!, $fromDate: ISO8601DateTime, $toDate: ISO8601DateTime, $boardUpdatesOnly: Boolean) {
1176
1176
  boards(ids: [$boardId]) {
1177
1177
  id
@@ -1207,7 +1207,7 @@
1207
1207
  }
1208
1208
  }
1209
1209
  }
1210
- `;var bm;!function(e){e.Item="Item",e.Board="Board"}(bm||(bm={}));const vm={objectId:o.z.string().describe("The ID of the item or board to get updates from"),objectType:o.z.enum([bm.Item,bm.Board]).describe("Type of object for which objectId was provided"),limit:o.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:o.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:o.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:o.z.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:o.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:o.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:o.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 ym(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const Im={columnId:o.z.string().describe("The id of the column to be deleted")},wm={boardId:o.z.number().describe("The id of the board to which the new column will be added"),...Im};const Tm={itemId:o.z.number()};const Em={};const Am=Vd`
1210
+ `;var vm;!function(e){e.Item="Item",e.Board="Board"}(vm||(vm={}));const ym={objectId:o.z.string().describe("The ID of the item or board to get updates from"),objectType:o.z.enum([vm.Item,vm.Board]).describe("Type of object for which objectId was provided"),limit:o.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:o.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:o.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:o.z.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:o.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:o.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:o.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 Im(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const wm={columnId:o.z.string().describe("The id of the column to be deleted")},Tm={boardId:o.z.number().describe("The id of the board to which the new column will be added"),...wm};const Em={itemId:o.z.number()};const Am={};const Sm=Vd`
1211
1211
  query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
1212
1212
  boards(ids: [$boardId]) {
1213
1213
  id
@@ -1250,7 +1250,7 @@
1250
1250
  }
1251
1251
  }
1252
1252
  }
1253
- `,Sm=Vd`
1253
+ `,Nm=Vd`
1254
1254
  query getUsersByIds($userIds: [ID!]!) {
1255
1255
  users(ids: $userIds) {
1256
1256
  id
@@ -1260,7 +1260,7 @@
1260
1260
  }
1261
1261
  }
1262
1262
  }
1263
- `,Nm=o.z.array(o.z.object({columnId:o.z.string().describe("The id of the column to filter by"),compareAttribute:o.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:o.z.union([o.z.string(),o.z.number(),o.z.boolean(),o.z.array(o.z.union([o.z.string(),o.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:o.z.nativeEnum(lr).optional().default(lr.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${qp.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),Dm=o.z.nativeEnum(pr).optional().default(pr.And).describe("The operator to use for the filters"),Om={boardId:o.z.string().describe("The ID of the board to fetch complete data for"),filters:Nm,filtersOperator:Dm};const km=Vd`
1263
+ `,Dm=o.z.array(o.z.object({columnId:o.z.string().describe("The id of the column to filter by"),compareAttribute:o.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:o.z.union([o.z.string(),o.z.number(),o.z.boolean(),o.z.array(o.z.union([o.z.string(),o.z.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:o.z.nativeEnum(lr).optional().default(lr.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${Gp.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),Om=o.z.nativeEnum(pr).optional().default(pr.And).describe("The operator to use for the filters"),km={boardId:o.z.string().describe("The ID of the board to fetch complete data for"),filters:Dm,filtersOperator:Om};const Cm=Vd`
1264
1264
  query GetBoardActivity(
1265
1265
  $boardId: ID!
1266
1266
  $itemIds: [ID!]
@@ -1283,7 +1283,7 @@
1283
1283
  }
1284
1284
  }
1285
1285
  }
1286
- `,Cm={boardId:o.z.number().describe("The id of the board to get activity for"),itemIds:o.z.array(o.z.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:o.z.array(o.z.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:o.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:o.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:o.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 Rm=Vd`
1286
+ `,Rm={boardId:o.z.number().describe("The id of the board to get activity for"),itemIds:o.z.array(o.z.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:o.z.array(o.z.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:o.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:o.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:o.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 $m=Vd`
1287
1287
  query GetBoardInfo($boardId: ID!) {
1288
1288
  boards(ids: [$boardId]) {
1289
1289
  # Basic Board Metadata
@@ -1371,7 +1371,7 @@
1371
1371
  }
1372
1372
  }
1373
1373
  }
1374
- `,$m=Vd`
1374
+ `,Lm=Vd`
1375
1375
  query GetBoardInfoJustColumns($boardId: ID!) {
1376
1376
  boards(ids: [$boardId]) {
1377
1377
  columns {
@@ -1384,7 +1384,7 @@
1384
1384
  }
1385
1385
  }
1386
1386
  }
1387
- `,Lm=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0}}),xm={boardId:o.z.number().describe("The id of the board to get information for")};const Um=Vd`
1387
+ `,xm=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0}}),Um={boardId:o.z.number().describe("The id of the board to get information for")};const Pm=Vd`
1388
1388
  fragment ItemDataFragment on Item {
1389
1389
  id
1390
1390
  name
@@ -1452,7 +1452,7 @@
1452
1452
  }
1453
1453
  }
1454
1454
  }
1455
- `,Pm=Vd`
1455
+ `,Fm=Vd`
1456
1456
  query SearchItemsDev($query: String!, $limit: Int, $boardIds: [ID!]) {
1457
1457
  search {
1458
1458
  items(query: $query, limit: $limit, board_ids: $boardIds) {
@@ -1462,11 +1462,11 @@
1462
1462
  }
1463
1463
  }
1464
1464
  }
1465
- `;var Fm;!function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.WORKSPACES="WORKSPACES",e.UPDATES="UPDATES",e.ITEMS="ITEMS",e.TIMELINE_ITEMS="TIMELINE_ITEMS",e.DASHBOARDS="DASHBOARDS"}(Fm||(Fm={}));const Mm=Object.values(Fm).join(", ");function Vm(e){return e.trim().toUpperCase().replace(/[\s\-/]+/g,"_").replace(/^_+|_+$/g,"")}const Bm={BOARDS:Fm.BOARD,DOCS:Fm.DOCUMENTS,DOC:Fm.DOCUMENTS,DOCUMENT:Fm.DOCUMENTS,FOLDER:Fm.FOLDERS,WORKSPACE:Fm.WORKSPACES,UPDATE:Fm.UPDATES,ITEM:Fm.ITEMS,PULSE:Fm.ITEMS,PULSES:Fm.ITEMS,TIMELINE_ITEM:Fm.TIMELINE_ITEMS,TIMELINE:Fm.TIMELINE_ITEMS,DASHBOARD:Fm.DASHBOARDS,OVERVIEW:Fm.DASHBOARDS,OVERVIEWS:Fm.DASHBOARDS},zm={USER:"To search for users or teams, use the list_users_and_teams tool.",USERS:"To search for users or teams, use the list_users_and_teams tool.",PERSON:"To search for users or teams, use the list_users_and_teams tool.",PEOPLE:"To search for users or teams, use the list_users_and_teams tool.",TEAM:"To search for users or teams, use the list_users_and_teams tool.",TEAMS:"To search for users or teams, use the list_users_and_teams tool.",USER_OR_TEAM:"To search for users or teams, use the list_users_and_teams tool.",USER_TEAM:"To search for users or teams, use the list_users_and_teams tool.",USERS_AND_TEAMS:"To search for users or teams, use the list_users_and_teams tool.",BOARD_ITEM:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS_PAGE:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',GET_BOARD_ITEMS_PAGE:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS_OR_GROUPS:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS_AND_GROUPS:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',GROUP:"To list groups within a board, use the get_board_info tool.",GROUPS:"To list groups within a board, use the get_board_info tool.",FORM:"Forms are not searchable.",FORMS:"Forms are not searchable."},jm={boardId:o.z.number().describe("The id of the board to get items from"),itemIds:o.z.array(o.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:o.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:o.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:o.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:o.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."),includeGroup:o.z.boolean().optional().default(!0).describe("Whether to include each item's board group (id and title) in the response. Set to false to reduce token usage when group membership is not needed."),includeItemDescription:o.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:o.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:o.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:Nm,filtersOperator:Dm,columnIds:o.z.array(o.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:o.z.array(o.z.object({columnId:o.z.string().describe("The id of the column to order by"),direction:o.z.nativeEnum(dr).optional().default(dr.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 qm={boardId:o.z.number().describe("The id of the board to get the schema of")};const Gm=Vd`
1465
+ `;var Mm;!function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.WORKSPACES="WORKSPACES",e.UPDATES="UPDATES",e.ITEMS="ITEMS",e.TIMELINE_ITEMS="TIMELINE_ITEMS",e.DASHBOARDS="DASHBOARDS"}(Mm||(Mm={}));const Vm=Object.values(Mm).join(", ");function Bm(e){return e.trim().toUpperCase().replace(/[\s\-/]+/g,"_").replace(/^_+|_+$/g,"")}const zm={BOARDS:Mm.BOARD,DOCS:Mm.DOCUMENTS,DOC:Mm.DOCUMENTS,DOCUMENT:Mm.DOCUMENTS,FOLDER:Mm.FOLDERS,WORKSPACE:Mm.WORKSPACES,UPDATE:Mm.UPDATES,ITEM:Mm.ITEMS,PULSE:Mm.ITEMS,PULSES:Mm.ITEMS,TIMELINE_ITEM:Mm.TIMELINE_ITEMS,TIMELINE:Mm.TIMELINE_ITEMS,DASHBOARD:Mm.DASHBOARDS,OVERVIEW:Mm.DASHBOARDS,OVERVIEWS:Mm.DASHBOARDS},jm={USER:"To search for users or teams, use the list_users_and_teams tool.",USERS:"To search for users or teams, use the list_users_and_teams tool.",PERSON:"To search for users or teams, use the list_users_and_teams tool.",PEOPLE:"To search for users or teams, use the list_users_and_teams tool.",TEAM:"To search for users or teams, use the list_users_and_teams tool.",TEAMS:"To search for users or teams, use the list_users_and_teams tool.",USER_OR_TEAM:"To search for users or teams, use the list_users_and_teams tool.",USER_TEAM:"To search for users or teams, use the list_users_and_teams tool.",USERS_AND_TEAMS:"To search for users or teams, use the list_users_and_teams tool.",BOARD_ITEM:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS_PAGE:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',GET_BOARD_ITEMS_PAGE:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS_OR_GROUPS:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',BOARD_ITEMS_AND_GROUPS:'To list items within a specific board, use the get_board_items_page tool. To search items across the account, use searchType "ITEMS".',GROUP:"To list groups within a board, use the get_board_info tool.",GROUPS:"To list groups within a board, use the get_board_info tool.",FORM:"Forms are not searchable.",FORMS:"Forms are not searchable."},qm={boardId:o.z.number().describe("The id of the board to get items from"),itemIds:o.z.array(o.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:o.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:o.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:o.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:o.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."),includeGroup:o.z.boolean().optional().default(!0).describe("Whether to include each item's board group (id and title) in the response. Set to false to reduce token usage when group membership is not needed."),includeItemDescription:o.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:o.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:o.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:Dm,filtersOperator:Om,columnIds:o.z.array(o.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:o.z.array(o.z.object({columnId:o.z.string().describe("The id of the column to order by"),direction:o.z.nativeEnum(dr).optional().default(dr.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 Gm={boardId:o.z.number().describe("The id of the board to get the schema of")};const Hm=Vd`
1466
1466
  query GetColumnTypeSchema($type: ColumnType!) {
1467
1467
  get_column_type_schema(type: $type)
1468
1468
  }
1469
- `,Hm="https://developer.monday.com/api-reference",Wm={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 with "EXACT" e.g. compareValue:["EXACT", "2025-01-01"]\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": ["EXACT", "2025-01-01"], "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'};function Ym(e){const t=Wm[e];return t?`# 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: ${e}\n${t}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n`:null}const Km={columnType:o.z.nativeEnum(qc).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:o.z.nativeEnum(qp).optional().default(qp.Schema).describe(`fetchMode "${qp.Schema}": JSON settings schema only (GraphQL). fetchMode "${qp.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const Qm={random_string:o.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:o.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const Jm={typeName:o.z.string().describe("The name of the GraphQL type to get details for")};const Xm=Vd`
1469
+ `,Wm="https://developer.monday.com/api-reference",Ym={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 with "EXACT" e.g. compareValue:["EXACT", "2025-01-01"]\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": ["EXACT", "2025-01-01"], "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'};function Km(e){const t=Ym[e];return t?`# 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: ${e}\n${t}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n`:null}const Qm={columnType:o.z.nativeEnum(Gc).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:o.z.nativeEnum(Gp).optional().default(Gp.Schema).describe(`fetchMode "${Gp.Schema}": JSON settings schema only (GraphQL). fetchMode "${Gp.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const Jm={random_string:o.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:o.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const Xm={typeName:o.z.string().describe("The name of the GraphQL type to get details for")};const Zm=Vd`
1470
1470
  fragment UserDetails on User {
1471
1471
  # Basic User Information
1472
1472
  id
@@ -1497,31 +1497,31 @@
1497
1497
  time_zone_identifier
1498
1498
  utc_hours_diff
1499
1499
  }
1500
- `,Zm=Vd`
1500
+ `,eu=Vd`
1501
1501
  fragment UserTeamMembership on Team {
1502
1502
  id
1503
1503
  name
1504
1504
  is_guest
1505
1505
  picture_url
1506
1506
  }
1507
- `,eu=Vd`
1507
+ `,tu=Vd`
1508
1508
  fragment TeamBasicInfo on Team {
1509
1509
  id
1510
1510
  name
1511
1511
  }
1512
- `,tu=Vd`
1512
+ `,au=Vd`
1513
1513
  fragment TeamExtendedInfo on Team {
1514
1514
  ...TeamBasicInfo
1515
1515
  is_guest
1516
1516
  picture_url
1517
1517
  }
1518
- `,au=Vd`
1518
+ `,iu=Vd`
1519
1519
  fragment TeamOwner on User {
1520
1520
  id
1521
1521
  name
1522
1522
  email
1523
1523
  }
1524
- `,iu=Vd`
1524
+ `,nu=Vd`
1525
1525
  fragment TeamMember on User {
1526
1526
  id
1527
1527
  name
@@ -1541,7 +1541,7 @@
1541
1541
  time_zone_identifier
1542
1542
  utc_hours_diff
1543
1543
  }
1544
- `,nu=Vd`
1544
+ `,ou=Vd`
1545
1545
  fragment TeamMemberSimplified on User {
1546
1546
  id
1547
1547
  name
@@ -1549,15 +1549,15 @@
1549
1549
  title
1550
1550
  kind
1551
1551
  }
1552
- `,ou=Vd`
1552
+ `,ru=Vd`
1553
1553
  fragment UserTeamMembershipSimplified on Team {
1554
1554
  id
1555
1555
  name
1556
1556
  is_guest
1557
1557
  }
1558
- `,ru=Vd`
1559
- ${Xm}
1558
+ `,su=Vd`
1560
1559
  ${Zm}
1560
+ ${eu}
1561
1561
 
1562
1562
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1563
1563
  users(ids: $userIds, limit: $limit) {
@@ -1569,21 +1569,21 @@
1569
1569
  }
1570
1570
  }
1571
1571
  }
1572
- `,su=Vd`
1573
- ${Xm}
1572
+ `,du=Vd`
1573
+ ${Zm}
1574
1574
 
1575
1575
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1576
1576
  users(ids: $userIds, limit: $limit) {
1577
1577
  ...UserDetails
1578
1578
  }
1579
1579
  }
1580
- `,du=Vd`
1581
- ${Xm}
1582
- ${ou}
1583
- ${tu}
1584
- ${eu}
1580
+ `,pu=Vd`
1581
+ ${Zm}
1582
+ ${ru}
1585
1583
  ${au}
1586
- ${nu}
1584
+ ${tu}
1585
+ ${iu}
1586
+ ${ou}
1587
1587
 
1588
1588
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1589
1589
  users(ids: $userIds, limit: $limit) {
@@ -1609,19 +1609,19 @@
1609
1609
  }
1610
1610
  }
1611
1611
  }
1612
- `,pu=Vd`
1613
- ${eu}
1612
+ `,lu=Vd`
1613
+ ${tu}
1614
1614
 
1615
1615
  query listTeamsOnly($teamIds: [ID!]) {
1616
1616
  teams(ids: $teamIds) {
1617
1617
  ...TeamBasicInfo
1618
1618
  }
1619
1619
  }
1620
- `,lu=Vd`
1621
- ${tu}
1622
- ${eu}
1620
+ `,cu=Vd`
1623
1621
  ${au}
1622
+ ${tu}
1624
1623
  ${iu}
1624
+ ${nu}
1625
1625
 
1626
1626
  query listTeamsWithMembers($teamIds: [ID!]) {
1627
1627
  teams(ids: $teamIds) {
@@ -1638,9 +1638,9 @@
1638
1638
  }
1639
1639
  }
1640
1640
  }
1641
- `,cu=Vd`
1642
- ${Xm}
1641
+ `,mu=Vd`
1643
1642
  ${Zm}
1643
+ ${eu}
1644
1644
 
1645
1645
  query getUserByName($name: String) {
1646
1646
  users(name: $name) {
@@ -1652,7 +1652,7 @@
1652
1652
  }
1653
1653
  }
1654
1654
  }
1655
- `,mu=Vd`
1655
+ `,uu=Vd`
1656
1656
  query getCurrentUser {
1657
1657
  me {
1658
1658
  id
@@ -1665,7 +1665,7 @@
1665
1665
  }
1666
1666
  }
1667
1667
  }
1668
- `;const uu=[["is_email_confirmed","Email Confirmed"],["became_active_at","Became Active At"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function hu(e,t=""){const a=uu.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`)),i=e.photo_url?.thumb;return i&&a.push(`${t}Photo Thumb: ${i}`),a}const fu=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(` Status: ${e.status||"N/A"}`),t.push(` Kind: ${e.kind||"N/A"}`),t.push(...hu(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"}`,`Kind: ${e.kind||"N/A"}`,...hu(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},_u=500,gu=500,bu=1e3,vu=Vd`
1668
+ `;const hu=[["is_email_confirmed","Email Confirmed"],["became_active_at","Became Active At"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function fu(e,t=""){const a=hu.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`)),i=e.photo_url?.thumb;return i&&a.push(`${t}Photo Thumb: ${i}`),a}const _u=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(` Status: ${e.status||"N/A"}`),t.push(` Kind: ${e.kind||"N/A"}`),t.push(...fu(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"}`,`Kind: ${e.kind||"N/A"}`,...fu(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},gu=500,bu=500,vu=1e3,yu=Vd`
1669
1669
  query getAccountSlug {
1670
1670
  me {
1671
1671
  account {
@@ -1673,11 +1673,11 @@
1673
1673
  }
1674
1674
  }
1675
1675
  }
1676
- `;async function yu(e){const t=await e.request(vu);return t.me?.account?.slug??null}function Iu(e,t){return`https://${e}.monday.com/workspaces/${t}`}const wu={userIds:o.z.array(o.z.string()).max(_u).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:o.z.array(o.z.string()).max(gu).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:o.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:o.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:o.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:o.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:o.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const Tu={itemId:o.z.number().describe("The id of the item to which the update will be added"),groupId:o.z.string().describe("The id of the group to which the item will be moved")};const Eu=Vd`
1676
+ `;async function Iu(e){const t=await e.request(yu);return t.me?.account?.slug??null}function wu(e,t){return`https://${e}.monday.com/workspaces/${t}`}const Tu={userIds:o.z.array(o.z.string()).max(gu).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:o.z.array(o.z.string()).max(bu).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:o.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:o.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:o.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:o.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:o.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const Eu={itemId:o.z.number().describe("The id of the item to which the update will be added"),groupId:o.z.string().describe("The id of the group to which the item will be moved")};const Au=Vd`
1677
1677
  mutation updateDocName($docId: ID!, $name: String!) {
1678
1678
  update_doc_name(docId: $docId, name: $name)
1679
1679
  }
1680
- `,Au=Vd`
1680
+ `,Su=Vd`
1681
1681
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1682
1682
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1683
1683
  success
@@ -1685,13 +1685,13 @@
1685
1685
  error
1686
1686
  }
1687
1687
  }
1688
- `,Su=Vd`
1688
+ `,Nu=Vd`
1689
1689
  query getDocIdByObjectId($objectId: [ID!]) {
1690
1690
  docs(object_ids: $objectId) {
1691
1691
  id
1692
1692
  }
1693
1693
  }
1694
- `,Nu=Vd`
1694
+ `,Du=Vd`
1695
1695
  mutation updateDocBlock($blockId: String!, $content: JSON!) {
1696
1696
  update_doc_block(block_id: $blockId, content: $content) {
1697
1697
  id
@@ -1699,20 +1699,20 @@
1699
1699
  created_at
1700
1700
  }
1701
1701
  }
1702
- `,Du=Vd`
1702
+ `,Ou=Vd`
1703
1703
  mutation deleteDocBlock($blockId: String!) {
1704
1704
  delete_doc_block(block_id: $blockId) {
1705
1705
  id
1706
1706
  }
1707
1707
  }
1708
- `,Ou=Vd`
1708
+ `,ku=Vd`
1709
1709
  query getDocObjectIdByDocId($docId: [ID!]) {
1710
1710
  docs(ids: $docId) {
1711
1711
  id
1712
1712
  object_id
1713
1713
  }
1714
1714
  }
1715
- `,ku=Vd`
1715
+ `,Cu=Vd`
1716
1716
  query getDocBoardItem($boardId: ID!) {
1717
1717
  boards(ids: [$boardId]) {
1718
1718
  items_page(limit: 1) {
@@ -1722,7 +1722,7 @@
1722
1722
  }
1723
1723
  }
1724
1724
  }
1725
- `,Cu=Vd`
1725
+ `,Ru=Vd`
1726
1726
  query getDocBlockContent($docId: [ID!]) {
1727
1727
  docs(ids: $docId) {
1728
1728
  blocks {
@@ -1732,7 +1732,7 @@
1732
1732
  }
1733
1733
  }
1734
1734
  }
1735
- `,Ru=Vd`
1735
+ `,$u=Vd`
1736
1736
  mutation createDocComment($itemId: ID!, $body: String!, $parentId: ID, $mentionsList: [UpdateMention]) {
1737
1737
  create_update(body: $body, item_id: $itemId, parent_id: $parentId, mentions_list: $mentionsList) {
1738
1738
  id
@@ -1740,7 +1740,7 @@
1740
1740
  created_at
1741
1741
  }
1742
1742
  }
1743
- `,$u=Vd`
1743
+ `,Lu=Vd`
1744
1744
  mutation createDocBlocks($docId: ID!, $afterBlockId: String, $blocksInput: [CreateBlockInput!]!) {
1745
1745
  create_doc_blocks(docId: $docId, afterBlockId: $afterBlockId, blocksInput: $blocksInput) {
1746
1746
  id
@@ -1808,7 +1808,7 @@
1808
1808
  }
1809
1809
  }
1810
1810
  }
1811
- `,Lu="content",xu="version_history",Uu=o.z.enum(["ids","object_ids","workspace_ids"]),Pu={mode:o.z.enum([Lu,xu]).optional().default(Lu).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:Uu.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:o.z.array(o.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:o.z.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:o.z.nativeEnum(Uo).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:o.z.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:o.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:o.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:o.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:o.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:o.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:o.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:o.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:o.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:o.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 Fu={workspace_id:o.z.number().describe("The ID of the workspace to get information for")};const Mu=Vd`
1811
+ `,xu="content",Uu="version_history",Pu=o.z.enum(["ids","object_ids","workspace_ids"]),Fu={mode:o.z.enum([xu,Uu]).optional().default(xu).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:Pu.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:o.z.array(o.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:o.z.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:o.z.nativeEnum(Uo).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:o.z.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:o.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:o.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:o.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:o.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:o.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:o.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:o.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:o.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:o.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 Mu={workspace_id:o.z.number().describe("The ID of the workspace to get information for")};const Vu=Vd`
1812
1812
  query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
1813
1813
  workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
1814
1814
  id
@@ -1816,7 +1816,7 @@
1816
1816
  description
1817
1817
  }
1818
1818
  }
1819
- `;function Vu(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function Bu(e){return Array.isArray(e)&&e.length>0}const zu={limit:o.z.number().min(1).max(100).default(100).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:o.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const ju=Vd`
1819
+ `;function Bu(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function zu(e){return Array.isArray(e)&&e.length>0}const ju={limit:o.z.number().min(1).max(100).default(100).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:o.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const qu=Vd`
1820
1820
  query getItemBoard($itemId: ID!) {
1821
1821
  items(ids: [$itemId]) {
1822
1822
  id
@@ -1829,7 +1829,7 @@
1829
1829
  }
1830
1830
  }
1831
1831
  }
1832
- `,qu=Vd`
1832
+ `,Gu=Vd`
1833
1833
  mutation createDoc($location: CreateDocInput!, $docOwnerIds: [ID!]) {
1834
1834
  create_doc(location: $location, doc_owner_ids: $docOwnerIds) {
1835
1835
  id
@@ -1838,7 +1838,7 @@
1838
1838
  name
1839
1839
  }
1840
1840
  }
1841
- `,Gu=Vd`
1841
+ `,Hu=Vd`
1842
1842
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1843
1843
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1844
1844
  success
@@ -1846,11 +1846,11 @@
1846
1846
  error
1847
1847
  }
1848
1848
  }
1849
- `,Hu=Vd`
1849
+ `,Wu=Vd`
1850
1850
  mutation updateDocName($docId: ID!, $name: String!) {
1851
1851
  update_doc_name(docId: $docId, name: $name)
1852
1852
  }
1853
- `,Wu=o.z.enum(["workspace","item"]),Yu=o.z.discriminatedUnion("type",[o.z.object({type:o.z.literal(Wu.enum.workspace).describe("Create document in workspace"),workspace_id:o.z.number().describe("Workspace ID under which to create the new document"),doc_kind:o.z.nativeEnum(Kn).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:o.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),o.z.object({type:o.z.literal(Wu.enum.item).describe("Create document attached to item"),item_id:o.z.number().describe("Item ID to attach the new document to"),column_id:o.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.")})]),Ku={doc_name:o.z.string().describe("Name for the new document."),markdown:o.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:o.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),docOwnerIds:o.z.array(o.z.string()).min(1).optional().describe("Optional list of user IDs to set as document owners at creation time. Use this to add the agent owner so they retain access to the document. Ownership is set inside the creation mutation itself, bypassing the permission checks that would block a subsequent add_subscribers_to_object call."),workspace_id:o.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:o.z.nativeEnum(Kn).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:o.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:o.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:o.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 Qu=Vd`
1853
+ `,Yu=o.z.enum(["workspace","item"]),Ku=o.z.discriminatedUnion("type",[o.z.object({type:o.z.literal(Yu.enum.workspace).describe("Create document in workspace"),workspace_id:o.z.number().describe("Workspace ID under which to create the new document"),doc_kind:o.z.nativeEnum(Kn).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:o.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),o.z.object({type:o.z.literal(Yu.enum.item).describe("Create document attached to item"),item_id:o.z.number().describe("Item ID to attach the new document to"),column_id:o.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.")})]),Qu={doc_name:o.z.string().describe("Name for the new document."),markdown:o.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:o.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),docOwnerIds:o.z.array(o.z.string()).min(1).optional().describe("Optional list of user IDs to set as document owners at creation time. Use this to add the agent owner so they retain access to the document. Ownership is set inside the creation mutation itself, bypassing the permission checks that would block a subsequent add_subscribers_to_object call."),workspace_id:o.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:o.z.nativeEnum(Kn).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:o.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:o.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:o.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 Ju=Vd`
1854
1854
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1855
1855
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1856
1856
  success
@@ -1858,7 +1858,7 @@
1858
1858
  error
1859
1859
  }
1860
1860
  }
1861
- `,Ju=Vd`
1861
+ `,Xu=Vd`
1862
1862
  query getDocByObjectId($objectId: [ID!]) {
1863
1863
  docs(object_ids: $objectId) {
1864
1864
  id
@@ -1866,7 +1866,7 @@
1866
1866
  url
1867
1867
  }
1868
1868
  }
1869
- `,Xu=Vd`
1869
+ `,Zu=Vd`
1870
1870
  query getDocById($docId: [ID!]) {
1871
1871
  docs(ids: $docId) {
1872
1872
  id
@@ -1874,7 +1874,7 @@
1874
1874
  url
1875
1875
  }
1876
1876
  }
1877
- `,Zu={doc_id:o.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:o.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:o.z.string().describe("Markdown content to add to the document."),after_block_id:o.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.")};function eh(e){if(e)return e}function th(e){if(e)return e}function ah(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 ih(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:ah(e.attributes)}}))}function nh(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:a.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:ah(e.attributes)}}))}function oh(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function rh(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 s=o,d=s+("string"==typeof e?e.length:1),p=Math.max(s,a),l=Math.min(d,n);p>=l?r.push(i):"string"!=typeof e?r.push(oh(i,t)):(p>s&&r.push({...i,insert:e.slice(0,p-s)}),r.push(oh({...i,insert:e.slice(p-s,l-s)},t)),l<d&&r.push({...i,insert:e.slice(l-s)})),o=d}return r}const sh=o.z.object({bold:o.z.boolean().optional(),italic:o.z.boolean().optional(),underline:o.z.boolean().optional(),strike:o.z.boolean().optional(),code:o.z.boolean().optional(),link:o.z.string().optional(),color:o.z.string().optional(),background:o.z.string().optional()}).optional(),dh=o.z.object({mention:o.z.object({id:o.z.union([o.z.string(),o.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:o.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.")}),ph=o.z.object({column_value:o.z.object({item_id:o.z.union([o.z.string(),o.z.number()]).describe("The board item ID."),column_id:o.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.")}),lh=o.z.object({insert:o.z.union([o.z.string().transform((e=>({text:e}))),o.z.object({text:o.z.string()}),dh,ph]).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:sh.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),ch=o.z.object({block_content_type:o.z.literal("text"),delta_format:o.z.array(lh).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),mh=o.z.object({block_content_type:o.z.literal("code"),delta_format:o.z.array(lh).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),uh=o.z.object({block_content_type:o.z.literal("list_item"),delta_format:o.z.array(lh).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:o.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),hh=o.z.discriminatedUnion("block_content_type",[ch,mh,uh]),fh=o.z.object({block_type:o.z.literal("text"),text_block_type:o.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:o.z.array(lh).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),_h=o.z.object({block_type:o.z.literal("list_item"),list_block_type:o.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:o.z.array(lh).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),gh=o.z.object({block_type:o.z.literal("code"),delta_format:o.z.array(lh).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),bh=o.z.object({block_type:o.z.literal("divider")}),vh=o.z.object({block_type:o.z.literal("page_break")}),yh=o.z.object({block_type:o.z.literal("image"),public_url:o.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:o.z.union([o.z.number().int(),o.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:o.z.number().int().min(1).optional().describe("Width in pixels.")}),Ih=o.z.object({block_type:o.z.literal("video"),raw_url:o.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:o.z.number().int().min(1).optional().describe("Width in pixels.")}),wh=o.z.object({block_type:o.z.literal("notice_box"),theme:o.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),Th=o.z.object({block_type:o.z.literal("table"),row_count:o.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:o.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:o.z.number().int().optional().describe("Table width in pixels."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),Eh=o.z.object({block_type:o.z.literal("layout"),column_count:o.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),Ah=o.z.discriminatedUnion("block_type",[fh,_h,gh,bh,vh,yh,Ih,wh,Th,Eh]),Sh=o.z.object({operation_type:o.z.literal("set_name"),name:o.z.string().min(1).describe("New document name.")}),Nh=o.z.object({operation_type:o.z.literal("add_markdown_content"),markdown:o.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Dh=o.z.object({operation_type:o.z.literal("update_block"),block_id:o.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:hh.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.")}),Oh=o.z.object({operation_type:o.z.literal("create_block"),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:o.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:Ah.describe("The block to create. Use block_type to select the block type.")}),kh=o.z.object({operation_type:o.z.literal("delete_block"),block_id:o.z.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Ch=o.z.object({operation_type:o.z.literal("replace_block"),block_id:o.z.string().describe("ID of the block to delete."),after_block_id:o.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:o.z.string().optional().describe("Parent block ID for the replacement block."),block:Ah.describe("The new block to create in place of the deleted one.")}),Rh=o.z.object({operation_type:o.z.literal("add_comment"),body:o.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:o.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:o.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:o.z.union([o.z.string(),o.z.array(o.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:o.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:o.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.")}),$h=o.z.discriminatedUnion("operation_type",[Sh,Nh,Dh,Oh,kh,Ch,Rh]),Lh={doc_id:o.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:o.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:o.z.array($h).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 xh=Vd`
1877
+ `,eh={doc_id:o.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:o.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:o.z.string().describe("Markdown content to add to the document."),after_block_id:o.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.")};function th(e){if(e)return e}function ah(e){if(e)return e}function ih(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 nh(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:ih(e.attributes)}}))}function oh(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:a.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:ih(e.attributes)}}))}function rh(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function sh(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 s=o,d=s+("string"==typeof e?e.length:1),p=Math.max(s,a),l=Math.min(d,n);p>=l?r.push(i):"string"!=typeof e?r.push(rh(i,t)):(p>s&&r.push({...i,insert:e.slice(0,p-s)}),r.push(rh({...i,insert:e.slice(p-s,l-s)},t)),l<d&&r.push({...i,insert:e.slice(l-s)})),o=d}return r}const dh=o.z.object({bold:o.z.boolean().optional(),italic:o.z.boolean().optional(),underline:o.z.boolean().optional(),strike:o.z.boolean().optional(),code:o.z.boolean().optional(),link:o.z.string().optional(),color:o.z.string().optional(),background:o.z.string().optional()}).optional(),ph=o.z.object({mention:o.z.object({id:o.z.union([o.z.string(),o.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:o.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.")}),lh=o.z.object({column_value:o.z.object({item_id:o.z.union([o.z.string(),o.z.number()]).describe("The board item ID."),column_id:o.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.")}),ch=o.z.object({insert:o.z.union([o.z.string().transform((e=>({text:e}))),o.z.object({text:o.z.string()}),ph,lh]).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:dh.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),mh=o.z.object({block_content_type:o.z.literal("text"),delta_format:o.z.array(ch).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),uh=o.z.object({block_content_type:o.z.literal("code"),delta_format:o.z.array(ch).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),hh=o.z.object({block_content_type:o.z.literal("list_item"),delta_format:o.z.array(ch).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:o.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),fh=o.z.discriminatedUnion("block_content_type",[mh,uh,hh]),_h=o.z.object({block_type:o.z.literal("text"),text_block_type:o.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:o.z.array(ch).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:o.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:o.z.enum(["LTR","RTL"]).optional()}),gh=o.z.object({block_type:o.z.literal("list_item"),list_block_type:o.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:o.z.array(ch).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:o.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),bh=o.z.object({block_type:o.z.literal("code"),delta_format:o.z.array(ch).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:o.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),vh=o.z.object({block_type:o.z.literal("divider")}),yh=o.z.object({block_type:o.z.literal("page_break")}),Ih=o.z.object({block_type:o.z.literal("image"),public_url:o.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:o.z.union([o.z.number().int(),o.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:o.z.number().int().min(1).optional().describe("Width in pixels.")}),wh=o.z.object({block_type:o.z.literal("video"),raw_url:o.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:o.z.number().int().min(1).optional().describe("Width in pixels.")}),Th=o.z.object({block_type:o.z.literal("notice_box"),theme:o.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),Eh=o.z.object({block_type:o.z.literal("table"),row_count:o.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:o.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:o.z.number().int().optional().describe("Table width in pixels."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),Ah=o.z.object({block_type:o.z.literal("layout"),column_count:o.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:o.z.array(o.z.object({width:o.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),Sh=o.z.discriminatedUnion("block_type",[_h,gh,bh,vh,yh,Ih,wh,Th,Eh,Ah]),Nh=o.z.object({operation_type:o.z.literal("set_name"),name:o.z.string().min(1).describe("New document name.")}),Dh=o.z.object({operation_type:o.z.literal("add_markdown_content"),markdown:o.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Oh=o.z.object({operation_type:o.z.literal("update_block"),block_id:o.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:fh.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.")}),kh=o.z.object({operation_type:o.z.literal("create_block"),after_block_id:o.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:o.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:Sh.describe("The block to create. Use block_type to select the block type.")}),Ch=o.z.object({operation_type:o.z.literal("delete_block"),block_id:o.z.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Rh=o.z.object({operation_type:o.z.literal("replace_block"),block_id:o.z.string().describe("ID of the block to delete."),after_block_id:o.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:o.z.string().optional().describe("Parent block ID for the replacement block."),block:Sh.describe("The new block to create in place of the deleted one.")}),$h=o.z.object({operation_type:o.z.literal("add_comment"),body:o.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:o.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:o.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:o.z.union([o.z.string(),o.z.array(o.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:o.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:o.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.")}),Lh=o.z.discriminatedUnion("operation_type",[Nh,Dh,Oh,kh,Ch,Rh,$h]),xh={doc_id:o.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:o.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:o.z.array(Lh).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 Uh=Vd`
1878
1878
  mutation CreateDashboard(
1879
1879
  $name: String!
1880
1880
  $workspace_id: ID!
@@ -1896,14 +1896,14 @@
1896
1896
  board_folder_id
1897
1897
  }
1898
1898
  }
1899
- `,Uh=Vd`
1899
+ `,Ph=Vd`
1900
1900
  query GetAllWidgetsSchema {
1901
1901
  all_widgets_schema {
1902
1902
  widget_type
1903
1903
  schema
1904
1904
  }
1905
1905
  }
1906
- `,Ph=Vd`
1906
+ `,Fh=Vd`
1907
1907
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1908
1908
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1909
1909
  id
@@ -1915,14 +1915,14 @@
1915
1915
  }
1916
1916
  }
1917
1917
  }
1918
- `,Fh={name:o.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:o.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:o.z.array(o.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:o.z.nativeEnum(No).default(No.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:o.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const Mh={parent_container_id:o.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:o.z.nativeEnum(fs).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:o.z.nativeEnum(Mo).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:o.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:o.z.record(o.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 Vh=Vd`
1918
+ `,Mh={name:o.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:o.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:o.z.array(o.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:o.z.nativeEnum(No).default(No.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:o.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const Vh={parent_container_id:o.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:o.z.nativeEnum(fs).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:o.z.nativeEnum(Mo).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:o.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:o.z.record(o.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 Bh=Vd`
1919
1919
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1920
1920
  update_workspace(id: $id, attributes: $attributes) {
1921
1921
  id
1922
1922
  name
1923
1923
  }
1924
1924
  }
1925
- `,Bh={id:o.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:o.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:o.z.string().optional().describe("The description of the workspace to update"),attributeKind:o.z.nativeEnum(_s).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:o.z.string().optional().describe("The name of the workspace to update")};const zh=Vd`
1925
+ `,zh={id:o.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:o.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:o.z.string().optional().describe("The description of the workspace to update"),attributeKind:o.z.nativeEnum(_s).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:o.z.string().optional().describe("The name of the workspace to update")};const jh=Vd`
1926
1926
  mutation updateFolder(
1927
1927
  $folderId: ID!
1928
1928
  $name: String
@@ -1949,7 +1949,7 @@
1949
1949
  name
1950
1950
  }
1951
1951
  }
1952
- `,jh={folderId:o.z.string().describe("The ID of the folder to update"),name:o.z.string().optional().describe("The new name of the folder"),color:o.z.nativeEnum(jo).optional().describe("The new color of the folder"),fontWeight:o.z.nativeEnum(Go).optional().describe("The new font weight of the folder"),customIcon:o.z.nativeEnum(qo).optional().describe("The new custom icon of the folder"),parentFolderId:o.z.string().optional().describe("The ID of the new parent folder"),workspaceId:o.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:o.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:o.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:o.z.nativeEnum(Er).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:o.z.boolean().optional().describe("Whether to position the folder after the object")};const qh=Vd`
1952
+ `,qh={folderId:o.z.string().describe("The ID of the folder to update"),name:o.z.string().optional().describe("The new name of the folder"),color:o.z.nativeEnum(jo).optional().describe("The new color of the folder"),fontWeight:o.z.nativeEnum(Go).optional().describe("The new font weight of the folder"),customIcon:o.z.nativeEnum(qo).optional().describe("The new custom icon of the folder"),parentFolderId:o.z.string().optional().describe("The ID of the new parent folder"),workspaceId:o.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:o.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:o.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:o.z.nativeEnum(Er).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:o.z.boolean().optional().describe("Whether to position the folder after the object")};const Gh=Vd`
1953
1953
  mutation createWorkspace(
1954
1954
  $name: String!
1955
1955
  $workspaceKind: WorkspaceKind!
@@ -1966,7 +1966,7 @@
1966
1966
  name
1967
1967
  }
1968
1968
  }
1969
- `,Gh={name:o.z.string().describe("The name of the new workspace to be created"),workspaceKind:o.z.nativeEnum(_s).describe("The kind of workspace to create"),description:o.z.string().optional().describe("The description of the new workspace"),accountProductId:o.z.string().optional().describe("The account product ID associated with the workspace")};const Hh=Vd`
1969
+ `,Hh={name:o.z.string().describe("The name of the new workspace to be created"),workspaceKind:o.z.nativeEnum(_s).describe("The kind of workspace to create"),description:o.z.string().optional().describe("The description of the new workspace"),accountProductId:o.z.string().optional().describe("The account product ID associated with the workspace")};const Wh=Vd`
1970
1970
  mutation createFolder(
1971
1971
  $workspaceId: ID!
1972
1972
  $name: String!
@@ -1987,7 +1987,7 @@
1987
1987
  name
1988
1988
  }
1989
1989
  }
1990
- `,Wh={workspaceId:o.z.string().describe("The ID of the workspace where the folder will be created"),name:o.z.string().describe("The name of the folder to be created"),color:o.z.nativeEnum(jo).optional().describe("The color of the folder"),fontWeight:o.z.nativeEnum(Go).optional().describe("The font weight of the folder"),customIcon:o.z.nativeEnum(qo).optional().describe("The custom icon of the folder"),parentFolderId:o.z.string().optional().describe("The ID of the parent folder")};const Yh=Vd`
1990
+ `,Yh={workspaceId:o.z.string().describe("The ID of the workspace where the folder will be created"),name:o.z.string().describe("The name of the folder to be created"),color:o.z.nativeEnum(jo).optional().describe("The color of the folder"),fontWeight:o.z.nativeEnum(Go).optional().describe("The font weight of the folder"),customIcon:o.z.nativeEnum(qo).optional().describe("The custom icon of the folder"),parentFolderId:o.z.string().optional().describe("The ID of the parent folder")};const Kh=Vd`
1991
1991
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
1992
1992
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
1993
1993
  success
@@ -1997,7 +1997,7 @@
1997
1997
  }
1998
1998
  }
1999
1999
  }
2000
- `,Kh=Vd`
2000
+ `,Qh=Vd`
2001
2001
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
2002
2002
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
2003
2003
  success
@@ -2007,7 +2007,7 @@
2007
2007
  }
2008
2008
  }
2009
2009
  }
2010
- `,Qh={objectType:o.z.nativeEnum(Er).describe("The type of object to move"),id:o.z.string().describe("The ID of the object to move"),position_object_id:o.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:o.z.nativeEnum(Er).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:o.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:o.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:o.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:o.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const Jh=Vd`
2010
+ `,Jh={objectType:o.z.nativeEnum(Er).describe("The type of object to move"),id:o.z.string().describe("The ID of the object to move"),position_object_id:o.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:o.z.nativeEnum(Er).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:o.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:o.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:o.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:o.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const Xh=Vd`
2011
2011
  query aggregateBoardInsights($query: AggregateQueryInput!, $boardId: ID!) {
2012
2012
  boards(ids: [$boardId]) {
2013
2013
  name
@@ -2029,14 +2029,14 @@
2029
2029
  }
2030
2030
  }
2031
2031
  }
2032
- `,Xh=new Set([Tn.Case,Tn.Between,Tn.Left,Tn.Raw,Tn.None,Tn.CountKeys]),Zh=Object.values(Tn).filter((e=>!Xh.has(e))),ef=new Set([Tn.Left,Tn.Trim,Tn.Upper,Tn.Lower,Tn.DateTruncDay,Tn.DateTruncWeek,Tn.DateTruncMonth,Tn.DateTruncQuarter,Tn.DateTruncYear,Tn.Color,Tn.Label,Tn.EndDate,Tn.StartDate,Tn.Hour,Tn.PhoneCountryShortName,Tn.Person,Tn.Upper,Tn.Lower,Tn.Order,Tn.Length,Tn.Flatten,Tn.IsDone]);function tf(e){return{column_id:e}}new Set([Tn.Count,Tn.CountDistinct,Tn.CountSubitems,Tn.CountItems,Tn.First,Tn.Sum,Tn.Average,Tn.Median,Tn.Min,Tn.Max,Tn.MinMax]);const af={boardId:o.z.number().describe("The id of the board to get insights for"),aggregations:o.z.array(o.z.object({function:o.z.enum(Zh).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:o.z.string().describe("The id of the column to aggregate")})).describe(`The aggregations to get. Before sending the aggregations, read guidelines.aggregation from get_column_type_info with fetchMode "${qp.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).optional(),groupBy:o.z.array(o.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:o.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:Nm,filtersOperator:Dm,orderBy:o.z.array(o.z.object({columnId:o.z.string().describe("The id of the column to order by"),direction:o.z.nativeEnum(dr).optional().default(dr.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 nf=Vd`
2032
+ `,Zh=new Set([Tn.Case,Tn.Between,Tn.Left,Tn.Raw,Tn.None,Tn.CountKeys]),ef=Object.values(Tn).filter((e=>!Zh.has(e))),tf=new Set([Tn.Left,Tn.Trim,Tn.Upper,Tn.Lower,Tn.DateTruncDay,Tn.DateTruncWeek,Tn.DateTruncMonth,Tn.DateTruncQuarter,Tn.DateTruncYear,Tn.Color,Tn.Label,Tn.EndDate,Tn.StartDate,Tn.Hour,Tn.PhoneCountryShortName,Tn.Person,Tn.Upper,Tn.Lower,Tn.Order,Tn.Length,Tn.Flatten,Tn.IsDone]);function af(e){return{column_id:e}}new Set([Tn.Count,Tn.CountDistinct,Tn.CountSubitems,Tn.CountItems,Tn.First,Tn.Sum,Tn.Average,Tn.Median,Tn.Min,Tn.Max,Tn.MinMax]);const nf={boardId:o.z.number().describe("The id of the board to get insights for"),aggregations:o.z.array(o.z.object({function:o.z.enum(ef).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:o.z.string().describe("The id of the column to aggregate")})).describe(`The aggregations to get. Before sending the aggregations, read guidelines.aggregation from get_column_type_info with fetchMode "${Gp.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).optional(),groupBy:o.z.array(o.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:o.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:Dm,filtersOperator:Om,orderBy:o.z.array(o.z.object({columnId:o.z.string().describe("The id of the column to order by"),direction:o.z.nativeEnum(dr).optional().default(dr.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 of=Vd`
2033
2033
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
2034
2034
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
2035
2035
  id
2036
2036
  name
2037
2037
  }
2038
2038
  }
2039
- `,of=Vd`
2039
+ `,rf=Vd`
2040
2040
  query SearchItems($query: String!, $limit: Int, $workspaceIds: [ID!]) {
2041
2041
  search {
2042
2042
  items(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -2046,12 +2046,14 @@
2046
2046
  id
2047
2047
  name
2048
2048
  url
2049
+ board_id
2050
+ workspace_id
2049
2051
  }
2050
2052
  }
2051
2053
  }
2052
2054
  }
2053
2055
  }
2054
- `,rf=Vd`
2056
+ `,sf=Vd`
2055
2057
  query SearchBoards($query: String!, $limit: Int, $workspaceIds: [ID!]) {
2056
2058
  search {
2057
2059
  boards(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -2061,12 +2063,13 @@
2061
2063
  id
2062
2064
  name
2063
2065
  url
2066
+ workspace_id
2064
2067
  }
2065
2068
  }
2066
2069
  }
2067
2070
  }
2068
2071
  }
2069
- `,sf=Vd`
2072
+ `,df=Vd`
2070
2073
  query SearchDocs($query: String!, $limit: Int, $workspaceIds: [ID!]) {
2071
2074
  search {
2072
2075
  docs(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
@@ -2075,12 +2078,13 @@
2075
2078
  indexed_data {
2076
2079
  id
2077
2080
  name
2081
+ workspace_id
2078
2082
  }
2079
2083
  }
2080
2084
  }
2081
2085
  }
2082
2086
  }
2083
- `,df=Vd`
2087
+ `,pf=Vd`
2084
2088
  query SearchWorkspaces($query: String!, $limit: Int) {
2085
2089
  search {
2086
2090
  workspaces(query: $query, limit: $limit) {
@@ -2095,7 +2099,7 @@
2095
2099
  }
2096
2100
  }
2097
2101
  }
2098
- `,pf=Vd`
2102
+ `,lf=Vd`
2099
2103
  query SearchUpdates($query: String!, $limit: Int, $boardIds: [ID!], $creatorIds: [ID!]) {
2100
2104
  search {
2101
2105
  updates(query: $query, limit: $limit, board_ids: $boardIds, creator_ids: $creatorIds) {
@@ -2112,7 +2116,7 @@
2112
2116
  }
2113
2117
  }
2114
2118
  }
2115
- `,lf=Vd`
2119
+ `,cf=Vd`
2116
2120
  query SearchTimelineItems($query: String!, $limit: Int) {
2117
2121
  search {
2118
2122
  timeline_items(query: $query, limit: $limit) {
@@ -2123,12 +2127,14 @@
2123
2127
  title
2124
2128
  summary
2125
2129
  content
2130
+ item_id
2131
+ board_id
2126
2132
  }
2127
2133
  }
2128
2134
  }
2129
2135
  }
2130
2136
  }
2131
- `,cf=Vd`
2137
+ `,mf=Vd`
2132
2138
  query SearchOverviewsDev($query: String!, $limit: Int, $workspaceIds: [ID!], $creatorIds: [ID!]) {
2133
2139
  search {
2134
2140
  overviews(query: $query, limit: $limit, workspace_ids: $workspaceIds, creator_ids: $creatorIds) {
@@ -2137,19 +2143,20 @@
2137
2143
  indexed_data {
2138
2144
  id
2139
2145
  name
2146
+ workspace_id
2140
2147
  }
2141
2148
  }
2142
2149
  }
2143
2150
  }
2144
2151
  }
2145
- `,mf=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,""),uf=new Set(Object.values(Fm));function hf(e){if(null!=e)return Array.isArray(e)?e:[e]}function ff(e){return o.z.preprocess(hf,o.z.array(o.z.coerce.number().finite()).optional()).describe(e)}function _f(e){return e&&e.length>0?e:void 0}const gf=o.z.preprocess((function(e){if("string"!=typeof e)return e;const t=Vm(e),a=Bm[t]??t;return uf.has(a)?a:e}),o.z.nativeEnum(Fm,{errorMap:function(e,t){if(e.code===o.z.ZodIssueCode.invalid_type)return"undefined"===e.received||"null"===e.received?{message:`searchType is required. Valid values: ${Mm}.`}:{message:`searchType must be a string. Valid values: ${Mm}.`};if(e.code===o.z.ZodIssueCode.invalid_enum_value){const t=String(e.received),a=zm[Vm(t)],i=`Invalid searchType "${t}". Valid values: ${Mm}.`;return{message:a?`${i} ${a}`:i}}return{message:t.defaultError}}})).describe(`The type of search to perform. Valid values: ${Mm}.`),bf=o.z.preprocess((function(e){return null==e?20:e}),o.z.coerce.number().finite().transform((e=>Math.min(Math.max(Math.trunc(e),1),20)))).optional().default(20).describe("The number of items to get. Maximum is 20."),vf={searchTerm:o.z.string().trim().min(1,{message:"searchTerm must be a non-empty search string."}).describe("The non-empty term to search for (at least one non-whitespace character)."),searchType:gf,limit:bf,workspaceIds:ff("Array of workspace IDs (numbers) to search in. Optional for FOLDERS search (searches all accessible workspaces when omitted). For BOARD, DOCUMENTS, and DASHBOARDS search, only pass this if the user explicitly asked to search within specific workspaces. Example: [12345, 67890]."),boardIds:ff("Array of board IDs (numbers) to scope the search to. Only applies to UPDATES search, and only pass it if the user explicitly asked to search within specific boards. Example: [12345, 67890]."),creatorIds:ff("Array of user IDs (numbers) whose items to search. Applies to UPDATES (filters by update author) and DASHBOARDS (filters by dashboard creator). Only pass it if the user explicitly asked to filter by specific creators. Example: [12345, 67890].")};const yf=o.z.object({id:o.z.string().describe("The ID of the entity to mention"),type:o.z.nativeEnum(br).describe("The type of mention: User, Team, Board, or Project")}),If=o.z.array(yf),wf={itemId:o.z.number().describe("The id of the item to which the update will be added"),body:o.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:o.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 Tf=Vd`
2152
+ `,uf=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,""),hf=new Set(Object.values(Mm));function ff(e){if(null!=e)return Array.isArray(e)?e:[e]}function _f(e){return o.z.preprocess(ff,o.z.array(o.z.coerce.number().finite()).optional()).describe(e)}function gf(e){return e&&e.length>0?e:void 0}const bf=o.z.preprocess((function(e){if("string"!=typeof e)return e;const t=Bm(e),a=zm[t]??t;return hf.has(a)?a:e}),o.z.nativeEnum(Mm,{errorMap:function(e,t){if(e.code===o.z.ZodIssueCode.invalid_type)return"undefined"===e.received||"null"===e.received?{message:`searchType is required. Valid values: ${Vm}.`}:{message:`searchType must be a string. Valid values: ${Vm}.`};if(e.code===o.z.ZodIssueCode.invalid_enum_value){const t=String(e.received),a=jm[Bm(t)],i=`Invalid searchType "${t}". Valid values: ${Vm}.`;return{message:a?`${i} ${a}`:i}}return{message:t.defaultError}}})).describe(`The type of search to perform. Valid values: ${Vm}.`),vf=o.z.preprocess((function(e){return null==e?20:e}),o.z.coerce.number().finite().transform((e=>Math.min(Math.max(Math.trunc(e),1),20)))).optional().default(20).describe("The number of items to get. Maximum is 20."),yf={searchTerm:o.z.string().trim().min(1,{message:"searchTerm must be a non-empty search string."}).optional().describe("The search phrase — the text the search matches results against (e.g. a board name, item title, or keywords). Required and must be non-empty. This is NOT a filter or an id — pass the words to look for."),searchType:bf,limit:vf,workspaceIds:_f("Array of workspace IDs (numbers) to search in. Optional for FOLDERS search (searches all accessible workspaces when omitted). For BOARD, DOCUMENTS, and DASHBOARDS search, only pass this if the user explicitly asked to search within specific workspaces. Example: [12345, 67890]."),boardIds:_f("Array of board IDs (numbers) to scope the search to. Only applies to UPDATES search, and only pass it if the user explicitly asked to search within specific boards. Example: [12345, 67890]."),creatorIds:_f("Array of user IDs (numbers) whose items to search. Applies to UPDATES (filters by update author) and DASHBOARDS (filters by dashboard creator). Only pass it if the user explicitly asked to filter by specific creators. Example: [12345, 67890].")};const If=o.z.object({id:o.z.string().describe("The ID of the entity to mention"),type:o.z.nativeEnum(br).describe("The type of mention: User, Team, Board, or Project")}),wf=o.z.array(If),Tf={itemId:o.z.number().describe("The id of the item to which the update will be added"),body:o.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:o.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 Ef=Vd`
2146
2153
  mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
2147
2154
  update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
2148
2155
  id
2149
2156
  name
2150
2157
  }
2151
2158
  }
2152
- `,Ef=o.z.object({fileType:o.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:o.z.string().describe("File display name"),linkToFile:o.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:o.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:o.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),Af={boardId:o.z.string().describe("The board's unique identifier"),itemId:o.z.string().describe("The item's unique identifier"),columnId:o.z.string().describe("The file or doc column's unique identifier"),files:o.z.array(Ef).describe("Array of file values to set on the column")};const Sf=Vd`
2159
+ `,Af=o.z.object({fileType:o.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:o.z.string().describe("File display name"),linkToFile:o.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:o.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:o.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),Sf={boardId:o.z.string().describe("The board's unique identifier"),itemId:o.z.string().describe("The item's unique identifier"),columnId:o.z.string().describe("The file or doc column's unique identifier"),files:o.z.array(Af).describe("Array of file values to set on the column")};const Nf=Vd`
2153
2160
  query getAssets($ids: [ID!]!) {
2154
2161
  assets(ids: $ids) {
2155
2162
  id
@@ -2167,7 +2174,7 @@
2167
2174
  }
2168
2175
  }
2169
2176
  }
2170
- `,Nf={ids:o.z.array(o.z.string()).min(1).describe("Array of asset IDs to fetch")};const Df=Vd`
2177
+ `,Df={ids:o.z.array(o.z.string()).min(1).describe("Array of asset IDs to fetch")};const Of=Vd`
2171
2178
  query getUserContext {
2172
2179
  me {
2173
2180
  id
@@ -2204,7 +2211,7 @@
2204
2211
  }
2205
2212
  }
2206
2213
  }
2207
- `,Of=Vd`
2214
+ `,kf=Vd`
2208
2215
  query getFavoriteDetails(
2209
2216
  $boardIds: [ID!]
2210
2217
  $folderIds: [ID!]
@@ -2228,13 +2235,13 @@
2228
2235
  name
2229
2236
  }
2230
2237
  }
2231
- `,kf={[ir.Board]:"boardIds",[ir.Folder]:"folderIds",[ir.Workspace]:"workspaceIds",[ir.Dashboard]:"dashboardIds"},Cf={[ir.Board]:"boards",[ir.Folder]:"folders",[ir.Workspace]:"workspaces",[ir.Dashboard]:"dashboards"};const Rf=Vd`
2238
+ `,Cf={[ir.Board]:"boardIds",[ir.Folder]:"folderIds",[ir.Workspace]:"workspaceIds",[ir.Dashboard]:"dashboardIds"},Rf={[ir.Board]:"boards",[ir.Folder]:"folders",[ir.Workspace]:"workspaces",[ir.Dashboard]:"dashboards"};const $f=Vd`
2232
2239
  mutation BatchUndo($boardId: ID!, $undoRecordId: ID!) {
2233
2240
  batch_undo(board_id: $boardId, undo_record_id: $undoRecordId) {
2234
2241
  success
2235
2242
  }
2236
2243
  }
2237
- `,$f={boardId:o.z.number().describe("The id of the board where the action was performed"),undoRecordId:o.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 Lf=Vd`
2244
+ `,Lf={boardId:o.z.number().describe("The id of the board where the action was performed"),undoRecordId:o.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 xf=Vd`
2238
2245
  mutation CreateUpload($input: CreateUploadInput!) {
2239
2246
  create_upload(input: $input) {
2240
2247
  upload_id
@@ -2248,7 +2255,7 @@
2248
2255
  expires_at
2249
2256
  }
2250
2257
  }
2251
- `,xf={fileName:o.z.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:o.z.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:o.z.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Uf=Vd`
2258
+ `,Uf={fileName:o.z.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:o.z.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:o.z.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Pf=Vd`
2252
2259
  mutation CompleteUpload($input: CompleteUploadInput!) {
2253
2260
  complete_upload(input: $input) {
2254
2261
  id
@@ -2260,13 +2267,13 @@
2260
2267
  filelink
2261
2268
  }
2262
2269
  }
2263
- `,Pf=Vd`
2270
+ `,Ff=Vd`
2264
2271
  mutation ChangeColumnValue($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {
2265
2272
  change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {
2266
2273
  id
2267
2274
  }
2268
2275
  }
2269
- `,Ff={uploadId:o.z.string().describe("The upload_id returned by get_asset_upload_url"),etag:o.z.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:o.z.string().describe("The board's unique identifier"),itemId:o.z.string().describe("The item's unique identifier"),columnId:o.z.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Mf="\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(),Vf={};const Bf=Vd`
2276
+ `,Mf={uploadId:o.z.string().describe("The upload_id returned by get_asset_upload_url"),etag:o.z.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:o.z.string().describe("The board's unique identifier"),itemId:o.z.string().describe("The item's unique identifier"),columnId:o.z.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Vf="\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(),Bf={};const zf=Vd`
2270
2277
  query GetItemAssets($itemId: [ID!]!, $columnId: [String!]!) {
2271
2278
  items(ids: $itemId) {
2272
2279
  assets(column_ids: $columnId) {
@@ -2276,7 +2283,7 @@
2276
2283
  }
2277
2284
  }
2278
2285
  }
2279
- `,zf=10485760,jf=5e4,qf=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Gf=new Set([".pdf"]),Hf=new Set([".docx"]),Wf=new Set([".xlsx"]),Yf=new Set([".xls"]),Kf=new Set([".txt",".md",".csv",".json"]),Qf={item_id:o.z.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:o.z.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:o.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:o.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 Jf(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function Xf(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 Xf(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Zf(e,t,a){const i=function(e,t){if(t){const e=Jf(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Jf(e.name)}(e,a);try{if(qf.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(Yf.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)>zf)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>zf)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;Gf.has(i)?(n=await async function(e){const t=await u.getDocumentProxy(new Uint8Array(e)),{text:a}=await u.extractText(t,{mergePages:!0});return a}(a),o="pdf"):Hf.has(i)?(n=await async function(e){return(await C.default.extractRawText({buffer:e})).value}(a),o="word"):Wf.has(i)?(n=await async function(e){const t=new R.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(Xf).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):Kf.has(i)?(n=a.toString("utf-8"),o="text"):(n=a.toString("utf-8"),o="unknown");const r=n.slice(t,t+jf),s=n.length>t+jf;return{file_name:e.name,file_extension:i,content_type:o,text:r,total_length:n.length,...Gf.has(i)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+jf}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var e_,t_,a_,i_,n_,o_,r_,s_,d_,p_,l_,c_,m_,u_,h_,f_,__,g_,b_,v_,y_,I_,w_,T_,E_,A_,S_,N_,D_,O_,k_,C_,R_,$_,L_,x_,U_,P_,F_,M_,V_,B_,z_,j_,q_,G_,H_,W_,Y_,K_,Q_,J_,X_,Z_,eg,tg,ag,ig,ng,og,rg,sg,dg,pg,lg,cg,mg,ug,hg,fg,_g,gg,bg,vg,yg,Ig,wg,Tg,Eg,Ag,Sg,Ng,Dg,Og,kg,Cg,Rg,$g,Lg,xg,Ug,Pg,Fg,Mg,Vg,Bg,zg,jg,qg,Gg,Hg,Wg,Yg,Kg,Qg,Jg,Xg,Zg,eb,tb,ab,ib,nb,ob,rb,sb,db,pb,lb,cb,mb,ub,hb,fb,_b,gb,bb,vb,yb,Ib,wb,Tb,Eb,Ab,Sb,Nb,Db,Ob,kb,Cb,Rb,$b,Lb,xb,Ub,Pb,Fb,Mb,Vb,Bb,zb,jb,qb,Gb,Hb,Wb,Yb,Kb,Qb,Jb,Xb,Zb,ev,tv,av,iv,nv,ov,rv,sv,dv,pv,lv,cv,mv,uv,hv,fv,_v,gv,bv,vv,yv,Iv,wv,Tv,Ev,Av,Sv,Nv,Dv,Ov,kv,Cv,Rv,$v,Lv,xv,Uv,Pv,Fv,Mv,Vv,Bv,zv,jv,qv,Gv,Hv,Wv,Yv,Kv,Qv,Jv,Xv,Zv,ey,ty,ay,iy,ny,oy,ry,sy,dy,py,ly,cy,my,uy,hy,fy;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(e_||(e_={})),function(e){e.Audio="AUDIO",e.Board="BOARD",e.Doc="DOC",e.Html="HTML",e.Image="IMAGE",e.Item="ITEM",e.Update="UPDATE",e.VibeApp="VIBE_APP",e.Video="VIDEO",e.View="VIEW"}(t_||(t_={})),function(e){e.Asset="ASSET",e.MondayEntity="MONDAY_ENTITY"}(a_||(a_={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(i_||(i_={})),function(e){e.Member="MEMBER",e.Owner="OWNER"}(n_||(n_={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(o_||(o_={})),function(e){e.ActionIntent="ACTION_INTENT",e.ClarificationReceived="CLARIFICATION_RECEIVED",e.ClarificationRequested="CLARIFICATION_REQUESTED",e.FeedbackGiven="FEEDBACK_GIVEN",e.PlanCreated="PLAN_CREATED",e.RunCompleted="RUN_COMPLETED",e.RunFailed="RUN_FAILED",e.RunStarted="RUN_STARTED",e.RunStopped="RUN_STOPPED",e.StepCompleted="STEP_COMPLETED",e.StepFailed="STEP_FAILED",e.StepRetry="STEP_RETRY",e.StepStarted="STEP_STARTED",e.StepSummary="STEP_SUMMARY",e.Thinking="THINKING",e.ToolCalled="TOOL_CALLED",e.ToolCompleted="TOOL_COMPLETED",e.ToolFailed="TOOL_FAILED"}(r_||(r_={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(s_||(s_={})),function(e){e.Team="TEAM",e.User="USER"}(d_||(d_={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(p_||(p_={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(l_||(l_={})),function(e){e.Table="TABLE",e.Union="UNION"}(c_||(c_={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(m_||(m_={})),function(e){e.And="AND",e.Or="OR"}(u_||(u_={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(h_||(h_={})),function(e){e.Asc="ASC",e.Desc="DESC"}(f_||(f_={})),function(e){e.Table="TABLE"}(__||(__={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(g_||(g_={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(b_||(b_={})),function(e){e.CompanyName="company_name",e.Custom="custom",e.Date="date",e.DomainName="domain_name",e.EmailAddress="email_address",e.FirstName="first_name",e.LastName="last_name",e.PhoneNumber="phone_number",e.Time="time",e.Url="url",e.Year="year"}(v_||(v_={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(y_||(y_={})),function(e){e.Arabic="arabic",e.Bengali="bengali",e.Chinese="chinese",e.Danish="danish",e.Dutch="dutch",e.English="english",e.French="french",e.German="german",e.Hebrew="hebrew",e.Hindi="hindi",e.Indonesian="indonesian",e.Italian="italian",e.Japanese="japanese",e.Korean="korean",e.Norwegian="norwegian",e.Polish="polish",e.Portuguese="portuguese",e.Russian="russian",e.Spanish="spanish",e.Swedish="swedish",e.Thai="thai",e.Turkish="turkish",e.Vietnamese="vietnamese"}(I_||(I_={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(w_||(w_={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(T_||(T_={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(E_||(E_={})),function(e){e.Casual="casual",e.Confident="confident",e.Empathic="empathic",e.Friendly="friendly",e.Natural="natural",e.Professional="professional",e.Promotional="promotional",e.Same="same"}(A_||(A_={})),function(e){e.MondayFast="MONDAY_FAST",e.MondayPowerful="MONDAY_POWERFUL",e.MondayStandard="MONDAY_STANDARD"}(S_||(S_={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ApplicationXlsx="APPLICATION_XLSX",e.ImageAvif="IMAGE_AVIF",e.ImageGif="IMAGE_GIF",e.ImageHeic="IMAGE_HEIC",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageSvg="IMAGE_SVG",e.ImageWebp="IMAGE_WEBP",e.TextCsv="TEXT_CSV",e.TextMarkdown="TEXT_MARKDOWN",e.TextPlain="TEXT_PLAIN",e.VideoMp4="VIDEO_MP4",e.VideoOgg="VIDEO_OGG",e.VideoQuicktime="VIDEO_QUICKTIME",e.VideoWebm="VIDEO_WEBM"}(N_||(N_={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(D_||(D_={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Skill="SKILL",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(O_||(O_={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(k_||(k_={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(C_||(C_={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(R_||(R_={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}($_||($_={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(L_||(L_={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.None="NONE",e.Pending="PENDING"}(x_||(x_={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.Channel="CHANNEL",e.Initiative="INITIATIVE",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(U_||(U_={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(P_||(P_={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(F_||(F_={})),function(e){e.Agent="AGENT"}(M_||(M_={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(V_||(V_={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(B_||(B_={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(z_||(z_={})),function(e){e.Edit="edit",e.View="view"}(j_||(j_={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(q_||(q_={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(G_||(G_={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(H_||(H_={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(W_||(W_={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Y_||(Y_={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(K_||(K_={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Q_||(Q_={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(J_||(J_={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(X_||(X_={})),function(e){e.Edit="edit",e.View="view"}(Z_||(Z_={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(eg||(eg={})),function(e){e.AccountCapacityExceeded="ACCOUNT_CAPACITY_EXCEEDED",e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.FileTooLarge="FILE_TOO_LARGE",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(tg||(tg={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(ag||(ag={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(ig||(ig={})),function(e){e.EmailBounced="EMAIL_BOUNCED",e.EmailClicked="EMAIL_CLICKED",e.EmailDelivered="EMAIL_DELIVERED",e.EmailDropped="EMAIL_DROPPED",e.EmailOpened="EMAIL_OPENED",e.EmailRecipientComplaint="EMAIL_RECIPIENT_COMPLAINT",e.EmailRecipientGroupResubscribed="EMAIL_RECIPIENT_GROUP_RESUBSCRIBED",e.EmailRecipientGroupUnsubscribed="EMAIL_RECIPIENT_GROUP_UNSUBSCRIBED",e.EmailRecipientUnsubscribed="EMAIL_RECIPIENT_UNSUBSCRIBED",e.EmailSent="EMAIL_SENT"}(ng||(ng={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(og||(og={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(rg||(rg={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(sg||(sg={})),function(e){e.CompetitorMove="COMPETITOR_MOVE",e.CrisisEvent="CRISIS_EVENT",e.CustomerBehavior="CUSTOMER_BEHAVIOR",e.EmergingTechnology="EMERGING_TECHNOLOGY",e.MarketTrend="MARKET_TREND",e.Other="OTHER",e.ProductLaunch="PRODUCT_LAUNCH",e.RegulatoryChange="REGULATORY_CHANGE"}(dg||(dg={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(pg||(pg={})),function(e){e.Later="LATER",e.Now="NOW"}(lg||(lg={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(cg||(cg={})),function(e){e.Asc="ASC",e.Desc="DESC"}(mg||(mg={})),function(e){e.Blocked="BLOCKED",e.Draft="DRAFT",e.Failed="FAILED",e.Generating="GENERATING",e.Ongoing="ONGOING",e.OnHold="ON_HOLD",e.Processing="PROCESSING",e.ReadyToSend="READY_TO_SEND",e.Scheduled="SCHEDULED",e.Sending="SENDING",e.Sent="SENT"}(ug||(ug={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(hg||(hg={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(fg||(fg={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(_g||(_g={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(gg||(gg={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(bg||(bg={})),function(e){e.Description="description",e.Title="title"}(vg||(vg={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(yg||(yg={})),function(e){e.Or="OR"}(Ig||(Ig={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(wg||(wg={})),function(e){e.Account="ACCOUNT",e.User="USER"}(Tg||(Tg={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(Eg||(Eg={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(Ag||(Ag={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(Sg||(Sg={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Ng||(Ng={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Dg||(Dg={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(Og||(Og={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(kg||(kg={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(Cg||(Cg={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(Rg||(Rg={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}($g||($g={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Lg||(Lg={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(xg||(xg={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Ug||(Ug={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Pg||(Pg={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Fg||(Fg={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Mg||(Mg={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(Vg||(Vg={})),function(e){e.BoardInaccessible="BOARD_INACCESSIBLE",e.BoardUnavailable="BOARD_UNAVAILABLE",e.InternalError="INTERNAL_ERROR",e.InvalidRequest="INVALID_REQUEST",e.ItemLimitExceeded="ITEM_LIMIT_EXCEEDED",e.NotFound="NOT_FOUND"}(Bg||(Bg={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(zg||(zg={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(jg||(jg={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(qg||(qg={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(Gg||(Gg={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(Hg||(Hg={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(Wg||(Wg={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Yg||(Yg={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Kg||(Kg={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Qg||(Qg={})),function(e){e.Monday="monday",e.Sunday="sunday"}(Jg||(Jg={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(Xg||(Xg={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(Zg||(Zg={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(eb||(eb={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(tb||(tb={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(ab||(ab={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(ib||(ib={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(nb||(nb={})),function(e){e.Card="CARD",e.Flat="FLAT"}(ob||(ob={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(rb||(rb={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(sb||(sb={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(db||(db={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(pb||(pb={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(lb||(lb={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.DisplayText="DISPLAY_TEXT",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Hour="HOUR",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.PageBlock="PAGE_BLOCK",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(cb||(cb={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(mb||(mb={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(ub||(ub={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(hb||(hb={})),function(e){e.And="AND",e.Or="OR"}(fb||(fb={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(_b||(_b={})),function(e){e.DataLimit="DATA_LIMIT",e.PlanLimit="PLAN_LIMIT"}(gb||(gb={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(bb||(bb={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(vb||(vb={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.AuthDomain="AUTH_DOMAIN",e.Consolidation="CONSOLIDATION",e.FirstUser="FIRST_USER",e.InternalCreation="INTERNAL_CREATION",e.Scim="SCIM",e.ServicePortalAuthDomain="SERVICE_PORTAL_AUTH_DOMAIN",e.ServicePortalUserInvitation="SERVICE_PORTAL_USER_INVITATION",e.Sso="SSO",e.SystemCreation="SYSTEM_CREATION",e.Unknown="UNKNOWN",e.User="USER"}(yb||(yb={})),function(e){e.Error="ERROR"}(Ib||(Ib={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(wb||(wb={})),function(e){e.Table="TABLE"}(Tb||(Tb={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(Eb||(Eb={})),function(e){e.And="AND",e.Or="OR"}(Ab||(Ab={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Sb||(Sb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Nb||(Nb={})),function(e){e.Asc="asc",e.Desc="desc"}(Db||(Db={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(Ob||(Ob={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Hour="hour",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Numbers="numbers",e.People="people",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(kb||(kb={})),function(e){e.And="and",e.Or="or"}(Cb||(Cb={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(Rb||(Rb={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}($b||($b={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(Lb||(Lb={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(xb||(xb={})),function(e){e.Board="BOARD",e.Doc="DOC",e.Workspace="WORKSPACE"}(Ub||(Ub={})),function(e){e.File="FILE"}(Pb||(Pb={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(Fb||(Fb={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(Mb||(Mb={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(Vb||(Vb={})),function(e){e.Dropdown="dropdown",e.Status="status"}(Bb||(Bb={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(zb||(zb={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(jb||(jb={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(qb||(qb={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(Gb||(Gb={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(Hb||(Hb={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(Wb||(Wb={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(Yb||(Yb={})),function(e){e.Post="Post",e.Project="Project"}(Kb||(Kb={})),function(e){e.Left="left",e.Right="right"}(Qb||(Qb={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(Jb||(Jb={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(Xb||(Xb={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(Zb||(Zb={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(ev||(ev={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(tv||(tv={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(av||(av={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(iv||(iv={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(nv||(nv={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(ov||(ov={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(rv||(rv={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(sv||(sv={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(dv||(dv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(pv||(pv={})),function(e){e.BaseRole="BASE_ROLE",e.Email="EMAIL",e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Name="NAME",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Status="STATUS",e.Teams="TEAMS"}(lv||(lv={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(cv||(cv={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsText="CONTAINS_TEXT",e.Equals="EQUALS",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.NotEquals="NOT_EQUALS",e.StartsWithText="STARTS_WITH_TEXT"}(mv||(mv={})),function(e){e.Api="API",e.Assigned="ASSIGNED",e.Automation="AUTOMATION",e.Chat="CHAT",e.Mention="MENTION",e.Schedule="SCHEDULE"}(uv||(uv={})),function(e){e.Completed="COMPLETED",e.Executing="EXECUTING",e.Failed="FAILED",e.NeedsConfirmation="NEEDS_CONFIRMATION",e.Running="RUNNING",e.Stopped="STOPPED",e.StoppedBySystem="STOPPED_BY_SYSTEM",e.Thinking="THINKING",e.WaitingClarification="WAITING_CLARIFICATION"}(hv||(hv={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(fv||(fv={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(_v||(_v={})),function(e){e.Board="BOARD"}(gv||(gv={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(bv||(bv={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(vv||(vv={})),function(e){e.Asc="ASC",e.Desc="DESC"}(yv||(yv={})),function(e){e.Complete="COMPLETE",e.Start="START"}(Iv||(Iv={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(wv||(wv={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(Tv||(Tv={})),function(e){e.CountKeys="COUNT_KEYS"}(Ev||(Ev={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(Av||(Av={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(Sv||(Sv={})),function(e){e.Nominal="nominal",e.Percent="percent"}(Nv||(Nv={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(Dv||(Dv={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(Ov||(Ov={})),function(e){e.Active="active",e.Inactive="inactive"}(kv||(kv={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(Cv||(Cv={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(Rv||(Rv={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}($v||($v={})),function(e){e.Done="DONE",e.InProgress="IN_PROGRESS",e.NotATask="NOT_A_TASK",e.NotNow="NOT_NOW",e.NoLongerRelevant="NO_LONGER_RELEVANT",e.Pending="PENDING",e.Todo="TODO"}(Lv||(Lv={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(xv||(xv={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(Uv||(Uv={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(Pv||(Pv={})),function(e){e.Custom="CUSTOM",e.Holiday="HOLIDAY"}(Fv||(Fv={})),function(e){e.Activity="activity",e.AiAssistant="aiAssistant",e.AiReply="aiReply",e.AiSummary="aiSummary",e.Campaigns="campaigns",e.Custom="custom",e.CustomInternalApp="customInternalApp",e.DemoEmail="demoEmail",e.Email="email",e.Form="form",e.GoogleCalendar="googleCalendar",e.Meeting="meeting",e.MergedTickets="mergedTickets",e.Note="note",e.OutlookCalendar="outlookCalendar",e.OutreachExpertPhoneCall="outreachExpertPhoneCall",e.OutreachExpertPhoneCallV2="outreachExpertPhoneCallV2",e.PhoneCall="phoneCall",e.Portal="portal",e.PortfolioStatus="portfolio_status",e.SequencesEmail="sequencesEmail",e.VideoMeeting="videoMeeting",e.Zoom="zoom"}(Mv||(Mv={})),function(e){e.Crm="crm",e.Service="service"}(Vv||(Vv={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(Bv||(Bv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(zv||(zv={})),function(e){e.InvalidField="INVALID_FIELD"}(jv||(jv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(qv||(qv={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(Gv||(Gv={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY"}(Hv||(Hv={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Wv||(Wv={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(Yv||(Yv={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Kv||(Kv={})),function(e){e.CreatedAt="CREATED_AT"}(Qv||(Qv={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(Jv||(Jv={})),function(e){e.Board="board"}(Xv||(Xv={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(Zv||(Zv={})),function(e){e.Board="BOARD",e.Item="ITEM"}(ey||(ey={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(ty||(ty={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(ay||(ay={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(iy||(iy={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(ny||(ny={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(oy||(oy={})),function(e){e.Error="ERROR",e.Ok="OK"}(ry||(ry={})),function(e){e.Wait="WAIT"}(sy||(sy={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(dy||(dy={})),function(e){e.LiteBuilder="LITE_BUILDER"}(py||(py={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(ly||(ly={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(cy||(cy={})),function(e){e.All="all",e.Member="member"}(my||(my={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(uy||(uy={})),function(e){e.CreatedAt="created_at"}(hy||(hy={})),function(e){e.Core="core",e.Crm="crm",e.Forms="forms",e.Marketing="marketing",e.ProjectManagement="project_management",e.Service="service",e.Software="software",e.Whiteboard="whiteboard"}(fy||(fy={}));const _y=Vd`
2286
+ `,jf=10485760,qf=5e4,Gf=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Hf=new Set([".pdf"]),Wf=new Set([".docx"]),Yf=new Set([".xlsx"]),Kf=new Set([".xls"]),Qf=new Set([".txt",".md",".csv",".json"]),Jf={item_id:o.z.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:o.z.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:o.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:o.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 Xf(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function Zf(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 Zf(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function e_(e,t,a){const i=function(e,t){if(t){const e=Xf(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Xf(e.name)}(e,a);try{if(Gf.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(Kf.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)>jf)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>jf)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;Hf.has(i)?(n=await async function(e){const t=await u.getDocumentProxy(new Uint8Array(e)),{text:a}=await u.extractText(t,{mergePages:!0});return a}(a),o="pdf"):Wf.has(i)?(n=await async function(e){return(await C.default.extractRawText({buffer:e})).value}(a),o="word"):Yf.has(i)?(n=await async function(e){const t=new R.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(Zf).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):Qf.has(i)?(n=a.toString("utf-8"),o="text"):(n=a.toString("utf-8"),o="unknown");const r=n.slice(t,t+qf),s=n.length>t+qf;return{file_name:e.name,file_extension:i,content_type:o,text:r,total_length:n.length,...Hf.has(i)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+qf}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var t_,a_,i_,n_,o_,r_,s_,d_,p_,l_,c_,m_,u_,h_,f_,__,g_,b_,v_,y_,I_,w_,T_,E_,A_,S_,N_,D_,O_,k_,C_,R_,$_,L_,x_,U_,P_,F_,M_,V_,B_,z_,j_,q_,G_,H_,W_,Y_,K_,Q_,J_,X_,Z_,eg,tg,ag,ig,ng,og,rg,sg,dg,pg,lg,cg,mg,ug,hg,fg,_g,gg,bg,vg,yg,Ig,wg,Tg,Eg,Ag,Sg,Ng,Dg,Og,kg,Cg,Rg,$g,Lg,xg,Ug,Pg,Fg,Mg,Vg,Bg,zg,jg,qg,Gg,Hg,Wg,Yg,Kg,Qg,Jg,Xg,Zg,eb,tb,ab,ib,nb,ob,rb,sb,db,pb,lb,cb,mb,ub,hb,fb,_b,gb,bb,vb,yb,Ib,wb,Tb,Eb,Ab,Sb,Nb,Db,Ob,kb,Cb,Rb,$b,Lb,xb,Ub,Pb,Fb,Mb,Vb,Bb,zb,jb,qb,Gb,Hb,Wb,Yb,Kb,Qb,Jb,Xb,Zb,ev,tv,av,iv,nv,ov,rv,sv,dv,pv,lv,cv,mv,uv,hv,fv,_v,gv,bv,vv,yv,Iv,wv,Tv,Ev,Av,Sv,Nv,Dv,Ov,kv,Cv,Rv,$v,Lv,xv,Uv,Pv,Fv,Mv,Vv,Bv,zv,jv,qv,Gv,Hv,Wv,Yv,Kv,Qv,Jv,Xv,Zv,ey,ty,ay,iy,ny,oy,ry,sy,dy,py,ly,cy,my,uy,hy,fy,_y;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(t_||(t_={})),function(e){e.Audio="AUDIO",e.Board="BOARD",e.Doc="DOC",e.Html="HTML",e.Image="IMAGE",e.Item="ITEM",e.Update="UPDATE",e.VibeApp="VIBE_APP",e.Video="VIDEO",e.View="VIEW"}(a_||(a_={})),function(e){e.Asset="ASSET",e.MondayEntity="MONDAY_ENTITY"}(i_||(i_={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(n_||(n_={})),function(e){e.Member="MEMBER",e.Owner="OWNER"}(o_||(o_={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(r_||(r_={})),function(e){e.ActionIntent="ACTION_INTENT",e.ClarificationReceived="CLARIFICATION_RECEIVED",e.ClarificationRequested="CLARIFICATION_REQUESTED",e.FeedbackGiven="FEEDBACK_GIVEN",e.PlanCreated="PLAN_CREATED",e.RunCompleted="RUN_COMPLETED",e.RunFailed="RUN_FAILED",e.RunStarted="RUN_STARTED",e.RunStopped="RUN_STOPPED",e.StepCompleted="STEP_COMPLETED",e.StepFailed="STEP_FAILED",e.StepRetry="STEP_RETRY",e.StepStarted="STEP_STARTED",e.StepSummary="STEP_SUMMARY",e.Thinking="THINKING",e.ToolCalled="TOOL_CALLED",e.ToolCompleted="TOOL_COMPLETED",e.ToolFailed="TOOL_FAILED"}(s_||(s_={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(d_||(d_={})),function(e){e.Team="TEAM",e.User="USER"}(p_||(p_={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(l_||(l_={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(c_||(c_={})),function(e){e.Table="TABLE",e.Union="UNION"}(m_||(m_={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(u_||(u_={})),function(e){e.And="AND",e.Or="OR"}(h_||(h_={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(f_||(f_={})),function(e){e.Asc="ASC",e.Desc="DESC"}(__||(__={})),function(e){e.Table="TABLE"}(g_||(g_={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(b_||(b_={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(v_||(v_={})),function(e){e.CompanyName="company_name",e.Custom="custom",e.Date="date",e.DomainName="domain_name",e.EmailAddress="email_address",e.FirstName="first_name",e.LastName="last_name",e.PhoneNumber="phone_number",e.Time="time",e.Url="url",e.Year="year"}(y_||(y_={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(I_||(I_={})),function(e){e.Arabic="arabic",e.Bengali="bengali",e.Chinese="chinese",e.Danish="danish",e.Dutch="dutch",e.English="english",e.French="french",e.German="german",e.Hebrew="hebrew",e.Hindi="hindi",e.Indonesian="indonesian",e.Italian="italian",e.Japanese="japanese",e.Korean="korean",e.Norwegian="norwegian",e.Polish="polish",e.Portuguese="portuguese",e.Russian="russian",e.Spanish="spanish",e.Swedish="swedish",e.Thai="thai",e.Turkish="turkish",e.Vietnamese="vietnamese"}(w_||(w_={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(T_||(T_={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(E_||(E_={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(A_||(A_={})),function(e){e.Casual="casual",e.Confident="confident",e.Empathic="empathic",e.Friendly="friendly",e.Natural="natural",e.Professional="professional",e.Promotional="promotional",e.Same="same"}(S_||(S_={})),function(e){e.MondayFast="MONDAY_FAST",e.MondayPowerful="MONDAY_POWERFUL",e.MondayStandard="MONDAY_STANDARD"}(N_||(N_={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ApplicationXlsx="APPLICATION_XLSX",e.ImageAvif="IMAGE_AVIF",e.ImageGif="IMAGE_GIF",e.ImageHeic="IMAGE_HEIC",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageSvg="IMAGE_SVG",e.ImageWebp="IMAGE_WEBP",e.TextCsv="TEXT_CSV",e.TextMarkdown="TEXT_MARKDOWN",e.TextPlain="TEXT_PLAIN",e.VideoMp4="VIDEO_MP4",e.VideoOgg="VIDEO_OGG",e.VideoQuicktime="VIDEO_QUICKTIME",e.VideoWebm="VIDEO_WEBM"}(D_||(D_={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(O_||(O_={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Skill="SKILL",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(k_||(k_={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(C_||(C_={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(R_||(R_={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}($_||($_={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(L_||(L_={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(x_||(x_={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.None="NONE",e.Pending="PENDING"}(U_||(U_={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.Channel="CHANNEL",e.Initiative="INITIATIVE",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(P_||(P_={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(F_||(F_={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(M_||(M_={})),function(e){e.Agent="AGENT"}(V_||(V_={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(B_||(B_={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(z_||(z_={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(j_||(j_={})),function(e){e.Edit="edit",e.View="view"}(q_||(q_={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(G_||(G_={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(H_||(H_={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(W_||(W_={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(Y_||(Y_={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(K_||(K_={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(Q_||(Q_={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(J_||(J_={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(X_||(X_={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(Z_||(Z_={})),function(e){e.Edit="edit",e.View="view"}(eg||(eg={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(tg||(tg={})),function(e){e.AccountCapacityExceeded="ACCOUNT_CAPACITY_EXCEEDED",e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.FileTooLarge="FILE_TOO_LARGE",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(ag||(ag={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(ig||(ig={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(ng||(ng={})),function(e){e.EmailBounced="EMAIL_BOUNCED",e.EmailClicked="EMAIL_CLICKED",e.EmailDelivered="EMAIL_DELIVERED",e.EmailDropped="EMAIL_DROPPED",e.EmailOpened="EMAIL_OPENED",e.EmailRecipientComplaint="EMAIL_RECIPIENT_COMPLAINT",e.EmailRecipientGroupResubscribed="EMAIL_RECIPIENT_GROUP_RESUBSCRIBED",e.EmailRecipientGroupUnsubscribed="EMAIL_RECIPIENT_GROUP_UNSUBSCRIBED",e.EmailRecipientUnsubscribed="EMAIL_RECIPIENT_UNSUBSCRIBED",e.EmailSent="EMAIL_SENT"}(og||(og={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(rg||(rg={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(sg||(sg={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(dg||(dg={})),function(e){e.CompetitorMove="COMPETITOR_MOVE",e.CrisisEvent="CRISIS_EVENT",e.CustomerBehavior="CUSTOMER_BEHAVIOR",e.EmergingTechnology="EMERGING_TECHNOLOGY",e.MarketTrend="MARKET_TREND",e.Other="OTHER",e.ProductLaunch="PRODUCT_LAUNCH",e.RegulatoryChange="REGULATORY_CHANGE"}(pg||(pg={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(lg||(lg={})),function(e){e.Later="LATER",e.Now="NOW"}(cg||(cg={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(mg||(mg={})),function(e){e.Asc="ASC",e.Desc="DESC"}(ug||(ug={})),function(e){e.Blocked="BLOCKED",e.Draft="DRAFT",e.Failed="FAILED",e.Generating="GENERATING",e.Ongoing="ONGOING",e.OnHold="ON_HOLD",e.Processing="PROCESSING",e.ReadyToSend="READY_TO_SEND",e.Scheduled="SCHEDULED",e.Sending="SENDING",e.Sent="SENT"}(hg||(hg={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(fg||(fg={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(_g||(_g={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(gg||(gg={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(bg||(bg={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(vg||(vg={})),function(e){e.Description="description",e.Title="title"}(yg||(yg={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(Ig||(Ig={})),function(e){e.Or="OR"}(wg||(wg={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(Tg||(Tg={})),function(e){e.Account="ACCOUNT",e.User="USER"}(Eg||(Eg={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(Ag||(Ag={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(Sg||(Sg={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(Ng||(Ng={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Dg||(Dg={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Og||(Og={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(kg||(kg={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(Cg||(Cg={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(Rg||(Rg={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}($g||($g={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(Lg||(Lg={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(xg||(xg={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(Ug||(Ug={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Pg||(Pg={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Fg||(Fg={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Mg||(Mg={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Vg||(Vg={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(Bg||(Bg={})),function(e){e.BoardInaccessible="BOARD_INACCESSIBLE",e.BoardUnavailable="BOARD_UNAVAILABLE",e.InternalError="INTERNAL_ERROR",e.InvalidRequest="INVALID_REQUEST",e.ItemLimitExceeded="ITEM_LIMIT_EXCEEDED",e.NotFound="NOT_FOUND"}(zg||(zg={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(jg||(jg={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(qg||(qg={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(Gg||(Gg={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(Hg||(Hg={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(Wg||(Wg={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(Yg||(Yg={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Kg||(Kg={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Qg||(Qg={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(Jg||(Jg={})),function(e){e.Monday="monday",e.Sunday="sunday"}(Xg||(Xg={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(Zg||(Zg={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(eb||(eb={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(tb||(tb={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(ab||(ab={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(ib||(ib={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(nb||(nb={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(ob||(ob={})),function(e){e.Card="CARD",e.Flat="FLAT"}(rb||(rb={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(sb||(sb={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(db||(db={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(pb||(pb={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(lb||(lb={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(cb||(cb={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.DisplayText="DISPLAY_TEXT",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Hour="HOUR",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.PageBlock="PAGE_BLOCK",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(mb||(mb={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(ub||(ub={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(hb||(hb={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(fb||(fb={})),function(e){e.And="AND",e.Or="OR"}(_b||(_b={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(gb||(gb={})),function(e){e.DataLimit="DATA_LIMIT",e.PlanLimit="PLAN_LIMIT"}(bb||(bb={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(vb||(vb={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(yb||(yb={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.AuthDomain="AUTH_DOMAIN",e.Consolidation="CONSOLIDATION",e.FirstUser="FIRST_USER",e.InternalCreation="INTERNAL_CREATION",e.Scim="SCIM",e.ServicePortalAuthDomain="SERVICE_PORTAL_AUTH_DOMAIN",e.ServicePortalUserInvitation="SERVICE_PORTAL_USER_INVITATION",e.Sso="SSO",e.SystemCreation="SYSTEM_CREATION",e.Unknown="UNKNOWN",e.User="USER"}(Ib||(Ib={})),function(e){e.Error="ERROR"}(wb||(wb={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(Tb||(Tb={})),function(e){e.Table="TABLE"}(Eb||(Eb={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(Ab||(Ab={})),function(e){e.And="AND",e.Or="OR"}(Sb||(Sb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Nb||(Nb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Db||(Db={})),function(e){e.Asc="asc",e.Desc="desc"}(Ob||(Ob={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(kb||(kb={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Hour="hour",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Numbers="numbers",e.People="people",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(Cb||(Cb={})),function(e){e.And="and",e.Or="or"}(Rb||(Rb={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}($b||($b={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(Lb||(Lb={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(xb||(xb={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(Ub||(Ub={})),function(e){e.Board="BOARD",e.Doc="DOC",e.Workspace="WORKSPACE"}(Pb||(Pb={})),function(e){e.File="FILE"}(Fb||(Fb={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(Mb||(Mb={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(Vb||(Vb={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(Bb||(Bb={})),function(e){e.Dropdown="dropdown",e.Status="status"}(zb||(zb={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(jb||(jb={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(qb||(qb={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(Gb||(Gb={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(Hb||(Hb={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(Wb||(Wb={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(Yb||(Yb={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(Kb||(Kb={})),function(e){e.Post="Post",e.Project="Project"}(Qb||(Qb={})),function(e){e.Left="left",e.Right="right"}(Jb||(Jb={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(Xb||(Xb={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(Zb||(Zb={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(ev||(ev={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(tv||(tv={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(av||(av={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(iv||(iv={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(nv||(nv={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(ov||(ov={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(rv||(rv={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(sv||(sv={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(dv||(dv={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(pv||(pv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(lv||(lv={})),function(e){e.BaseRole="BASE_ROLE",e.Email="EMAIL",e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Name="NAME",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Status="STATUS",e.Teams="TEAMS"}(cv||(cv={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(mv||(mv={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsText="CONTAINS_TEXT",e.Equals="EQUALS",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.NotEquals="NOT_EQUALS",e.StartsWithText="STARTS_WITH_TEXT"}(uv||(uv={})),function(e){e.Api="API",e.Assigned="ASSIGNED",e.Automation="AUTOMATION",e.Chat="CHAT",e.Mention="MENTION",e.Schedule="SCHEDULE"}(hv||(hv={})),function(e){e.Completed="COMPLETED",e.Executing="EXECUTING",e.Failed="FAILED",e.NeedsConfirmation="NEEDS_CONFIRMATION",e.Running="RUNNING",e.Stopped="STOPPED",e.StoppedBySystem="STOPPED_BY_SYSTEM",e.Thinking="THINKING",e.WaitingClarification="WAITING_CLARIFICATION"}(fv||(fv={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(_v||(_v={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(gv||(gv={})),function(e){e.Board="BOARD"}(bv||(bv={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(vv||(vv={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(yv||(yv={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Iv||(Iv={})),function(e){e.Complete="COMPLETE",e.Start="START"}(wv||(wv={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(Tv||(Tv={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(Ev||(Ev={})),function(e){e.CountKeys="COUNT_KEYS"}(Av||(Av={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(Sv||(Sv={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(Nv||(Nv={})),function(e){e.Nominal="nominal",e.Percent="percent"}(Dv||(Dv={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(Ov||(Ov={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(kv||(kv={})),function(e){e.Active="active",e.Inactive="inactive"}(Cv||(Cv={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(Rv||(Rv={})),function(e){e.Create="CREATE",e.Update="UPDATE"}($v||($v={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(Lv||(Lv={})),function(e){e.Done="DONE",e.InProgress="IN_PROGRESS",e.NotATask="NOT_A_TASK",e.NotNow="NOT_NOW",e.NoLongerRelevant="NO_LONGER_RELEVANT",e.Pending="PENDING",e.Todo="TODO"}(xv||(xv={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(Uv||(Uv={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(Pv||(Pv={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(Fv||(Fv={})),function(e){e.Custom="CUSTOM",e.Holiday="HOLIDAY"}(Mv||(Mv={})),function(e){e.Activity="activity",e.AiAssistant="aiAssistant",e.AiReply="aiReply",e.AiSummary="aiSummary",e.Campaigns="campaigns",e.Custom="custom",e.CustomInternalApp="customInternalApp",e.DemoEmail="demoEmail",e.Email="email",e.Form="form",e.GoogleCalendar="googleCalendar",e.Meeting="meeting",e.MergedTickets="mergedTickets",e.Note="note",e.OutlookCalendar="outlookCalendar",e.OutreachExpertPhoneCall="outreachExpertPhoneCall",e.OutreachExpertPhoneCallV2="outreachExpertPhoneCallV2",e.PhoneCall="phoneCall",e.Portal="portal",e.PortfolioStatus="portfolio_status",e.SequencesEmail="sequencesEmail",e.VideoMeeting="videoMeeting",e.Zoom="zoom"}(Vv||(Vv={})),function(e){e.Crm="crm",e.Service="service"}(Bv||(Bv={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(zv||(zv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(jv||(jv={})),function(e){e.InvalidField="INVALID_FIELD"}(qv||(qv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Gv||(Gv={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(Hv||(Hv={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY"}(Wv||(Wv={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Yv||(Yv={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(Kv||(Kv={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Qv||(Qv={})),function(e){e.CreatedAt="CREATED_AT"}(Jv||(Jv={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(Xv||(Xv={})),function(e){e.Board="board"}(Zv||(Zv={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(ey||(ey={})),function(e){e.Board="BOARD",e.Item="ITEM"}(ty||(ty={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(ay||(ay={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(iy||(iy={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(ny||(ny={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(oy||(oy={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(ry||(ry={})),function(e){e.Error="ERROR",e.Ok="OK"}(sy||(sy={})),function(e){e.Wait="WAIT"}(dy||(dy={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(py||(py={})),function(e){e.LiteBuilder="LITE_BUILDER"}(ly||(ly={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(cy||(cy={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(my||(my={})),function(e){e.All="all",e.Member="member"}(uy||(uy={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(hy||(hy={})),function(e){e.CreatedAt="created_at"}(fy||(fy={})),function(e){e.Core="core",e.Crm="crm",e.Forms="forms",e.Marketing="marketing",e.ProjectManagement="project_management",e.Service="service",e.Software="software",e.Whiteboard="whiteboard"}(_y||(_y={}));const gy=Vd`
2280
2287
  fragment CustomAgentFields on CustomAgent {
2281
2288
  id
2282
2289
  kind
@@ -2295,65 +2302,65 @@
2295
2302
  created_at
2296
2303
  updated_at
2297
2304
  }
2298
- `,gy=Vd`
2299
- ${_y}
2305
+ `,by=Vd`
2306
+ ${gy}
2300
2307
 
2301
2308
  query getCustomAgents($ids: [ID!], $limit: Int) {
2302
2309
  custom_agents(ids: $ids, limit: $limit) {
2303
2310
  ...CustomAgentFields
2304
2311
  }
2305
2312
  }
2306
- `,by=Vd`
2307
- ${_y}
2313
+ `,vy=Vd`
2314
+ ${gy}
2308
2315
 
2309
2316
  mutation createAgent($input: CreateAgentInput!) {
2310
2317
  create_agent(input: $input) {
2311
2318
  ...CustomAgentFields
2312
2319
  }
2313
2320
  }
2314
- `,vy=Vd`
2315
- ${_y}
2321
+ `,yy=Vd`
2322
+ ${gy}
2316
2323
 
2317
2324
  mutation createBlankAgent($input: CreateBlankAgentInput) {
2318
2325
  create_blank_agent(input: $input) {
2319
2326
  ...CustomAgentFields
2320
2327
  }
2321
2328
  }
2322
- `,yy=Vd`
2323
- ${_y}
2329
+ `,Iy=Vd`
2330
+ ${gy}
2324
2331
 
2325
2332
  mutation updateAgent($id: ID!, $input: UpdateAgentInput!) {
2326
2333
  update_agent(id: $id, input: $input) {
2327
2334
  ...CustomAgentFields
2328
2335
  }
2329
2336
  }
2330
- `,Iy=Vd`
2331
- ${_y}
2337
+ `,wy=Vd`
2338
+ ${gy}
2332
2339
 
2333
2340
  mutation deleteAgent($id: ID!) {
2334
2341
  delete_agent(id: $id) {
2335
2342
  ...CustomAgentFields
2336
2343
  }
2337
2344
  }
2338
- `,wy=Vd`
2345
+ `,Ty=Vd`
2339
2346
  mutation activateAgent($id: ID!) {
2340
2347
  activate_agent(id: $id) {
2341
2348
  success
2342
2349
  }
2343
2350
  }
2344
- `,Ty=Vd`
2351
+ `,Ey=Vd`
2345
2352
  mutation deactivateAgent($id: ID!, $inactive_reason: InactiveReason) {
2346
2353
  deactivate_agent(id: $id, inactive_reason: $inactive_reason) {
2347
2354
  success
2348
2355
  }
2349
2356
  }
2350
- `,Ey=Vd`
2357
+ `,Ay=Vd`
2351
2358
  mutation runAgent($id: ID!) {
2352
2359
  run_agent(id: $id) {
2353
2360
  trigger_uuid
2354
2361
  }
2355
2362
  }
2356
- `,Ay=Vd`
2363
+ `,Sy=Vd`
2357
2364
  query getAgentActiveTriggers($agent_id: ID!) {
2358
2365
  agent_active_triggers(agent_id: $agent_id) {
2359
2366
  node_id
@@ -2363,31 +2370,31 @@
2363
2370
  field_summary
2364
2371
  }
2365
2372
  }
2366
- `,Sy=Vd`
2373
+ `,Ny=Vd`
2367
2374
  mutation addTriggerToAgent($agent_id: ID!, $block_reference_id: ID!, $field_values: JSON) {
2368
2375
  add_trigger_to_agent(agent_id: $agent_id, block_reference_id: $block_reference_id, field_values: $field_values) {
2369
2376
  success
2370
2377
  }
2371
2378
  }
2372
- `,Ny=Vd`
2379
+ `,Dy=Vd`
2373
2380
  mutation removeTriggerFromAgent($agent_id: ID!, $node_id: ID!) {
2374
2381
  remove_trigger_from_agent(agent_id: $agent_id, node_id: $node_id) {
2375
2382
  success
2376
2383
  }
2377
2384
  }
2378
- `,Dy=Vd`
2385
+ `,Oy=Vd`
2379
2386
  mutation addSkillToAgent($agent_id: ID!, $skill_id: ID!) {
2380
2387
  add_skill_to_agent(agent_id: $agent_id, skill_id: $skill_id) {
2381
2388
  success
2382
2389
  }
2383
2390
  }
2384
- `,Oy=Vd`
2391
+ `,ky=Vd`
2385
2392
  mutation removeSkillFromAgent($agent_id: ID!, $skill_id: ID!) {
2386
2393
  remove_skill_from_agent(agent_id: $agent_id, skill_id: $skill_id) {
2387
2394
  success
2388
2395
  }
2389
2396
  }
2390
- `,ky=Vd`
2397
+ `,Cy=Vd`
2391
2398
  query getAgentTriggersCatalog($block_reference_ids: [ID!]) {
2392
2399
  agent_triggers_catalog(block_reference_ids: $block_reference_ids) {
2393
2400
  block_reference_id
@@ -2404,7 +2411,7 @@
2404
2411
  }
2405
2412
  }
2406
2413
  }
2407
- `,Cy=Vd`
2414
+ `,Ry=Vd`
2408
2415
  query getAgentSkillsCatalog {
2409
2416
  agent_skills_catalog {
2410
2417
  id
@@ -2412,7 +2419,7 @@
2412
2419
  description
2413
2420
  }
2414
2421
  }
2415
- `,Ry=Vd`
2422
+ `,$y=Vd`
2416
2423
  mutation createAgentSkill($name: String!, $content: String!, $description: String) {
2417
2424
  create_agent_skill(name: $name, content: $content, description: $description) {
2418
2425
  id
@@ -2420,7 +2427,7 @@
2420
2427
  description
2421
2428
  }
2422
2429
  }
2423
- `,$y={action:o.z.enum(["create","create_blank","get","update","delete","activate","deactivate","run"]).describe('"create" — create a new agent via AI (pass prompt). "create_blank" — create a new agent manually (pass name/role/etc). "get" — fetch one agent by agent_id or list owned agents. "update" — modify mutable fields on an existing agent. "delete" — permanently delete an agent (irreversible). "activate" — transition agent to ACTIVE. "deactivate" — transition agent to INACTIVE. "run" — manually enqueue an agent run (fire-and-forget).'),agent_id:o.z.string().trim().min(1,"agent_id must be a non-empty string").optional().describe('Used with action:"get" to fetch a specific agent. Required for action:"update", "delete", "activate", "deactivate", "run". Omit for action:"create", "create_blank", or action:"get" (to list owned agents).'),prompt:o.z.string().trim().min(1).optional().describe('Required for action:"create". Plain-language description of what the agent should do. Platform generates profile, goal, and plan via AI.'),agent_model:o.z.nativeEnum(o_).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank". HTTPS URL of the avatar. Prefer dapulse-res.cloudinary.com or cdn.monday.com.'),gender:o.z.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:o.z.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const Ly={action:o.z.enum(["list","add","remove"]).describe('"list" — returns all triggers currently attached to this agent (includes node_id needed for remove). "add" — attaches a new trigger by block_reference_id. "remove" — detaches a trigger instance by node_id.'),agent_id:o.z.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:o.z.string().trim().min(1).optional().describe('Required for action:"add". The block_reference_id from agent_catalog action:"list_triggers" identifying the trigger type to attach. Never guess this value — look it up in the catalog first.'),field_values:o.z.record(o.z.union([o.z.string(),o.z.number(),o.z.boolean(),o.z.object({value:o.z.string(),label:o.z.string()}).passthrough()])).optional().describe('Used with action:"add" when the trigger type has required_fields. Key/value object whose shape is described by field_schemas in the agent_catalog response. Scalar fields use string/number/boolean values. Selection fields use { "value": "<id>", "label": "<name>" }.'),node_id:o.z.string().trim().min(1).optional().describe('Required for action:"remove". The node_id of the trigger instance — get it from action:"list". Each instance has a unique node_id even if the same trigger type is attached multiple times. Do NOT pass block_reference_id here.')};const xy={action:o.z.enum(["create","add","remove"]).describe('"create" — author a new custom skill in the account-wide catalog (no agent_id needed). "add" — attach an existing skill to this agent by skill_id. "remove" — detach a skill from this agent.'),agent_id:o.z.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:o.z.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:o.z.string().trim().min(1).optional().describe('Required for action:"create". Markdown instructions defining what the skill does and how to execute it. Be specific and thorough — this is the skill\'s runtime behavior.'),description:o.z.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:o.z.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". The skill id from agent_catalog action:"list_skills", or the id returned by action:"create" in this tool. Never guess or invent a skill id.')};const Uy=Vd`
2430
+ `,Ly={action:o.z.enum(["create","create_blank","get","update","delete","activate","deactivate","run"]).describe('"create" — create a new agent via AI (pass prompt). "create_blank" — create a new agent manually (pass name/role/etc). "get" — fetch one agent by agent_id or list owned agents. "update" — modify mutable fields on an existing agent. "delete" — permanently delete an agent (irreversible). "activate" — transition agent to ACTIVE. "deactivate" — transition agent to INACTIVE. "run" — manually enqueue an agent run (fire-and-forget).'),agent_id:o.z.string().trim().min(1,"agent_id must be a non-empty string").optional().describe('Used with action:"get" to fetch a specific agent. Required for action:"update", "delete", "activate", "deactivate", "run". Omit for action:"create", "create_blank", or action:"get" (to list owned agents).'),prompt:o.z.string().trim().min(1).optional().describe('Required for action:"create". Plain-language description of what the agent should do. Platform generates profile, goal, and plan via AI.'),agent_model:o.z.nativeEnum(r_).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank". HTTPS URL of the avatar. Prefer dapulse-res.cloudinary.com or cdn.monday.com.'),gender:o.z.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:o.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:o.z.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const xy={action:o.z.enum(["list","add","remove"]).describe('"list" — returns all triggers currently attached to this agent (includes node_id needed for remove). "add" — attaches a new trigger by block_reference_id. "remove" — detaches a trigger instance by node_id.'),agent_id:o.z.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:o.z.string().trim().min(1).optional().describe('Required for action:"add". The block_reference_id from agent_catalog action:"list_triggers" identifying the trigger type to attach. Never guess this value — look it up in the catalog first.'),field_values:o.z.record(o.z.union([o.z.string(),o.z.number(),o.z.boolean(),o.z.object({value:o.z.string(),label:o.z.string()}).passthrough()])).optional().describe('Used with action:"add" when the trigger type has required_fields. Key/value object whose shape is described by field_schemas in the agent_catalog response. Scalar fields use string/number/boolean values. Selection fields use { "value": "<id>", "label": "<name>" }.'),node_id:o.z.string().trim().min(1).optional().describe('Required for action:"remove". The node_id of the trigger instance — get it from action:"list". Each instance has a unique node_id even if the same trigger type is attached multiple times. Do NOT pass block_reference_id here.')};const Uy={action:o.z.enum(["create","add","remove"]).describe('"create" — author a new custom skill in the account-wide catalog (no agent_id needed). "add" — attach an existing skill to this agent by skill_id. "remove" — detach a skill from this agent.'),agent_id:o.z.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:o.z.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:o.z.string().trim().min(1).optional().describe('Required for action:"create". Markdown instructions defining what the skill does and how to execute it. Be specific and thorough — this is the skill\'s runtime behavior.'),description:o.z.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:o.z.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". The skill id from agent_catalog action:"list_skills", or the id returned by action:"create" in this tool. Never guess or invent a skill id.')};const Py=Vd`
2424
2431
  query getAgentKnowledge($id: ID!) {
2425
2432
  agent_knowledge(id: $id) {
2426
2433
  resources {
@@ -2435,25 +2442,25 @@
2435
2442
  }
2436
2443
  }
2437
2444
  }
2438
- `,Py=Vd`
2445
+ `,Fy=Vd`
2439
2446
  mutation addAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2440
2447
  add_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2441
2448
  success
2442
2449
  }
2443
2450
  }
2444
- `,Fy=Vd`
2451
+ `,My=Vd`
2445
2452
  mutation removeAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!) {
2446
2453
  remove_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type) {
2447
2454
  success
2448
2455
  }
2449
2456
  }
2450
- `,My=Vd`
2457
+ `,Vy=Vd`
2451
2458
  mutation updateAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2452
2459
  update_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2453
2460
  success
2454
2461
  }
2455
2462
  }
2456
- `,Vy={action:o.z.enum(["list","add","update","remove"]).describe('"list" — returns all resources the agent currently has access to. "add" — grants access to a board or doc. "update" — changes the permission level on an existing resource. "remove" — revokes the agent\'s access to a board or doc.'),agent_id:o.z.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:o.z.string().trim().min(1).optional().describe("Required for action:add, action:update, action:remove. The ID of the board or doc to grant/update/revoke access to."),scope_type:o.z.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:o.z.enum(["READ","READ_WRITE"]).optional().describe('Required for action:add and action:update. The permission level: "READ" (agent can read the resource) or "READ_WRITE" (agent can read and write the resource).')};const By={action:o.z.enum(["list_triggers","list_skills"]).describe('"list_triggers" — fetch available trigger types with block_reference_id, field_schemas, and required_fields. Call before using manage_agent_triggers action:"add". "list_skills" — fetch available skills with id, name, description. Call before using manage_agent_skills action:"add".'),block_reference_ids:o.z.array(o.z.string()).min(1).optional().describe('Used with action:"list_triggers". Fetch specific trigger types by block_reference_id. Omit to return all trigger types.')};const zy=Vd`
2463
+ `,By={action:o.z.enum(["list","add","update","remove"]).describe('"list" — returns all resources the agent currently has access to. "add" — grants access to a board or doc. "update" — changes the permission level on an existing resource. "remove" — revokes the agent\'s access to a board or doc.'),agent_id:o.z.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:o.z.string().trim().min(1).optional().describe("Required for action:add, action:update, action:remove. The ID of the board or doc to grant/update/revoke access to."),scope_type:o.z.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:o.z.enum(["READ","READ_WRITE"]).optional().describe('Required for action:add and action:update. The permission level: "READ" (agent can read the resource) or "READ_WRITE" (agent can read and write the resource).')};const zy={action:o.z.enum(["list_triggers","list_skills"]).describe('"list_triggers" — fetch available trigger types with block_reference_id, field_schemas, and required_fields. Call before using manage_agent_triggers action:"add". "list_skills" — fetch available skills with id, name, description. Call before using manage_agent_skills action:"add".'),block_reference_ids:o.z.array(o.z.string()).min(1).optional().describe('Used with action:"list_triggers". Fetch specific trigger types by block_reference_id. Omit to return all trigger types.')};const jy=Vd`
2457
2464
  query getBoardAutomations($boardIds: [ID!], $limit: Int, $cursor: String, $includeLegacy: Boolean!) {
2458
2465
  board_automations(board_ids: $boardIds, limit: $limit, cursor: $cursor) {
2459
2466
  cursor
@@ -2475,39 +2482,39 @@
2475
2482
  }
2476
2483
  }
2477
2484
  }
2478
- `;function jy(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function qy(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:jy(a),is_active:t??!1}}const Gy={boardId:o.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:o.z.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:o.z.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const Hy=Vd`
2485
+ `;function qy(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function Gy(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:qy(a),is_active:t??!1}}const Hy={boardId:o.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:o.z.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:o.z.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const Wy=Vd`
2479
2486
  mutation activateLiveWorkflow($id: ID!) {
2480
2487
  activate_live_workflow(id: $id) {
2481
2488
  is_success
2482
2489
  }
2483
2490
  }
2484
- `,Wy=Vd`
2491
+ `,Yy=Vd`
2485
2492
  mutation deactivateLiveWorkflow($id: ID!) {
2486
2493
  deactivate_live_workflow(id: $id) {
2487
2494
  is_success
2488
2495
  }
2489
2496
  }
2490
- `,Yy=Vd`
2497
+ `,Ky=Vd`
2491
2498
  mutation deleteLiveWorkflow($id: ID!) {
2492
2499
  delete_live_workflow(id: $id) {
2493
2500
  is_success
2494
2501
  }
2495
2502
  }
2496
- `,Ky={action:o.z.enum(["activate","deactivate","delete"]).describe("The operation to perform. activate: enables a paused automation so it responds to its trigger. deactivate: pauses an automation without deleting it. delete: permanently removes an automation (irreversible)."),workflowId:o.z.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const Qy="platform-agent",Jy=({path:e,method:t,headers:a,body:i,signal:n})=>fetch(`https://api.monday.com${e}`,{method:t,headers:a,body:i,signal:n}),Xy=e=>e?.fetchConfig?.fetch??Jy,Zy={userPrompt:o.z.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:o.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const eI="\n triggerUuid\n eventState\n eventKind\n triggerStartedAt\n createdAt\n triggerDuration\n errorReason\n entityKind\n hostType\n hostInstanceId\n billingActionsCount\n creatorAppFeatureReferenceId\n waitingForTriggerName\n reignitionSubscriptionId\n",tI=Vd`
2503
+ `,Qy={action:o.z.enum(["activate","deactivate","delete"]).describe("The operation to perform. activate: enables a paused automation so it responds to its trigger. deactivate: pauses an automation without deleting it. delete: permanently removes an automation (irreversible)."),workflowId:o.z.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const Jy="platform-agent",Xy=({path:e,method:t,headers:a,body:i,signal:n})=>fetch(`https://api.monday.com${e}`,{method:t,headers:a,body:i,signal:n}),Zy=e=>e?.fetchConfig?.fetch??Xy,eI={userPrompt:o.z.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:o.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const tI="\n triggerUuid\n eventState\n eventKind\n triggerStartedAt\n createdAt\n triggerDuration\n errorReason\n entityKind\n hostType\n hostInstanceId\n billingActionsCount\n creatorAppFeatureReferenceId\n waitingForTriggerName\n reignitionSubscriptionId\n",aI=Vd`
2497
2504
  query GetTriggerEvents($nextPageOffset: Int, $filters: TriggerEventsFiltersInput) {
2498
2505
  trigger_events(nextPageOffset: $nextPageOffset, filters: $filters) {
2499
2506
  triggerEvents {
2500
- ${eI}
2507
+ ${tI}
2501
2508
  }
2502
2509
  }
2503
2510
  }
2504
- `,aI=Vd`
2511
+ `,iI=Vd`
2505
2512
  query GetTriggerEvent($triggerUuid: String!) {
2506
2513
  trigger_event(triggerUuid: $triggerUuid) {
2507
- ${eI}
2514
+ ${tI}
2508
2515
  }
2509
2516
  }
2510
- `,iI=Vd`
2517
+ `,nI=Vd`
2511
2518
  query GetBlockEvents($triggerUuid: String!, $nextPageOffset: Int) {
2512
2519
  block_events(triggerUuid: $triggerUuid, nextPageOffset: $nextPageOffset) {
2513
2520
  blockEvents {
@@ -2527,7 +2534,7 @@
2527
2534
  }
2528
2535
  }
2529
2536
  }
2530
- `,nI=Vd`
2537
+ `,oI=Vd`
2531
2538
  query GetToolEvents($triggerUuid: String!, $nextPageOffset: Int) {
2532
2539
  tool_events(trigger_uuid: $triggerUuid, next_page_offset: $nextPageOffset) {
2533
2540
  tool_events {
@@ -2543,7 +2550,7 @@
2543
2550
  }
2544
2551
  }
2545
2552
  }
2546
- `,oI=o.z.object({dateRange:o.z.object({startDate:o.z.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:o.z.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:o.z.array(o.z.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:o.z.array(o.z.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:o.z.array(o.z.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:o.z.string().optional().describe("Filter by item identifier"),entityKind:o.z.string().optional().describe("Filter by entity kind"),hostType:o.z.string().optional().describe("Filter by host type")}).optional(),rI={mode:o.z.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:o.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:o.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:o.z.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:oI.describe("history: run filters"),triggerUuid:o.z.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:o.z.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:o.z.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:o.z.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const sI=Vd`
2553
+ `,rI=o.z.object({dateRange:o.z.object({startDate:o.z.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:o.z.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:o.z.array(o.z.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:o.z.array(o.z.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:o.z.array(o.z.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:o.z.string().optional().describe("Filter by item identifier"),entityKind:o.z.string().optional().describe("Filter by entity kind"),hostType:o.z.string().optional().describe("Filter by host type")}).optional(),sI={mode:o.z.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:o.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:o.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:o.z.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:rI.describe("history: run filters"),triggerUuid:o.z.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:o.z.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:o.z.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:o.z.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const dI=Vd`
2547
2554
  query GetAccountTriggerStatistics($filters: AccountTriggerStatisticsFiltersInput) {
2548
2555
  account_trigger_statistics(filters: $filters) {
2549
2556
  id
@@ -2552,7 +2559,7 @@
2552
2559
  total
2553
2560
  }
2554
2561
  }
2555
- `,dI=Vd`
2562
+ `,pI=Vd`
2556
2563
  query GetAccountTriggersByEntity($runStatus: TriggerEventState!, $filters: AccountTriggersByEntityIdFiltersInput) {
2557
2564
  account_triggers_statistics_by_entity_id(run_status: $runStatus, filters: $filters) {
2558
2565
  id
@@ -2560,7 +2567,7 @@
2560
2567
  workflow_statistics
2561
2568
  }
2562
2569
  }
2563
- `,pI={breakdown:o.z.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:o.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:o.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:o.z.array(o.z.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:o.z.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:o.z.array(o.z.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const lI=Vd`
2570
+ `,lI={breakdown:o.z.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:o.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:o.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:o.z.array(o.z.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:o.z.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:o.z.array(o.z.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const cI=Vd`
2564
2571
  mutation createWorkflow(
2565
2572
  $workspace_id: ID!
2566
2573
  $title: String
@@ -2581,7 +2588,7 @@
2581
2588
  workflow_draft_id
2582
2589
  }
2583
2590
  }
2584
- `,cI={workspaceId:o.z.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:o.z.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:o.z.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:o.z.string().optional().describe("Optional workflow description."),folderId:o.z.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:o.z.array(o.z.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const mI={workflowObjectId:o.z.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:o.z.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:o.z.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const uI={prompt:o.z.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const hI=Vd`
2591
+ `,mI={workspaceId:o.z.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:o.z.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:o.z.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:o.z.string().optional().describe("Optional workflow description."),folderId:o.z.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:o.z.array(o.z.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const uI={workflowObjectId:o.z.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:o.z.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:o.z.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const hI={prompt:o.z.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const fI=Vd`
2585
2592
  mutation publishWorkflow($workflow_object_id: ID!, $workflow_draft_id: ID!, $should_activate: Boolean) {
2586
2593
  publish_workflow(
2587
2594
  workflow_object_id: $workflow_object_id
@@ -2592,7 +2599,7 @@
2592
2599
  workflow_live_id
2593
2600
  }
2594
2601
  }
2595
- `,fI={workflowObjectId:o.z.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:o.z.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:o.z.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const _I=Vd`
2602
+ `,_I={workflowObjectId:o.z.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:o.z.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:o.z.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const gI=Vd`
2596
2603
  mutation ConfigureCategorizeAiColumn(
2597
2604
  $boardId: ID!
2598
2605
  $columnId: ID!
@@ -2612,7 +2619,7 @@
2612
2619
  column_id
2613
2620
  }
2614
2621
  }
2615
- `,gI=Vd`
2622
+ `,bI=Vd`
2616
2623
  mutation ConfigureSummarizeAiColumn(
2617
2624
  $boardId: ID!
2618
2625
  $columnId: ID!
@@ -2632,7 +2639,7 @@
2632
2639
  column_id
2633
2640
  }
2634
2641
  }
2635
- `,bI=Vd`
2642
+ `,vI=Vd`
2636
2643
  mutation ConfigureTranslateAiColumn(
2637
2644
  $boardId: ID!
2638
2645
  $columnId: ID!
@@ -2652,7 +2659,7 @@
2652
2659
  column_id
2653
2660
  }
2654
2661
  }
2655
- `,vI=Vd`
2662
+ `,yI=Vd`
2656
2663
  mutation ConfigureImproveTextAiColumn(
2657
2664
  $boardId: ID!
2658
2665
  $columnId: ID!
@@ -2676,7 +2683,7 @@
2676
2683
  column_id
2677
2684
  }
2678
2685
  }
2679
- `,yI=Vd`
2686
+ `,II=Vd`
2680
2687
  mutation ConfigureExtractAiColumn(
2681
2688
  $boardId: ID!
2682
2689
  $columnId: ID!
@@ -2700,7 +2707,7 @@
2700
2707
  column_id
2701
2708
  }
2702
2709
  }
2703
- `,II=Vd`
2710
+ `,wI=Vd`
2704
2711
  mutation ConfigureOpenBlockAiColumn(
2705
2712
  $boardId: ID!
2706
2713
  $columnId: ID!
@@ -2716,7 +2723,7 @@
2716
2723
  column_id
2717
2724
  }
2718
2725
  }
2719
- `,wI=Vd`
2726
+ `,TI=Vd`
2720
2727
  mutation ConfigureWriteMeAiColumn(
2721
2728
  $boardId: ID!
2722
2729
  $columnId: ID!
@@ -2736,7 +2743,7 @@
2736
2743
  column_id
2737
2744
  }
2738
2745
  }
2739
- `,TI=Vd`
2746
+ `,EI=Vd`
2740
2747
  mutation ConfigurePersonAssignmentAiColumn(
2741
2748
  $boardId: ID!
2742
2749
  $columnId: ID!
@@ -2756,14 +2763,14 @@
2756
2763
  column_id
2757
2764
  }
2758
2765
  }
2759
- `,EI={board_id:o.z.number().describe("The ID of the board containing the column"),column_id:o.z.string().describe("The ID of the column to configure with AI"),block_type:o.z.enum(["categorize","summarize","translate","improve_text","extract","open_block","write_me","person_assignment"]).describe("The AI block type to configure. See tool description for which fields apply to each block."),source_type:o.z.enum(["item_name","thread","column","emails_and_activities"]).optional().describe("Where the AI reads input. Required for all blocks except open_block and write_me. Values: item_name (item name), thread (updates/comments), column (another column — requires source_column_id), emails_and_activities (categorize only)."),source_column_id:o.z.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:o.z.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:o.z.enum(["english","spanish","french","german","hebrew","chinese","korean","arabic","bengali","danish","dutch","hindi","indonesian","italian","japanese","norwegian","polish","portuguese","russian","swedish","thai","turkish","vietnamese"]).optional().describe("Required for translate block. The target language to translate text into."),tone:o.z.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:o.z.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:o.z.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:o.z.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:o.z.enum(["email_address","first_name","last_name","phone_number","company_name","domain_name","url","date","time","year","custom"]).optional().describe("Required for extract block. Type of entity to extract from text."),custom_instructions:o.z.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:o.z.string().max(3e3).optional().describe("Required for open_block and write_me. Natural-language prompt. Reference columns via {pulse.column_id}, item name via {pulse.name}, subitems via {pulse.subitem.column_id}. Max 3000 chars."),groups:o.z.array(o.z.object({user_ids:o.z.array(o.z.number()).describe("Array of user IDs in this group"),description:o.z.string().describe("Description of this group (e.g., role, team name, or assignment criteria)")})).optional().describe("Required for person_assignment. Array of groups, each with user_ids and a description."),run_backfill:o.z.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const AI=Vd`
2766
+ `,AI={board_id:o.z.number().describe("The ID of the board containing the column"),column_id:o.z.string().describe("The ID of the column to configure with AI"),block_type:o.z.enum(["categorize","summarize","translate","improve_text","extract","open_block","write_me","person_assignment"]).describe("The AI block type to configure. See tool description for which fields apply to each block."),source_type:o.z.enum(["item_name","thread","column","emails_and_activities"]).optional().describe("Where the AI reads input. Required for all blocks except open_block and write_me. Values: item_name (item name), thread (updates/comments), column (another column — requires source_column_id), emails_and_activities (categorize only)."),source_column_id:o.z.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:o.z.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:o.z.enum(["english","spanish","french","german","hebrew","chinese","korean","arabic","bengali","danish","dutch","hindi","indonesian","italian","japanese","norwegian","polish","portuguese","russian","swedish","thai","turkish","vietnamese"]).optional().describe("Required for translate block. The target language to translate text into."),tone:o.z.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:o.z.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:o.z.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:o.z.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:o.z.enum(["email_address","first_name","last_name","phone_number","company_name","domain_name","url","date","time","year","custom"]).optional().describe("Required for extract block. Type of entity to extract from text."),custom_instructions:o.z.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:o.z.string().max(3e3).optional().describe("Required for open_block and write_me. Natural-language prompt. Reference columns via {pulse.column_id}, item name via {pulse.name}, subitems via {pulse.subitem.column_id}. Max 3000 chars."),groups:o.z.array(o.z.object({user_ids:o.z.array(o.z.number()).describe("Array of user IDs in this group"),description:o.z.string().describe("Description of this group (e.g., role, team name, or assignment criteria)")})).optional().describe("Required for person_assignment. Array of groups, each with user_ids and a description."),run_backfill:o.z.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const SI=Vd`
2760
2767
  mutation RemoveAiFromColumn($boardId: ID!, $columnId: ID!) {
2761
2768
  remove_ai_from_column(board_id: $boardId, column_id: $columnId) {
2762
2769
  column_id
2763
2770
  success
2764
2771
  }
2765
2772
  }
2766
- `,SI={board_id:o.z.number().describe("The ID of the board containing the column"),column_id:o.z.string().describe("The ID of the column to remove AI from")};const NI="Do NOT include any personally identifiable information (PII) such as names, email addresses, phone numbers, or any other personal data.",DI={kind:o.z.enum(["feedback","feature_request","bug"]).describe("The kind of submission: general feedback, a feature request, or a bug report"),title:o.z.string().describe(`A short summary of the feedback. ${NI}`),description:o.z.string().describe(`Full details — what happened, what was expected, or what is being requested. ${NI}`),tool_name:o.z.string().optional().describe('The name of the monday.com MCP tool this feedback is about, if applicable (e.g. "create_item", "get_board_info"). Only include monday.com MCP tool names — do not reference tools from other connected services.')};const OI=Vd`
2773
+ `,NI={board_id:o.z.number().describe("The ID of the board containing the column"),column_id:o.z.string().describe("The ID of the column to remove AI from")};const DI="Do NOT include any personally identifiable information (PII) such as names, email addresses, phone numbers, or any other personal data.",OI={kind:o.z.enum(["feedback","feature_request","bug"]).describe("The kind of submission: general feedback, a feature request, or a bug report"),title:o.z.string().describe(`A short summary of the feedback. ${DI}`),description:o.z.string().describe(`Full details — what happened, what was expected, or what is being requested. ${DI}`),tool_name:o.z.string().optional().describe('The name of the monday.com MCP tool this feedback is about, if applicable (e.g. "create_item", "get_board_info"). Only include monday.com MCP tool names — do not reference tools from other connected services.')};const kI=Vd`
2767
2774
  query KnowledgeBaseSearch($query: String!, $limit: Int) {
2768
2775
  knowledge_base_search(query: $query, limit: $limit) {
2769
2776
  answer
@@ -2777,7 +2784,7 @@
2777
2784
  }
2778
2785
  }
2779
2786
  }
2780
- `,kI=Vd`
2787
+ `,CI=Vd`
2781
2788
  query AskDeveloperDocs($query: String!) {
2782
2789
  ask_developer_docs(query: $query) {
2783
2790
  id
@@ -2786,7 +2793,7 @@
2786
2793
  conversation_id
2787
2794
  }
2788
2795
  }
2789
- `,CI="developer_docs",RI="general",$I={query:o.z.string().describe("The question or topic to search for in the monday.com knowledge base."),kind:o.z.enum([CI,RI]).describe('The knowledge domain to search. Use "developer_docs" for questions about the monday.com API — GraphQL queries and mutations, authentication, rate limits, webhooks, schema, API best practices, and building apps. Use "general" for questions about using monday.com — features, automations, UI, help center, and settings.')};o.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'),o.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const LI=Vd`
2796
+ `,RI="developer_docs",$I="general",LI={query:o.z.string().describe("The question or topic to search for in the monday.com knowledge base."),kind:o.z.enum([RI,$I]).describe('The knowledge domain to search. Use "developer_docs" for questions about the monday.com API — GraphQL queries and mutations, authentication, rate limits, webhooks, schema, API best practices, and building apps. Use "general" for questions about using monday.com — features, automations, UI, help center, and settings.')};o.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'),o.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const xI=Vd`
2790
2797
  query getSprintsByIds($ids: [ID!]) {
2791
2798
  items(ids: $ids) {
2792
2799
  id
@@ -2821,7 +2828,7 @@
2821
2828
  }
2822
2829
  }
2823
2830
  }
2824
- `,xI={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"},UI={...xI,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},PI="BOARD_NOT_FOUND:",FI="SPRINT_NOT_FOUND:",MI="DOCUMENT_NOT_FOUND:",VI="DOCUMENT_INVALID:",BI="DOCUMENT_EMPTY:",zI="EXPORT_FAILED:",jI="INTERNAL_ERROR:",qI="VALIDATION_ERROR:",GI="task_sprint",HI={[UI.SPRINT_TASKS]:"Sprint Tasks",[UI.SPRINT_TIMELINE]:"Sprint Timeline",[UI.SPRINT_COMPLETION]:"Sprint Completion",[UI.SPRINT_START_DATE]:"Sprint Start Date",[UI.SPRINT_END_DATE]:"Sprint End Date",[UI.SPRINT_ACTIVATION]:"Sprint Activation",[UI.SPRINT_SUMMARY]:"Sprint Summary",[UI.SPRINT_CAPACITY]:"Sprint Capacity"},WI=Vr,YI={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},KI=(e,t)=>e.column_values?.find((e=>e.id===t)),QI=(e,t)=>{const a=KI(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},JI=(e,t)=>{const a=KI(e,t);return"DateValue"===a?.__typename?a.date??null:null},XI=(e,t)=>{const a=KI(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},ZI=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},ew=(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)))},tw=e=>ew(e,Object.values(xI)),aw=e=>ew(e,Object.values(YI)),iw=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},nw=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===qc.BoardRelation))||null,ow={sprintId:o.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const rw=Vd`
2831
+ `,UI={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"},PI={...UI,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},FI="BOARD_NOT_FOUND:",MI="SPRINT_NOT_FOUND:",VI="DOCUMENT_NOT_FOUND:",BI="DOCUMENT_INVALID:",zI="DOCUMENT_EMPTY:",jI="EXPORT_FAILED:",qI="INTERNAL_ERROR:",GI="VALIDATION_ERROR:",HI="task_sprint",WI={[PI.SPRINT_TASKS]:"Sprint Tasks",[PI.SPRINT_TIMELINE]:"Sprint Timeline",[PI.SPRINT_COMPLETION]:"Sprint Completion",[PI.SPRINT_START_DATE]:"Sprint Start Date",[PI.SPRINT_END_DATE]:"Sprint End Date",[PI.SPRINT_ACTIVATION]:"Sprint Activation",[PI.SPRINT_SUMMARY]:"Sprint Summary",[PI.SPRINT_CAPACITY]:"Sprint Capacity"},YI=Vr,KI={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},QI=(e,t)=>e.column_values?.find((e=>e.id===t)),JI=(e,t)=>{const a=QI(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},XI=(e,t)=>{const a=QI(e,t);return"DateValue"===a?.__typename?a.date??null:null},ZI=(e,t)=>{const a=QI(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},ew=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},tw=(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)))},aw=e=>tw(e,Object.values(UI)),iw=e=>tw(e,Object.values(KI)),nw=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},ow=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Gc.BoardRelation))||null,rw={sprintId:o.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const sw=Vd`
2825
2832
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
2826
2833
  boards(ids: [$boardId]) {
2827
2834
  items_page(limit: $limit) {
@@ -2857,7 +2864,7 @@
2857
2864
  }
2858
2865
  }
2859
2866
  }
2860
- `,sw={sprintsBoardId:o.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:o.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const dw=Vd`
2867
+ `,dw={sprintsBoardId:o.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:o.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const pw=Vd`
2861
2868
  query GetRecentBoards($limit: Int) {
2862
2869
  boards(limit: $limit, order_by: used_at, state: active) {
2863
2870
  id
@@ -2873,7 +2880,7 @@
2873
2880
  }
2874
2881
  }
2875
2882
  }
2876
- `,pw={};const lw=[class extends he{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=g.READ,this.annotations=ue({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 pw}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(dw,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${PI} 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:`${jI} 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=nw(e,xI.SPRINT_TASKS);if(!i)return;const n=iw(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=nw(e,GI);if(!i)return;const n=iw(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&&(tw(i)&&this.processSprintsBoard(i,a,t),aw(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends he{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=g.READ,this.annotations=ue({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 sw}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(rw,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:`${jI} 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(Wd,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${PI} 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:`${qI} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${jI} 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(xI),i=ZI(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=>HI[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=QI(e,UI.SPRINT_ACTIVATION),a=QI(e,UI.SPRINT_COMPLETION),i=JI(e,UI.SPRINT_START_DATE),n=JI(e,UI.SPRINT_END_DATE),o=((e,t)=>{const a=KI(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,UI.SPRINT_TIMELINE),r=XI(e,UI.SPRINT_SUMMARY);let s=WI.Planned;return a?s=WI.Completed:(t||i)&&(s=WI.Active),{id:e.id,name:e.name||"Unknown",status:s,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 he{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=g.READ,this.annotations=ue({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 ow}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${jI} 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||`${jI} Unknown error occurred while reading document content`}}catch(e){return{content:`${jI} 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(LI,t)).items||[];if(0===a.length)return{success:!1,error:`${FI} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${FI} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(xI),...t];return ZI(a,i)})(i,[UI.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${qI} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=XI(i,UI.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${MI} 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:`${jI} 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(Bd,t)).docs||[];if(0===a.length)return{success:!1,error:`${MI} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${VI} 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:`${zI} 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:`${BI} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${jI} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],cw=[class extends he{constructor(){super(...arguments),this.name="delete_item",this.type=g.WRITE,this.annotations=ue({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Tm}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(Gd,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends he{constructor(){super(...arguments),this.name="get_board_items_page",this.type=g.READ,this.annotations=ue({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 jm}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){hp(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,includeGroup:e.includeGroup};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(Um,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:lr.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.includeGroup&&"group"in e&&e.group&&(a.group={id:e.group.id,title:e.group.title}),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 qc.BoardRelation:return e.linked_items;case qc.Formula:return e.display_value;case qc.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(Pm,t,{versionOverride:"dev",timeout:wp})).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)))}},om,class extends he{constructor(){super(...arguments),this.name="create_items",this.type=g.WRITE,this.annotations=ue({title:"Create Multiple Items",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create up to 20 new items in a single call. Each item is fully independent - it chooses its own groupId, parentItemId (for subitems), duplicateFromItemId (for bulk templating from an existing item), and createLabelsIfMissing. A single call can therefore span multiple groups, mix regular items with subitems under different parents, and mix fresh creates with duplicates of existing items. Each item returns its own item_id and item_url on success, or a raw error message on failure. [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?rm:sm}async executeInternal(e){const t=this.context?.boardId??e.boardId;this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.items.length;const a=new om(this.mondayApi,{boardId:t}),i="Skipped: a previous item hit the minute rate limit; this item was not attempted",n=e.items.map(((e,t)=>async()=>{const i=await a.execute({name:e.name,columnValues:e.columnValues,groupId:e.groupId,parentItemId:e.parentItemId,duplicateFromItemId:e.duplicateFromItemId,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,...i.content}})),o=await Tp(n,{limit:15,onSkipped:e=>({index:e,error:i,_errorEntry:{code:"RATE_LIMIT_SKIPPED",message:i,path:["results",e]}}),onError:(e,t)=>({index:t,error:e instanceof Error?e.message:String(e),_errorEntry:dm(e,t)})}),r=o.filter((e=>"error"in e)).map((e=>e._errorEntry)),s=o.map((({_errorEntry:e,...t})=>t)),d=o.length,p=r.length,l={board_id:t,summary:{total:d,created:d-p,failed:p},is_partial_success:p>0&&p<d,results:s};return r.length&&(l.errors=r),{content:l}}},class extends he{constructor(){super(...arguments),this.name="create_update",this.type=g.WRITE,this.annotations=ue({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 um}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=mm.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(lm,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){up(e,"create update")}}},class extends he{constructor(){super(...arguments),this.name="delete_update",this.type=g.WRITE,this.annotations=ue({title:"Delete Update",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an update (comment/post) from a monday.com item."}getInputSchema(){return fm}async executeInternal(e){try{const t={id:e.id.toString()},a=await this.mondayApi.request(hm,t);if(!a.delete_update?.id)throw new Error("Failed to delete update: update not found or already deleted");return{content:{message:`Update ${a.delete_update.id} successfully deleted`,update_id:a.delete_update.id}}}catch(e){up(e,"delete update")}}},class extends he{constructor(){super(...arguments),this.name="get_updates",this.type=g.READ,this.annotations=ue({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 vm}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===bm.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===bm.Item?await this.mondayApi.request(_m,{...i,itemId:e.objectId}):await this.mondayApi.request(gm,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:ym(e.fromDate),toDate:ym(e.toDate)}:{}});const o=e.objectType===bm.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})),s=e.objectType===bm.Item?n.items?.[0]?.url:n.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:s,updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}}}}catch(e){up(e,"get updates")}}},class extends he{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=g.WRITE,this.annotations=ue({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 wf}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=If.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(lm,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){up(e,"create update")}}},class extends he{constructor(){super(...arguments),this.name="get_board_schema",this.type=g.READ,this.annotations=ue({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 qm}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(Wd,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 he{constructor(){super(...arguments),this.name="get_board_activity",this.type=g.READ,this.annotations=ue({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). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return Cm}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-Ip.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(km,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const d=r.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:d?.name,board_url:d?.url,data:s.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends he{constructor(){super(...arguments),this.name="get_board_info",this.type=g.READ,this.annotations=ue({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(Rm,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:Lm(i,n)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===qc.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request($m,{boardId:a});return i.boards?.[0]??null}},class extends he{constructor(){super(...arguments),this.name="get_full_board_data",this.type=g.READ,this.annotations=ue({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 Om}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(Am,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(Sm,e);r=t.users?.filter((e=>null!==e))||[]}const s=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&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){up(e,"get full board data")}}},class extends he{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=g.READ,this.annotations=ue({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 wu}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(mu);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=fu(s),p=await yu(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.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},s=await this.mondayApi.request(cu,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const d=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${s.users.length} user(s) matching "${e.name}":\n\n${d}`,l=await yu(this.mondayApi);return{content:{data:p,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>_u)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>gu)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(lu,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(pu,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:bu};s=await this.mondayApi.request(du,t)}else if(t){const t={userIds:e.userIds,limit:bu};s=await this.mondayApi.request(ru,t)}else{const e={userIds:void 0,limit:bu};s=await this.mondayApi.request(su,e)}const d=fu(s),p=await yu(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Sp,class extends he{constructor(){super(...arguments),this.name="change_items_column_values",this.type=g.WRITE,this.annotations=ue({title:"Change Multiple Items Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update column values for up to 40 items in a single call. Each update targets one item by itemId and sets one or more column values on it. Each update is independent - it can target its own board via boardId and set its own column values, so a single call can update many items across multiple boards, apply the same value to many items, or apply different values per item. Each update returns its own item_id and item_url on success or a raw error message on failure. To link board-relation columns, call link_board_items_workflow before using this tool. [REQUIRED PRECONDITION]: Before using this tool, if you are not familiar with the board structure (column IDs, column types, status labels), first use get_board_info to understand the board metadata. This is essential for constructing valid column values."}getInputSchema(){return this.context?.boardId?Dp:Op}async executeInternal(e){this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.updates.length;const t=this.context?.boardId??e.boardId,a=e.updates.map((e=>e.boardId??t)),i=a.map(((e,t)=>null==e?t:-1)).filter((e=>e>=0));if(i.length>0)throw new mp(`Missing boardId for update(s) at index ${i.join(", ")}. Set a boardId on each update or provide a batch-level boardId.`,"MISSING_REQUIRED_PARAMETER");const n="Skipped: a previous update hit the minute rate limit, this update was not attempted",o=new Sp(this.mondayApi),r=e.updates.map(((e,t)=>async()=>{const i=a[t],n=await o.execute({boardId:i,itemId:e.itemId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,board_id:i,...n.content}})),s=await Tp(r,{limit:15,onSkipped:e=>({index:e,error:n,_errorEntry:{code:"RATE_LIMIT_SKIPPED",message:n,path:["results",e]}}),onError:(e,t)=>({index:t,error:e instanceof Error?e.message:String(e),_errorEntry:kp(e,t)})}),d=s.filter((e=>"error"in e)).map((e=>e._errorEntry)),p=s.map((({_errorEntry:e,...t})=>t)),l=s.length,c=d.length,m={summary:{total:l,updated:l-c,failed:c},is_partial_success:c>0&&c<l,results:p};return d.length&&(m.errors=d),{content:m}}},class extends he{constructor(){super(...arguments),this.name="move_item_to_group",this.type=g.WRITE,this.annotations=ue({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 Tu}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(Kd,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends he{constructor(){super(...arguments),this.name="create_board",this.type=g.WRITE,this.annotations=ue({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Zp}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(Qd,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 he{constructor(){super(...arguments),this.name="use_template",this.type=g.WRITE,this.annotations=ue({title:"Use Template",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Apply a monday.com template to create boards in a workspace. Returns a process_id immediately — the operation runs asynchronously and can take 30 seconds to 2+ minutes. Use check_template_status(processId) to poll every 5–10 seconds until status is COMPLETE or FAILED. Stop polling on COMPLETE (boards ready) or FAILED (unrecoverable error). Give up after ~5 minutes if neither terminal status is reached. Boards exist as empty shells until status is COMPLETE."}getInputSchema(){return el}async executeInternal(e){const t={templateId:e.templateId,destinationWorkspaceId:e.destinationWorkspaceId,destinationName:e.destinationName,boardKind:e.boardKind},a=await this.mondayApi.request(sp,t),i=a.use_template?.process_id;return null==i?{content:{processId:null,message:"Failed to start template application. The request was rejected."}}:{content:{processId:i,message:"Template application started. Poll check_template_status with processId every 5–10 seconds. Stop on COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes."}}}},class extends he{constructor(){super(...arguments),this.name="check_template_status",this.type=g.READ,this.annotations=ue({title:"Check Template Status",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Check the status of a use_template operation. Poll after calling use_template — wait 5–10 seconds between polls. Status values: PENDING | IN_PROGRESS | COMPLETE | FAILED. Stop polling when status is COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes if neither terminal status is reached. Board IDs are only available once COMPLETE — boards exist but are empty during IN_PROGRESS. Returns null if process_id is invalid or expired (1-hour TTL)."}getInputSchema(){return tl}async executeInternal(e){const t={processId:e.processId},a=(await this.mondayApi.request(dp,t)).template_installation_status;return a?a.status===Qr.Complete?{content:{status:Qr.Complete,board_ids:a.board_ids,board_ids_map:a.board_ids_map,message:`Template application complete. ${a.board_ids.length} board(s) created.`}}:a.status===Qr.Failed?{content:{status:Qr.Failed,board_ids:[],board_ids_map:[],message:"Template application failed. Please try again."}}:a.status===Qr.Pending||a.status===Qr.InProgress?{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Template application ${a.status===Qr.InProgress?"in progress":"pending"}. Board IDs will be available once complete.`}}:{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Unexpected status: ${a.status}. Poll again or contact support.`}}:{content:{status:null,message:"Status not found. The process_id is invalid or has expired."}}}},class extends he{constructor(){super(...arguments),this.name="create_form",this.type=g.WRITE,this.annotations=ue({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 jl}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(wl,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends he{constructor(){super(...arguments),this.name="update_form",this.type=g.WRITE,this.annotations=ue({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new $c((()=>this.mondayApi)),this.actionHandlers=new Map([[pc.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[pc.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[pc.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[pc.activate,this.helpers.activateForm.bind(this.helpers)],[pc.createTag,this.helpers.createTag.bind(this.helpers)],[pc.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[pc.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[pc.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[pc.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[pc.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[pc.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Rc}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 he{constructor(){super(...arguments),this.name="get_form",this.type=g.READ,this.annotations=ue({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 Lc}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Tl,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 he{constructor(){super(...arguments),this.name="form_questions_editor",this.type=g.WRITE,this.annotations=ue({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new dc((()=>this.mondayApi)),this.actionHandlers=new Map([[oc.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[oc.Update,this.helpers.updateQuestion.bind(this.helpers)],[oc.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return sc}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends he{constructor(){super(...arguments),this.name="create_form_submission",this.type=g.WRITE,this.annotations=ue({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 jc}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await I.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(xc,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){up(e,"submit form")}}},class extends he{constructor(){super(...arguments),this.name="create_column",this.type=g.WRITE,this.annotations=ue({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?Gc:Hc}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(Jd,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends he{constructor(){super(...arguments),this.name="update_column",this.type=g.WRITE,this.annotations=ue({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?Wc:Yc}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(Zd,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 he{constructor(){super(...arguments),this.name="create_group",this.type=g.WRITE,this.annotations=ue({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 em}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(Xc,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 he{constructor(){super(...arguments),this.name="delete_column",this.type=g.WRITE,this.annotations=ue({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?Im:wm}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(Xd,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},bp,class extends bp{constructor(e,t){super(e,t),this.name="all_api_read",this.type=g.READ,this.annotations=ue({title:"Run read-only Query on the monday.com API",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Execute read-only GraphQL queries against the monday.com API. Only queries are accepted — mutations are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}async executeInternal(e){const t=lt(e.query);this.recordGraphqlOperationCounts(t);const a=bn(t);if(a?.operation===ke.MUTATION)throw new mp("all_api_read only accepts read queries. Mutations are not allowed.",lp);return super.executeInternal(e)}},class extends bp{constructor(e,t){super(e,t),this.name="all_api_write",this.type=g.WRITE,this.annotations=ue({title:"Run Mutation on the monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute GraphQL mutations against the monday.com API to create, update, or delete data. Only mutations are accepted — queries are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your mutation."}async executeInternal(e){const t=lt(e.query);this.recordGraphqlOperationCounts(t);const a=bn(t);if(a&&a.operation!==ke.MUTATION)throw new mp("all_api_write only accepts mutations. Read queries are not allowed.",lp);return super.executeInternal(e)}},class extends he{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=g.ALL_API,this.annotations=ue({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 Qm}async executeInternal(e){try{const t=await this.mondayApi.request(ep),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 he{constructor(){super(...arguments),this.name="get_column_type_info",this.type=g.READ,this.annotations=ue({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${qp.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${qp.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return Km}async executeInternal(e){if(e.fetchMode===qp.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:Ym(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Tn.CountItems} function. Do not use ${Tn.Count} function for that purpose.\n `}},url:Hm}};const t={type:e.columnType},a=await this.mondayApi.request(Gm,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:Hm}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends he{constructor(e,t){super("function"==typeof e?()=>_p(e()):_p(e),t),this.name="get_type_details",this.type=g.ALL_API,this.annotations=ue({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 Jm}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,Vd`
2883
+ `,lw={};const cw=[class extends he{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=g.READ,this.annotations=ue({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 lw}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(pw,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${FI} 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:`${qI} 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=ow(e,UI.SPRINT_TASKS);if(!i)return;const n=nw(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=ow(e,HI);if(!i)return;const n=nw(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&&(aw(i)&&this.processSprintsBoard(i,a,t),iw(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends he{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=g.READ,this.annotations=ue({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 dw}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(sw,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:`${qI} 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(Wd,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${FI} 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:`${GI} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${qI} 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(UI),i=ew(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=>WI[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=JI(e,PI.SPRINT_ACTIVATION),a=JI(e,PI.SPRINT_COMPLETION),i=XI(e,PI.SPRINT_START_DATE),n=XI(e,PI.SPRINT_END_DATE),o=((e,t)=>{const a=QI(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,PI.SPRINT_TIMELINE),r=ZI(e,PI.SPRINT_SUMMARY);let s=YI.Planned;return a?s=YI.Completed:(t||i)&&(s=YI.Active),{id:e.id,name:e.name||"Unknown",status:s,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 he{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=g.READ,this.annotations=ue({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 rw}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${qI} 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||`${qI} Unknown error occurred while reading document content`}}catch(e){return{content:`${qI} 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(xI,t)).items||[];if(0===a.length)return{success:!1,error:`${MI} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${MI} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(UI),...t];return ew(a,i)})(i,[PI.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${GI} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=ZI(i,PI.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${VI} 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:`${qI} 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(Bd,t)).docs||[];if(0===a.length)return{success:!1,error:`${VI} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${BI} 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:`${jI} 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:`${zI} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${qI} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],mw=[class extends he{constructor(){super(...arguments),this.name="delete_item",this.type=g.WRITE,this.annotations=ue({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Em}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(Gd,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends he{constructor(){super(...arguments),this.name="get_board_items_page",this.type=g.READ,this.annotations=ue({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 qm}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){fp(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,includeGroup:e.includeGroup};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(Pm,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:lr.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.includeGroup&&"group"in e&&e.group&&(a.group={id:e.group.id,title:e.group.title}),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 Gc.BoardRelation:return e.linked_items;case Gc.Formula:return e.display_value;case Gc.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:Tp})).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)))}},rm,class extends he{constructor(){super(...arguments),this.name="create_items",this.type=g.WRITE,this.annotations=ue({title:"Create Multiple Items",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create up to 20 new items in a single call. Each item is fully independent - it chooses its own groupId, parentItemId (for subitems), duplicateFromItemId (for bulk templating from an existing item), and createLabelsIfMissing. A single call can therefore span multiple groups, mix regular items with subitems under different parents, and mix fresh creates with duplicates of existing items. Each item returns its own item_id and item_url on success, or a raw error message on failure. [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?sm:dm}async executeInternal(e){const t=this.context?.boardId??e.boardId;this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.items.length;const a=new rm(this.mondayApi,{boardId:t}),i="Skipped: a previous item hit the minute rate limit; this item was not attempted",n=e.items.map(((e,t)=>async()=>{const i=await a.execute({name:e.name,columnValues:e.columnValues,groupId:e.groupId,parentItemId:e.parentItemId,duplicateFromItemId:e.duplicateFromItemId,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,...i.content}})),o=await Ep(n,{limit:15,onSkipped:e=>({index:e,error:i,_errorEntry:{code:"RATE_LIMIT_SKIPPED",message:i,path:["results",e]}}),onError:(e,t)=>({index:t,error:e instanceof Error?e.message:String(e),_errorEntry:pm(e,t)})}),r=o.filter((e=>"error"in e)).map((e=>e._errorEntry)),s=o.map((({_errorEntry:e,...t})=>t)),d=o.length,p=r.length,l={board_id:t,summary:{total:d,created:d-p,failed:p},is_partial_success:p>0&&p<d,results:s};return r.length&&(l.errors=r),{content:l}}},class extends he{constructor(){super(...arguments),this.name="create_update",this.type=g.WRITE,this.annotations=ue({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 hm}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=um.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(cm,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){hp(e,"create update")}}},class extends he{constructor(){super(...arguments),this.name="delete_update",this.type=g.WRITE,this.annotations=ue({title:"Delete Update",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an update (comment/post) from a monday.com item."}getInputSchema(){return _m}async executeInternal(e){try{const t={id:e.id.toString()},a=await this.mondayApi.request(fm,t);if(!a.delete_update?.id)throw new Error("Failed to delete update: update not found or already deleted");return{content:{message:`Update ${a.delete_update.id} successfully deleted`,update_id:a.delete_update.id}}}catch(e){hp(e,"delete update")}}},class extends he{constructor(){super(...arguments),this.name="get_updates",this.type=g.READ,this.annotations=ue({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 ym}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===vm.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===vm.Item?await this.mondayApi.request(gm,{...i,itemId:e.objectId}):await this.mondayApi.request(bm,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:Im(e.fromDate),toDate:Im(e.toDate)}:{}});const o=e.objectType===vm.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})),s=e.objectType===vm.Item?n.items?.[0]?.url:n.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:s,updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}}}}catch(e){hp(e,"get updates")}}},class extends he{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=g.WRITE,this.annotations=ue({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 Tf}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=wf.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(cm,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){hp(e,"create update")}}},class extends he{constructor(){super(...arguments),this.name="get_board_schema",this.type=g.READ,this.annotations=ue({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 Gm}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(Wd,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 he{constructor(){super(...arguments),this.name="get_board_activity",this.type=g.READ,this.annotations=ue({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). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return Rm}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-wp.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(Cm,o),s=r.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const d=r.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:d?.name,board_url:d?.url,data:s.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends he{constructor(){super(...arguments),this.name="get_board_info",this.type=g.READ,this.annotations=ue({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 Um}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request($m,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:xm(i,n)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Gc.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(Lm,{boardId:a});return i.boards?.[0]??null}},class extends he{constructor(){super(...arguments),this.name="get_full_board_data",this.type=g.READ,this.annotations=ue({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 km}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(Sm,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(Nm,e);r=t.users?.filter((e=>null!==e))||[]}const s=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&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){hp(e,"get full board data")}}},class extends he{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=g.READ,this.annotations=ue({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 Tu}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(uu);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=_u(s),p=await Iu(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.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},s=await this.mondayApi.request(mu,r);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const d=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${s.users.length} user(s) matching "${e.name}":\n\n${d}`,l=await Iu(this.mondayApi);return{content:{data:p,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>gu)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>bu)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(cu,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(lu,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:vu};s=await this.mondayApi.request(pu,t)}else if(t){const t={userIds:e.userIds,limit:vu};s=await this.mondayApi.request(su,t)}else{const e={userIds:void 0,limit:vu};s=await this.mondayApi.request(du,e)}const d=_u(s),p=await Iu(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Np,class extends he{constructor(){super(...arguments),this.name="update_items",this.type=g.WRITE,this.annotations=ue({title:"Update Multiple Items",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update column values for up to 40 items in a single call. Each update targets one item by itemId and sets one or more column values on it. Each update is independent - it can target its own board via boardId and set its own column values, so a single call can update many items across multiple boards, apply the same value to many items, or apply different values per item. Each update returns its own item_id and item_url on success or a raw error message on failure. To link board-relation columns, call link_board_items_workflow before using this tool. [REQUIRED PRECONDITION]: Before using this tool, if you are not familiar with the board structure (column IDs, column types, status labels), first use get_board_info to understand the board metadata. This is essential for constructing valid column values."}getInputSchema(){return this.context?.boardId?Op:kp}async executeInternal(e){this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.updates.length;const t=this.context?.boardId??e.boardId,a=e.updates.map((e=>e.boardId??t)),i=a.map(((e,t)=>null==e?t:-1)).filter((e=>e>=0));if(i.length>0)throw new up(`Missing boardId for update(s) at index ${i.join(", ")}. Set a boardId on each update or provide a batch-level boardId.`,"MISSING_REQUIRED_PARAMETER");const n="Skipped: a previous update hit the minute rate limit, this update was not attempted",o=new Np(this.mondayApi),r=e.updates.map(((e,t)=>async()=>{const i=a[t],n=await o.execute({boardId:i,itemId:e.itemId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,board_id:i,...n.content}})),s=await Ep(r,{limit:15,onSkipped:e=>({index:e,error:n,_errorEntry:{code:"RATE_LIMIT_SKIPPED",message:n,path:["results",e]}}),onError:(e,t)=>({index:t,error:e instanceof Error?e.message:String(e),_errorEntry:Cp(e,t)})}),d=s.filter((e=>"error"in e)).map((e=>e._errorEntry)),p=s.map((({_errorEntry:e,...t})=>t)),l=s.length,c=d.length,m={summary:{total:l,updated:l-c,failed:c},is_partial_success:c>0&&c<l,results:p};return d.length&&(m.errors=d),{content:m}}},class extends he{constructor(){super(...arguments),this.name="move_item_to_group",this.type=g.WRITE,this.annotations=ue({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 Eu}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(Kd,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends he{constructor(){super(...arguments),this.name="create_board",this.type=g.WRITE,this.annotations=ue({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return el}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(Qd,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 he{constructor(){super(...arguments),this.name="use_template",this.type=g.WRITE,this.annotations=ue({title:"Use Template",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Apply a monday.com template to create boards in a workspace. Returns a process_id immediately — the operation runs asynchronously and can take 30 seconds to 2+ minutes. Use check_template_status(processId) to poll every 5–10 seconds until status is COMPLETE or FAILED. Stop polling on COMPLETE (boards ready) or FAILED (unrecoverable error). Give up after ~5 minutes if neither terminal status is reached. Boards exist as empty shells until status is COMPLETE."}getInputSchema(){return tl}async executeInternal(e){const t={templateId:e.templateId,destinationWorkspaceId:e.destinationWorkspaceId,destinationName:e.destinationName,boardKind:e.boardKind},a=await this.mondayApi.request(sp,t),i=a.use_template?.process_id;return null==i?{content:{processId:null,message:"Failed to start template application. The request was rejected."}}:{content:{processId:i,message:"Template application started. Poll check_template_status with processId every 5–10 seconds. Stop on COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes."}}}},class extends he{constructor(){super(...arguments),this.name="check_template_status",this.type=g.READ,this.annotations=ue({title:"Check Template Status",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Check the status of a use_template operation. Poll after calling use_template — wait 5–10 seconds between polls. Status values: PENDING | IN_PROGRESS | COMPLETE | FAILED. Stop polling when status is COMPLETE (boards ready) or FAILED (unrecoverable). Give up after ~5 minutes if neither terminal status is reached. Board IDs are only available once COMPLETE — boards exist but are empty during IN_PROGRESS. Returns null if process_id is invalid or expired (1-hour TTL)."}getInputSchema(){return al}async executeInternal(e){const t={processId:e.processId},a=(await this.mondayApi.request(dp,t)).template_installation_status;return a?a.status===Qr.Complete?{content:{status:Qr.Complete,board_ids:a.board_ids,board_ids_map:a.board_ids_map,message:`Template application complete. ${a.board_ids.length} board(s) created.`}}:a.status===Qr.Failed?{content:{status:Qr.Failed,board_ids:[],board_ids_map:[],message:"Template application failed. Please try again."}}:a.status===Qr.Pending||a.status===Qr.InProgress?{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Template application ${a.status===Qr.InProgress?"in progress":"pending"}. Board IDs will be available once complete.`}}:{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Unexpected status: ${a.status}. Poll again or contact support.`}}:{content:{status:null,message:"Status not found. The process_id is invalid or has expired."}}}},class extends he{constructor(){super(...arguments),this.name="create_form",this.type=g.WRITE,this.annotations=ue({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 ql}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(Tl,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends he{constructor(){super(...arguments),this.name="update_form",this.type=g.WRITE,this.annotations=ue({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Lc((()=>this.mondayApi)),this.actionHandlers=new Map([[lc.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[lc.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[lc.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[lc.activate,this.helpers.activateForm.bind(this.helpers)],[lc.createTag,this.helpers.createTag.bind(this.helpers)],[lc.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[lc.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[lc.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[lc.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[lc.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[lc.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return $c}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 he{constructor(){super(...arguments),this.name="get_form",this.type=g.READ,this.annotations=ue({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 xc}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(El,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 he{constructor(){super(...arguments),this.name="form_questions_editor",this.type=g.WRITE,this.annotations=ue({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new pc((()=>this.mondayApi)),this.actionHandlers=new Map([[rc.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[rc.Update,this.helpers.updateQuestion.bind(this.helpers)],[rc.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return dc}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends he{constructor(){super(...arguments),this.name="create_form_submission",this.type=g.WRITE,this.annotations=ue({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 qc}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await I.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(Uc,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){hp(e,"submit form")}}},class extends he{constructor(){super(...arguments),this.name="create_column",this.type=g.WRITE,this.annotations=ue({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?Hc:Wc}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(Jd,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends he{constructor(){super(...arguments),this.name="update_column",this.type=g.WRITE,this.annotations=ue({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?Yc:Kc}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(Zd,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 he{constructor(){super(...arguments),this.name="create_group",this.type=g.WRITE,this.annotations=ue({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 tm}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(Zc,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 he{constructor(){super(...arguments),this.name="delete_column",this.type=g.WRITE,this.annotations=ue({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?wm:Tm}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(Xd,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},vp,class extends vp{constructor(e,t){super(e,t),this.name="all_api_read",this.type=g.READ,this.annotations=ue({title:"Run read-only Query on the monday.com API",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Execute read-only GraphQL queries against the monday.com API. Only queries are accepted — mutations are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}async executeInternal(e){const t=lt(e.query);this.recordGraphqlOperationCounts(t);const a=bn(t);if(a?.operation===ke.MUTATION)throw new up("all_api_read only accepts read queries. Mutations are not allowed.",lp);return super.executeInternal(e)}},class extends vp{constructor(e,t){super(e,t),this.name="all_api_write",this.type=g.WRITE,this.annotations=ue({title:"Run Mutation on the monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute GraphQL mutations against the monday.com API to create, update, or delete data. Only mutations are accepted — queries are rejected with an error before the request is sent. Use get_graphql_schema and get_type_details tools first to understand the schema before crafting your mutation."}async executeInternal(e){const t=lt(e.query);this.recordGraphqlOperationCounts(t);const a=bn(t);if(a&&a.operation!==ke.MUTATION)throw new up("all_api_write only accepts mutations. Read queries are not allowed.",lp);return super.executeInternal(e)}},class extends he{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=g.ALL_API,this.annotations=ue({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(ep),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 he{constructor(){super(...arguments),this.name="get_column_type_info",this.type=g.READ,this.annotations=ue({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${Gp.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${Gp.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return Qm}async executeInternal(e){if(e.fetchMode===Gp.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:Km(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Tn.CountItems} function. Do not use ${Tn.Count} function for that purpose.\n `}},url:Wm}};const t={type:e.columnType},a=await this.mondayApi.request(Hm,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:Wm}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends he{constructor(e,t){super("function"==typeof e?()=>gp(e()):gp(e),t),this.name="get_type_details",this.type=g.ALL_API,this.annotations=ue({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 Xm}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,Vd`
2877
2884
  query getTypeDetails {
2878
2885
  __type(name: "${t}") {
2879
2886
  name
@@ -2961,5 +2968,5 @@
2961
2968
  }
2962
2969
  }
2963
2970
  }
2964
- `),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 he{constructor(){super(...arguments),this.name="create_custom_activity",this.type=g.WRITE,this.annotations=ue({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return Kc}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 he{constructor(){super(...arguments),this.name="create_notification",this.type=g.WRITE,this.annotations=ue({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 Jc}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(Qc,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 he{constructor(){super(...arguments),this.name="create_timeline_item",this.type=g.WRITE,this.annotations=ue({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return pm}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(ip,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 he{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=g.READ,this.annotations=ue({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Em}async executeInternal(e){const t=await this.mondayApi.request(np);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 he{constructor(){super(...arguments),this.name="read_docs",this.type=g.READ,this.annotations=ue({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. Each comment is enriched with anchor info (block_id, selection_from, selection_length) indicating which block and text range it\'s attached to. 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 Pu}async executeInternal(e){return e.mode===xu?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??Lu,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 s=await this.mondayApi.request(Bd,r);if((!s.docs||0===s.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};s=await this.mondayApi.request(Bd,a)}if(!s.docs||0===s.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:s.docs.flatMap((e=>e?[e.id]:[])),object_ids:s.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(s.docs,r,n,d,p,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:xu,object_ids:[o]};try{const e={docId:o,since:a,until:i},r=await this.mondayApi.request(zd,e);let s=r?.doc_version_history?.restoring_points;if(!s||0===s.length)return{content:`No version history found for document ${o}${a?` from ${a}`:""}.`};if(!t)return n&&(s=s.slice(0,n)),{content:{doc_id:o,since:a,until:i,restoring_points:s}};const d=Math.min(n??10,10),p=s.slice(0,d+1),l=s.length>d,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:o,date:e.date,prevDate:a.date},n=await this.mondayApi.request(qd,i);return{...e,diff:n?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,d);return{content:{doc_id:o,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:s.length}}}}catch(e){return{content:`Error fetching version history for document ${o}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const n of e){const e=n.insert,o="string"==typeof e?e.length:1,r=n.attributes,s=r?.comments;if(s&&Array.isArray(s))for(const e of s){const n=String(e),r=t.get(n);if(r&&r.block_id===a.id){const e=Math.max(r.selection_from+r.selection_length,i+o);r.selection_length=e-r.selection_from}else r||t.set(n,{block_id:a.id,selection_from:i,selection_length:o})}i+=o}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[n,o]=await Promise.all([this.mondayApi.request(jd,i),this.mondayApi.request(Cu,{docId:[t]}).catch((()=>null))]),r=n.boards?.[0]?.items_page?.items;if(!r)return[];let s=new Map;if(o){const e=(o.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((e=>{let t;if("string"==typeof e.content)try{t=JSON.parse(e.content)}catch{t={}}else t=e.content??{};return{id:e.id??"",type:e.type??"",content:t}}));s=this.buildCommentAnchorMap(e)}const d=[];for(const e of r)if(e.updates&&0!==e.updates.length)for(const t of e.updates)d.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,anchor:s.get(t.id)??null,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 d}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 s=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,s="";try{const t={docId:e.id},a=await this.mondayApi.request(op,t);s=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){s=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.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:s,...i&&{comments:t}}}))),d=t.page||1,p=t.limit||25,l=s.length,c=l===p;return{content:{message:`Documents retrieved (${s.length})`,pagination:{current_page:d,limit:p,count:l,has_more_pages:c},data:s}}}},class extends he{constructor(){super(...arguments),this.name="workspace_info",this.type=g.READ,this.annotations=ue({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 Fu}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(rp,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 s=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:[]}]))),d=[];(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&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(t):d.push(t)}));const p=[];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&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:r.id,name:r.name,url:t?Iu(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(s.values()),root_items:{boards:d,docs:p}}}(a,await yu(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends he{constructor(){super(...arguments),this.name="list_workspaces",this.type=g.READ,this.annotations=ue({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all workspaces available to the user, ordered by membership (user\'s workspaces first). Returns workspaces with their ID, name, and description.\n[IMPORTANT] To search for workspaces by name, use the "search" tool with searchType WORKSPACES instead — it provides faster and more accurate results.'}getInputSchema(){return zu}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Vu(await this.mondayApi.request(Mu,t(gs.Member)));let i=a;if(!Bu(a)){i=Vu(await this.mondayApi.request(Mu,t(gs.All)))}if(!Bu(i))return{content:{message:"No workspaces found.",data:[]}};const n=i.length===e.limit,o=await yu(this.mondayApi),r=i.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:o&&e.id?Iu(o,e.id):void 0})));return{content:{message:"Workspaces retrieved",...n?{next_page:e.page+1}:{},data:r}}}},class extends he{constructor(){super(...arguments),this.name="create_doc",this.type=g.WRITE,this.annotations=ue({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, optional docOwnerIds)\n- item: Creates a document attached to an item (requires item_id, optional column_id, optional docOwnerIds)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_name: "My Doc", doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, doc_name: "My Doc", folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, doc_name: "My Doc", column_id: "doc_col_1" , markdown: "..." }\n- Workspace doc with agent owner: { location: "workspace", workspace_id: 123, doc_name: "My Doc", markdown: "...", docOwnerIds: ["<agent_owner_user_id>"] }'}getInputSchema(){return Ku}async executeInternal(e){const t=Yu.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===Wu.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||Kn.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},r=await this.mondayApi.request(qu,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===Wu.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(ju,o),s=r.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const d=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===qc.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:qc.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(Jd,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},m=await this.mondayApi.request(qu,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Hu,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(Gu,o),s=r?.add_content_to_doc_from_markdown?.success,d=r?.add_content_to_doc_from_markdown?.error;return s?(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: ${d||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends he{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=g.WRITE,this.annotations=ue({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 Zu}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(Xu,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Ju,{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(Qu,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${s} block${1===s?"":"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 he{constructor(){super(...arguments),this.name="update_doc",this.type=g.WRITE,this.annotations=ue({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 Lh}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(Su,{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(Eu,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(Au,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:nh(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:nh(e.delta_format),language:e.language};case"list_item":return{deltaFormat:nh(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(Nu,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:ih(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:eh(e.alignment),direction:th(e.direction)}};case"list_item":return{list_block:{delta_format:ih(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:ih(e.delta_format),text_block_type:Jr.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($u,o),s=r?.create_doc_blocks;if(!s||0===s.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${s.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(Du,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(Ou,{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(ku,{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(Cu,{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,s){if((null!=r||null!=s)&&!o)throw new Error("selection_from and selection_length require block_id");if(null!=r!=(null!=s))throw new Error("selection_from and selection_length must both be provided together");const d=o?Array.isArray(o)?o:[o]:[];if((null!=r||null!=s)&&d.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(n){const e=JSON.parse(n),t=mm.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(Ru,m);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(d.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 d){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 d=r??0,p=s??o;if(d+p>o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${d}, ${d+p}) is out of range for block ${a} (total length ${o})`);let l;try{l=rh(n,f,d,p)}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 c={...i.content,deltaFormat:l},m=await this.mondayApi.request(Nu,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" 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 he{constructor(){super(...arguments),this.name="update_workspace",this.type=g.WRITE,this.annotations=ue({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return Bh}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(Vh,t),i=await yu(this.mondayApi),n=i?Iu(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 he{constructor(){super(...arguments),this.name="update_folder",this.type=g.WRITE,this.annotations=ue({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return jh}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(zh,n);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends he{constructor(){super(...arguments),this.name="create_workspace",this.type=g.WRITE,this.annotations=ue({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Gh}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(qh,t),i=await yu(this.mondayApi),n=i&&a.create_workspace?.id?Iu(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 he{constructor(){super(...arguments),this.name="create_folder",this.type=g.WRITE,this.annotations=ue({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Wh}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(Hh,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 he{constructor(){super(...arguments),this.name="move_object",this.type=g.WRITE,this.annotations=ue({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 Qh}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},p=await this.mondayApi.request(zh,d);return{content:{message:"Object moved",object_id:p.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:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Yh,d);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Kh,d);return p.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:p.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${p.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case Er.Folder:return this.executeUpdateFolder(e);case Er.Board:return this.executeUpdateBoardHierarchy(e);case Er.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends he{constructor(){super(...arguments),this.name="create_dashboard",this.type=g.WRITE,this.annotations=ue({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 Fh}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(xh,t);if(!a.create_dashboard)throw new mp("Failed to create dashboard",cp);const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){up(e,"create dashboard")}}},class extends he{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=g.READ,this.annotations=ue({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(Uh,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:Hm}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends he{constructor(){super(...arguments),this.name="create_widget",this.type=g.WRITE,this.annotations=ue({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 Mh}async executeInternal(e){if(!e.settings)throw new mp("You must pass the settings parameter","MISSING_REQUIRED_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(Ph,t);if(!a.create_widget)throw new mp("Failed to create widget",cp);const i=a.create_widget;i.parent?.kind===fs.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){up(t,`create ${e.widget_kind} widget`)}}},class extends he{constructor(){super(...arguments),this.name="board_insights",this.type=g.READ,this.annotations=ue({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 af}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===Tn.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Tn.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return ef.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:wn.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Tn.CountItems?[]:[{type:wn.Column,column:tf(n),as:n}]}),as:s}}var i,n;const o={type:wn.Column,column:tf(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:wn.Column,column:tf(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:In.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(Jh,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:{message:"Board insights retrieved",board_name:r.boards?.[0]?.name,board_url:r.boards?.[0]?.url,data:s}}:{content:"No board insights found for the given query."}}},class extends he{constructor(){super(...arguments),this.name="search",this.type=g.READ,this.annotations=ue({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Search within monday.com platform. Supported searchType values: ${Mm}.\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 browsing all boards, docs, or folders within a workspace without a search term, use workspace_info tool.\nFor groups, use get_board_info tool.\nFor listing items within a specific board, use get_board_items_page tool. ITEMS search here queries items across the account.\nITEMS search returns id, title, and url.\nWORKSPACES search returns id, title, and description.\nUPDATES search returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with boardIds and/or creatorIds.\nTIMELINE_ITEMS search returns id, title, summary, and content.\nDASHBOARDS search (also called "overviews") returns id and title. Optionally scope it with workspaceIds and/or creatorIds.\nFOLDERS search returns id and title. Optionally scope it with workspaceIds, which searches all accessible workspaces when omitted. Pass workspaceIds to narrow the search if results may be truncated.\n `}getInputSchema(){return vf}async executeInternal(e){try{if(e.searchType===Fm.FOLDERS){const{results:t,truncated:a}=await this.searchFoldersAsync(e);return{content:{message:a?"Search results (truncated: only the first 100 folders across the searched workspaces were scanned. Narrow with workspaceIds for complete results.)":"Search results",data:t}}}return{content:{message:"Search results",data:await this.runSmartSearchAsync(e)}}}catch(e){throw hp(e),e}}async runSmartSearchAsync(e){const t=_f(e.workspaceIds?.map((e=>e.toString())));if(e.searchType===Fm.BOARD)return this.searchBoardsAsync(e.searchTerm,e.limit,t);if(e.searchType===Fm.DOCUMENTS)return this.searchDocsAsync(e.searchTerm,e.limit,t);if(e.searchType===Fm.WORKSPACES)return this.searchWorkspacesAsync(e.searchTerm,e.limit);if(e.searchType===Fm.UPDATES){const t=_f(e.boardIds?.map((e=>e.toString()))),a=_f(e.creatorIds?.map((e=>e.toString())));return this.searchUpdatesAsync(e.searchTerm,e.limit,t,a)}if(e.searchType===Fm.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);if(e.searchType===Fm.TIMELINE_ITEMS)return this.searchTimelineItemsAsync(e.searchTerm,e.limit);if(e.searchType===Fm.DASHBOARDS){const a=e.creatorIds?.map((e=>e.toString()));return this.searchOverviewsAsync(e.searchTerm,e.limit,t,a)}throw new mp(`Unsupported search type for smart search: ${e.searchType}`,pp)}async searchBoardsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return(await this.mondayApi.request(rf,i,{timeout:wp})).search.boards.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url})))}async searchDocsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return(await this.mondayApi.request(sf,i,{timeout:wp})).search.docs.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name})))}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return(await this.mondayApi.request(df,a,{timeout:wp})).search.workspaces.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,description:e.indexed_data.description||void 0})))}async searchUpdatesAsync(e,t,a,i){const n={query:e,limit:t,boardIds:a,creatorIds:i};return(await this.mondayApi.request(pf,n,{timeout:wp})).search.updates.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.body,itemId:e.indexed_data.item_id,boardId:e.indexed_data.board_id,creatorId:e.indexed_data.creator_id})))}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return(await this.mondayApi.request(of,i,{timeout:wp})).search.items.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url})))}async searchTimelineItemsAsync(e,t){const a={query:e,limit:t};return(await this.mondayApi.request(lf,a,{timeout:wp})).search.timeline_items.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.title,summary:e.indexed_data.summary||void 0,content:e.indexed_data.content||void 0})))}async searchOverviewsAsync(e,t,a,i){const n={query:e,limit:t,workspaceIds:a,creatorIds:i};return(await this.mondayApi.request(cf,n,{versionOverride:"dev",timeout:wp})).search.overviews.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name})))}async searchFoldersAsync(e){const t=mf(e.searchTerm);if(!t)return{results:[],truncated:!1};const a={page:1,limit:100,workspace_ids:_f(e.workspaceIds?.map((e=>e.toString())))},i=(await this.mondayApi.request(nf,a)).folders||[];return{results:i.filter((e=>e?.name&&mf(e.name).includes(t))).filter((e=>e?.id)).slice(0,e.limit).map((e=>({id:e.id,title:e.name}))),truncated:100===i.length}}},class extends he{constructor(){super(...arguments),this.name="get_user_context",this.type=g.READ,this.annotations=ue({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(Df,{},{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,...s}=e;return{content:{message:"User context",...{user:s,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[kf[e]]=t[e];const n=await this.mondayApi.request(Of,i),o=[];for(const e of a){const t=Cf[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 he{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=g.WRITE,this.annotations=ue({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 Af}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(Tf,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends he{constructor(){super(...arguments),this.name="get_assets",this.type=g.READ,this.annotations=ue({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 Nf}async executeInternal(e){const t=await this.mondayApi.request(Sf,{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 he{constructor(){super(...arguments),this.name="create_view",this.type=g.WRITE,this.annotations=ue({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 il}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(al,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 he{constructor(){super(...arguments),this.name="update_view",this.type=g.WRITE,this.annotations=ue({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\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 ol}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(nl,t);return a.update_view?{content:`View "${a.update_view.name}" (ID: ${a.update_view.id}, type: ${a.update_view.type}) successfully updated`}:{content:"Failed to update view - no response from API"}}},class extends he{constructor(){super(...arguments),this.name="create_view_table",this.type=g.WRITE,this.annotations=ue({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\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 settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return pl}async executeInternal(e){const t={boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(rl,t);return a.create_view_table?{content:`Table view "${a.create_view_table.name}" (ID: ${a.create_view_table.id}, type: ${a.create_view_table.type}) successfully created`}:{content:"Failed to create table view - no response from API"}}},class extends he{constructor(){super(...arguments),this.name="update_view_table",this.type=g.WRITE,this.annotations=ue({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\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 settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return ul}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(ll,t);return a.update_view_table?{content:`Table view "${a.update_view_table.name}" (ID: ${a.update_view_table.id}, type: ${a.update_view_table.type}) successfully updated`}:{content:"Failed to update table view - no response from API"}}},class extends he{constructor(){super(...arguments),this.name="undo_action",this.type=g.WRITE,this.annotations=ue({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 $f}async executeInternal(e){return await this.mondayApi.request(Rf,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends he{constructor(){super(...arguments),this.name="get_object_schemas",this.type=g.READ,this.annotations=ue({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 Rp}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(Cp,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends he{constructor(){super(...arguments),this.name="create_object_schema",this.type=g.WRITE,this.annotations=ue({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 Lp}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request($p,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 he{constructor(){super(...arguments),this.name="update_object_schema",this.type=g.WRITE,this.annotations=ue({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 Up}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(xp,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 he{constructor(){super(...arguments),this.name="delete_object_schema",this.type=g.WRITE,this.annotations=ue({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 Fp}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(Pp,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 he{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=g.WRITE,this.annotations=ue({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 Vp}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(Mp,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 he{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=g.WRITE,this.annotations=ue({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 jp}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(Bp,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(zp,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 he{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=g.WRITE,this.annotations=ue({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 with fetchMode "${qp.Schema}" 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 Qp}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(Gp,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(Hp,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 he{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=g.WRITE,this.annotations=ue({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 Xp}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:vo.Deactivate,reactivate:vo.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(Jp,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 he{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=g.WRITE,this.annotations=ue({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return xf}async executeInternal(e){const t=(await this.mondayApi.request(Lf,{input:{file_name:e.fileName,content_type:e.contentType,file_size:e.fileSize,source:"mcp",multipart:!1}},{versionOverride:"dev"})).create_upload,a=t.parts[0]?.url;if(!a)throw new Error("create_upload returned no upload URL — parts array was empty");return{content:{upload_id:t.upload_id,upload_url:a,url_expires_at:t.expires_at}}}},class extends he{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=g.WRITE,this.annotations=ue({title:"Finalize Asset Upload",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Finalize a file upload and create the asset on monday.com. Call this after uploading the file to the presigned URL from get_asset_upload_url. Requires the etag value from the PUT response headers. Automatically attaches the uploaded asset to the specified file column on the item. Returns the created asset_id."}getInputSchema(){return Ff}async executeInternal(e){const t=(await this.mondayApi.request(Uf,{input:{upload_id:e.uploadId,holder:{type:"ITEM",id:e.itemId},board_id:e.boardId,parts:[{part_number:1,etag:e.etag}]}},{versionOverride:"dev"})).complete_upload,a=JSON.stringify({added_file:{fileType:"ASSET",name:t.filename,assetId:String(t.id)}});return await this.mondayApi.request(Pf,{boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,value:a}),{content:{asset_id:t.id,filename:t.filename,content_type:t.content_type,file_size:t.file_size,url:t.url,filelink:t.filelink}}}},class extends he{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=g.READ,this.annotations=ue({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 Vf}async executeInternal(e){return{content:Mf}}},class extends he{constructor(){super(...arguments),this.name="fetch_file_content",this.type=g.READ,this.annotations=ue({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 Qf}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:n=0}=e,o=await this.mondayApi.request(Bf,{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=>Zf(e,n,i))))}}}},class extends he{constructor(){super(...arguments),this.name="manage_agent",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Full lifecycle management for monday platform agents — create, read, update, delete, change state, and run.\n\nmonday platform agents are user-built work orchestrators on monday.com — each has a profile (name, role, avatar), a goal, and a markdown execution plan. Agents in state ACTIVE can be triggered automatically. They are NOT local LangChain or MCP agents.\n\nACTIONS (only pass fields that apply to the chosen action):\n- create: { action:"create", prompt, agent_model? } — AI-generated agent. Platform creates profile, goal, and plan from the prompt.\n- create_blank: { action:"create_blank", name?, role?, role_description?, avatar_url?, gender?, background_color?, user_prompt? } — manually defined agent.\n- get one: { action:"get", agent_id }\n- list owned: { action:"get" }\n- update: { action:"update", agent_id, name?, role?, role_description?, plan?, agent_model? }\n- delete: { action:"delete", agent_id }\n- activate: { action:"activate", agent_id }\n- deactivate: { action:"deactivate", agent_id }\n- run: { action:"run", agent_id }\n\nRULES:\n- "create_blank" with no fields creates a nameless blank agent — only do this intentionally.\n- "update" requires at least one of name/role/role_description/plan/agent_model.\n- "update", "delete", "activate", "deactivate", "run" all require "agent_id".\n- Created agents start INACTIVE. Follow with action:"activate" using the returned agent_id before they can be triggered.\n- ⚠️ DESTRUCTIVE — "delete" is permanent and irreversible. When the user refers to an agent by name, ALWAYS call action:"get" first to confirm the correct agent_id before deleting.\n- "run" is fire-and-forget. Returns trigger_uuid — no run-status query exists, treat successful enqueue as the only signal.\n- Agent state is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED only appears as the return value of action:"delete".\n\nUSAGE EXAMPLES:\n- AI create: { "action": "create", "prompt": "Run my daily standup every weekday at 9am." }\n- Manual create:{ "action": "create_blank", "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Fetch one: { "action": "get", "agent_id": "42" }\n- List mine: { "action": "get" }\n- Rename: { "action": "update", "agent_id": "7", "name": "New Name" }\n- Activate: { "action": "activate", "agent_id": "7" }\n- Deactivate: { "action": "deactivate", "agent_id": "7" }\n- Run: { "action": "run", "agent_id": "7" }\n- Delete: { "action": "delete", "agent_id": "7" }\n\nRELATED TOOLS:\n- agent_catalog — browse available trigger types and skills before wiring them to an agent\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent_knowledge — manage which boards/docs this agent has access to'}getInputSchema(){return $y}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"create_blank":return this.handleCreateBlank(e);case"get":return this.handleGet(e);case"update":return this.handleUpdate(e);case"delete":return this.handleDelete(e);case"activate":return this.handleActivate(e);case"deactivate":return this.handleDeactivate(e);case"run":return this.handleRun(e)}}async handleCreate(e){if(!e.prompt)throw new Error('manage_agent action:"create" requires "prompt". For a manually configured agent, use action:"create_blank".');try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(by,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 — call manage_agent with action:"activate" and agent_id:"${a.create_agent.id}" to activate it`,agent:a.create_agent}}}catch(e){up(e,"create monday platform agent")}}async handleCreateBlank(e){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(vy,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 — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){up(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(gy,{ids:[e.agent_id]},{versionOverride:"dev"}),a=t?.[0];return a?{content:{message:"monday platform agent",agent:a}}:{content:`monday platform agent ${e.agent_id} not found, or the authenticated user does not have access to it.`}}catch(e){up(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(gy,{limit:100},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user (limited to 100 — ask the user if they need more)",count:t.length,agents:t}}}catch(e){up(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(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.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(yy,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){up(e,"update monday platform agent")}}async handleDelete(e){if(!e.agent_id)throw new Error('manage_agent action:"delete" requires "agent_id".');try{const t={id:e.agent_id},a=await this.mondayApi.request(Iy,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){up(e,"delete monday platform agent")}}async handleActivate(e){if(!e.agent_id)throw new Error('manage_agent action:"activate" requires "agent_id".');try{const t=await this.mondayApi.request(wy,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){up(e,"activate monday platform agent")}}async handleDeactivate(e){if(!e.agent_id)throw new Error('manage_agent action:"deactivate" requires "agent_id".');try{const t={id:e.agent_id,inactive_reason:vb.DeactivatedByUser},a=await this.mondayApi.request(Ty,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){up(e,"deactivate monday platform agent")}}async handleRun(e){if(!e.agent_id)throw new Error('manage_agent action:"run" requires "agent_id".');try{const t=await this.mondayApi.request(Ey,{id:e.agent_id},{versionOverride:"dev"});if(!t.run_agent)throw new Error("run_agent returned no data — the agent run may not have been enqueued");return{content:{message:"Agent run enqueued.",trigger_uuid:t.run_agent.trigger_uuid}}}catch(e){up(e,"run monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent Triggers",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the triggers attached to a monday platform agent — triggers define WHEN the agent runs automatically.\n\nACTIONS:\n- list: { agent_id } — returns active triggers with node_id, block_reference_id, name, field_summary.\n- add: { agent_id, block_reference_id, field_values? } — attaches a trigger type to the agent.\n- remove: { agent_id, node_id } — detaches a trigger instance by node_id (NOT block_reference_id).\n\nWORKFLOW — add a trigger:\n1. Call agent_catalog action:"list_triggers" — note block_reference_id, field_schemas, and required_fields.\n2. Collect required field values from the user (e.g. board_id, column_id).\n3. Call this tool action:"add" with block_reference_id and field_values.\nNote: add returns only { success } — no node_id for the new instance. Call action:"list" afterward if you need the node_id.\n\nWORKFLOW — remove a trigger:\n1. Call action:"list" to see active triggers and note the node_id of the instance to remove.\n2. Call action:"remove" with that node_id.\n\nNOTE: Only triggers that can be added programmatically appear in the catalog. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\nrequire user setup in the monday.com UI — they will not appear in agent_catalog and cannot be managed here.\n\nUSAGE EXAMPLES:\n- List triggers: { "action": "list", "agent_id": "7" }\n- Add trigger: { "action": "add", "agent_id": "7", "block_reference_id": "status-change-ref", "field_values": { "board_id": "42" } }\n- Remove trigger: { "action": "remove", "agent_id": "7", "node_id": "node-abc" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_triggers" — discover available trigger types and their required field_values before calling action:"add" here\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return Ly}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t={agent_id:e.agent_id},a=(await this.mondayApi.request(Ay,t,{versionOverride:"dev"})).agent_active_triggers??[];return{content:{message:'Active triggers on this agent. Use node_id with action:"remove" to detach a trigger.',count:a.length,triggers:a}}}catch(e){up(e,"list active triggers for monday platform agent")}}async handleAdd(e){if(!e.block_reference_id)throw new Error('block_reference_id is required for action:"add". Call agent_catalog action:"list_triggers" first to find the block_reference_id.');try{const t={agent_id:e.agent_id,block_reference_id:e.block_reference_id,field_values:e.field_values},a=await this.mondayApi.request(Sy,t,{versionOverride:"dev"});return{content:{message:'Trigger added to agent. Call action:"list" to verify and retrieve the node_id.',success:a.add_trigger_to_agent?.success??!1}}}catch(e){up(e,"add trigger to monday platform agent")}}async handleRemove(e){if(!e.node_id)throw new Error('node_id is required for action:"remove". Call action:"list" first to get node_id values.');try{const t={agent_id:e.agent_id,node_id:e.node_id},a=await this.mondayApi.request(Ny,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){up(e,"remove trigger from monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent Skills",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the full skill lifecycle for monday platform agents — create new skills in the catalog, attach skills to an agent, or detach them.\n\nSkills extend what an agent can do (e.g. sending emails, querying databases, posting to Slack).\n\nACTIONS:\n- create: { name, content, description? } — creates a new custom skill in the account-wide catalog.\n The skill becomes available to all agents in the account.\n- add: { agent_id, skill_id } — attaches a skill to this agent.\n- remove: { agent_id, skill_id } — detaches a skill from this agent.\n\nWORKFLOW — attach an existing skill:\n1. Call agent_catalog action:"list_skills" — find the skill_id of the skill to attach.\n2. Call this tool action:"add" with agent_id and that skill_id.\n\nWORKFLOW — create a new skill and attach it:\n1. Call this tool action:"create" with name and content — note the returned id.\n2. Call this tool action:"add" with agent_id and that id directly (no catalog lookup needed).\n\nNOTE: There is no action to list which skills are currently attached to a specific agent — the platform does not yet expose that query.\nTo browse all skills available in the account catalog, use agent_catalog action:"list_skills".\n\nUSAGE EXAMPLES:\n- Create a skill: { "action": "create", "name": "Send Slack Message", "content": "## Instructions\\nPost a message to a Slack channel.", "description": "Sends a message to Slack" }\n- Add a skill: { "action": "add", "agent_id": "7", "skill_id": "skill-abc-123" }\n- Remove a skill: { "action": "remove", "agent_id": "7", "skill_id": "skill-abc-123" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_skills" — browse existing skills to find a skill_id before calling action:"add"\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return xy}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleCreate(e){if(!e.name||!e.content)throw new Error('action:"create" requires both "name" and "content".');try{const t={name:e.name,content:e.content,description:e.description},a=await this.mondayApi.request(Ry,t,{versionOverride:"dev"});if(!a.create_agent_skill)throw new Error("create_agent_skill returned no data");return{content:{message:'Skill created and added to the account catalog. Use the returned id with action:"add" to attach it to an agent.',skill:a.create_agent_skill}}}catch(e){up(e,"create monday platform agent skill")}}async handleAdd(e){if(!e.agent_id)throw new Error('agent_id is required for action:"add".');if(!e.skill_id)throw new Error('skill_id is required for action:"add". Get it from agent_catalog action:"list_skills" or from action:"create" in this tool.');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(Dy,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){up(e,"add skill to monday platform agent")}}async handleRemove(e){if(!e.agent_id)throw new Error('agent_id is required for action:"remove".');if(!e.skill_id)throw new Error('skill_id is required for action:"remove".');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(Oy,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){up(e,"remove skill from monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent Knowledge",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'List, grant, update, or revoke a monday platform agent\'s access to boards and docs.\n\nAn agent\'s "knowledge" is the set of monday.com boards and docs it can read from or write to during a run.\n\n- list: Returns all resources the agent currently has access to, including permission level and resource type.\n- add: Grants the agent access to a board or doc with the specified permission level.\n- update: Changes the permission level on a resource the agent already has access to. Call action:"list" first to confirm the resource_id exists.\n- remove: Revokes the agent\'s access to a board or doc entirely. Call action:"list" first to confirm the resource_id exists.\n\nPermission types:\n- READ: Agent can read data from the resource.\n- READ_WRITE: Agent can read and write data to the resource.\n\nUSAGE EXAMPLES:\n- List: { "action": "list", "agent_id": "7" }\n- Add board access: { "action": "add", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ" }\n- Update to read-write: { "action": "update", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ_WRITE" }\n- Remove access: { "action": "remove", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD" }\n\nRELATED TOOLS:\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform'}getInputSchema(){return Vy}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"update":return this.handleUpdate(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t=(await this.mondayApi.request(Uy,{id:e.agent_id},{versionOverride:"dev"})).agent_knowledge??{resources:[],files:[]};return{content:{message:"Current agent resource access.",count:t.resources?.length??0,knowledge:t}}}catch(e){up(e,"list agent knowledge for monday platform agent")}}async handleAdd(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:add");try{const t=await this.mondayApi.request(Py,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access granted to agent.",success:t.add_agent_resource_access?.success??!1}}}catch(e){up(e,"add agent resource access for monday platform agent")}}async handleUpdate(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:update");try{const t=await this.mondayApi.request(My,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access updated.",success:t.update_agent_resource_access?.success??!1}}}catch(e){up(e,"update agent resource access for monday platform agent")}}async handleRemove(e){if(!e.resource_id||!e.scope_type)throw new Error("resource_id and scope_type are required for action:remove");try{const t=await this.mondayApi.request(Fy,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type},{versionOverride:"dev"});return{content:{message:"Resource access removed from agent.",success:t.remove_agent_resource_access?.success??!1}}}catch(e){up(e,"remove agent resource access for monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="agent_catalog",this.type=g.READ,this.annotations=ue({title:"monday Platform Agent Catalog",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Browse the account-wide catalog of available trigger types and skills for monday platform agents. READ-ONLY — no agent_id required.\n\nUse this tool to discover what\'s available BEFORE wiring anything to a specific agent.\n\nACTIONS:\n- list_triggers: { block_reference_ids? } — returns available trigger types.\n Each entry has block_reference_id (required for manage_agent_triggers action:"add"), name, description,\n field_schemas (describes field_values shape), and required_fields (fields to collect from the user).\n Note: only triggers that can be added programmatically appear here. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\n require user setup in the monday.com UI and will not appear here.\n\n- list_skills: {} — returns available skills with id, name, description.\n Never guess or invent a skill id — always look it up here before calling manage_agent_skills action:"add".\n\nUSAGE EXAMPLES:\n- List all trigger types: { "action": "list_triggers" }\n- Fetch specific trigger: { "action": "list_triggers", "block_reference_ids": ["some-block-ref-id"] }\n- List all skills: { "action": "list_skills" }\n\nRELATED TOOLS:\n- manage_agent_triggers — use block_reference_id from list_triggers to attach a trigger to a specific agent\n- manage_agent_skills — use skill id from list_skills, or action:"create" to author a new skill, then attach to an agent\n- manage_agent — manage the agent entity itself (create, update, delete, activate, etc.)'}getInputSchema(){return By}async executeInternal(e){switch(e.action){case"list_triggers":return this.handleListTriggers(e);case"list_skills":return this.handleListSkills()}}async handleListTriggers(e){try{const t={block_reference_ids:e.block_reference_ids},a=(await this.mondayApi.request(ky,t,{versionOverride:"dev"})).agent_triggers_catalog??[];return{content:{message:'Available trigger types. Use block_reference_id and inspect field_schemas/required_fields before calling manage_agent_triggers action:"add".',count:a.length,triggers:a}}}catch(e){up(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(Cy,{},{versionOverride:"dev"})).agent_skills_catalog??[];return{content:{message:'Available skills. Use id when calling manage_agent_skills action:"add".',count:e.length,skills:e}}}catch(e){up(e,"fetch monday platform agent skills catalog")}}},class extends he{constructor(){super(...arguments),this.name="list_automations",this.type=g.READ,this.annotations=ue({title:"List Board Automations",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all automations on a specific monday.com board, including their ids, titles, active state, and configuration.\nReturns two groups: "workflows" (fully manageable, supports pagination via limit/cursor) and "legacyAutomations" (READ-ONLY automations set up in an older way — returned on the first page only, when no cursor is given).\nAlways present BOTH groups to the user together as one list of board automations — never omit or hide "legacyAutomations". The split and the read-only limitation are internal context for you only: don\'t volunteer them and don\'t label any automation "legacy" or "read-only". Only if the user asks to act on a legacy one, briefly explain it can\'t be changed (e.g. "This one was set up in an older way and can\'t be modified here").\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\n'}getInputSchema(){return Gy}async executeInternal(e){try{const a=!e.cursor,i={boardIds:[e.boardId],limit:e.limit??100,includeLegacy:a,...e.cursor?{cursor:e.cursor}:{}},n=await this.mondayApi.request(zy,i),o=(n.board_automations?.items??[]).map(qy),r=n.board_automations?.cursor??null,s=a?(t=n.board_automations?.legacy_automations,null==t||"object"==typeof t&&"error"in t?null:t):null;return{content:{message:`Found ${o.length} live workflow(s) on board ${e.boardId}`,workflows:o,...null!=s?{legacyAutomations:s}:{},pagination:{nextCursor:r,hasMore:null!==r}}}}catch(e){up(e,"list live workflows")}var t}},class extends he{constructor(){super(...arguments),this.name="manage_automations",this.type=g.WRITE,this.annotations=ue({title:"Manage Automations",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Activate, deactivate, or delete an existing monday.com automation.\n\nRequires an automation id. When the user refers to an automation by name, always call list_automations first to resolve the id — never guess or infer ids.\n\nActions:\n- activate: enables a paused automation so it starts responding to its trigger.\n- deactivate: pauses an automation while preserving its definition.\n- delete: permanently removes an automation — irreversible.\n\nWhen intent is ambiguous ("stop", "turn off", "pause"), prefer deactivate over delete.'}getInputSchema(){return Ky}async executeInternal(e){const t=e;switch(t.action){case"activate":return this.activateWorkflow(t);case"deactivate":return this.deactivateWorkflow(t);case"delete":return this.deleteWorkflow(t)}}async activateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Hy,t,{versionOverride:"dev"});if(!a.activate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} activation did not report success`);return{content:{message:`Workflow ${e.workflowId} activated`,workflowId:e.workflowId,isActive:!0}}}catch(e){up(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Wy,t,{versionOverride:"dev"});if(!a.deactivate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deactivation did not report success`);return{content:{message:`Workflow ${e.workflowId} deactivated`,workflowId:e.workflowId,isActive:!1}}}catch(e){up(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Yy,t,{versionOverride:"dev"});if(!a.delete_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deletion did not report success`);return{content:{message:`Workflow ${e.workflowId} deleted`,workflowId:e.workflowId}}}catch(e){up(e,"delete workflow")}}},class extends he{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=g.WRITE,this.annotations=ue({title:"Create Automation",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'\n Creates an automation on a monday board from a structured natural-language description.\n\nUse this tool only when you know:\n- boardId\n- the user\'s intended trigger\n- at least one intended action\n- any details the user provided that are relevant to the trigger, conditions, or actions\n\nThe caller does not need to know the exact available automation blocks or their required fields. Describe the user\'s intent clearly — the tool will translate that intent into supported blocks and values.\n\nIf a required detail is missing from the user\'s request, ask for clarification before calling the tool.\n\nIf the tool returns status: "needs_clarification", present the unresolved fields to the user, gather answers, then call the tool again.\n\nDescribe the automation in this format:\n\nTrigger:\n When <the event that should start the automation>\n Details:\n <relevant detail>: <value>\n\nConditions:\n - Only if <condition that should be true>\n Details:\n <relevant detail>: <value>\n\nActions:\n - <action the automation should perform>:\n <relevant detail>: <value>\n\nRules:\n- Use one trigger.\n- Conditions are optional.\n- Multiple conditions mean AND.\n- Use one or more actions.\n- Do not use branching.\n- Use natural language, not block IDs or internal field names.\n- Actions may reference values from the trigger context, such as "{{item name}}", "{{creator}}", "{{status}}", "{{group}}", or "{{board}}".\n\nTerminology:\n- Trigger: the event that starts the automation, such as "when a new item is created".\n- Conditions: optional requirements that must be true before actions run.\n- Actions: what the automation does when it runs.\n\nExample:\n\nTrigger:\n When a new item is created\n\nActions:\n - Send a notification:\n Recipient: John Snow\n Title: Important Update\n Message: The item "{{item name}}" was created.\n\n - Move the item to a group:\n Group: Top group\n'}getInputSchema(){return Zy}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=Xy(this.context),i=await a({serviceName:Qy,path:"/platform-ai-gateway/agents/lite-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new mp(`lite-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`,"UPSTREAM_HTTP_ERROR")}return{content:await i.json()}}catch(e){up(e,"create automation")}}},class extends he{constructor(){super(...arguments),this.name="get_automation_runs",this.type=g.READ,this.annotations=ue({title:"Get Automation Runs",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Read automation/workflow run history. Read-only.\n\nModes:\n- "history": paginated run feed (state, duration, error reason). Use "filters" to narrow results and "nextPageOffset" to page (offset-only — next page = previous offset + returned count).\n- "detail": single run by "triggerUuid" (required) — returns block steps and MCP tool calls. Set "includeToolEvents": false to skip tool calls.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nKnown event states: "success", "failure", "exhausted".'}getInputSchema(){return rI}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};try{return"detail"===e.mode?await this.runDetail(e):await this.runHistory(e)}catch(e){up(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},i=await this.mondayApi.request(tI,{nextPageOffset:t,filters:a}),n=i.trigger_events?.triggerEvents??[],o=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(n),r=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${n.length} run(s) (${r}) at offset ${t}. By state: ${function(e){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`));return t.length?t.join(", "):"none"}(o)}. Offset-only pagination — for the next page request offset ${t+n.length}.`,scope:r,offset:t,count:n.length,stateCounts:o,runs:n}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,i=e.toolEventsOffset??0,n=(await this.mondayApi.request(aI,{triggerUuid:e.triggerUuid})).trigger_event;if(!n)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[o,r]=await Promise.all([this.mondayApi.request(iI,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(nI,{triggerUuid:e.triggerUuid,nextPageOffset:i}):Promise.resolve(null)]),s=o.block_events?.blockEvents??[],d=r?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${n.eventState??"unknown"}, ${s.length} block step(s), ${d.length} tool call(s).`,found:!0,run:n,blockEvents:s,blockEventsOffset:a,toolEvents:d,toolEventsOffset:i,toolEventsIncluded:t}}}},class extends he{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=g.READ,this.annotations=ue({title:"Get Automation Statistics",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Aggregate automation run statistics. Read-only.\n\nBreakdowns:\n- "totals": success/failure/total counts at the account or board level.\n- "by_entity": per-automation and per-workflow counts for a given "runStatus" (required: "success" | "failure" | "exhausted"). Use "excludeAutomationIds" to omit specific automations.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nOptional "userIds" narrows results to specific creators.'}getInputSchema(){return pI}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};const t=e.boardId?function(e){const t=Number(e.trim());if(!Number.isInteger(t)||t<=0)throw new Error(`Invalid boardId: '${e}' is not a positive integer.`);return t}(e.boardId):void 0,a=e.boardId?`board ${e.boardId}`:"account-wide";try{return"by_entity"===e.breakdown?await this.runByEntity(e,t,a):await this.runTotals(e,t,a)}catch(e){up(e,"get automation statistics")}}async runTotals(e,t,a){const i=(await this.mondayApi.request(sI,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${i?.success??0}, failure=${i?.failure??0}, total=${i?.total??0}.`,scope:a,breakdown:"totals",statistics:i}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const i=(await this.mondayApi.request(dI,{runStatus:e.runStatus,filters:{board_id:t,automation_ids:e.excludeAutomationIds,user_ids:e.userIds}})).account_triggers_statistics_by_entity_id;return{content:{message:`By-entity '${e.runStatus}' statistics (${a}).`,scope:a,breakdown:"by_entity",runStatus:e.runStatus,automationStatistics:i?.automation_statistics,workflowStatistics:i?.workflow_statistics}}}},class extends he{constructor(){super(...arguments),this.name="create_workflow",this.type=g.WRITE,this.annotations=ue({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n"}getInputSchema(){return cI}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(lI,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:n}=a.create_workflow;if(!i||!n)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:n}}}catch(e){up(e,"create Workflow Builder workflow")}}},class extends he{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=g.WRITE,this.annotations=ue({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return mI}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=Xy(this.context),i=await a({serviceName:Qy,path:"/platform-ai-gateway/agents/workflow-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){up(e,"update workflow")}}},class extends he{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=g.READ,this.annotations=ue({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return uI}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=Xy(this.context),i=await a({serviceName:Qy,path:"/platform-ai-gateway/agents/workflow-planner",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){up(e,"plan workflow")}}},class extends he{constructor(){super(...arguments),this.name="publish_workflow",this.type=g.WRITE,this.annotations=ue({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nWhen to use: Only call this tool when the user explicitly asks to publish the workflow. After a workflow is created or updated successfully, suggest to the user that they can publish it and wait for their explicit confirmation before proceeding.\n\nBefore publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\n"}getInputSchema(){return fI}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(hI,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:n}=a.publish_workflow;if(!i||!n)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:n}}}catch(e){up(e,"publish workflow")}}},class extends he{constructor(){super(...arguments),this.name="configure_ai_column",this.type=g.WRITE,this.annotations=ue({title:"Configure AI Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add AI to a column or set up an AI column on a monday.com board. Use this tool when the user wants to automatically categorize, summarize, translate, extract, generate text, improve writing, or assign people using AI on a column. This is the right tool for requests like "add AI to a column", "set up automatic extraction/categorization/summarization", "make a column use AI", "configure AI on a column", or "use AI to automatically fill a column".\n\nThe column must already exist on the board with a compatible type for the chosen block. To create a new AI column, first use create_column to create the column, then use this tool to add AI behavior.\n\nBLOCK TYPES (only pass fields that apply to the chosen block_type):\n- categorize: { block_type, source_type, source_column_id?, additional_instructions? } — assigns labels from target column\'s existing status/dropdown options\n- summarize: { block_type, source_type, source_column_id?, additional_instructions? } — generates concise summaries\n- translate: { block_type, source_type, source_column_id?, target_language } — translates to target language\n- improve_text: { block_type, source_type, source_column_id?, tone?, improver_length?, refinement_type? } — rewrites/fixes text\n- extract: { block_type, source_type, source_column_id?, entity_type, custom_instructions?, additional_instructions? } — extracts structured info\n- open_block: { block_type, ai_query } — flexible custom prompt, reference columns via {pulse.column_id}\n- write_me: { block_type, ai_query, tone, output_length } — generates new text from prompt\n- person_assignment: { block_type, source_type, source_column_id?, groups } — assigns people based on context\n\nSOURCE TYPES (required for all blocks except open_block and write_me):\n- item_name: uses the item\'s name as input\n- thread: uses the item\'s updates/comments as input\n- column: uses another column\'s value (requires source_column_id)\n- emails_and_activities: uses emails & activities (categorize only)\n\nCOLUMN REFERENCE SYNTAX (for open_block and write_me ai_query):\n- {pulse.column_id} — regular board column\n- {pulse.name} — the item name\n- {pulse.subitem.column_id} — subitem column\n\nRELATED TOOLS:\n- create_column — create the target column first if it doesn\'t exist\n- get_board_schema — discover existing columns and their types/IDs'}getInputSchema(){return EI}async executeInternal(e){const t=void 0!==e.run_backfill?{run_backfill:e.run_backfill}:void 0;try{switch(e.block_type){case"categorize":return this.handleCategorize(e.board_id,e,t);case"summarize":return this.handleSummarize(e.board_id,e,t);case"translate":return this.handleTranslate(e.board_id,e,t);case"improve_text":return this.handleImproveText(e.board_id,e,t);case"extract":return this.handleExtract(e.board_id,e,t);case"open_block":return this.handleOpenBlock(e.board_id,e,t);case"write_me":return this.handleWriteMe(e.board_id,e,t);case"person_assignment":return this.handlePersonAssignment(e.board_id,e,t)}}catch(e){up(e,"configure AI column")}}validateSourceType(e,t){if(!e.source_type)throw new Error(`source_type is required for ${t} block`);if("column"===e.source_type&&!e.source_column_id)throw new Error('source_column_id is required when source_type is "column"')}async handleCategorize(e,t,a){this.validateSourceType(t,"categorize");const i=await this.mondayApi.request(_I,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const i=await this.mondayApi.request(gI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_summarize_ai_column?.column_id}}}async handleTranslate(e,t,a){if(this.validateSourceType(t,"translate"),!t.target_language)throw new Error("target_language is required for translate block");const i=await this.mondayApi.request(bI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,targetLanguage:t.target_language,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const i=await this.mondayApi.request(vI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,tone:t.tone,length:t.improver_length,refinementType:t.refinement_type,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_improve_text_ai_column?.column_id}}}async handleExtract(e,t,a){if(this.validateSourceType(t,"extract"),!t.entity_type)throw new Error("entity_type is required for extract block");if("custom"===t.entity_type&&!t.custom_instructions)throw new Error('custom_instructions is required for extract block when entity_type is "custom"');const i=await this.mondayApi.request(yI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,entityType:t.entity_type,customInstructions:t.custom_instructions,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_extract_ai_column?.column_id}}}async handleOpenBlock(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for open_block block");const i=await this.mondayApi.request(II,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_open_block_ai_column?.column_id}}}async handleWriteMe(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for write_me block");if(!t.tone)throw new Error("tone is required for write_me block");if(!t.output_length)throw new Error("output_length is required for write_me block");const i=await this.mondayApi.request(wI,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,tone:t.tone,length:t.output_length,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_write_me_ai_column?.column_id}}}async handlePersonAssignment(e,t,a){if(this.validateSourceType(t,"person_assignment"),!t.groups||0===t.groups.length)throw new Error("groups is required for person_assignment block");const i=await this.mondayApi.request(TI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,groups:t.groups,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_person_assignment_ai_column?.column_id}}}},class extends he{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=g.WRITE,this.annotations=ue({title:"Remove AI from Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0})}getDescription(){return"Remove AI from a column on a monday.com board. Use this tool when the user wants to disable AI on a column, turn off AI automation, stop AI from running on a column, or delete the AI behavior from a column. This deletes all AI automation recipes and the app feature extension associated with the column. The column itself is not deleted — only its AI behavior is removed.\n\nUse get_board_schema to find column IDs before calling this tool."}getInputSchema(){return SI}async executeInternal(e){try{const t=await this.mondayApi.request(AI,{boardId:e.board_id.toString(),columnId:e.column_id});return{content:{message:"AI removed from column successfully",column_id:t.remove_ai_from_column?.column_id,success:t.remove_ai_from_column?.success}}}catch(e){up(e,"remove AI from column")}}},class extends he{constructor(){super(...arguments),this.name="send_feedback",this.type=g.READ,this.annotations=ue({title:"Send Feedback",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Submit feedback, feature requests, or bug reports about the monday.com MCP server to help improve it.\n\nCall this tool proactively — do NOT wait for the user to explicitly ask. Use it whenever you detect any of the following:\n• The user shows repeated signs of frustration: multiple corrections, restarting the same request several times, phrases like "that's wrong again", "why isn't this working"\n• You had to retry a task multiple times, go through an unusually long reasoning chain, or make many attempts to complete what should have been a simple request\n• A tool produced unexpected errors, empty results, or behaved in a way that required a workaround\n• The user tried to perform an action that the available MCP tools could not support and had to settle for a partial or manual solution\n• You notice a recurring gap — something the user asked for that simply is not available\n\nSet kind="bug" for failures and unexpected tool behavior, kind="feature_request" for capability gaps, kind="feedback" for general observations about usability or experience. Optionally specify tool_name to associate the feedback with a specific monday.com MCP tool.\n\nIMPORTANT: This tool is strictly for feedback about monday.com MCP tools and monday.com functionality only. Do NOT call it for issues with other connectors or services (e.g. Google Drive, Slack, GitHub, or any non-monday.com integration). ${NI}`}getInputSchema(){return DI}async executeInternal(e){return this.sessionContext.metadata??={},this.sessionContext.metadata.kind=e.kind,this.sessionContext.metadata.title=e.title,this.sessionContext.metadata.description=e.description,e.tool_name&&(this.sessionContext.metadata.tool_name=e.tool_name),{content:{message:"Feedback submitted successfully. Thank you for helping improve the monday.com MCP server."}}}},class extends he{constructor(){super(...arguments),this.name="get_monday_knowledge",this.type=g.READ,this.annotations=ue({title:"Get Monday Knowledge",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Ask a question about monday.com and get an AI-generated answer from the official knowledge base.\n\nUse kind="general" for questions about using monday.com — features, automations, UI, help center, and settings. Returns cited source articles with links.\nUse kind="developer_docs" for questions about the monday.com API — GraphQL queries and mutations, authentication, rate limits, webhooks, schema, API best practices, and building apps.\n\nImportant: do not include PII data in the questions.'}getInputSchema(){return $I}async executeInternal(e){return e.kind===CI?this.queryDeveloperDocs(e.query):this.queryGeneralKnowledge(e.query)}async queryGeneralKnowledge(e){const t={query:e},a=(await this.mondayApi.request(OI,t)).knowledge_base_search;a?.answer||up(new Error("No answer found in the knowledge base. Try rephrasing your question."),"get_monday_knowledge"),this.sessionContext.metadata??={},this.sessionContext.metadata.query=e,this.sessionContext.metadata.answer=a.answer;const i=(a.raw_snippets??[]).filter((e=>e.url&&e.title)).map((e=>({title:e.title,url:e.url,snippet:e.text??""})));return{content:{answer:a.answer,sources:i,kind:RI}}}async queryDeveloperDocs(e){const t={query:e},a=(await this.mondayApi.request(kI,t)).ask_developer_docs;return a?.answer||up(new Error("No answer found in developer docs. Try rephrasing your question."),"get_monday_knowledge"),this.sessionContext.metadata??={},this.sessionContext.metadata.query=e,this.sessionContext.metadata.answer=a.answer,{content:{answer:a.answer,sources:[],kind:CI}}}}];var mw;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(mw||(mw={}));const uw=(e,t)=>{let a=[];t?.mode===mw.APPS?a=[...me]:t?.mode!==mw.API&&t?.mode||(a=[...cw,...lw]);const i=a.map((t=>((e,t)=>e.prototype instanceof he?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof q?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==g.ALL_API;if(t.mode===mw.API&&"only"===t.enableDynamicApiTools)return e.type===g.ALL_API;let a=!1;return t.mode===mw.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===g.ALL_API),t.readOnlyMode&&(a=a||e.type!==g.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))},hw=e=>"object"==typeof e?JSON.stringify(e):e;exports.MondayAgentToolkit=class{constructor(e){this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??z},this.tools=this.initializeTools(e)}initializeTools(t){const a={apiClient:"function"==typeof t.mondayApiToken?()=>new e.ApiClient({token:t.mondayApiToken(),apiVersion:t.mondayApiVersion??z,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}):new e.ApiClient({token:t.mondayApiToken,apiVersion:t.mondayApiVersion??z,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}),apiToken:this.mondayApiToken,context:this.context};return uw(a,t.toolsConfiguration)}getTools(){return this.tools.map((e=>{const t=e.getInputSchema();return{type:"function",function:{name:e.name,description:e.getDescription(),parameters:t?h.zodToJsonSchema(o.z.object(t)):void 0}}}))}async handleToolCall(e){const{name:t,arguments:a}=e.function,i=JSON.parse(a),n=this.tools.find((e=>e.name===t));if(!n)throw new Error(`Unknown tool: ${t}`);const r=n.getInputSchema();if(r){const t=o.z.object(r).safeParse(i);if(!t.success)throw new Error(`Invalid arguments: ${t.error.message}`);const a=await n.execute(t.data);return{role:"tool",tool_call_id:e.id,content:hw(a.content)}}{const t=await n.execute();return{role:"tool",tool_call_id:e.id,content:hw(t.content)}}}};
2971
+ `),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 he{constructor(){super(...arguments),this.name="create_custom_activity",this.type=g.WRITE,this.annotations=ue({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return Qc}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 he{constructor(){super(...arguments),this.name="create_notification",this.type=g.WRITE,this.annotations=ue({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 Xc}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(Jc,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 he{constructor(){super(...arguments),this.name="create_timeline_item",this.type=g.WRITE,this.annotations=ue({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return lm}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(ip,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 he{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=g.READ,this.annotations=ue({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Am}async executeInternal(e){const t=await this.mondayApi.request(np);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 he{constructor(){super(...arguments),this.name="read_docs",this.type=g.READ,this.annotations=ue({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. Each comment is enriched with anchor info (block_id, selection_from, selection_length) indicating which block and text range it\'s attached to. 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 Fu}async executeInternal(e){return e.mode===Uu?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??xu,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 s=await this.mondayApi.request(Bd,r);if((!s.docs||0===s.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};s=await this.mondayApi.request(Bd,a)}if(!s.docs||0===s.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:s.docs.flatMap((e=>e?[e.id]:[])),object_ids:s.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(s.docs,r,n,d,p,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:Uu,object_ids:[o]};try{const e={docId:o,since:a,until:i},r=await this.mondayApi.request(zd,e);let s=r?.doc_version_history?.restoring_points;if(!s||0===s.length)return{content:`No version history found for document ${o}${a?` from ${a}`:""}.`};if(!t)return n&&(s=s.slice(0,n)),{content:{doc_id:o,since:a,until:i,restoring_points:s}};const d=Math.min(n??10,10),p=s.slice(0,d+1),l=s.length>d,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:o,date:e.date,prevDate:a.date},n=await this.mondayApi.request(qd,i);return{...e,diff:n?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,d);return{content:{doc_id:o,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:s.length}}}}catch(e){return{content:`Error fetching version history for document ${o}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const n of e){const e=n.insert,o="string"==typeof e?e.length:1,r=n.attributes,s=r?.comments;if(s&&Array.isArray(s))for(const e of s){const n=String(e),r=t.get(n);if(r&&r.block_id===a.id){const e=Math.max(r.selection_from+r.selection_length,i+o);r.selection_length=e-r.selection_from}else r||t.set(n,{block_id:a.id,selection_from:i,selection_length:o})}i+=o}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[n,o]=await Promise.all([this.mondayApi.request(jd,i),this.mondayApi.request(Ru,{docId:[t]}).catch((()=>null))]),r=n.boards?.[0]?.items_page?.items;if(!r)return[];let s=new Map;if(o){const e=(o.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((e=>{let t;if("string"==typeof e.content)try{t=JSON.parse(e.content)}catch{t={}}else t=e.content??{};return{id:e.id??"",type:e.type??"",content:t}}));s=this.buildCommentAnchorMap(e)}const d=[];for(const e of r)if(e.updates&&0!==e.updates.length)for(const t of e.updates)d.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,anchor:s.get(t.id)??null,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 d}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 s=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,s="";try{const t={docId:e.id},a=await this.mondayApi.request(op,t);s=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){s=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.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:s,...i&&{comments:t}}}))),d=t.page||1,p=t.limit||25,l=s.length,c=l===p;return{content:{message:`Documents retrieved (${s.length})`,pagination:{current_page:d,limit:p,count:l,has_more_pages:c},data:s}}}},class extends he{constructor(){super(...arguments),this.name="workspace_info",this.type=g.READ,this.annotations=ue({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 Mu}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(rp,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 s=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:[]}]))),d=[];(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&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(t):d.push(t)}));const p=[];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&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:r.id,name:r.name,url:t?wu(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(s.values()),root_items:{boards:d,docs:p}}}(a,await Iu(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends he{constructor(){super(...arguments),this.name="list_workspaces",this.type=g.READ,this.annotations=ue({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all workspaces available to the user, ordered by membership (user\'s workspaces first). Returns workspaces with their ID, name, and description.\n[IMPORTANT] To search for workspaces by name, use the "search" tool with searchType WORKSPACES instead — it provides faster and more accurate results.'}getInputSchema(){return ju}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Bu(await this.mondayApi.request(Vu,t(gs.Member)));let i=a;if(!zu(a)){i=Bu(await this.mondayApi.request(Vu,t(gs.All)))}if(!zu(i))return{content:{message:"No workspaces found.",data:[]}};const n=i.length===e.limit,o=await Iu(this.mondayApi),r=i.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:o&&e.id?wu(o,e.id):void 0})));return{content:{message:"Workspaces retrieved",...n?{next_page:e.page+1}:{},data:r}}}},class extends he{constructor(){super(...arguments),this.name="create_doc",this.type=g.WRITE,this.annotations=ue({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, optional docOwnerIds)\n- item: Creates a document attached to an item (requires item_id, optional column_id, optional docOwnerIds)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_name: "My Doc", doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, doc_name: "My Doc", folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, doc_name: "My Doc", column_id: "doc_col_1" , markdown: "..." }\n- Workspace doc with agent owner: { location: "workspace", workspace_id: 123, doc_name: "My Doc", markdown: "...", docOwnerIds: ["<agent_owner_user_id>"] }'}getInputSchema(){return Qu}async executeInternal(e){const t=Ku.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===Yu.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||Kn.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},r=await this.mondayApi.request(Gu,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===Yu.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(qu,o),s=r.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const d=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===Gc.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:Gc.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(Jd,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},m=await this.mondayApi.request(Gu,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Wu,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(Hu,o),s=r?.add_content_to_doc_from_markdown?.success,d=r?.add_content_to_doc_from_markdown?.error;return s?(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: ${d||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends he{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=g.WRITE,this.annotations=ue({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 eh}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(Zu,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Xu,{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(Ju,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const s=o?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${s} block${1===s?"":"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 he{constructor(){super(...arguments),this.name="update_doc",this.type=g.WRITE,this.annotations=ue({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 xh}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(Nu,{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(Au,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(Su,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:oh(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:oh(e.delta_format),language:e.language};case"list_item":return{deltaFormat:oh(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(Du,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:nh(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:th(e.alignment),direction:ah(e.direction)}};case"list_item":return{list_block:{delta_format:nh(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:nh(e.delta_format),text_block_type:Jr.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(Lu,o),s=r?.create_doc_blocks;if(!s||0===s.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${s.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(Ou,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(ku,{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(Cu,{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(Ru,{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,s){if((null!=r||null!=s)&&!o)throw new Error("selection_from and selection_length require block_id");if(null!=r!=(null!=s))throw new Error("selection_from and selection_length must both be provided together");const d=o?Array.isArray(o)?o:[o]:[];if((null!=r||null!=s)&&d.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(n){const e=JSON.parse(n),t=um.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request($u,m);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(d.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 d){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 d=r??0,p=s??o;if(d+p>o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${d}, ${d+p}) is out of range for block ${a} (total length ${o})`);let l;try{l=sh(n,f,d,p)}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 c={...i.content,deltaFormat:l},m=await this.mondayApi.request(Du,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" 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 he{constructor(){super(...arguments),this.name="update_workspace",this.type=g.WRITE,this.annotations=ue({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return zh}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(Bh,t),i=await Iu(this.mondayApi),n=i?wu(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 he{constructor(){super(...arguments),this.name="update_folder",this.type=g.WRITE,this.annotations=ue({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return qh}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(jh,n);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends he{constructor(){super(...arguments),this.name="create_workspace",this.type=g.WRITE,this.annotations=ue({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Hh}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Gh,t),i=await Iu(this.mondayApi),n=i&&a.create_workspace?.id?wu(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 he{constructor(){super(...arguments),this.name="create_folder",this.type=g.WRITE,this.annotations=ue({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Yh}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(Wh,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 he{constructor(){super(...arguments),this.name="move_object",this.type=g.WRITE,this.annotations=ue({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 Jh}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},p=await this.mondayApi.request(jh,d);return{content:{message:"Object moved",object_id:p.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:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Kh,d);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Qh,d);return p.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:p.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${p.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case Er.Folder:return this.executeUpdateFolder(e);case Er.Board:return this.executeUpdateBoardHierarchy(e);case Er.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends he{constructor(){super(...arguments),this.name="create_dashboard",this.type=g.WRITE,this.annotations=ue({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 Mh}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(Uh,t);if(!a.create_dashboard)throw new up("Failed to create dashboard",cp);const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){hp(e,"create dashboard")}}},class extends he{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=g.READ,this.annotations=ue({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(Ph,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:Wm}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends he{constructor(){super(...arguments),this.name="create_widget",this.type=g.WRITE,this.annotations=ue({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 Vh}async executeInternal(e){if(!e.settings)throw new up("You must pass the settings parameter",mp);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(Fh,t);if(!a.create_widget)throw new up("Failed to create widget",cp);const i=a.create_widget;i.parent?.kind===fs.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){hp(t,`create ${e.widget_kind} widget`)}}},class extends he{constructor(){super(...arguments),this.name="board_insights",this.type=g.READ,this.annotations=ue({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 nf}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===Tn.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Tn.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return tf.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:wn.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===Tn.CountItems?[]:[{type:wn.Column,column:af(n),as:n}]}),as:s}}var i,n;const o={type:wn.Column,column:af(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:wn.Column,column:af(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:In.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(Xh,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return s.length?{content:{message:"Board insights retrieved",board_name:r.boards?.[0]?.name,board_url:r.boards?.[0]?.url,data:s}}:{content:"No board insights found for the given query."}}},class extends he{constructor(){super(...arguments),this.name="search",this.type=g.READ,this.annotations=ue({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Search within monday.com platform. Supported searchType values: ${Vm}.\nsearchTerm is the phrase the search matches against — the text/keywords to look for (e.g. a board name, item title, or a word from an update). It is required and must be non-empty. This tool has no "list everything" mode: to browse or list without a search phrase, use workspace_info (boards/docs/folders in a workspace) or get_board_items_page (items in a board) instead of calling search with an empty searchTerm.\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 browsing all boards, docs, or folders within a workspace without a search term, use workspace_info tool.\nFor groups, use get_board_info tool.\nFor listing items within a specific board, use get_board_items_page tool. ITEMS search here queries items across the account.\nBOARD search returns id, title, url, and workspaceId.\nDOCUMENTS search returns id, title, and workspaceId.\nITEMS search returns id, title, url, boardId, and workspaceId.\nWORKSPACES search returns id, title, and description.\nUPDATES search returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with boardIds and/or creatorIds.\nTIMELINE_ITEMS search returns id, title, summary, content, itemId, and boardId.\nDASHBOARDS search (also called "overviews") returns id, title, and workspaceId. Optionally scope it with workspaceIds and/or creatorIds.\nFOLDERS search returns id and title. Optionally scope it with workspaceIds, which searches all accessible workspaces when omitted. Pass workspaceIds to narrow the search if results may be truncated.\n `}getInputSchema(){return yf}async executeInternal(e){const{searchTerm:t}=e;if(!t)throw new up("searchTerm is required and must be a non-empty search string. To browse or list without a search term, use workspace_info (for boards, docs, and folders in a workspace) or get_board_items_page (for items within a specific board).",mp);try{if(e.searchType===Mm.FOLDERS){const{results:a,truncated:i}=await this.searchFoldersAsync(e,t);return{content:{message:i?"Search results (truncated: only the first 100 folders across the searched workspaces were scanned. Narrow with workspaceIds for complete results.)":"Search results",data:a}}}return{content:{message:"Search results",data:await this.runSmartSearchAsync(e,t)}}}catch(e){throw fp(e),e}}async runSmartSearchAsync(e,t){const a=gf(e.workspaceIds?.map((e=>e.toString())));if(e.searchType===Mm.BOARD)return this.searchBoardsAsync(t,e.limit,a);if(e.searchType===Mm.DOCUMENTS)return this.searchDocsAsync(t,e.limit,a);if(e.searchType===Mm.WORKSPACES)return this.searchWorkspacesAsync(t,e.limit);if(e.searchType===Mm.UPDATES){const a=gf(e.boardIds?.map((e=>e.toString()))),i=gf(e.creatorIds?.map((e=>e.toString())));return this.searchUpdatesAsync(t,e.limit,a,i)}if(e.searchType===Mm.ITEMS)return this.searchItemsAsync(t,e.limit,a);if(e.searchType===Mm.TIMELINE_ITEMS)return this.searchTimelineItemsAsync(t,e.limit);if(e.searchType===Mm.DASHBOARDS){const i=e.creatorIds?.map((e=>e.toString()));return this.searchOverviewsAsync(t,e.limit,a,i)}throw new up(`Unsupported search type for smart search: ${e.searchType}`,pp)}async searchBoardsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return(await this.mondayApi.request(sf,i,{timeout:Tp})).search.boards.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url,workspaceId:e.indexed_data.workspace_id??void 0})))}async searchDocsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return(await this.mondayApi.request(df,i,{timeout:Tp})).search.docs.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,workspaceId:e.indexed_data.workspace_id??void 0})))}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return(await this.mondayApi.request(pf,a,{timeout:Tp})).search.workspaces.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,description:e.indexed_data.description||void 0})))}async searchUpdatesAsync(e,t,a,i){const n={query:e,limit:t,boardIds:a,creatorIds:i};return(await this.mondayApi.request(lf,n,{timeout:Tp})).search.updates.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.body,itemId:e.indexed_data.item_id,boardId:e.indexed_data.board_id,creatorId:e.indexed_data.creator_id})))}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return(await this.mondayApi.request(rf,i,{timeout:Tp})).search.items.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url,boardId:e.indexed_data.board_id??void 0,workspaceId:e.indexed_data.workspace_id??void 0})))}async searchTimelineItemsAsync(e,t){const a={query:e,limit:t};return(await this.mondayApi.request(cf,a,{timeout:Tp})).search.timeline_items.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.title,summary:e.indexed_data.summary||void 0,content:e.indexed_data.content||void 0,itemId:e.indexed_data.item_id,boardId:e.indexed_data.board_id??void 0})))}async searchOverviewsAsync(e,t,a,i){const n={query:e,limit:t,workspaceIds:a,creatorIds:i};return(await this.mondayApi.request(mf,n,{versionOverride:"dev",timeout:Tp})).search.overviews.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,workspaceId:e.indexed_data.workspace_id??void 0})))}async searchFoldersAsync(e,t){const a=uf(t);if(!a)return{results:[],truncated:!1};const i={page:1,limit:100,workspace_ids:gf(e.workspaceIds?.map((e=>e.toString())))},n=(await this.mondayApi.request(of,i)).folders||[];return{results:n.filter((e=>e?.name&&uf(e.name).includes(a))).filter((e=>e?.id)).slice(0,e.limit).map((e=>({id:e.id,title:e.name}))),truncated:100===n.length}}},class extends he{constructor(){super(...arguments),this.name="get_user_context",this.type=g.READ,this.annotations=ue({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(Of,{},{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,...s}=e;return{content:{message:"User context",...{user:s,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[Cf[e]]=t[e];const n=await this.mondayApi.request(kf,i),o=[];for(const e of a){const t=Rf[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 he{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=g.WRITE,this.annotations=ue({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 Sf}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(Ef,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends he{constructor(){super(...arguments),this.name="get_assets",this.type=g.READ,this.annotations=ue({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 Df}async executeInternal(e){const t=await this.mondayApi.request(Nf,{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 he{constructor(){super(...arguments),this.name="create_view",this.type=g.WRITE,this.annotations=ue({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 nl}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(il,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 he{constructor(){super(...arguments),this.name="update_view",this.type=g.WRITE,this.annotations=ue({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\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 rl}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(ol,t);return a.update_view?{content:`View "${a.update_view.name}" (ID: ${a.update_view.id}, type: ${a.update_view.type}) successfully updated`}:{content:"Failed to update view - no response from API"}}},class extends he{constructor(){super(...arguments),this.name="create_view_table",this.type=g.WRITE,this.annotations=ue({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\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 settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return ll}async executeInternal(e){const t={boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(sl,t);return a.create_view_table?{content:`Table view "${a.create_view_table.name}" (ID: ${a.create_view_table.id}, type: ${a.create_view_table.type}) successfully created`}:{content:"Failed to create table view - no response from API"}}},class extends he{constructor(){super(...arguments),this.name="update_view_table",this.type=g.WRITE,this.annotations=ue({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\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 settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return hl}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(cl,t);return a.update_view_table?{content:`Table view "${a.update_view_table.name}" (ID: ${a.update_view_table.id}, type: ${a.update_view_table.type}) successfully updated`}:{content:"Failed to update table view - no response from API"}}},class extends he{constructor(){super(...arguments),this.name="undo_action",this.type=g.WRITE,this.annotations=ue({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 Lf}async executeInternal(e){return await this.mondayApi.request($f,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends he{constructor(){super(...arguments),this.name="get_object_schemas",this.type=g.READ,this.annotations=ue({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 $p}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(Rp,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends he{constructor(){super(...arguments),this.name="create_object_schema",this.type=g.WRITE,this.annotations=ue({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 xp}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Lp,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 he{constructor(){super(...arguments),this.name="update_object_schema",this.type=g.WRITE,this.annotations=ue({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 Pp}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Up,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 he{constructor(){super(...arguments),this.name="delete_object_schema",this.type=g.WRITE,this.annotations=ue({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 Mp}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(Fp,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 he{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=g.WRITE,this.annotations=ue({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 Bp}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(Vp,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 he{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=g.WRITE,this.annotations=ue({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(zp,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(jp,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 he{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=g.WRITE,this.annotations=ue({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 with fetchMode "${Gp.Schema}" 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 Jp}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(Hp,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(Wp,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 he{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=g.WRITE,this.annotations=ue({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 Zp}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:vo.Deactivate,reactivate:vo.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(Xp,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 he{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=g.WRITE,this.annotations=ue({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Uf}async executeInternal(e){const t=(await this.mondayApi.request(xf,{input:{file_name:e.fileName,content_type:e.contentType,file_size:e.fileSize,source:"mcp",multipart:!1}},{versionOverride:"dev"})).create_upload,a=t.parts[0]?.url;if(!a)throw new Error("create_upload returned no upload URL — parts array was empty");return{content:{upload_id:t.upload_id,upload_url:a,url_expires_at:t.expires_at}}}},class extends he{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=g.WRITE,this.annotations=ue({title:"Finalize Asset Upload",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Finalize a file upload and create the asset on monday.com. Call this after uploading the file to the presigned URL from get_asset_upload_url. Requires the etag value from the PUT response headers. Automatically attaches the uploaded asset to the specified file column on the item. Returns the created asset_id."}getInputSchema(){return Mf}async executeInternal(e){const t=(await this.mondayApi.request(Pf,{input:{upload_id:e.uploadId,holder:{type:"ITEM",id:e.itemId},board_id:e.boardId,parts:[{part_number:1,etag:e.etag}]}},{versionOverride:"dev"})).complete_upload,a=JSON.stringify({added_file:{fileType:"ASSET",name:t.filename,assetId:String(t.id)}});return await this.mondayApi.request(Ff,{boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,value:a}),{content:{asset_id:t.id,filename:t.filename,content_type:t.content_type,file_size:t.file_size,url:t.url,filelink:t.filelink}}}},class extends he{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=g.READ,this.annotations=ue({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 Bf}async executeInternal(e){return{content:Vf}}},class extends he{constructor(){super(...arguments),this.name="fetch_file_content",this.type=g.READ,this.annotations=ue({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 Jf}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:n=0}=e,o=await this.mondayApi.request(zf,{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=>e_(e,n,i))))}}}},class extends he{constructor(){super(...arguments),this.name="manage_agent",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Full lifecycle management for monday platform agents — create, read, update, delete, change state, and run.\n\nmonday platform agents are user-built work orchestrators on monday.com — each has a profile (name, role, avatar), a goal, and a markdown execution plan. Agents in state ACTIVE can be triggered automatically. They are NOT local LangChain or MCP agents.\n\nACTIONS (only pass fields that apply to the chosen action):\n- create: { action:"create", prompt, agent_model? } — AI-generated agent. Platform creates profile, goal, and plan from the prompt.\n- create_blank: { action:"create_blank", name?, role?, role_description?, avatar_url?, gender?, background_color?, user_prompt? } — manually defined agent.\n- get one: { action:"get", agent_id }\n- list owned: { action:"get" }\n- update: { action:"update", agent_id, name?, role?, role_description?, plan?, agent_model? }\n- delete: { action:"delete", agent_id }\n- activate: { action:"activate", agent_id }\n- deactivate: { action:"deactivate", agent_id }\n- run: { action:"run", agent_id }\n\nRULES:\n- "create_blank" with no fields creates a nameless blank agent — only do this intentionally.\n- "update" requires at least one of name/role/role_description/plan/agent_model.\n- "update", "delete", "activate", "deactivate", "run" all require "agent_id".\n- Created agents start INACTIVE. Follow with action:"activate" using the returned agent_id before they can be triggered.\n- ⚠️ DESTRUCTIVE — "delete" is permanent and irreversible. When the user refers to an agent by name, ALWAYS call action:"get" first to confirm the correct agent_id before deleting.\n- "run" is fire-and-forget. Returns trigger_uuid — no run-status query exists, treat successful enqueue as the only signal.\n- Agent state is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED only appears as the return value of action:"delete".\n\nUSAGE EXAMPLES:\n- AI create: { "action": "create", "prompt": "Run my daily standup every weekday at 9am." }\n- Manual create:{ "action": "create_blank", "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Fetch one: { "action": "get", "agent_id": "42" }\n- List mine: { "action": "get" }\n- Rename: { "action": "update", "agent_id": "7", "name": "New Name" }\n- Activate: { "action": "activate", "agent_id": "7" }\n- Deactivate: { "action": "deactivate", "agent_id": "7" }\n- Run: { "action": "run", "agent_id": "7" }\n- Delete: { "action": "delete", "agent_id": "7" }\n\nRELATED TOOLS:\n- agent_catalog — browse available trigger types and skills before wiring them to an agent\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent_knowledge — manage which boards/docs this agent has access to'}getInputSchema(){return Ly}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"create_blank":return this.handleCreateBlank(e);case"get":return this.handleGet(e);case"update":return this.handleUpdate(e);case"delete":return this.handleDelete(e);case"activate":return this.handleActivate(e);case"deactivate":return this.handleDeactivate(e);case"run":return this.handleRun(e)}}async handleCreate(e){if(!e.prompt)throw new Error('manage_agent action:"create" requires "prompt". For a manually configured agent, use action:"create_blank".');try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(vy,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 — call manage_agent with action:"activate" and agent_id:"${a.create_agent.id}" to activate it`,agent:a.create_agent}}}catch(e){hp(e,"create monday platform agent")}}async handleCreateBlank(e){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(yy,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 — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){hp(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(by,{ids:[e.agent_id]},{versionOverride:"dev"}),a=t?.[0];return a?{content:{message:"monday platform agent",agent:a}}:{content:`monday platform agent ${e.agent_id} not found, or the authenticated user does not have access to it.`}}catch(e){hp(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(by,{limit:100},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user (limited to 100 — ask the user if they need more)",count:t.length,agents:t}}}catch(e){hp(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(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.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(Iy,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){hp(e,"update monday platform agent")}}async handleDelete(e){if(!e.agent_id)throw new Error('manage_agent action:"delete" requires "agent_id".');try{const t={id:e.agent_id},a=await this.mondayApi.request(wy,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){hp(e,"delete monday platform agent")}}async handleActivate(e){if(!e.agent_id)throw new Error('manage_agent action:"activate" requires "agent_id".');try{const t=await this.mondayApi.request(Ty,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){hp(e,"activate monday platform agent")}}async handleDeactivate(e){if(!e.agent_id)throw new Error('manage_agent action:"deactivate" requires "agent_id".');try{const t={id:e.agent_id,inactive_reason:yb.DeactivatedByUser},a=await this.mondayApi.request(Ey,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){hp(e,"deactivate monday platform agent")}}async handleRun(e){if(!e.agent_id)throw new Error('manage_agent action:"run" requires "agent_id".');try{const t=await this.mondayApi.request(Ay,{id:e.agent_id},{versionOverride:"dev"});if(!t.run_agent)throw new Error("run_agent returned no data — the agent run may not have been enqueued");return{content:{message:"Agent run enqueued.",trigger_uuid:t.run_agent.trigger_uuid}}}catch(e){hp(e,"run monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent Triggers",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the triggers attached to a monday platform agent — triggers define WHEN the agent runs automatically.\n\nACTIONS:\n- list: { agent_id } — returns active triggers with node_id, block_reference_id, name, field_summary.\n- add: { agent_id, block_reference_id, field_values? } — attaches a trigger type to the agent.\n- remove: { agent_id, node_id } — detaches a trigger instance by node_id (NOT block_reference_id).\n\nWORKFLOW — add a trigger:\n1. Call agent_catalog action:"list_triggers" — note block_reference_id, field_schemas, and required_fields.\n2. Collect required field values from the user (e.g. board_id, column_id).\n3. Call this tool action:"add" with block_reference_id and field_values.\nNote: add returns only { success } — no node_id for the new instance. Call action:"list" afterward if you need the node_id.\n\nWORKFLOW — remove a trigger:\n1. Call action:"list" to see active triggers and note the node_id of the instance to remove.\n2. Call action:"remove" with that node_id.\n\nNOTE: Only triggers that can be added programmatically appear in the catalog. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\nrequire user setup in the monday.com UI — they will not appear in agent_catalog and cannot be managed here.\n\nUSAGE EXAMPLES:\n- List triggers: { "action": "list", "agent_id": "7" }\n- Add trigger: { "action": "add", "agent_id": "7", "block_reference_id": "status-change-ref", "field_values": { "board_id": "42" } }\n- Remove trigger: { "action": "remove", "agent_id": "7", "node_id": "node-abc" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_triggers" — discover available trigger types and their required field_values before calling action:"add" here\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return xy}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t={agent_id:e.agent_id},a=(await this.mondayApi.request(Sy,t,{versionOverride:"dev"})).agent_active_triggers??[];return{content:{message:'Active triggers on this agent. Use node_id with action:"remove" to detach a trigger.',count:a.length,triggers:a}}}catch(e){hp(e,"list active triggers for monday platform agent")}}async handleAdd(e){if(!e.block_reference_id)throw new Error('block_reference_id is required for action:"add". Call agent_catalog action:"list_triggers" first to find the block_reference_id.');try{const t={agent_id:e.agent_id,block_reference_id:e.block_reference_id,field_values:e.field_values},a=await this.mondayApi.request(Ny,t,{versionOverride:"dev"});return{content:{message:'Trigger added to agent. Call action:"list" to verify and retrieve the node_id.',success:a.add_trigger_to_agent?.success??!1}}}catch(e){hp(e,"add trigger to monday platform agent")}}async handleRemove(e){if(!e.node_id)throw new Error('node_id is required for action:"remove". Call action:"list" first to get node_id values.');try{const t={agent_id:e.agent_id,node_id:e.node_id},a=await this.mondayApi.request(Dy,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){hp(e,"remove trigger from monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent Skills",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the full skill lifecycle for monday platform agents — create new skills in the catalog, attach skills to an agent, or detach them.\n\nSkills extend what an agent can do (e.g. sending emails, querying databases, posting to Slack).\n\nACTIONS:\n- create: { name, content, description? } — creates a new custom skill in the account-wide catalog.\n The skill becomes available to all agents in the account.\n- add: { agent_id, skill_id } — attaches a skill to this agent.\n- remove: { agent_id, skill_id } — detaches a skill from this agent.\n\nWORKFLOW — attach an existing skill:\n1. Call agent_catalog action:"list_skills" — find the skill_id of the skill to attach.\n2. Call this tool action:"add" with agent_id and that skill_id.\n\nWORKFLOW — create a new skill and attach it:\n1. Call this tool action:"create" with name and content — note the returned id.\n2. Call this tool action:"add" with agent_id and that id directly (no catalog lookup needed).\n\nNOTE: There is no action to list which skills are currently attached to a specific agent — the platform does not yet expose that query.\nTo browse all skills available in the account catalog, use agent_catalog action:"list_skills".\n\nUSAGE EXAMPLES:\n- Create a skill: { "action": "create", "name": "Send Slack Message", "content": "## Instructions\\nPost a message to a Slack channel.", "description": "Sends a message to Slack" }\n- Add a skill: { "action": "add", "agent_id": "7", "skill_id": "skill-abc-123" }\n- Remove a skill: { "action": "remove", "agent_id": "7", "skill_id": "skill-abc-123" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_skills" — browse existing skills to find a skill_id before calling action:"add"\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return Uy}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleCreate(e){if(!e.name||!e.content)throw new Error('action:"create" requires both "name" and "content".');try{const t={name:e.name,content:e.content,description:e.description},a=await this.mondayApi.request($y,t,{versionOverride:"dev"});if(!a.create_agent_skill)throw new Error("create_agent_skill returned no data");return{content:{message:'Skill created and added to the account catalog. Use the returned id with action:"add" to attach it to an agent.',skill:a.create_agent_skill}}}catch(e){hp(e,"create monday platform agent skill")}}async handleAdd(e){if(!e.agent_id)throw new Error('agent_id is required for action:"add".');if(!e.skill_id)throw new Error('skill_id is required for action:"add". Get it from agent_catalog action:"list_skills" or from action:"create" in this tool.');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(Oy,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){hp(e,"add skill to monday platform agent")}}async handleRemove(e){if(!e.agent_id)throw new Error('agent_id is required for action:"remove".');if(!e.skill_id)throw new Error('skill_id is required for action:"remove".');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(ky,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){hp(e,"remove skill from monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=g.WRITE,this.annotations=ue({title:"Manage monday Platform Agent Knowledge",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'List, grant, update, or revoke a monday platform agent\'s access to boards and docs.\n\nAn agent\'s "knowledge" is the set of monday.com boards and docs it can read from or write to during a run.\n\n- list: Returns all resources the agent currently has access to, including permission level and resource type.\n- add: Grants the agent access to a board or doc with the specified permission level.\n- update: Changes the permission level on a resource the agent already has access to. Call action:"list" first to confirm the resource_id exists.\n- remove: Revokes the agent\'s access to a board or doc entirely. Call action:"list" first to confirm the resource_id exists.\n\nPermission types:\n- READ: Agent can read data from the resource.\n- READ_WRITE: Agent can read and write data to the resource.\n\nUSAGE EXAMPLES:\n- List: { "action": "list", "agent_id": "7" }\n- Add board access: { "action": "add", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ" }\n- Update to read-write: { "action": "update", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ_WRITE" }\n- Remove access: { "action": "remove", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD" }\n\nRELATED TOOLS:\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform'}getInputSchema(){return By}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"update":return this.handleUpdate(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t=(await this.mondayApi.request(Py,{id:e.agent_id},{versionOverride:"dev"})).agent_knowledge??{resources:[],files:[]};return{content:{message:"Current agent resource access.",count:t.resources?.length??0,knowledge:t}}}catch(e){hp(e,"list agent knowledge for monday platform agent")}}async handleAdd(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:add");try{const t=await this.mondayApi.request(Fy,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access granted to agent.",success:t.add_agent_resource_access?.success??!1}}}catch(e){hp(e,"add agent resource access for monday platform agent")}}async handleUpdate(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:update");try{const t=await this.mondayApi.request(Vy,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access updated.",success:t.update_agent_resource_access?.success??!1}}}catch(e){hp(e,"update agent resource access for monday platform agent")}}async handleRemove(e){if(!e.resource_id||!e.scope_type)throw new Error("resource_id and scope_type are required for action:remove");try{const t=await this.mondayApi.request(My,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type},{versionOverride:"dev"});return{content:{message:"Resource access removed from agent.",success:t.remove_agent_resource_access?.success??!1}}}catch(e){hp(e,"remove agent resource access for monday platform agent")}}},class extends he{constructor(){super(...arguments),this.name="agent_catalog",this.type=g.READ,this.annotations=ue({title:"monday Platform Agent Catalog",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Browse the account-wide catalog of available trigger types and skills for monday platform agents. READ-ONLY — no agent_id required.\n\nUse this tool to discover what\'s available BEFORE wiring anything to a specific agent.\n\nACTIONS:\n- list_triggers: { block_reference_ids? } — returns available trigger types.\n Each entry has block_reference_id (required for manage_agent_triggers action:"add"), name, description,\n field_schemas (describes field_values shape), and required_fields (fields to collect from the user).\n Note: only triggers that can be added programmatically appear here. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\n require user setup in the monday.com UI and will not appear here.\n\n- list_skills: {} — returns available skills with id, name, description.\n Never guess or invent a skill id — always look it up here before calling manage_agent_skills action:"add".\n\nUSAGE EXAMPLES:\n- List all trigger types: { "action": "list_triggers" }\n- Fetch specific trigger: { "action": "list_triggers", "block_reference_ids": ["some-block-ref-id"] }\n- List all skills: { "action": "list_skills" }\n\nRELATED TOOLS:\n- manage_agent_triggers — use block_reference_id from list_triggers to attach a trigger to a specific agent\n- manage_agent_skills — use skill id from list_skills, or action:"create" to author a new skill, then attach to an agent\n- manage_agent — manage the agent entity itself (create, update, delete, activate, etc.)'}getInputSchema(){return zy}async executeInternal(e){switch(e.action){case"list_triggers":return this.handleListTriggers(e);case"list_skills":return this.handleListSkills()}}async handleListTriggers(e){try{const t={block_reference_ids:e.block_reference_ids},a=(await this.mondayApi.request(Cy,t,{versionOverride:"dev"})).agent_triggers_catalog??[];return{content:{message:'Available trigger types. Use block_reference_id and inspect field_schemas/required_fields before calling manage_agent_triggers action:"add".',count:a.length,triggers:a}}}catch(e){hp(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(Ry,{},{versionOverride:"dev"})).agent_skills_catalog??[];return{content:{message:'Available skills. Use id when calling manage_agent_skills action:"add".',count:e.length,skills:e}}}catch(e){hp(e,"fetch monday platform agent skills catalog")}}},class extends he{constructor(){super(...arguments),this.name="list_automations",this.type=g.READ,this.annotations=ue({title:"List Board Automations",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'List all automations on a specific monday.com board, including their ids, titles, active state, and configuration.\nReturns two groups: "workflows" (fully manageable, supports pagination via limit/cursor) and "legacyAutomations" (READ-ONLY automations set up in an older way — returned on the first page only, when no cursor is given).\nAlways present BOTH groups to the user together as one list of board automations — never omit or hide "legacyAutomations". The split and the read-only limitation are internal context for you only: don\'t volunteer them and don\'t label any automation "legacy" or "read-only". Only if the user asks to act on a legacy one, briefly explain it can\'t be changed (e.g. "This one was set up in an older way and can\'t be modified here").\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\n'}getInputSchema(){return Hy}async executeInternal(e){try{const a=!e.cursor,i={boardIds:[e.boardId],limit:e.limit??100,includeLegacy:a,...e.cursor?{cursor:e.cursor}:{}},n=await this.mondayApi.request(jy,i),o=(n.board_automations?.items??[]).map(Gy),r=n.board_automations?.cursor??null,s=a?(t=n.board_automations?.legacy_automations,null==t||"object"==typeof t&&"error"in t?null:t):null;return{content:{message:`Found ${o.length} live workflow(s) on board ${e.boardId}`,workflows:o,...null!=s?{legacyAutomations:s}:{},pagination:{nextCursor:r,hasMore:null!==r}}}}catch(e){hp(e,"list live workflows")}var t}},class extends he{constructor(){super(...arguments),this.name="manage_automations",this.type=g.WRITE,this.annotations=ue({title:"Manage Automations",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Activate, deactivate, or delete an existing monday.com automation.\n\nRequires an automation id. When the user refers to an automation by name, always call list_automations first to resolve the id — never guess or infer ids.\n\nActions:\n- activate: enables a paused automation so it starts responding to its trigger.\n- deactivate: pauses an automation while preserving its definition.\n- delete: permanently removes an automation — irreversible.\n\nWhen intent is ambiguous ("stop", "turn off", "pause"), prefer deactivate over delete.'}getInputSchema(){return Qy}async executeInternal(e){const t=e;switch(t.action){case"activate":return this.activateWorkflow(t);case"deactivate":return this.deactivateWorkflow(t);case"delete":return this.deleteWorkflow(t)}}async activateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Wy,t,{versionOverride:"dev"});if(!a.activate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} activation did not report success`);return{content:{message:`Workflow ${e.workflowId} activated`,workflowId:e.workflowId,isActive:!0}}}catch(e){hp(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Yy,t,{versionOverride:"dev"});if(!a.deactivate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deactivation did not report success`);return{content:{message:`Workflow ${e.workflowId} deactivated`,workflowId:e.workflowId,isActive:!1}}}catch(e){hp(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Ky,t,{versionOverride:"dev"});if(!a.delete_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deletion did not report success`);return{content:{message:`Workflow ${e.workflowId} deleted`,workflowId:e.workflowId}}}catch(e){hp(e,"delete workflow")}}},class extends he{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=g.WRITE,this.annotations=ue({title:"Create Automation",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'\n Creates an automation on a monday board from a structured natural-language description.\n\nUse this tool only when you know:\n- boardId\n- the user\'s intended trigger\n- at least one intended action\n- any details the user provided that are relevant to the trigger, conditions, or actions\n\nThe caller does not need to know the exact available automation blocks or their required fields. Describe the user\'s intent clearly — the tool will translate that intent into supported blocks and values.\n\nIf a required detail is missing from the user\'s request, ask for clarification before calling the tool.\n\nIf the tool returns status: "needs_clarification", present the unresolved fields to the user, gather answers, then call the tool again.\n\nDescribe the automation in this format:\n\nTrigger:\n When <the event that should start the automation>\n Details:\n <relevant detail>: <value>\n\nConditions:\n - Only if <condition that should be true>\n Details:\n <relevant detail>: <value>\n\nActions:\n - <action the automation should perform>:\n <relevant detail>: <value>\n\nRules:\n- Use one trigger.\n- Conditions are optional.\n- Multiple conditions mean AND.\n- Use one or more actions.\n- Do not use branching.\n- Use natural language, not block IDs or internal field names.\n- Actions may reference values from the trigger context, such as "{{item name}}", "{{creator}}", "{{status}}", "{{group}}", or "{{board}}".\n\nTerminology:\n- Trigger: the event that starts the automation, such as "when a new item is created".\n- Conditions: optional requirements that must be true before actions run.\n- Actions: what the automation does when it runs.\n\nExample:\n\nTrigger:\n When a new item is created\n\nActions:\n - Send a notification:\n Recipient: John Snow\n Title: Important Update\n Message: The item "{{item name}}" was created.\n\n - Move the item to a group:\n Group: Top group\n'}getInputSchema(){return eI}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=Zy(this.context),i=await a({serviceName:Jy,path:"/platform-ai-gateway/agents/lite-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new up(`lite-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`,"UPSTREAM_HTTP_ERROR")}return{content:await i.json()}}catch(e){hp(e,"create automation")}}},class extends he{constructor(){super(...arguments),this.name="get_automation_runs",this.type=g.READ,this.annotations=ue({title:"Get Automation Runs",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Read automation/workflow run history. Read-only.\n\nModes:\n- "history": paginated run feed (state, duration, error reason). Use "filters" to narrow results and "nextPageOffset" to page (offset-only — next page = previous offset + returned count).\n- "detail": single run by "triggerUuid" (required) — returns block steps and MCP tool calls. Set "includeToolEvents": false to skip tool calls.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nKnown event states: "success", "failure", "exhausted".'}getInputSchema(){return sI}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};try{return"detail"===e.mode?await this.runDetail(e):await this.runHistory(e)}catch(e){hp(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},i=await this.mondayApi.request(aI,{nextPageOffset:t,filters:a}),n=i.trigger_events?.triggerEvents??[],o=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(n),r=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${n.length} run(s) (${r}) at offset ${t}. By state: ${function(e){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`));return t.length?t.join(", "):"none"}(o)}. Offset-only pagination — for the next page request offset ${t+n.length}.`,scope:r,offset:t,count:n.length,stateCounts:o,runs:n}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,i=e.toolEventsOffset??0,n=(await this.mondayApi.request(iI,{triggerUuid:e.triggerUuid})).trigger_event;if(!n)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[o,r]=await Promise.all([this.mondayApi.request(nI,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(oI,{triggerUuid:e.triggerUuid,nextPageOffset:i}):Promise.resolve(null)]),s=o.block_events?.blockEvents??[],d=r?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${n.eventState??"unknown"}, ${s.length} block step(s), ${d.length} tool call(s).`,found:!0,run:n,blockEvents:s,blockEventsOffset:a,toolEvents:d,toolEventsOffset:i,toolEventsIncluded:t}}}},class extends he{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=g.READ,this.annotations=ue({title:"Get Automation Statistics",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Aggregate automation run statistics. Read-only.\n\nBreakdowns:\n- "totals": success/failure/total counts at the account or board level.\n- "by_entity": per-automation and per-workflow counts for a given "runStatus" (required: "success" | "failure" | "exhausted"). Use "excludeAutomationIds" to omit specific automations.\n\nScope: provide "boardId" for a specific board or "accountWide": true. One is required.\n\nOptional "userIds" narrows results to specific creators.'}getInputSchema(){return lI}async executeInternal(e){if(!e.boardId&&!e.accountWide)return{content:{message:'Either "boardId" or "accountWide": true must be provided.'}};const t=e.boardId?function(e){const t=Number(e.trim());if(!Number.isInteger(t)||t<=0)throw new Error(`Invalid boardId: '${e}' is not a positive integer.`);return t}(e.boardId):void 0,a=e.boardId?`board ${e.boardId}`:"account-wide";try{return"by_entity"===e.breakdown?await this.runByEntity(e,t,a):await this.runTotals(e,t,a)}catch(e){hp(e,"get automation statistics")}}async runTotals(e,t,a){const i=(await this.mondayApi.request(dI,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${i?.success??0}, failure=${i?.failure??0}, total=${i?.total??0}.`,scope:a,breakdown:"totals",statistics:i}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const i=(await this.mondayApi.request(pI,{runStatus:e.runStatus,filters:{board_id:t,automation_ids:e.excludeAutomationIds,user_ids:e.userIds}})).account_triggers_statistics_by_entity_id;return{content:{message:`By-entity '${e.runStatus}' statistics (${a}).`,scope:a,breakdown:"by_entity",runStatus:e.runStatus,automationStatistics:i?.automation_statistics,workflowStatistics:i?.workflow_statistics}}}},class extends he{constructor(){super(...arguments),this.name="create_workflow",this.type=g.WRITE,this.annotations=ue({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n"}getInputSchema(){return mI}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(cI,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:n}=a.create_workflow;if(!i||!n)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:n}}}catch(e){hp(e,"create Workflow Builder workflow")}}},class extends he{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=g.WRITE,this.annotations=ue({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return uI}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=Zy(this.context),i=await a({serviceName:Jy,path:"/platform-ai-gateway/agents/workflow-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){hp(e,"update workflow")}}},class extends he{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=g.READ,this.annotations=ue({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return hI}async executeInternal(e){try{const t="function"==typeof this.apiToken?this.apiToken():this.apiToken,a=Zy(this.context),i=await a({serviceName:Jy,path:"/platform-ai-gateway/agents/workflow-planner",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:t},"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!i.ok){const e=await i.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${i.status}${e?`: ${e}`:""}`)}return{content:await i.json()}}catch(e){hp(e,"plan workflow")}}},class extends he{constructor(){super(...arguments),this.name="publish_workflow",this.type=g.WRITE,this.annotations=ue({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nWhen to use: Only call this tool when the user explicitly asks to publish the workflow. After a workflow is created or updated successfully, suggest to the user that they can publish it and wait for their explicit confirmation before proceeding.\n\nBefore publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\n"}getInputSchema(){return _I}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(fI,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:n}=a.publish_workflow;if(!i||!n)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:n}}}catch(e){hp(e,"publish workflow")}}},class extends he{constructor(){super(...arguments),this.name="configure_ai_column",this.type=g.WRITE,this.annotations=ue({title:"Configure AI Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add AI to a column or set up an AI column on a monday.com board. Use this tool when the user wants to automatically categorize, summarize, translate, extract, generate text, improve writing, or assign people using AI on a column. This is the right tool for requests like "add AI to a column", "set up automatic extraction/categorization/summarization", "make a column use AI", "configure AI on a column", or "use AI to automatically fill a column".\n\nThe column must already exist on the board with a compatible type for the chosen block. To create a new AI column, first use create_column to create the column, then use this tool to add AI behavior.\n\nBLOCK TYPES (only pass fields that apply to the chosen block_type):\n- categorize: { block_type, source_type, source_column_id?, additional_instructions? } — assigns labels from target column\'s existing status/dropdown options\n- summarize: { block_type, source_type, source_column_id?, additional_instructions? } — generates concise summaries\n- translate: { block_type, source_type, source_column_id?, target_language } — translates to target language\n- improve_text: { block_type, source_type, source_column_id?, tone?, improver_length?, refinement_type? } — rewrites/fixes text\n- extract: { block_type, source_type, source_column_id?, entity_type, custom_instructions?, additional_instructions? } — extracts structured info\n- open_block: { block_type, ai_query } — flexible custom prompt, reference columns via {pulse.column_id}\n- write_me: { block_type, ai_query, tone, output_length } — generates new text from prompt\n- person_assignment: { block_type, source_type, source_column_id?, groups } — assigns people based on context\n\nSOURCE TYPES (required for all blocks except open_block and write_me):\n- item_name: uses the item\'s name as input\n- thread: uses the item\'s updates/comments as input\n- column: uses another column\'s value (requires source_column_id)\n- emails_and_activities: uses emails & activities (categorize only)\n\nCOLUMN REFERENCE SYNTAX (for open_block and write_me ai_query):\n- {pulse.column_id} — regular board column\n- {pulse.name} — the item name\n- {pulse.subitem.column_id} — subitem column\n\nRELATED TOOLS:\n- create_column — create the target column first if it doesn\'t exist\n- get_board_schema — discover existing columns and their types/IDs'}getInputSchema(){return AI}async executeInternal(e){const t=void 0!==e.run_backfill?{run_backfill:e.run_backfill}:void 0;try{switch(e.block_type){case"categorize":return this.handleCategorize(e.board_id,e,t);case"summarize":return this.handleSummarize(e.board_id,e,t);case"translate":return this.handleTranslate(e.board_id,e,t);case"improve_text":return this.handleImproveText(e.board_id,e,t);case"extract":return this.handleExtract(e.board_id,e,t);case"open_block":return this.handleOpenBlock(e.board_id,e,t);case"write_me":return this.handleWriteMe(e.board_id,e,t);case"person_assignment":return this.handlePersonAssignment(e.board_id,e,t)}}catch(e){hp(e,"configure AI column")}}validateSourceType(e,t){if(!e.source_type)throw new Error(`source_type is required for ${t} block`);if("column"===e.source_type&&!e.source_column_id)throw new Error('source_column_id is required when source_type is "column"')}async handleCategorize(e,t,a){this.validateSourceType(t,"categorize");const i=await this.mondayApi.request(gI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const i=await this.mondayApi.request(bI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_summarize_ai_column?.column_id}}}async handleTranslate(e,t,a){if(this.validateSourceType(t,"translate"),!t.target_language)throw new Error("target_language is required for translate block");const i=await this.mondayApi.request(vI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,targetLanguage:t.target_language,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const i=await this.mondayApi.request(yI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,tone:t.tone,length:t.improver_length,refinementType:t.refinement_type,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_improve_text_ai_column?.column_id}}}async handleExtract(e,t,a){if(this.validateSourceType(t,"extract"),!t.entity_type)throw new Error("entity_type is required for extract block");if("custom"===t.entity_type&&!t.custom_instructions)throw new Error('custom_instructions is required for extract block when entity_type is "custom"');const i=await this.mondayApi.request(II,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,entityType:t.entity_type,customInstructions:t.custom_instructions,additionalInstructions:t.additional_instructions,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_extract_ai_column?.column_id}}}async handleOpenBlock(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for open_block block");const i=await this.mondayApi.request(wI,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_open_block_ai_column?.column_id}}}async handleWriteMe(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for write_me block");if(!t.tone)throw new Error("tone is required for write_me block");if(!t.output_length)throw new Error("output_length is required for write_me block");const i=await this.mondayApi.request(TI,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,tone:t.tone,length:t.output_length,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_write_me_ai_column?.column_id}}}async handlePersonAssignment(e,t,a){if(this.validateSourceType(t,"person_assignment"),!t.groups||0===t.groups.length)throw new Error("groups is required for person_assignment block");const i=await this.mondayApi.request(EI,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,groups:t.groups,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:i.configure_person_assignment_ai_column?.column_id}}}},class extends he{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=g.WRITE,this.annotations=ue({title:"Remove AI from Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0})}getDescription(){return"Remove AI from a column on a monday.com board. Use this tool when the user wants to disable AI on a column, turn off AI automation, stop AI from running on a column, or delete the AI behavior from a column. This deletes all AI automation recipes and the app feature extension associated with the column. The column itself is not deleted — only its AI behavior is removed.\n\nUse get_board_schema to find column IDs before calling this tool."}getInputSchema(){return NI}async executeInternal(e){try{const t=await this.mondayApi.request(SI,{boardId:e.board_id.toString(),columnId:e.column_id});return{content:{message:"AI removed from column successfully",column_id:t.remove_ai_from_column?.column_id,success:t.remove_ai_from_column?.success}}}catch(e){hp(e,"remove AI from column")}}},class extends he{constructor(){super(...arguments),this.name="send_feedback",this.type=g.READ,this.annotations=ue({title:"Send Feedback",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Submit feedback, feature requests, or bug reports about the monday.com MCP server to help improve it.\n\nCall this tool proactively — do NOT wait for the user to explicitly ask. Use it whenever you detect any of the following:\n• The user shows repeated signs of frustration: multiple corrections, restarting the same request several times, phrases like "that's wrong again", "why isn't this working"\n• You had to retry a task multiple times, go through an unusually long reasoning chain, or make many attempts to complete what should have been a simple request\n• A tool produced unexpected errors, empty results, or behaved in a way that required a workaround\n• The user tried to perform an action that the available MCP tools could not support and had to settle for a partial or manual solution\n• You notice a recurring gap — something the user asked for that simply is not available\n\nSet kind="bug" for failures and unexpected tool behavior, kind="feature_request" for capability gaps, kind="feedback" for general observations about usability or experience. Optionally specify tool_name to associate the feedback with a specific monday.com MCP tool.\n\nIMPORTANT: This tool is strictly for feedback about monday.com MCP tools and monday.com functionality only. Do NOT call it for issues with other connectors or services (e.g. Google Drive, Slack, GitHub, or any non-monday.com integration). ${DI}`}getInputSchema(){return OI}async executeInternal(e){return this.sessionContext.metadata??={},this.sessionContext.metadata.kind=e.kind,this.sessionContext.metadata.title=e.title,this.sessionContext.metadata.description=e.description,e.tool_name&&(this.sessionContext.metadata.tool_name=e.tool_name),{content:{message:"Feedback submitted successfully. Thank you for helping improve the monday.com MCP server."}}}},class extends he{constructor(){super(...arguments),this.name="get_monday_knowledge",this.type=g.READ,this.annotations=ue({title:"Get Monday Knowledge",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Ask a question about monday.com and get an AI-generated answer from the official knowledge base.\n\nUse kind="general" for questions about using monday.com — features, automations, UI, help center, and settings. Returns cited source articles with links.\nUse kind="developer_docs" for questions about the monday.com API — GraphQL queries and mutations, authentication, rate limits, webhooks, schema, API best practices, and building apps.\n\nImportant: do not include PII data in the questions.'}getInputSchema(){return LI}async executeInternal(e){return e.kind===RI?this.queryDeveloperDocs(e.query):this.queryGeneralKnowledge(e.query)}async queryGeneralKnowledge(e){const t={query:e},a=(await this.mondayApi.request(kI,t)).knowledge_base_search;a?.answer||hp(new Error("No answer found in the knowledge base. Try rephrasing your question."),"get_monday_knowledge"),this.sessionContext.metadata??={},this.sessionContext.metadata.query=e,this.sessionContext.metadata.answer=a.answer;const i=(a.raw_snippets??[]).filter((e=>e.url&&e.title)).map((e=>({title:e.title,url:e.url,snippet:e.text??""})));return{content:{answer:a.answer,sources:i,kind:$I}}}async queryDeveloperDocs(e){const t={query:e},a=(await this.mondayApi.request(CI,t)).ask_developer_docs;return a?.answer||hp(new Error("No answer found in developer docs. Try rephrasing your question."),"get_monday_knowledge"),this.sessionContext.metadata??={},this.sessionContext.metadata.query=e,this.sessionContext.metadata.answer=a.answer,{content:{answer:a.answer,sources:[],kind:RI}}}}];var uw;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(uw||(uw={}));const hw=(e,t)=>{let a=[];t?.mode===uw.APPS?a=[...me]:t?.mode!==uw.API&&t?.mode||(a=[...mw,...cw]);const i=a.map((t=>((e,t)=>e.prototype instanceof he?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof q?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==g.ALL_API;if(t.mode===uw.API&&"only"===t.enableDynamicApiTools)return e.type===g.ALL_API;let a=!1;return t.mode===uw.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===g.ALL_API),t.readOnlyMode&&(a=a||e.type!==g.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))},fw=e=>"object"==typeof e?JSON.stringify(e):e;exports.MondayAgentToolkit=class{constructor(e){this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??z},this.tools=this.initializeTools(e)}initializeTools(t){const a={apiClient:"function"==typeof t.mondayApiToken?()=>new e.ApiClient({token:t.mondayApiToken(),apiVersion:t.mondayApiVersion??z,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}):new e.ApiClient({token:t.mondayApiToken,apiVersion:t.mondayApiVersion??z,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}),apiToken:this.mondayApiToken,context:this.context};return hw(a,t.toolsConfiguration)}getTools(){return this.tools.map((e=>{const t=e.getInputSchema();return{type:"function",function:{name:e.name,description:e.getDescription(),parameters:t?h.zodToJsonSchema(o.z.object(t)):void 0}}}))}async handleToolCall(e){const{name:t,arguments:a}=e.function,i=JSON.parse(a),n=this.tools.find((e=>e.name===t));if(!n)throw new Error(`Unknown tool: ${t}`);const r=n.getInputSchema();if(r){const t=o.z.object(r).safeParse(i);if(!t.success)throw new Error(`Invalid arguments: ${t.error.message}`);const a=await n.execute(t.data);return{role:"tool",tool_call_id:e.id,content:fw(a.content)}}{const t=await n.execute();return{role:"tool",tool_call_id:e.id,content:fw(t.content)}}}};
2965
2972
  //# sourceMappingURL=index.js.map