@mondaydotcomorg/agent-toolkit 5.72.0 → 5.73.0-msft-v5

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.
@@ -525,7 +525,7 @@
525
525
  }
526
526
  }
527
527
  }
528
- `,Oc="TOOL_EXECUTION_FAILED",Rc="GRAPHQL_ERROR",Cc="INVALID_OPERATION_TYPE",kc="EMPTY_API_RESPONSE",Lc="MISSING_REQUIRED_PARAMETER";class Uc extends Error{constructor(e,t,a){super(e),this.name="ToolValidationError",this.code=t,this.errors=a}}function Pc(e,t){if(e instanceof Uc)throw e;const a=e?.response?.errors?.map((e=>{const{code:t,error_data:a}=e.extensions??{},n=Object.fromEntries(Object.entries({code:t,error_data:a}).filter((([,e])=>void 0!==e)));return Object.keys(n).length>0?`${e.message} (details: ${JSON.stringify(n)})`:e.message}))?.join(", ");if(a){const n=new Error(`Failed to ${t}: ${a}`);throw n.response=e.response,n}const n=e instanceof Error?e.message:"Unknown error";throw new Uc(`Failed to ${t}: ${n}`,Oc)}function $c(e){if(e instanceof Error&&"AbortError"===e.name)throw new Uc("Search has timed out, try providing alternative search term","SEARCH_TIMEOUT")}function xc(e){const t=e?.response;return 429===t?.status}function Mc(t){if(!(t instanceof e.ApiClient))return t;const{token:a,defaultApiVersion:n,defaultEndpoint:i,requestConfig:o}=t;return new e.ApiClient({token:a,apiVersion:n,endpoint:i,requestConfig:{...o,headers:{...o?.headers,"x-api-schema":"public"}}})}const Vc={query:n.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:n.z.string().default("{}").describe("JSON string containing the variables for the GraphQL operation")};class Fc extends ce{constructor(e,t){super("function"==typeof e?()=>Mc(e()):Mc(e),t),this.name="all_monday_api",this.type=f.ALL_API,this.annotations=le({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 Vc}async loadSchema(e){if(Fc.schemaCache[e])return Fc.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Ic),{data:a}=t,n=fi(a);return Fc.schemaCache[e]=n,n}catch(e){throw new Uc(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`,"GRAPHQL_SCHEMA_LOAD_FAILED")}}countGraphqlOperations(e){const t={},a={};for(const n of e.definitions){if("OperationDefinition"!==n.kind)continue;const e=n.operation===Ne.MUTATION?a:n.operation===Ne.QUERY?t:null;if(e)for(const t of n.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 hi(await this.loadSchema(t),e).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;let n={};try{n=JSON.parse(a)}catch(e){throw new Uc(`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`,"INVALID_VARIABLES_JSON")}const i=st(t);this.recordGraphqlOperationCounts(i);const o=await this.validateOperation(i,this.context?.apiVersion??V);if(o.length>0)throw new Uc(o.join(", "),"GRAPHQL_VALIDATION_FAILED");try{return{content:await this.mondayApi.request(t,n)}}catch(e){Pc(e,"execute GraphQL operation")}}}Fc.schemaCache={};const Bc=1e3;var zc,qc;!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"}(zc||(zc={})),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=Bc]="SECOND"}(qc||(qc={}));const jc=10*qc.SECOND;async function Gc(e,t){const a={value:!1},n=t.isRateLimitError??xc;return async function(e,t){const a=new Array(e.length);let n=0;const i=Math.min(t,e.length);return await Promise.allSettled(Array.from({length:i},(async()=>{for(;n<e.length;){const t=n++;a[t]=await e[t]()}}))),a}(e.map(((e,i)=>async()=>{if(a.value)return t.onSkipped(i);try{return await e()}catch(e){return n(e)&&(a.value=!0),t.onError(e,i)}})),t.limit)}const Hc='Pass a JSON object serialized once as a string, keyed by column id — not a JSON string of a JSON string. Column ids and labels must come from get_board_info for this board, people ids from list_users_and_teams, never guessed. Formats by column type: text and numbers: "value". long_text: {"text": "..."}. status: {"label": "Done"} or {"index": 1}, and the label must already exist unless createLabelsIfMissing is true. dropdown: {"labels": ["A"]} or {"ids": [1]} — always an array, even for one value. date: {"date": "YYYY-MM-DD"}. timeline: {"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}. people: {"personsAndTeams": [{"id": 123, "kind": "person"}]}, where kind is "person" or "team". board_relation: {"item_ids": [123]}. tags: {"tag_ids": [123]}. checkbox: {"checked": "true"}. link: {"url": "https://...", "text": "..."}. location: {"lat": "40.7", "lng": "-74.0", "address": "..."}, lat and lng are required strings, an address alone fails. email: {"email": "a@b.com", "text": "a@b.com"}. phone: {"phone": "+12125551234", "countryShortName": "US"}, digits only with an optional leading + and no spaces or dashes, uppercase ISO-2 country code. Plain strings fail for email and phone. null clears a column. Example: {"text_col": "New text", "status_col": {"label": "Done"}, "dropdown_col": {"labels": ["A"]}, "date_col": {"date": "2023-05-25"}}',Wc=e=>{try{const t=JSON.parse(e);return"string"==typeof t?t:e}catch{return e}},Yc={itemId:n.z.number().describe("The ID of the item to be updated"),columnValues:n.z.string().describe(`The new column values for the item. Multiple columns can be changed at once. ${Hc}`),createLabelsIfMissing:n.z.boolean().optional().describe("If true, create missing Status/Dropdown labels when setting those columns. Requires permission to change board structure. Omit or false to only use existing labels.")},Kc={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Yc};class Qc extends ce{constructor(){super(...arguments),this.name="change_item_column_values",this.type=f.WRITE,this.annotations=le({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of a single item on a monday.com board. [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 with filters.columns.only to get column metadata without fetching views. 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?Yc:Kc}async executeInternal(e){const t=this.context?.boardId??e.boardId,a=Wc(e.columnValues),n={boardId:t.toString(),itemId:e.itemId.toString(),columnValues:a,...void 0!==e.createLabelsIfMissing&&{createLabelsIfMissing:e.createLabelsIfMissing}};let i;try{i=JSON.parse(a)}catch(e){throw new Uc(`Invalid columnValues JSON: ${e.message}`,"INVALID_COLUMN_VALUES_JSON")}if(null===i||"object"!=typeof i||Array.isArray(i))throw new Uc("Invalid columnValues JSON: expected a JSON object keyed by column id","INVALID_COLUMN_VALUES_JSON");const o=Object.keys(i);let r;try{r=await this.mondayApi.request(hc,{...n,columnIds:o})}catch(e){Pc(e,"change column values")}const s=r.change_multiple_column_values?.column_values?.reduce(((e,t)=>(e[t.id]=t.value??null,e)),{});return{content:{message:`Item ${r.change_multiple_column_values?.id} successfully updated`,item_id:r.change_multiple_column_values?.id,item_name:r.change_multiple_column_values?.name,item_url:r.change_multiple_column_values?.url,column_values:s}}}}const Jc=n.z.object({itemId:n.z.number().describe("The id of the item to update."),columnValues:n.z.string().describe(`The new column values for this item, keyed by column id. To change the item name include a "name" key. ${Hc}`),boardId:n.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:n.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.")}),Xc={updates:n.z.array(Jc).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.")},Zc={boardId:n.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."),...Xc};function em(e,t){if(e instanceof Uc)return{code:e.code,message:e.message,path:["results",t]};const a=e?.response?.errors?.[0],n=e instanceof Error?e.message:String(e),i=a?.extensions??{};return{...i,code:i.code??Rc,message:a?.message??n,path:["results",t]}}const tm=rc`
528
+ `,Oc="TOOL_EXECUTION_FAILED",Rc="GRAPHQL_ERROR",Cc="INVALID_OPERATION_TYPE",kc="EMPTY_API_RESPONSE",Lc="MISSING_REQUIRED_PARAMETER";class Uc extends Error{constructor(e,t,a){super(e),this.name="ToolValidationError",this.code=t,this.errors=a}}function Pc(e,t){if(e instanceof Uc)throw e;const a=e?.response?.errors?.map((e=>{const{code:t,error_data:a}=e.extensions??{},n=Object.fromEntries(Object.entries({code:t,error_data:a}).filter((([,e])=>void 0!==e)));return Object.keys(n).length>0?`${e.message} (details: ${JSON.stringify(n)})`:e.message}))?.join(", ");if(a){const n=new Error(`Failed to ${t}: ${a}`);throw n.response=e.response,n}const n=e instanceof Error?e.message:"Unknown error";throw new Uc(`Failed to ${t}: ${n}`,Oc)}function $c(e){if(e instanceof Error&&"AbortError"===e.name)throw new Uc("Search has timed out, try providing alternative search term","SEARCH_TIMEOUT")}function xc(e){const t=e?.response;return 429===t?.status}function Mc(t){if(!(t instanceof e.ApiClient))return t;const{token:a,defaultApiVersion:n,defaultEndpoint:i,requestConfig:o}=t;return new e.ApiClient({token:a,apiVersion:n,endpoint:i,requestConfig:{...o,headers:{...o?.headers,"x-api-schema":"public"}}})}const Vc={query:n.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:n.z.string().default("{}").describe("JSON string containing the variables for the GraphQL operation")};class Fc extends ce{constructor(e,t){super("function"==typeof e?()=>Mc(e()):Mc(e),t),this.name="all_monday_api",this.type=f.ALL_API,this.annotations=le({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 Vc}async loadSchema(e){if(Fc.schemaCache[e])return Fc.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Ic),{data:a}=t,n=fi(a);return Fc.schemaCache[e]=n,n}catch(e){throw new Uc(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`,"GRAPHQL_SCHEMA_LOAD_FAILED")}}countGraphqlOperations(e){const t={},a={};for(const n of e.definitions){if("OperationDefinition"!==n.kind)continue;const e=n.operation===Ne.MUTATION?a:n.operation===Ne.QUERY?t:null;if(e)for(const t of n.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 hi(await this.loadSchema(t),e).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;let n={};try{n=JSON.parse(a)}catch(e){throw new Uc(`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`,"INVALID_VARIABLES_JSON")}const i=st(t);this.recordGraphqlOperationCounts(i);const o=await this.validateOperation(i,this.context?.apiVersion??V);if(o.length>0)throw new Uc(o.join(", "),"GRAPHQL_VALIDATION_FAILED");try{return{content:await this.mondayApi.request(t,n)}}catch(e){Pc(e,"execute GraphQL operation")}}}Fc.schemaCache={};const Bc=1e3;var zc,qc;!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"}(zc||(zc={})),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=Bc]="SECOND"}(qc||(qc={}));const jc=10*qc.SECOND;async function Gc(e,t){const a={value:!1},n=t.isRateLimitError??xc;return async function(e,t){const a=new Array(e.length);let n=0;const i=Math.min(t,e.length);return await Promise.allSettled(Array.from({length:i},(async()=>{for(;n<e.length;){const t=n++;a[t]=await e[t]()}}))),a}(e.map(((e,i)=>async()=>{if(a.value)return t.onSkipped(i);try{return await e()}catch(e){return n(e)&&(a.value=!0),t.onError(e,i)}})),t.limit)}const Hc='Pass a JSON object serialized once as a string, keyed by column id — not a JSON string of a JSON string. Column ids and labels must come from get_board_info for this board, people ids from list_users_and_teams, never guessed. Formats by column type: text and numbers: "value". long_text: {"text": "..."}. status: {"label": "Done"} or {"index": 1}, and the label must already exist unless createLabelsIfMissing is true. dropdown: {"labels": ["A"]} or {"ids": [1]} — always an array, even for one value. date: {"date": "YYYY-MM-DD"}. timeline: {"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}. people: {"personsAndTeams": [{"id": 123, "kind": "person"}]}, where kind is "person", "team" or "agent". An AI agent takes kind "agent" with its user id from list_users_and_teams, never "person". board_relation: {"item_ids": [123]}. tags: {"tag_ids": [123]}. checkbox: {"checked": "true"}. link: {"url": "https://...", "text": "..."}. location: {"lat": "40.7", "lng": "-74.0", "address": "..."}, lat and lng are required strings, an address alone fails. email: {"email": "a@b.com", "text": "a@b.com"}. phone: {"phone": "+12125551234", "countryShortName": "US"}, digits only with an optional leading + and no spaces or dashes, uppercase ISO-2 country code. Plain strings fail for email and phone. null clears a column. Example: {"text_col": "New text", "status_col": {"label": "Done"}, "dropdown_col": {"labels": ["A"]}, "date_col": {"date": "2023-05-25"}}',Wc=e=>{try{const t=JSON.parse(e);return"string"==typeof t?t:e}catch{return e}},Yc={itemId:n.z.number().describe("The ID of the item to be updated"),columnValues:n.z.string().describe(`The new column values for the item. Multiple columns can be changed at once. ${Hc}`),createLabelsIfMissing:n.z.boolean().optional().describe("If true, create missing Status/Dropdown labels when setting those columns. Requires permission to change board structure. Omit or false to only use existing labels.")},Kc={boardId:n.z.number().describe("The ID of the board that contains the item to be updated"),...Yc};class Qc extends ce{constructor(){super(...arguments),this.name="change_item_column_values",this.type=f.WRITE,this.annotations=le({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of a single item on a monday.com board. [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 with filters.columns.only to get column metadata without fetching views. 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?Yc:Kc}async executeInternal(e){const t=this.context?.boardId??e.boardId,a=Wc(e.columnValues),n={boardId:t.toString(),itemId:e.itemId.toString(),columnValues:a,...void 0!==e.createLabelsIfMissing&&{createLabelsIfMissing:e.createLabelsIfMissing}};let i;try{i=JSON.parse(a)}catch(e){throw new Uc(`Invalid columnValues JSON: ${e.message}`,"INVALID_COLUMN_VALUES_JSON")}if(null===i||"object"!=typeof i||Array.isArray(i))throw new Uc("Invalid columnValues JSON: expected a JSON object keyed by column id","INVALID_COLUMN_VALUES_JSON");const o=Object.keys(i);let r;try{r=await this.mondayApi.request(hc,{...n,columnIds:o})}catch(e){Pc(e,"change column values")}const s=r.change_multiple_column_values?.column_values?.reduce(((e,t)=>(e[t.id]=t.value??null,e)),{});return{content:{message:`Item ${r.change_multiple_column_values?.id} successfully updated`,item_id:r.change_multiple_column_values?.id,item_name:r.change_multiple_column_values?.name,item_url:r.change_multiple_column_values?.url,column_values:s}}}}const Jc=n.z.object({itemId:n.z.number().describe("The id of the item to update."),columnValues:n.z.string().describe(`The new column values for this item, keyed by column id. To change the item name include a "name" key. ${Hc}`),boardId:n.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:n.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.")}),Xc={updates:n.z.array(Jc).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.")},Zc={boardId:n.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."),...Xc};function em(e,t){if(e instanceof Uc)return{code:e.code,message:e.message,path:["results",t]};const a=e?.response?.errors?.[0],n=e instanceof Error?e.message:String(e),i=a?.extensions??{};return{...i,code:i.code??Rc,message:a?.message??n,path:["results",t]}}const tm=rc`
529
529
  query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
530
530
  get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
531
531
  id
@@ -1145,7 +1145,7 @@
1145
1145
  }
1146
1146
  }
1147
1147
  }
1148
- `,$h=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Ds).describe("The type of mention: User, Team, Board, or Project")}),xh=n.z.array($h),Mh={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead. use html tags to format the text, dont use markdown."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project'),parentId:n.z.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update. Replies cannot be nested: if this is the ID of a reply, the reply is posted on its parent update instead.")};class Vh extends ce{constructor(){super(...arguments),this.name="create_update",this.type=f.WRITE,this.annotations=le({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 Mh}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),n=xh.safeParse(a);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);t=n.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()},n=await this.createUpdate(a);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${n.create_update.id} created on item ${e.itemId}`,update_id:n.create_update.id,item_id:e.itemId,item_name:n.create_update.item?.name,item_url:n.create_update.item?.url}}}catch(e){Pc(e,"create update")}}async createUpdate(e){try{return await this.mondayApi.request(Uh,e)}catch(t){if(!e.parentId||!function(e){return!!e?.response?.errors?.some((e=>"REPLY_TO_REPLY_NOT_ALLOWED"===e.extensions?.code))}(t))throw t;const a=await this.findParentUpdateId(e.itemId,e.parentId);if(!a)throw t;return this.mondayApi.request(Uh,{...e,parentId:a})}}async findParentUpdateId(e,t){const a=await this.mondayApi.request(Ph,{itemId:e});return a.items?.[0]?.updates?.find((e=>e.replies?.some((e=>e.id===t))))?.id}}const Fh={updates:n.z.array(n.z.object(Mh)).min(1,"updates must not be empty").max(40,"updates must not exceed 40 per call").describe("The updates to post, up to 40 per call. Each entry posts one update (or reply, via parentId) on one item and returns its own result on success or a raw error message on failure.")};function Bh(e,t){if(e instanceof Uc)return{code:e.code,message:e.message,path:["results",t]};const a=e?.response?.errors?.[0],n=e instanceof Error?e.message:String(e),i=a?.extensions??{};return{...i,code:i.code??Rc,message:a?.message??n,path:["results",t]}}const zh=rc`
1148
+ `,$h=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Ds).describe("The type of mention: User, Team, Board, or Project. Mention an AI agent as User, not Agent")}),xh=n.z.array($h),Mh={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead. use html tags to format the text, dont use markdown."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project. To mention an AI agent, use type User with the agent\'s user id from list_users_and_teams. Type Agent adds no mention'),parentId:n.z.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update. Replies cannot be nested: if this is the ID of a reply, the reply is posted on its parent update instead.")};class Vh extends ce{constructor(){super(...arguments),this.name="create_update",this.type=f.WRITE,this.annotations=le({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 Mh}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),n=xh.safeParse(a);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);t=n.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()},n=await this.createUpdate(a);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${n.create_update.id} created on item ${e.itemId}`,update_id:n.create_update.id,item_id:e.itemId,item_name:n.create_update.item?.name,item_url:n.create_update.item?.url}}}catch(e){Pc(e,"create update")}}async createUpdate(e){try{return await this.mondayApi.request(Uh,e)}catch(t){if(!e.parentId||!function(e){return!!e?.response?.errors?.some((e=>"REPLY_TO_REPLY_NOT_ALLOWED"===e.extensions?.code))}(t))throw t;const a=await this.findParentUpdateId(e.itemId,e.parentId);if(!a)throw t;return this.mondayApi.request(Uh,{...e,parentId:a})}}async findParentUpdateId(e,t){const a=await this.mondayApi.request(Ph,{itemId:e});return a.items?.[0]?.updates?.find((e=>e.replies?.some((e=>e.id===t))))?.id}}const Fh={updates:n.z.array(n.z.object(Mh)).min(1,"updates must not be empty").max(40,"updates must not exceed 40 per call").describe("The updates to post, up to 40 per call. Each entry posts one update (or reply, via parentId) on one item and returns its own result on success or a raw error message on failure.")};function Bh(e,t){if(e instanceof Uc)return{code:e.code,message:e.message,path:["results",t]};const a=e?.response?.errors?.[0],n=e instanceof Error?e.message:String(e),i=a?.extensions??{};return{...i,code:i.code??Rc,message:a?.message??n,path:["results",t]}}const zh=rc`
1149
1149
  mutation DeleteUpdate($id: ID!) {
1150
1150
  delete_update(id: $id) {
1151
1151
  id
@@ -1188,6 +1188,42 @@
1188
1188
  }
1189
1189
  }
1190
1190
  `,Gh=rc`
1191
+ query GetItemsUpdates($itemIds: [ID!]!, $itemsLimit: Int, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
1192
+ items(ids: $itemIds, limit: $itemsLimit) {
1193
+ id
1194
+ url
1195
+ updates(limit: $limit, page: $page) {
1196
+ id
1197
+ text_body
1198
+ created_at
1199
+ updated_at
1200
+ item_id
1201
+ creator {
1202
+ id
1203
+ name
1204
+ }
1205
+ replies @include(if: $includeReplies) {
1206
+ id
1207
+ text_body
1208
+ created_at
1209
+ updated_at
1210
+ creator {
1211
+ id
1212
+ name
1213
+ }
1214
+ }
1215
+ assets @include(if: $includeAssets) {
1216
+ id
1217
+ name
1218
+ url
1219
+ file_extension
1220
+ file_size
1221
+ created_at
1222
+ }
1223
+ }
1224
+ }
1225
+ }
1226
+ `,Hh=rc`
1191
1227
  query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!, $fromDate: ISO8601DateTime, $toDate: ISO8601DateTime, $boardUpdatesOnly: Boolean) {
1192
1228
  boards(ids: [$boardId], limit: 1) {
1193
1229
  id
@@ -1223,7 +1259,7 @@
1223
1259
  }
1224
1260
  }
1225
1261
  }
1226
- `;var Hh;!function(e){e.Item="Item",e.Board="Board"}(Hh||(Hh={}));const Wh={objectId:n.z.string().describe("The ID of the item or board to get updates from"),objectType:n.z.enum([Hh.Item,Hh.Board]).describe("Type of object for which objectId was provided"),limit:n.z.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:n.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:n.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:n.z.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:n.z.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:n.z.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:n.z.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function Yh(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const Kh={columnId:n.z.string().describe("The id of the column to be deleted")},Qh={boardId:n.z.number().describe("The id of the board to which the new column will be added"),...Kh};const Jh={itemId:n.z.number()};const Xh={};const Zh=rc`
1262
+ `;var Wh;!function(e){e.Item="Item",e.Board="Board"}(Wh||(Wh={}));const Yh=2e3,Kh={objectId:n.z.string().optional().describe("The ID of the item or board to get updates from. Provide either objectId or objectIds."),objectIds:n.z.array(n.z.string()).min(1).max(25).optional().describe("Item IDs to get updates from in one request, up to 25, instead of objectId. Item objectType only. limit and page apply to each item."),objectType:n.z.enum([Wh.Item,Wh.Board]).describe("Type of object for which objectId was provided"),limit:n.z.number().min(1).max(100).optional().describe("Number of updates per page (default: 25, or 10 per item with objectIds, max: 100)"),page:n.z.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:n.z.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:n.z.boolean().optional().default(!1).describe("Include file attachments in the response"),includeFullText:n.z.boolean().optional().default(!1).describe("Return update and reply bodies in full instead of truncating them at 2000 characters. Use it when a body came back with text_body_truncated and you need the rest."),fromDate:n.z.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:n.z.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:n.z.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function Qh(e,t=!1){return/^\d{4}-\d{2}-\d{2}$/.test(e)?t?`${e}T23:59:59Z`:`${e}T00:00:00Z`:e}function Jh(e,t){return t||!e||e.length<=Yh?{text_body:e}:{text_body:e.slice(0,Yh),text_body_truncated:!0}}function Xh(e,t){const a={id:e.id,...Jh(e.text_body,t.includeFullText??!1),created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null,item_id:e.item_id};return t.includeReplies&&e.replies&&(a.replies=e.replies.map((e=>({id:e.id,...Jh(e.text_body,t.includeFullText??!1),created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),t.includeAssets&&e.assets&&(a.assets=e.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}const Zh={columnId:n.z.string().describe("The id of the column to be deleted")},e_={boardId:n.z.number().describe("The id of the board to which the new column will be added"),...Zh};const t_={itemId:n.z.number()};const a_={};const n_=rc`
1227
1263
  query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
1228
1264
  boards(ids: [$boardId], limit: 1) {
1229
1265
  id
@@ -1266,7 +1302,7 @@
1266
1302
  }
1267
1303
  }
1268
1304
  }
1269
- `,e_=rc`
1305
+ `,i_=rc`
1270
1306
  query getUsersByIds($userIds: [ID!]!) {
1271
1307
  users(ids: $userIds) {
1272
1308
  id
@@ -1276,7 +1312,7 @@
1276
1312
  }
1277
1313
  }
1278
1314
  }
1279
- `,t_=n.z.array(n.z.object({columnId:n.z.string().describe('Ordinary column ids are board-specific. Use get_board_info with filters.columns.only to get them for the current board. Also accepts four virtual columns that get_board_info does not return: "group" (the group id goes in compareValue, e.g. "group_mm6wsvcc" - the columnId itself is always the literal "group"), "__creation_log__", "__last_updated__" and "__item_id__".'),compareAttribute:n.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:n.z.union([n.z.string(),n.z.number(),n.z.boolean(),n.z.array(n.z.union([n.z.string(),n.z.number()]))]).describe('The value to compare the attribute to. This can be a string or index value depending on the column type. The operators within_the_last and within_the_next are the exception: they take a two item array of [UNIT, AMOUNT] such as ["DAYS", 7].'),operator:n.z.nativeEnum(_s).optional().default(_s.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info with filters.columns.only for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),a_=n.z.nativeEnum(hs).optional().default(hs.And).describe("The operator to use for the filters"),n_={boardId:n.z.string().describe("The ID of the board to fetch complete data for"),filters:t_,filtersOperator:a_};const i_=rc`
1315
+ `,o_=n.z.array(n.z.object({columnId:n.z.string().describe('Ordinary column ids are board-specific. Use get_board_info with filters.columns.only to get them for the current board. Also accepts four virtual columns that get_board_info does not return: "group" (the group id goes in compareValue, e.g. "group_mm6wsvcc" - the columnId itself is always the literal "group"), "__creation_log__", "__last_updated__" and "__item_id__".'),compareAttribute:n.z.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:n.z.union([n.z.string(),n.z.number(),n.z.boolean(),n.z.array(n.z.union([n.z.string(),n.z.number()]))]).describe('The value to compare the attribute to. This can be a string or index value depending on the column type. The operators within_the_last and within_the_next are the exception: they take a two item array of [UNIT, AMOUNT] such as ["DAYS", 7].'),operator:n.z.nativeEnum(_s).optional().default(_s.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info with filters.columns.only for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),r_=n.z.nativeEnum(hs).optional().default(hs.And).describe("The operator to use for the filters"),s_={boardId:n.z.string().describe("The ID of the board to fetch complete data for"),filters:o_,filtersOperator:r_};const d_=rc`
1280
1316
  query GetBoardActivity(
1281
1317
  $boardId: ID!
1282
1318
  $itemIds: [ID!]
@@ -1299,7 +1335,7 @@
1299
1335
  }
1300
1336
  }
1301
1337
  }
1302
- `,o_={boardId:n.z.number().describe("The id of the board to get activity for"),itemIds:n.z.array(n.z.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:n.z.array(n.z.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:n.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:n.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:n.z.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const r_=rc`
1338
+ `,p_={boardId:n.z.number().describe("The id of the board to get activity for"),itemIds:n.z.array(n.z.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:n.z.array(n.z.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:n.z.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:n.z.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:n.z.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const l_=rc`
1303
1339
  query GetBoardInfo(
1304
1340
  $boardId: ID!
1305
1341
  $columnIds: [String]
@@ -1394,7 +1430,7 @@
1394
1430
  }
1395
1431
  }
1396
1432
  }
1397
- `,s_=rc`
1433
+ `,c_=rc`
1398
1434
  query GetBoardInfoViewIndex($boardId: ID!) {
1399
1435
  boards(ids: [$boardId], limit: 1) {
1400
1436
  id
@@ -1404,7 +1440,7 @@
1404
1440
  }
1405
1441
  }
1406
1442
  }
1407
- `,d_=rc`
1443
+ `,m_=rc`
1408
1444
  query GetBoardInfoJustColumns($boardId: ID!) {
1409
1445
  boards(ids: [$boardId], limit: 1) {
1410
1446
  columns {
@@ -1417,7 +1453,7 @@
1417
1453
  }
1418
1454
  }
1419
1455
  }
1420
- `,p_=rc`
1456
+ `,u_=rc`
1421
1457
  query GetBoardKnowledge($boardId: ID!) {
1422
1458
  entity_knowledge(entity_type: BOARD, entity_id: $boardId) {
1423
1459
  summary
@@ -1433,7 +1469,7 @@
1433
1469
  }
1434
1470
  }
1435
1471
  }
1436
- `,l_=(e,t,a,n,i=!0)=>({board:{...e,columns:e.columns??[],views:e.views??[],subItemColumns:t?.columns??void 0},...i?{knowledge:n??null}:{},...a&&a.length>0?{unmatchedViewNames:a}:{}}),c_=e=>e.trim().toLowerCase().replace(/\\&/g,"&"),m_={boardId:n.z.number().describe("The id of the board to get information for"),includeKnowledge:n.z.boolean().optional().describe("Optional. Set to true only when you need generated business context beyond the board structure, such as workflow and status meanings, column purposes, people roles, or related boards. This adds a slower, more expensive request and may return null while knowledge is unavailable or still being generated. Defaults to false."),filters:n.z.object({views:n.z.object({ids:n.z.array(n.z.string()).optional().describe("Optional. Restrict returned views to these view ids."),names:n.z.array(n.z.string()).optional().describe("Optional. Restrict returned views to these view names (case-insensitive). The tool resolves names via a lean id/name index query first to avoid downloading every view on large boards."),only:n.z.boolean().optional().describe("Optional. When true, omit columns and return only views plus the board metadata needed around them.")}).optional().describe("Optional view selection controls."),columns:n.z.object({ids:n.z.array(n.z.string()).optional().describe("Optional. Restrict returned columns to these column ids."),only:n.z.boolean().optional().describe("Optional. When true, omit views and return only columns plus the board metadata needed around them.")}).optional().describe("Optional column selection controls.")}).optional().describe("Optional response-shaping filters for large boards. Omit to return the full board info payload.")};const u_=rc`
1472
+ `,h_=(e,t,a,n,i=!0)=>({board:{...e,columns:e.columns??[],views:e.views??[],subItemColumns:t?.columns??void 0},...i?{knowledge:n??null}:{},...a&&a.length>0?{unmatchedViewNames:a}:{}}),__=e=>e.trim().toLowerCase().replace(/\\&/g,"&"),f_={boardId:n.z.number().describe("The id of the board to get information for"),includeKnowledge:n.z.boolean().optional().describe("Optional. Set to true only when you need generated business context beyond the board structure, such as workflow and status meanings, column purposes, people roles, or related boards. This adds a slower, more expensive request and may return null while knowledge is unavailable or still being generated. Defaults to false."),filters:n.z.object({views:n.z.object({ids:n.z.array(n.z.string()).optional().describe("Optional. Restrict returned views to these view ids."),names:n.z.array(n.z.string()).optional().describe("Optional. Restrict returned views to these view names (case-insensitive). The tool resolves names via a lean id/name index query first to avoid downloading every view on large boards."),only:n.z.boolean().optional().describe("Optional. When true, omit columns and return only views plus the board metadata needed around them.")}).optional().describe("Optional view selection controls."),columns:n.z.object({ids:n.z.array(n.z.string()).optional().describe("Optional. Restrict returned columns to these column ids."),only:n.z.boolean().optional().describe("Optional. When true, omit views and return only columns plus the board metadata needed around them.")}).optional().describe("Optional column selection controls.")}).optional().describe("Optional response-shaping filters for large boards. Omit to return the full board info payload.")};const g_=rc`
1437
1473
  fragment ItemDataFragment on Item {
1438
1474
  id
1439
1475
  name
@@ -1513,7 +1549,7 @@
1513
1549
  }
1514
1550
  }
1515
1551
  }
1516
- `,h_=rc`
1552
+ `,b_=rc`
1517
1553
  query SearchItemsDev($query: String!, $limit: Int, $boardIds: [ID!]) {
1518
1554
  search {
1519
1555
  items(query: $query, limit: $limit, board_ids: $boardIds) {
@@ -1523,11 +1559,11 @@
1523
1559
  }
1524
1560
  }
1525
1561
  }
1526
- `;var __;!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"}(__||(__={}));const f_=Object.values(__).join(", ");function g_(e){return e.trim().toUpperCase().replace(/[\s\-/]+/g,"_").replace(/^_+|_+$/g,"")}const b_={BOARDS:__.BOARD,DOCS:__.DOCUMENTS,DOC:__.DOCUMENTS,DOCUMENT:__.DOCUMENTS,FOLDER:__.FOLDERS,WORKSPACE:__.WORKSPACES,UPDATE:__.UPDATES,ITEM:__.ITEMS,PULSE:__.ITEMS,PULSES:__.ITEMS,TIMELINE_ITEM:__.TIMELINE_ITEMS,TIMELINE:__.TIMELINE_ITEMS,DASHBOARD:__.DASHBOARDS,OVERVIEW:__.DASHBOARDS,OVERVIEWS:__.DASHBOARDS},y_={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."},v_={boardId:n.z.number().describe("The id of the board to get items from"),itemIds:n.z.array(n.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:n.z.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:n.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:n.z.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:n.z.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeGroup:n.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:n.z.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:n.z.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:t_,filtersOperator:a_,columnIds:n.z.array(n.z.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:n.z.array(n.z.object({columnId:n.z.string().describe('Ordinary column ids are board-specific. Use get_board_info with filters.columns.only to get them for the current board. Also accepts four virtual columns that get_board_info does not return: "group", "__creation_log__", "__last_updated__" and "__item_id__".'),direction:n.z.nativeEnum(us).optional().default(us.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 I_={boardId:n.z.number().describe("The id of the board to get the schema of")};const E_=rc`
1562
+ `;var y_;!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"}(y_||(y_={}));const v_=Object.values(y_).join(", ");function I_(e){return e.trim().toUpperCase().replace(/[\s\-/]+/g,"_").replace(/^_+|_+$/g,"")}const E_={BOARDS:y_.BOARD,DOCS:y_.DOCUMENTS,DOC:y_.DOCUMENTS,DOCUMENT:y_.DOCUMENTS,FOLDER:y_.FOLDERS,WORKSPACE:y_.WORKSPACES,UPDATE:y_.UPDATES,ITEM:y_.ITEMS,PULSE:y_.ITEMS,PULSES:y_.ITEMS,TIMELINE_ITEM:y_.TIMELINE_ITEMS,TIMELINE:y_.TIMELINE_ITEMS,DASHBOARD:y_.DASHBOARDS,OVERVIEW:y_.DASHBOARDS,OVERVIEWS:y_.DASHBOARDS},T_={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."},w_={boardId:n.z.number().describe("The id of the board to get items from"),itemIds:n.z.array(n.z.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:n.z.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:n.z.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:n.z.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:n.z.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeGroup:n.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:n.z.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:n.z.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:o_,filtersOperator:r_,columnIds:n.z.array(n.z.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:n.z.array(n.z.object({columnId:n.z.string().describe('Ordinary column ids are board-specific. Use get_board_info with filters.columns.only to get them for the current board. Also accepts four virtual columns that get_board_info does not return: "group", "__creation_log__", "__last_updated__" and "__item_id__".'),direction:n.z.nativeEnum(us).optional().default(us.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 A_={boardId:n.z.number().describe("The id of the board to get the schema of")};const S_=rc`
1527
1563
  query GetColumnTypeSchema($type: ColumnType!) {
1528
1564
  get_column_type_schema(type: $type)
1529
1565
  }
1530
- `,T_="https://developer.monday.com/api-reference",w_={group:'Filters items by the board group they belong to. The columnId is the literal string "group" - a group id such as "group_mm6wsvcc" is NEVER a valid columnId. For filtering by group id, use any_of or not_any_of. Use an array of group ids, as returned in an item\'s group.id or by get_board_info.\nEXAMPLES:\n ✅ Correct: {"columnId": "group", "compareValue": ["group_mm6wsvcc"], "operator": "any_of"} // group id goes in compareValue\n ✅ Correct: {"columnId": "group", "compareValue": ["group_mm6wsvcc", "group_mm4w1e0n"], "operator": "any_of"} // several groups\n ❌ Wrong: {"columnId": "group_mm6wsvcc", "compareValue": "group_mm6wsvcc"} // group id used as the columnId\n ❌ Wrong: {"columnId": "__group__", "compareValue": ["group_mm6wsvcc"], "operator": "any_of"} // the columnId is exactly "group", with no surrounding underscores\n ❌ Wrong: {"columnId": "group_id", "compareValue": ["group_mm6wsvcc"], "operator": "any_of"} // use the virtual column id "group" for board-group membership\n ❌ Wrong: {"columnId": "group", "compareValue": "Backlog", "operator": "any_of"} // group title instead of group id',last_updated:'The columnId is the literal string "__last_updated__", with two underscores before and after. Supported operators: any_of, not_any_of, within_the_last, between. With any_of and not_any_of, use compareAttribute "UPDATED_AT" and a compareValue array holding one of "TODAY", "YESTERDAY", "THIS_WEEK", "THIS_MONTH". With within_the_last, use compareAttribute "UPDATED_AT" and a [UNIT, AMOUNT] window. With between, use compareAttribute "UPDATED_AT" and a two item array of "YYYY-MM-DD" dates [FROM, TO].\nThis id is also the correct one to use in orderBy to sort items by when they were last updated.\nEXAMPLES:\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // updated today\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["DAYS", 7], "operator": "within_the_last", "compareAttribute": "UPDATED_AT"} // updated in the last 7 days\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["WEEKS", 1], "operator": "within_the_last", "compareAttribute": "UPDATED_AT"} // updated in the last week\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "UPDATED_AT"} // updated in Q1\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // missing the underscores around last_updated\n ❌ Wrong: {"columnId": "__last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // missing one trailing underscore\n ❌ Wrong: {"columnId": "updated_at", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // use __last_updated__ for the item\'s update time\n ❌ Wrong: {"columnId": "__last_updated__", "compareValue": ["LAST_MONTH"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // LAST_MONTH and LAST_WEEK match no items, use within_the_last with ["MONTHS", 1] or ["WEEKS", 1]\n ❌ Wrong: {"columnId": "__last_updated__", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator\n ❌ Wrong: {"columnId": "__last_updated__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // missing UPDATED_AT',creation_log:'The columnId is the literal string "__creation_log__", with two underscores before and after. Supported operators: any_of, not_any_of, within_the_last, between. With any_of and not_any_of, use compareAttribute "CREATED_AT" and a compareValue array holding one of "TODAY", "YESTERDAY", "THIS_WEEK", "THIS_MONTH". With within_the_last, use compareAttribute "CREATED_AT" and a [UNIT, AMOUNT] window. With between, use compareAttribute "CREATED_AT" and a two item array of "YYYY-MM-DD" dates [FROM, TO].\nThis id is also the correct one to use in orderBy to sort items by creation time.\nEXAMPLES:\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // items created today\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "CREATED_AT"} // items not created this week\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["DAYS", 30], "operator": "within_the_last", "compareAttribute": "CREATED_AT"} // created in the last 30 days\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "CREATED_AT"} // created in Q1\n ❌ Wrong: {"columnId": "creation_log", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // missing the underscores around creation_log\n ❌ Wrong: {"columnId": "created_at", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // use __creation_log__ for the item\'s creation time\n ❌ Wrong: {"columnId": "__creation_log__", "compareValue": ["LAST_MONTH"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // LAST_MONTH and LAST_WEEK match no items, use within_the_last with ["MONTHS", 1] or ["WEEKS", 1]\n ❌ Wrong: {"columnId": "__creation_log__", "compareValue": ["PAST_DATETIME", "14"], "operator": "within_the_last"} // PAST_DATETIME is not a unit, use ["DAYS", 14]\n ❌ Wrong: {"columnId": "__creation_log__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // missing CREATED_AT',item_id:'The columnId is the literal string "__item_id__", with two underscores before and after. Prefer the tool\'s own itemIds argument when you simply want a known set of items - use this filter only when combining an item-id restriction with other filter rules. Supported operators: any_of, not_any_of. CompareValue is an array of item ids as strings.\nEXAMPLES:\n ✅ Correct: {"columnId": "__item_id__", "compareValue": ["3208003201"], "operator": "any_of"} // filtering by a single item id\n ✅ Correct: {"columnId": "__item_id__", "compareValue": ["3208003201", "3208003202"], "operator": "not_any_of"} // excluding several item ids\n ❌ Wrong: {"columnId": "item_id", "compareValue": ["3208003201"], "operator": "any_of"} // missing the underscores around item_id\n ❌ Wrong: {"columnId": "parent_item_id", "compareValue": ["3208003201"], "operator": "any_of"} // parent_item_id describes item hierarchy in the response\n ❌ Wrong: {"columnId": "pulse_id", "compareValue": ["3208003201"], "operator": "any_of"} // pulse_id is an internal name, not a filterable id',date:'Supported operators: any_of, not_any_of, between, greater_than, greater_than_or_equals, lower_than, lower_than_or_equal, within_the_last, within_the_next, is_empty, is_not_empty. 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\n - A two item array of plain "YYYY-MM-DD" dates [FROM, TO] with the between operator, e.g. ["2025-01-01", "2025-03-31"]\nFor a date range, use a single between rule.\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 ✅ Correct: {"columnId": "date", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // a date range, no compareAttribute\n ✅ Correct: {"columnId": "date", "compareValue": ["DAYS", 7], "operator": "within_the_last"} // due in the last 7 days\n ✅ Correct: {"columnId": "date", "compareValue": ["WEEKS", 2], "operator": "within_the_next"} // due in the next 2 weeks\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\n ❌ Wrong: {"columnId": "date", "compareValue": 7, "operator": "within_the_last"} // a bare number is not a valid window, use ["DAYS", 7]\n ❌ Wrong: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01"], "operator": "within_the_next"} // within_the_next takes a [UNIT, AMOUNT] window, never an exact date\n ❌ Wrong: {"columnId": "date", "compareValue": "one_week", "compareAttribute": "WEEKS", "operator": "within_the_last"} // the unit belongs inside compareValue, never in compareAttribute\n ❌ Wrong: {"columnId": "date", "compareValue": ["2025-01-01", "2025-03-31"], "compareAttribute": "EXACT", "operator": "between"} // a date column takes no compareAttribute, "EXACT" belongs inside compareValue\n ❌ Wrong: {"columnId": "date", "compareValue": ["2025-01-01", "2025-03-31"], "compareAttribute": "START_DATE", "operator": "between"} // START_DATE/END_DATE apply to timeline columns, never to date columns\n ❌ Wrong: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01", "2025-03-31"], "operator": "between"} // between takes exactly two plain dates, with no EXACT prefix',timeline:'A timeline column holds a start and an end date. Supported operators without compareAttribute: any_of, not_any_of, is_empty, is_not_empty. Supported operators with compareAttribute "START_DATE" or "END_DATE": between, greater_than, greater_than_or_equals, lower_than, lower_than_or_equal. With between, compareValue is a two item array of plain "YYYY-MM-DD" dates [FROM, TO].\nEXAMPLES:\n ✅ Correct: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "START_DATE"} // timelines starting in Q1\n ✅ Correct: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "END_DATE"} // timelines ending in Q1\n ✅ Correct: {"columnId": "timeline", "compareValue": "2025-06-01", "operator": "greater_than", "compareAttribute": "START_DATE"} // starts after a date\n ✅ Correct: {"columnId": "timeline", "compareValue": [], "operator": "is_empty"} // no timeline set\n ❌ Wrong: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // between on a timeline requires compareAttribute START_DATE or END_DATE\n ❌ Wrong: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "EXACT"} // EXACT is not a timeline compareAttribute, use START_DATE or END_DATE\n ❌ Wrong: {"columnId": "timeline", "compareValue": "2025-06-01", "operator": "contains_text"} // timeline columns hold dates, not text\n ❌ Wrong: {"columnId": "timeline", "compareValue": ["DAYS", 30], "operator": "within_the_next"} // within_the_next does not exist for timeline, use between with START_DATE\n ❌ Wrong: {"columnId": "timeline", "compareValue": "2025-06-01", "operator": "greater_than_or_equals"} // missing the required compareAttribute',location:'Supported operators: is_empty, is_not_empty. CompareValue is an empty array.\nEXAMPLES:\n ✅ Correct: {"columnId": "location", "compareValue": [], "operator": "is_not_empty"} // items that have a location\n ✅ Correct: {"columnId": "location", "compareValue": [], "operator": "is_empty"} // items missing a location\n ❌ Wrong: {"columnId": "location", "compareValue": "New York", "operator": "contains_text"} // location columns cannot be text filtered\n ❌ Wrong: {"columnId": "location", "compareValue": ["New York"], "operator": "any_of"} // any_of is not supported for location',board_relation:'A connect boards column. Supported operators: any_of, not_any_of, contains_text, not_contains_text, starts_with, is_empty, is_not_empty. With any_of and not_any_of, compareValue is an array of the linked item ids as numbers. With the text operators, compareValue is a single string matched against the linked items\' names.\nEXAMPLES:\n ✅ Correct: {"columnId": "board_relation", "compareValue": [3208003201], "operator": "any_of"} // linked to a specific item\n ✅ Correct: {"columnId": "board_relation", "compareValue": "Acme", "operator": "contains_text"} // linked item name contains text\n ✅ Correct: {"columnId": "board_relation", "compareValue": [], "operator": "is_empty"} // nothing linked\n ❌ Wrong: {"columnId": "board_relation", "compareValue": 3208003201, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "board_relation", "compareValue": "Acme", "operator": "ends_with"} // ends_with is not supported for this column',subtasks:'Supported operators: is_empty, is_not_empty. CompareValue is an empty array. To filter on subitem values, query the subitems board directly using its own boardId.\nEXAMPLES:\n ✅ Correct: {"columnId": "subitems", "compareValue": [], "operator": "is_not_empty"} // items that have subitems\n ✅ Correct: {"columnId": "subitems", "compareValue": [], "operator": "is_empty"} // items without subitems\n ❌ Wrong: {"columnId": "subitems", "compareValue": "Design", "operator": "contains_text"} // subitem content is not filterable from the parent board\n ❌ Wrong: {"columnId": "subitems", "compareValue": ["3208003201"], "operator": "any_of"} // any_of is not supported for subitems',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 A_(e){const t=w_[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 operators\n- CompareValue MUST BE SENT AS A TWO ITEM ARRAY OF [UNIT, AMOUNT] WHEN USED WITH within_the_last, within_the_next operators, where UNIT is one of "DAYS", "WORKDAYS", "WEEKS", "MONTHS" and AMOUNT is a number, e.g. ["DAYS", 7] for the last or next 7 days\n- CompareValue MUST BE SENT AS A TWO ITEM ARRAY OF plain "YYYY-MM-DD" dates [FROM, TO] WHEN USED WITH between\n\n## [IMPORTANT] Column type: ${e}\n${t}\n`:null}const S_={columnType:n.z.nativeEnum(hh).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:n.z.nativeEnum(hm).optional().default(hm.Schema).describe(`fetchMode "${hm.Schema}": JSON settings schema only (GraphQL). fetchMode "${hm.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const N_={random_string:n.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:n.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const D_={typeName:n.z.string().describe("The name of the GraphQL type to get details for")};const O_=rc`
1566
+ `,N_="https://developer.monday.com/api-reference",D_={group:'Filters items by the board group they belong to. The columnId is the literal string "group" - a group id such as "group_mm6wsvcc" is NEVER a valid columnId. For filtering by group id, use any_of or not_any_of. Use an array of group ids, as returned in an item\'s group.id or by get_board_info.\nEXAMPLES:\n ✅ Correct: {"columnId": "group", "compareValue": ["group_mm6wsvcc"], "operator": "any_of"} // group id goes in compareValue\n ✅ Correct: {"columnId": "group", "compareValue": ["group_mm6wsvcc", "group_mm4w1e0n"], "operator": "any_of"} // several groups\n ❌ Wrong: {"columnId": "group_mm6wsvcc", "compareValue": "group_mm6wsvcc"} // group id used as the columnId\n ❌ Wrong: {"columnId": "__group__", "compareValue": ["group_mm6wsvcc"], "operator": "any_of"} // the columnId is exactly "group", with no surrounding underscores\n ❌ Wrong: {"columnId": "group_id", "compareValue": ["group_mm6wsvcc"], "operator": "any_of"} // use the virtual column id "group" for board-group membership\n ❌ Wrong: {"columnId": "group", "compareValue": "Backlog", "operator": "any_of"} // group title instead of group id',last_updated:'The columnId is the literal string "__last_updated__", with two underscores before and after. Supported operators: any_of, not_any_of, within_the_last, between. With any_of and not_any_of, use compareAttribute "UPDATED_AT" and a compareValue array holding one of "TODAY", "YESTERDAY", "THIS_WEEK", "THIS_MONTH". With within_the_last, use compareAttribute "UPDATED_AT" and a [UNIT, AMOUNT] window. With between, use compareAttribute "UPDATED_AT" and a two item array of "YYYY-MM-DD" dates [FROM, TO].\nThis id is also the correct one to use in orderBy to sort items by when they were last updated.\nEXAMPLES:\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // updated today\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["DAYS", 7], "operator": "within_the_last", "compareAttribute": "UPDATED_AT"} // updated in the last 7 days\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["WEEKS", 1], "operator": "within_the_last", "compareAttribute": "UPDATED_AT"} // updated in the last week\n ✅ Correct: {"columnId": "__last_updated__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "UPDATED_AT"} // updated in Q1\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // missing the underscores around last_updated\n ❌ Wrong: {"columnId": "__last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // missing one trailing underscore\n ❌ Wrong: {"columnId": "updated_at", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // use __last_updated__ for the item\'s update time\n ❌ Wrong: {"columnId": "__last_updated__", "compareValue": ["LAST_MONTH"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // LAST_MONTH and LAST_WEEK match no items, use within_the_last with ["MONTHS", 1] or ["WEEKS", 1]\n ❌ Wrong: {"columnId": "__last_updated__", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator\n ❌ Wrong: {"columnId": "__last_updated__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // missing UPDATED_AT',creation_log:'The columnId is the literal string "__creation_log__", with two underscores before and after. Supported operators: any_of, not_any_of, within_the_last, between. With any_of and not_any_of, use compareAttribute "CREATED_AT" and a compareValue array holding one of "TODAY", "YESTERDAY", "THIS_WEEK", "THIS_MONTH". With within_the_last, use compareAttribute "CREATED_AT" and a [UNIT, AMOUNT] window. With between, use compareAttribute "CREATED_AT" and a two item array of "YYYY-MM-DD" dates [FROM, TO].\nThis id is also the correct one to use in orderBy to sort items by creation time.\nEXAMPLES:\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // items created today\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "CREATED_AT"} // items not created this week\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["DAYS", 30], "operator": "within_the_last", "compareAttribute": "CREATED_AT"} // created in the last 30 days\n ✅ Correct: {"columnId": "__creation_log__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "CREATED_AT"} // created in Q1\n ❌ Wrong: {"columnId": "creation_log", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // missing the underscores around creation_log\n ❌ Wrong: {"columnId": "created_at", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // use __creation_log__ for the item\'s creation time\n ❌ Wrong: {"columnId": "__creation_log__", "compareValue": ["LAST_MONTH"], "operator": "any_of", "compareAttribute": "CREATED_AT"} // LAST_MONTH and LAST_WEEK match no items, use within_the_last with ["MONTHS", 1] or ["WEEKS", 1]\n ❌ Wrong: {"columnId": "__creation_log__", "compareValue": ["PAST_DATETIME", "14"], "operator": "within_the_last"} // PAST_DATETIME is not a unit, use ["DAYS", 14]\n ❌ Wrong: {"columnId": "__creation_log__", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // missing CREATED_AT',item_id:'The columnId is the literal string "__item_id__", with two underscores before and after. Prefer the tool\'s own itemIds argument when you simply want a known set of items - use this filter only when combining an item-id restriction with other filter rules. Supported operators: any_of, not_any_of. CompareValue is an array of item ids as strings.\nEXAMPLES:\n ✅ Correct: {"columnId": "__item_id__", "compareValue": ["3208003201"], "operator": "any_of"} // filtering by a single item id\n ✅ Correct: {"columnId": "__item_id__", "compareValue": ["3208003201", "3208003202"], "operator": "not_any_of"} // excluding several item ids\n ❌ Wrong: {"columnId": "item_id", "compareValue": ["3208003201"], "operator": "any_of"} // missing the underscores around item_id\n ❌ Wrong: {"columnId": "parent_item_id", "compareValue": ["3208003201"], "operator": "any_of"} // parent_item_id describes item hierarchy in the response\n ❌ Wrong: {"columnId": "pulse_id", "compareValue": ["3208003201"], "operator": "any_of"} // pulse_id is an internal name, not a filterable id',date:'Supported operators: any_of, not_any_of, between, greater_than, greater_than_or_equals, lower_than, lower_than_or_equal, within_the_last, within_the_next, is_empty, is_not_empty. 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\n - A two item array of plain "YYYY-MM-DD" dates [FROM, TO] with the between operator, e.g. ["2025-01-01", "2025-03-31"]\nFor a date range, use a single between rule.\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 ✅ Correct: {"columnId": "date", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // a date range, no compareAttribute\n ✅ Correct: {"columnId": "date", "compareValue": ["DAYS", 7], "operator": "within_the_last"} // due in the last 7 days\n ✅ Correct: {"columnId": "date", "compareValue": ["WEEKS", 2], "operator": "within_the_next"} // due in the next 2 weeks\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\n ❌ Wrong: {"columnId": "date", "compareValue": 7, "operator": "within_the_last"} // a bare number is not a valid window, use ["DAYS", 7]\n ❌ Wrong: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01"], "operator": "within_the_next"} // within_the_next takes a [UNIT, AMOUNT] window, never an exact date\n ❌ Wrong: {"columnId": "date", "compareValue": "one_week", "compareAttribute": "WEEKS", "operator": "within_the_last"} // the unit belongs inside compareValue, never in compareAttribute\n ❌ Wrong: {"columnId": "date", "compareValue": ["2025-01-01", "2025-03-31"], "compareAttribute": "EXACT", "operator": "between"} // a date column takes no compareAttribute, "EXACT" belongs inside compareValue\n ❌ Wrong: {"columnId": "date", "compareValue": ["2025-01-01", "2025-03-31"], "compareAttribute": "START_DATE", "operator": "between"} // START_DATE/END_DATE apply to timeline columns, never to date columns\n ❌ Wrong: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01", "2025-03-31"], "operator": "between"} // between takes exactly two plain dates, with no EXACT prefix',timeline:'A timeline column holds a start and an end date. Supported operators without compareAttribute: any_of, not_any_of, is_empty, is_not_empty. Supported operators with compareAttribute "START_DATE" or "END_DATE": between, greater_than, greater_than_or_equals, lower_than, lower_than_or_equal. With between, compareValue is a two item array of plain "YYYY-MM-DD" dates [FROM, TO].\nEXAMPLES:\n ✅ Correct: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "START_DATE"} // timelines starting in Q1\n ✅ Correct: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "END_DATE"} // timelines ending in Q1\n ✅ Correct: {"columnId": "timeline", "compareValue": "2025-06-01", "operator": "greater_than", "compareAttribute": "START_DATE"} // starts after a date\n ✅ Correct: {"columnId": "timeline", "compareValue": [], "operator": "is_empty"} // no timeline set\n ❌ Wrong: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between"} // between on a timeline requires compareAttribute START_DATE or END_DATE\n ❌ Wrong: {"columnId": "timeline", "compareValue": ["2025-01-01", "2025-03-31"], "operator": "between", "compareAttribute": "EXACT"} // EXACT is not a timeline compareAttribute, use START_DATE or END_DATE\n ❌ Wrong: {"columnId": "timeline", "compareValue": "2025-06-01", "operator": "contains_text"} // timeline columns hold dates, not text\n ❌ Wrong: {"columnId": "timeline", "compareValue": ["DAYS", 30], "operator": "within_the_next"} // within_the_next does not exist for timeline, use between with START_DATE\n ❌ Wrong: {"columnId": "timeline", "compareValue": "2025-06-01", "operator": "greater_than_or_equals"} // missing the required compareAttribute',location:'Supported operators: is_empty, is_not_empty. CompareValue is an empty array.\nEXAMPLES:\n ✅ Correct: {"columnId": "location", "compareValue": [], "operator": "is_not_empty"} // items that have a location\n ✅ Correct: {"columnId": "location", "compareValue": [], "operator": "is_empty"} // items missing a location\n ❌ Wrong: {"columnId": "location", "compareValue": "New York", "operator": "contains_text"} // location columns cannot be text filtered\n ❌ Wrong: {"columnId": "location", "compareValue": ["New York"], "operator": "any_of"} // any_of is not supported for location',board_relation:'A connect boards column. Supported operators: any_of, not_any_of, contains_text, not_contains_text, starts_with, is_empty, is_not_empty. With any_of and not_any_of, compareValue is an array of the linked item ids as numbers. With the text operators, compareValue is a single string matched against the linked items\' names.\nEXAMPLES:\n ✅ Correct: {"columnId": "board_relation", "compareValue": [3208003201], "operator": "any_of"} // linked to a specific item\n ✅ Correct: {"columnId": "board_relation", "compareValue": "Acme", "operator": "contains_text"} // linked item name contains text\n ✅ Correct: {"columnId": "board_relation", "compareValue": [], "operator": "is_empty"} // nothing linked\n ❌ Wrong: {"columnId": "board_relation", "compareValue": 3208003201, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "board_relation", "compareValue": "Acme", "operator": "ends_with"} // ends_with is not supported for this column',subtasks:'Supported operators: is_empty, is_not_empty. CompareValue is an empty array. To filter on subitem values, query the subitems board directly using its own boardId.\nEXAMPLES:\n ✅ Correct: {"columnId": "subitems", "compareValue": [], "operator": "is_not_empty"} // items that have subitems\n ✅ Correct: {"columnId": "subitems", "compareValue": [], "operator": "is_empty"} // items without subitems\n ❌ Wrong: {"columnId": "subitems", "compareValue": "Design", "operator": "contains_text"} // subitem content is not filterable from the parent board\n ❌ Wrong: {"columnId": "subitems", "compareValue": ["3208003201"], "operator": "any_of"} // any_of is not supported for subitems',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 O_(e){const t=D_[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 operators\n- CompareValue MUST BE SENT AS A TWO ITEM ARRAY OF [UNIT, AMOUNT] WHEN USED WITH within_the_last, within_the_next operators, where UNIT is one of "DAYS", "WORKDAYS", "WEEKS", "MONTHS" and AMOUNT is a number, e.g. ["DAYS", 7] for the last or next 7 days\n- CompareValue MUST BE SENT AS A TWO ITEM ARRAY OF plain "YYYY-MM-DD" dates [FROM, TO] WHEN USED WITH between\n\n## [IMPORTANT] Column type: ${e}\n${t}\n`:null}const R_={columnType:n.z.nativeEnum(hh).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:n.z.nativeEnum(hm).optional().default(hm.Schema).describe(`fetchMode "${hm.Schema}": JSON settings schema only (GraphQL). fetchMode "${hm.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const C_={random_string:n.z.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:n.z.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const k_={typeName:n.z.string().describe("The name of the GraphQL type to get details for")};const L_=rc`
1531
1567
  fragment UserDetails on User {
1532
1568
  # Basic User Information
1533
1569
  id
@@ -1558,31 +1594,31 @@
1558
1594
  time_zone_identifier
1559
1595
  utc_hours_diff
1560
1596
  }
1561
- `,R_=rc`
1597
+ `,U_=rc`
1562
1598
  fragment UserTeamMembership on Team {
1563
1599
  id
1564
1600
  name
1565
1601
  is_guest
1566
1602
  picture_url
1567
1603
  }
1568
- `,C_=rc`
1604
+ `,P_=rc`
1569
1605
  fragment TeamBasicInfo on Team {
1570
1606
  id
1571
1607
  name
1572
1608
  }
1573
- `,k_=rc`
1609
+ `,$_=rc`
1574
1610
  fragment TeamExtendedInfo on Team {
1575
1611
  ...TeamBasicInfo
1576
1612
  is_guest
1577
1613
  picture_url
1578
1614
  }
1579
- `,L_=rc`
1615
+ `,x_=rc`
1580
1616
  fragment TeamOwner on User {
1581
1617
  id
1582
1618
  name
1583
1619
  email
1584
1620
  }
1585
- `,U_=rc`
1621
+ `,M_=rc`
1586
1622
  fragment TeamMember on User {
1587
1623
  id
1588
1624
  name
@@ -1602,7 +1638,7 @@
1602
1638
  time_zone_identifier
1603
1639
  utc_hours_diff
1604
1640
  }
1605
- `,P_=rc`
1641
+ `,V_=rc`
1606
1642
  fragment TeamMemberSimplified on User {
1607
1643
  id
1608
1644
  name
@@ -1610,15 +1646,15 @@
1610
1646
  title
1611
1647
  kind
1612
1648
  }
1613
- `,$_=rc`
1649
+ `,F_=rc`
1614
1650
  fragment UserTeamMembershipSimplified on Team {
1615
1651
  id
1616
1652
  name
1617
1653
  is_guest
1618
1654
  }
1619
- `,x_=rc`
1620
- ${O_}
1621
- ${R_}
1655
+ `,B_=rc`
1656
+ ${L_}
1657
+ ${U_}
1622
1658
 
1623
1659
  query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
1624
1660
  users(ids: $userIds, limit: $limit) {
@@ -1630,21 +1666,21 @@
1630
1666
  }
1631
1667
  }
1632
1668
  }
1633
- `,M_=rc`
1634
- ${O_}
1669
+ `,z_=rc`
1670
+ ${L_}
1635
1671
 
1636
1672
  query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
1637
1673
  users(ids: $userIds, limit: $limit) {
1638
1674
  ...UserDetails
1639
1675
  }
1640
1676
  }
1641
- `,V_=rc`
1642
- ${O_}
1643
- ${$_}
1644
- ${k_}
1645
- ${C_}
1677
+ `,q_=rc`
1646
1678
  ${L_}
1679
+ ${F_}
1680
+ ${$_}
1647
1681
  ${P_}
1682
+ ${x_}
1683
+ ${V_}
1648
1684
 
1649
1685
  query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
1650
1686
  users(ids: $userIds, limit: $limit) {
@@ -1670,19 +1706,19 @@
1670
1706
  }
1671
1707
  }
1672
1708
  }
1673
- `,F_=rc`
1674
- ${C_}
1709
+ `,j_=rc`
1710
+ ${P_}
1675
1711
 
1676
1712
  query listTeamsOnly($teamIds: [ID!]) {
1677
1713
  teams(ids: $teamIds) {
1678
1714
  ...TeamBasicInfo
1679
1715
  }
1680
1716
  }
1681
- `,B_=rc`
1682
- ${k_}
1683
- ${C_}
1684
- ${L_}
1685
- ${U_}
1717
+ `,G_=rc`
1718
+ ${$_}
1719
+ ${P_}
1720
+ ${x_}
1721
+ ${M_}
1686
1722
 
1687
1723
  query listTeamsWithMembers($teamIds: [ID!]) {
1688
1724
  teams(ids: $teamIds) {
@@ -1699,9 +1735,9 @@
1699
1735
  }
1700
1736
  }
1701
1737
  }
1702
- `,z_=rc`
1703
- ${O_}
1704
- ${R_}
1738
+ `,H_=rc`
1739
+ ${L_}
1740
+ ${U_}
1705
1741
 
1706
1742
  query getUserByName($name: String) {
1707
1743
  users(name: $name) {
@@ -1713,7 +1749,7 @@
1713
1749
  }
1714
1750
  }
1715
1751
  }
1716
- `,q_=rc`
1752
+ `,W_=rc`
1717
1753
  query getCurrentUser {
1718
1754
  me {
1719
1755
  id
@@ -1726,7 +1762,7 @@
1726
1762
  }
1727
1763
  }
1728
1764
  }
1729
- `;const j_=[["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 G_(e,t=""){const a=j_.filter((([t])=>{const a=e[t];return null!=a})).map((([a,n])=>`${t}${n}: ${e[a]}`)),n=e.photo_url?.thumb;return n&&a.push(`${t}Photo Thumb: ${n}`),a}const H_=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(...G_(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"}`,...G_(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},W_=500,Y_=500,K_=1e3,Q_=rc`
1765
+ `;const Y_=[["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 K_(e,t=""){const a=Y_.filter((([t])=>{const a=e[t];return null!=a})).map((([a,n])=>`${t}${n}: ${e[a]}`)),n=e.photo_url?.thumb;return n&&a.push(`${t}Photo Thumb: ${n}`),a}const Q_=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(...K_(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"}`,...K_(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},J_=500,X_=500,Z_=1e3,ef=rc`
1730
1766
  query getAccountSlug {
1731
1767
  me {
1732
1768
  account {
@@ -1734,11 +1770,11 @@
1734
1770
  }
1735
1771
  }
1736
1772
  }
1737
- `;async function J_(e){const t=await e.request(Q_);return t.me?.account?.slug??null}function X_(e,t){return`https://${e}.monday.com/workspaces/${t}`}const Z_={userIds:n.z.array(n.z.string()).max(W_).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:n.z.array(n.z.string()).max(Y_).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:n.z.string().optional().describe("Name-based USER search ONLY. STANDALONE parameter - cannot be combined with others. PREFERRED method for finding users when you know names. Performs fuzzy matching.\n CRITICAL: This parameter searches for USERS ONLY, NOT teams. To search for teams, use teamIds parameter instead."),getMe:n.z.boolean().optional().describe('[TOP PRIORITY] Use ALWAYS when requesting current user information. Examples of when it should be used: ["get my user" or "get my teams"].\n This parameter CONFLICTS with all others. '),includeTeams:n.z.boolean().optional().describe("[AVOID] This fetches all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get their team memberships."),teamsOnly:n.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:n.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const ef={itemId:n.z.number().describe("The id of the item to move"),groupId:n.z.string().describe("The id of the group to which the item will be moved. Must be a group on the item's board, read from get_board_info in this run — never guessed from the group title.")};const tf=rc`
1773
+ `;async function tf(e){const t=await e.request(ef);return t.me?.account?.slug??null}function af(e,t){return`https://${e}.monday.com/workspaces/${t}`}const nf={userIds:n.z.array(n.z.string()).max(J_).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:n.z.array(n.z.string()).max(X_).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:n.z.string().optional().describe("Name-based USER search ONLY. STANDALONE parameter - cannot be combined with others. PREFERRED method for finding users when you know names. Performs fuzzy matching.\n CRITICAL: This parameter searches for USERS ONLY, NOT teams. To search for teams, use teamIds parameter instead."),getMe:n.z.boolean().optional().describe('[TOP PRIORITY] Use ALWAYS when requesting current user information. Examples of when it should be used: ["get my user" or "get my teams"].\n This parameter CONFLICTS with all others. '),includeTeams:n.z.boolean().optional().describe("[AVOID] This fetches all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get their team memberships."),teamsOnly:n.z.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:n.z.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const of={itemId:n.z.number().describe("The id of the item to move"),groupId:n.z.string().describe("The id of the group to which the item will be moved. Must be a group on the item's board, read from get_board_info in this run — never guessed from the group title.")};const rf=rc`
1738
1774
  mutation updateDocName($docId: ID!, $name: String!) {
1739
1775
  update_doc_name(docId: $docId, name: $name)
1740
1776
  }
1741
- `,af=rc`
1777
+ `,sf=rc`
1742
1778
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1743
1779
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1744
1780
  success
@@ -1746,13 +1782,13 @@
1746
1782
  error
1747
1783
  }
1748
1784
  }
1749
- `,nf=rc`
1785
+ `,df=rc`
1750
1786
  query getDocIdByObjectId($objectId: ID!) {
1751
1787
  docs(object_ids: [$objectId], limit: 1) {
1752
1788
  id
1753
1789
  }
1754
1790
  }
1755
- `,of=rc`
1791
+ `,pf=rc`
1756
1792
  mutation updateDocBlock($blockId: String!, $content: JSON!) {
1757
1793
  update_doc_block(block_id: $blockId, content: $content) {
1758
1794
  id
@@ -1760,26 +1796,26 @@
1760
1796
  created_at
1761
1797
  }
1762
1798
  }
1763
- `,rf=rc`
1799
+ `,lf=rc`
1764
1800
  mutation deleteDocBlock($blockId: String!) {
1765
1801
  delete_doc_block(block_id: $blockId) {
1766
1802
  id
1767
1803
  }
1768
1804
  }
1769
- `,sf=rc`
1805
+ `,cf=rc`
1770
1806
  mutation deleteDocBlocks($blockIds: [ID!]!) {
1771
1807
  delete_doc_blocks(block_ids: $blockIds) {
1772
1808
  id
1773
1809
  }
1774
1810
  }
1775
- `,df=rc`
1811
+ `,mf=rc`
1776
1812
  query getDocObjectIdByDocId($docId: ID!) {
1777
1813
  docs(ids: [$docId], limit: 1) {
1778
1814
  id
1779
1815
  object_id
1780
1816
  }
1781
1817
  }
1782
- `,pf=rc`
1818
+ `,uf=rc`
1783
1819
  query getDocBoardItem($boardId: ID!) {
1784
1820
  boards(ids: [$boardId]) {
1785
1821
  items_page(limit: 1) {
@@ -1789,7 +1825,7 @@
1789
1825
  }
1790
1826
  }
1791
1827
  }
1792
- `,lf=rc`
1828
+ `,hf=rc`
1793
1829
  query getDocBlockContent($docId: ID!) {
1794
1830
  docs(ids: [$docId], limit: 1) {
1795
1831
  blocks {
@@ -1799,7 +1835,7 @@
1799
1835
  }
1800
1836
  }
1801
1837
  }
1802
- `,cf=rc`
1838
+ `,_f=rc`
1803
1839
  mutation createDocComment($itemId: ID!, $body: String!, $parentId: ID, $mentionsList: [UpdateMention]) {
1804
1840
  create_update(body: $body, item_id: $itemId, parent_id: $parentId, mentions_list: $mentionsList) {
1805
1841
  id
@@ -1807,7 +1843,7 @@
1807
1843
  created_at
1808
1844
  }
1809
1845
  }
1810
- `,mf=rc`
1846
+ `,ff=rc`
1811
1847
  mutation createDocBlocks($docId: ID!, $afterBlockId: String, $blocksInput: [CreateBlockInput!]!) {
1812
1848
  create_doc_blocks(docId: $docId, afterBlockId: $afterBlockId, blocksInput: $blocksInput) {
1813
1849
  id
@@ -1875,7 +1911,7 @@
1875
1911
  }
1876
1912
  }
1877
1913
  }
1878
- `,uf="content",hf="version_history",_f=n.z.enum(["ids","object_ids","workspace_ids"]),ff={mode:n.z.enum([uf,hf]).optional().default(uf).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:_f.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content". Default to "object_ids" — the number in a doc URL is an object_id. Use "ids" only for the internal doc id field returned by read_docs, and "workspace_ids" only to list all docs in a workspace.'),ids:n.z.array(n.z.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:n.z.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:n.z.nativeEnum(fr).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:n.z.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:n.z.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),blocks_limit:n.z.number().optional().describe("Maximum number of blocks to return per document (default: 25). Only used in content mode when include_blocks is true."),blocks_page:n.z.number().optional().describe("Page number for block pagination, starting at 1. Omit to use the API default. Use with blocks_limit to page through documents with more than 25 blocks. Only used in content mode when include_blocks is true."),include_comments:n.z.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:n.z.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:n.z.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:n.z.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:n.z.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:n.z.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const gf={workspace_id:n.z.number().describe("The ID of the workspace to get information for")};const bf=rc`
1914
+ `,gf="content",bf="version_history",yf=n.z.enum(["ids","object_ids","workspace_ids"]),vf={mode:n.z.enum([gf,bf]).optional().default(gf).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:yf.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content". Default to "object_ids" — the number in a doc URL is an object_id. Use "ids" only for the internal doc id field returned by read_docs, and "workspace_ids" only to list all docs in a workspace.'),ids:n.z.array(n.z.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:n.z.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:n.z.nativeEnum(fr).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:n.z.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:n.z.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),blocks_limit:n.z.number().optional().describe("Maximum number of blocks to return per document (default: 25). Only used in content mode when include_blocks is true."),blocks_page:n.z.number().optional().describe("Page number for block pagination, starting at 1. Omit to use the API default. Use with blocks_limit to page through documents with more than 25 blocks. Only used in content mode when include_blocks is true."),include_comments:n.z.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:n.z.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:n.z.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:n.z.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:n.z.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:n.z.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const If={workspace_id:n.z.number().describe("The ID of the workspace to get information for")};const Ef=rc`
1879
1915
  query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
1880
1916
  workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
1881
1917
  id
@@ -1883,7 +1919,7 @@
1883
1919
  description
1884
1920
  }
1885
1921
  }
1886
- `;function yf(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function vf(e){return Array.isArray(e)&&e.length>0}const If={limit:n.z.number().min(1).max(100).default(100).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:n.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const Ef=rc`
1922
+ `;function Tf(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function wf(e){return Array.isArray(e)&&e.length>0}const Af={limit:n.z.number().min(1).max(100).default(100).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:n.z.number().min(1).default(1).describe("Page number to return. Default is 1.")};const Sf=rc`
1887
1923
  query getItemBoard($itemId: ID!) {
1888
1924
  items(ids: [$itemId], limit: 1) {
1889
1925
  id
@@ -1896,7 +1932,7 @@
1896
1932
  }
1897
1933
  }
1898
1934
  }
1899
- `,Tf=rc`
1935
+ `,Nf=rc`
1900
1936
  mutation createDoc($location: CreateDocInput!, $docOwnerIds: [ID!]) {
1901
1937
  create_doc(location: $location, doc_owner_ids: $docOwnerIds) {
1902
1938
  id
@@ -1905,7 +1941,7 @@
1905
1941
  name
1906
1942
  }
1907
1943
  }
1908
- `,wf=rc`
1944
+ `,Df=rc`
1909
1945
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1910
1946
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1911
1947
  success
@@ -1913,11 +1949,11 @@
1913
1949
  error
1914
1950
  }
1915
1951
  }
1916
- `,Af=rc`
1952
+ `,Of=rc`
1917
1953
  mutation updateDocName($docId: ID!, $name: String!) {
1918
1954
  update_doc_name(docId: $docId, name: $name)
1919
1955
  }
1920
- `,Sf=n.z.enum(["workspace","item"]),Nf=n.z.discriminatedUnion("type",[n.z.object({type:n.z.literal(Sf.enum.workspace).describe("Create document in workspace"),workspace_id:n.z.number().describe("Workspace ID under which to create the new document"),doc_kind:n.z.nativeEnum(mo).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:n.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),n.z.object({type:n.z.literal(Sf.enum.item).describe("Create document attached to item"),item_id:n.z.number().describe("Item ID to attach the new document to"),column_id:n.z.string().optional().describe("ID of an existing 'doc' column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.")})]),Df={doc_name:n.z.string().describe("Name for the new document."),markdown:n.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:n.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),docOwnerIds:n.z.array(n.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:n.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:n.z.nativeEnum(mo).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:n.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:n.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:n.z.string().optional().describe('[OPTIONAL - use only when location="item"] ID of an existing "doc" column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.')};const Of=rc`
1956
+ `,Rf=n.z.enum(["workspace","item"]),Cf=n.z.discriminatedUnion("type",[n.z.object({type:n.z.literal(Rf.enum.workspace).describe("Create document in workspace"),workspace_id:n.z.number().describe("Workspace ID under which to create the new document"),doc_kind:n.z.nativeEnum(mo).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:n.z.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),n.z.object({type:n.z.literal(Rf.enum.item).describe("Create document attached to item"),item_id:n.z.number().describe("Item ID to attach the new document to"),column_id:n.z.string().optional().describe("ID of an existing 'doc' column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.")})]),kf={doc_name:n.z.string().describe("Name for the new document."),markdown:n.z.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:n.z.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),docOwnerIds:n.z.array(n.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:n.z.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:n.z.nativeEnum(mo).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:n.z.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:n.z.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:n.z.string().optional().describe('[OPTIONAL - use only when location="item"] ID of an existing "doc" column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.')};const Lf=rc`
1921
1957
  mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
1922
1958
  add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
1923
1959
  success
@@ -1925,7 +1961,7 @@
1925
1961
  error
1926
1962
  }
1927
1963
  }
1928
- `,Rf=rc`
1964
+ `,Uf=rc`
1929
1965
  query getDocByObjectId($objectId: ID!) {
1930
1966
  docs(object_ids: [$objectId], limit: 1) {
1931
1967
  id
@@ -1933,7 +1969,7 @@
1933
1969
  url
1934
1970
  }
1935
1971
  }
1936
- `,Cf=rc`
1972
+ `,Pf=rc`
1937
1973
  query getDocById($docId: ID!) {
1938
1974
  docs(ids: [$docId], limit: 1) {
1939
1975
  id
@@ -1941,7 +1977,7 @@
1941
1977
  url
1942
1978
  }
1943
1979
  }
1944
- `,kf={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:n.z.string().describe("Markdown content to add to the document."),after_block_id:n.z.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};function Lf(e){if(e)return e}function Uf(e){if(e)return e}function Pf(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 $f(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:Pf(e.attributes)}}))}function xf(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:l.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Pf(e.attributes)}}))}function Mf(e,t){const a=e.attributes||{},n=a.comments||[];return{...e,attributes:{...a,comments:[...n,t]}}}function Vf(e,t,a,n){const i=a+n;let o=0;const r=[];for(const n of e){const e=n.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,i);p>=l?r.push(n):"string"!=typeof e?r.push(Mf(n,t)):(p>s&&r.push({...n,insert:e.slice(0,p-s)}),r.push(Mf({...n,insert:e.slice(p-s,l-s)},t)),l<d&&r.push({...n,insert:e.slice(l-s)})),o=d}return r}const Ff=n.z.object({bold:n.z.boolean().optional(),italic:n.z.boolean().optional(),underline:n.z.boolean().optional(),strike:n.z.boolean().optional(),code:n.z.boolean().optional(),link:n.z.string().optional(),color:n.z.string().optional(),background:n.z.string().optional()}).optional(),Bf=n.z.object({mention:n.z.object({id:n.z.union([n.z.string(),n.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:n.z.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),zf=n.z.object({column_value:n.z.object({item_id:n.z.union([n.z.string(),n.z.number()]).describe("The board item ID."),column_id:n.z.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),qf=n.z.object({insert:n.z.union([n.z.string().transform((e=>({text:e}))),n.z.object({text:n.z.string()}),Bf,zf]).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:Ff.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),jf=n.z.object({block_content_type:n.z.literal("text"),delta_format:n.z.array(qf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),Gf=n.z.object({block_content_type:n.z.literal("code"),delta_format:n.z.array(qf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Hf=n.z.object({block_content_type:n.z.literal("list_item"),delta_format:n.z.array(qf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:n.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),Wf=n.z.discriminatedUnion("block_content_type",[jf,Gf,Hf]),Yf=n.z.object({block_type:n.z.literal("text"),text_block_type:n.z.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:n.z.array(qf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),Kf=n.z.object({block_type:n.z.literal("list_item"),list_block_type:n.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:n.z.array(qf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),Qf=n.z.object({block_type:n.z.literal("code"),delta_format:n.z.array(qf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Jf=n.z.object({block_type:n.z.literal("divider")}),Xf=n.z.object({block_type:n.z.literal("page_break")}),Zf=n.z.object({block_type:n.z.literal("image"),public_url:n.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:n.z.union([n.z.number().int(),n.z.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),eg=n.z.object({block_type:n.z.literal("video"),raw_url:n.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),tg=n.z.object({block_type:n.z.literal("notice_box"),theme:n.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),ag=n.z.object({block_type:n.z.literal("table"),row_count:n.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:n.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:n.z.number().int().optional().describe("Table width in pixels."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),ng=n.z.object({block_type:n.z.literal("layout"),column_count:n.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),ig=n.z.discriminatedUnion("block_type",[Yf,Kf,Qf,Jf,Xf,Zf,eg,tg,ag,ng]),og=n.z.object({operation_type:n.z.literal("set_name"),name:n.z.string().min(1).describe("New document name.")}),rg=n.z.object({operation_type:n.z.literal("add_markdown_content"),markdown:n.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),sg=n.z.object({operation_type:n.z.literal("update_block"),block_id:n.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:Wf.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.")}),dg=n.z.object({operation_type:n.z.literal("create_block"),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:n.z.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:ig.describe("The block to create. Use block_type to select the block type.")}),pg=n.z.object({operation_type:n.z.literal("delete_blocks"),block_ids:n.z.array(n.z.string()).min(1).max(100).describe("Block IDs to permanently delete (1–100 per call). Put ALL IDs for the delete into this single array — do NOT emit multiple delete_blocks operations back-to-back. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),lg=n.z.object({operation_type:n.z.literal("replace_block"),block_id:n.z.string().describe("ID of the block to delete."),after_block_id:n.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:n.z.string().optional().describe("Parent block ID for the replacement block."),block:ig.describe("The new block to create in place of the deleted one.")}),cg=n.z.object({operation_type:n.z.literal("add_comment"),body:n.z.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:n.z.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:n.z.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:n.z.union([n.z.string(),n.z.array(n.z.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:n.z.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:n.z.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),mg=n.z.discriminatedUnion("operation_type",[og,rg,sg,dg,pg,lg,cg]),ug={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:n.z.array(mg).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_blocks: Permanently delete 1–100 blocks in one call. Provide all block IDs in the block_ids array. Works for all block types including BOARD, WIDGET, DOC embed, and 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_blocks 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\nBATCHING: delete_blocks accepts 1..100 IDs. Put ALL IDs in one operation\'s block_ids array. Never emit multiple delete_blocks operations in a row.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const hg=rc`
1980
+ `,$f={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:n.z.string().describe("Markdown content to add to the document."),after_block_id:n.z.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};function xf(e){if(e)return e}function Mf(e){if(e)return e}function Vf(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 Ff(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:Vf(e.attributes)}}))}function Bf(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:l.randomUUID(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:Vf(e.attributes)}}))}function zf(e,t){const a=e.attributes||{},n=a.comments||[];return{...e,attributes:{...a,comments:[...n,t]}}}function qf(e,t,a,n){const i=a+n;let o=0;const r=[];for(const n of e){const e=n.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,i);p>=l?r.push(n):"string"!=typeof e?r.push(zf(n,t)):(p>s&&r.push({...n,insert:e.slice(0,p-s)}),r.push(zf({...n,insert:e.slice(p-s,l-s)},t)),l<d&&r.push({...n,insert:e.slice(l-s)})),o=d}return r}const jf=n.z.object({bold:n.z.boolean().optional(),italic:n.z.boolean().optional(),underline:n.z.boolean().optional(),strike:n.z.boolean().optional(),code:n.z.boolean().optional(),link:n.z.string().optional(),color:n.z.string().optional(),background:n.z.string().optional()}).optional(),Gf=n.z.object({mention:n.z.object({id:n.z.union([n.z.string(),n.z.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:n.z.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),Hf=n.z.object({column_value:n.z.object({item_id:n.z.union([n.z.string(),n.z.number()]).describe("The board item ID."),column_id:n.z.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),Wf=n.z.object({insert:n.z.union([n.z.string().transform((e=>({text:e}))),n.z.object({text:n.z.string()}),Gf,Hf]).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:jf.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),Yf=n.z.object({block_content_type:n.z.literal("text"),delta_format:n.z.array(Wf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),Kf=n.z.object({block_content_type:n.z.literal("code"),delta_format:n.z.array(Wf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Qf=n.z.object({block_content_type:n.z.literal("list_item"),delta_format:n.z.array(Wf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:n.z.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),Jf=n.z.discriminatedUnion("block_content_type",[Yf,Kf,Qf]),Xf=n.z.object({block_type:n.z.literal("text"),text_block_type:n.z.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:n.z.array(Wf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:n.z.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:n.z.enum(["LTR","RTL"]).optional()}),Zf=n.z.object({block_type:n.z.literal("list_item"),list_block_type:n.z.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:n.z.array(Wf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:n.z.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),eg=n.z.object({block_type:n.z.literal("code"),delta_format:n.z.array(Wf).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:n.z.string().optional().describe('Programming language (e.g. "javascript", "python").')}),tg=n.z.object({block_type:n.z.literal("divider")}),ag=n.z.object({block_type:n.z.literal("page_break")}),ng=n.z.object({block_type:n.z.literal("image"),public_url:n.z.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:n.z.union([n.z.number().int(),n.z.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),ig=n.z.object({block_type:n.z.literal("video"),raw_url:n.z.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:n.z.number().int().min(1).optional().describe("Width in pixels.")}),og=n.z.object({block_type:n.z.literal("notice_box"),theme:n.z.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),rg=n.z.object({block_type:n.z.literal("table"),row_count:n.z.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:n.z.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:n.z.number().int().optional().describe("Table width in pixels."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),sg=n.z.object({block_type:n.z.literal("layout"),column_count:n.z.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:n.z.array(n.z.object({width:n.z.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),dg=n.z.discriminatedUnion("block_type",[Xf,Zf,eg,tg,ag,ng,ig,og,rg,sg]),pg=n.z.object({operation_type:n.z.literal("set_name"),name:n.z.string().min(1).describe("New document name.")}),lg=n.z.object({operation_type:n.z.literal("add_markdown_content"),markdown:n.z.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),cg=n.z.object({operation_type:n.z.literal("update_block"),block_id:n.z.string().describe("ID of the block to update. Get block IDs from read_docs."),content:Jf.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.")}),mg=n.z.object({operation_type:n.z.literal("create_block"),after_block_id:n.z.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:n.z.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:dg.describe("The block to create. Use block_type to select the block type.")}),ug=n.z.object({operation_type:n.z.literal("delete_blocks"),block_ids:n.z.array(n.z.string()).min(1).max(100).describe("Block IDs to permanently delete (1–100 per call). Put ALL IDs for the delete into this single array — do NOT emit multiple delete_blocks operations back-to-back. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),hg=n.z.object({operation_type:n.z.literal("replace_block"),block_id:n.z.string().describe("ID of the block to delete."),after_block_id:n.z.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:n.z.string().optional().describe("Parent block ID for the replacement block."),block:dg.describe("The new block to create in place of the deleted one.")}),_g=n.z.object({operation_type:n.z.literal("add_comment"),body:n.z.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:n.z.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:n.z.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project. To mention an AI agent, use type User with the agent\'s user id from list_users_and_teams. Type Agent adds no mention.'),block_id:n.z.union([n.z.string(),n.z.array(n.z.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:n.z.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:n.z.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),fg=n.z.discriminatedUnion("operation_type",[pg,lg,cg,mg,ug,hg,_g]),gg={doc_id:n.z.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:n.z.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:n.z.array(fg).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_blocks: Permanently delete 1–100 blocks in one call. Provide all block IDs in the block_ids array. Works for all block types including BOARD, WIDGET, DOC embed, and 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_blocks 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\nBATCHING: delete_blocks accepts 1..100 IDs. Put ALL IDs in one operation\'s block_ids array. Never emit multiple delete_blocks operations in a row.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const bg=rc`
1945
1981
  mutation CreateDashboard(
1946
1982
  $name: String!
1947
1983
  $workspace_id: ID!
@@ -1963,14 +1999,14 @@
1963
1999
  board_folder_id
1964
2000
  }
1965
2001
  }
1966
- `,_g=rc`
2002
+ `,yg=rc`
1967
2003
  query GetAllWidgetsSchema {
1968
2004
  all_widgets_schema {
1969
2005
  widget_type
1970
2006
  schema
1971
2007
  }
1972
2008
  }
1973
- `,fg=rc`
2009
+ `,vg=rc`
1974
2010
  mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
1975
2011
  create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
1976
2012
  id
@@ -1982,14 +2018,14 @@
1982
2018
  }
1983
2019
  }
1984
2020
  }
1985
- `,gg={name:n.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:n.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:n.z.array(n.z.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:n.z.nativeEnum(nr).default(nr.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:n.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const bg={parent_container_id:n.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:n.z.nativeEnum(Op).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:n.z.nativeEnum(Ar).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:n.z.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:n.z.record(n.z.unknown()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};const yg=rc`
2021
+ `,Ig={name:n.z.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:n.z.string().describe("ID of the workspace that will own the dashboard"),board_ids:n.z.array(n.z.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:n.z.nativeEnum(nr).default(nr.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:n.z.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const Eg={parent_container_id:n.z.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:n.z.nativeEnum(Op).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:n.z.nativeEnum(Ar).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:n.z.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:n.z.record(n.z.unknown()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};const Tg=rc`
1986
2022
  mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
1987
2023
  update_workspace(id: $id, attributes: $attributes) {
1988
2024
  id
1989
2025
  name
1990
2026
  }
1991
2027
  }
1992
- `,vg={id:n.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:n.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:n.z.string().optional().describe("The description of the workspace to update"),attributeKind:n.z.nativeEnum($p).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:n.z.string().optional().describe("The name of the workspace to update")};const Ig=rc`
2028
+ `,wg={id:n.z.string().describe("The ID of the workspace to update"),attributeAccountProductId:n.z.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:n.z.string().optional().describe("The description of the workspace to update"),attributeKind:n.z.nativeEnum($p).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:n.z.string().optional().describe("The name of the workspace to update")};const Ag=rc`
1993
2029
  mutation updateFolder(
1994
2030
  $folderId: ID!
1995
2031
  $name: String
@@ -2016,7 +2052,7 @@
2016
2052
  name
2017
2053
  }
2018
2054
  }
2019
- `,Eg={folderId:n.z.string().describe("The ID of the folder to update"),name:n.z.string().optional().describe("The new name of the folder"),color:n.z.nativeEnum(Lr).optional().describe("The new color of the folder"),fontWeight:n.z.nativeEnum(Pr).optional().describe("The new font weight of the folder"),customIcon:n.z.nativeEnum(Ur).optional().describe("The new custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder"),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:n.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:n.z.string().optional().describe("The ID of the object to position the folder relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(zs).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the folder after the object")};const Tg=rc`
2055
+ `,Sg={folderId:n.z.string().describe("The ID of the folder to update"),name:n.z.string().optional().describe("The new name of the folder"),color:n.z.nativeEnum(Lr).optional().describe("The new color of the folder"),fontWeight:n.z.nativeEnum(Pr).optional().describe("The new font weight of the folder"),customIcon:n.z.nativeEnum(Ur).optional().describe("The new custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder"),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:n.z.string().optional().describe("The account product ID associated with the folder"),position_object_id:n.z.string().optional().describe("The ID of the object to position the folder relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(zs).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the folder after the object")};const Ng=rc`
2020
2056
  mutation createWorkspace(
2021
2057
  $name: String!
2022
2058
  $workspaceKind: WorkspaceKind!
@@ -2033,7 +2069,7 @@
2033
2069
  name
2034
2070
  }
2035
2071
  }
2036
- `,wg={name:n.z.string().describe("The name of the new workspace to be created"),workspaceKind:n.z.nativeEnum($p).describe("The kind of workspace to create"),description:n.z.string().optional().describe("The description of the new workspace"),accountProductId:n.z.string().optional().describe("The account product ID associated with the workspace")};const Ag=rc`
2072
+ `,Dg={name:n.z.string().describe("The name of the new workspace to be created"),workspaceKind:n.z.nativeEnum($p).describe("The kind of workspace to create"),description:n.z.string().optional().describe("The description of the new workspace"),accountProductId:n.z.string().optional().describe("The account product ID associated with the workspace")};const Og=rc`
2037
2073
  mutation createFolder(
2038
2074
  $workspaceId: ID!
2039
2075
  $name: String!
@@ -2054,7 +2090,7 @@
2054
2090
  name
2055
2091
  }
2056
2092
  }
2057
- `,Sg={workspaceId:n.z.string().describe("The ID of the workspace where the folder will be created"),name:n.z.string().describe("The name of the folder to be created"),color:n.z.nativeEnum(Lr).optional().describe("The color of the folder"),fontWeight:n.z.nativeEnum(Pr).optional().describe("The font weight of the folder"),customIcon:n.z.nativeEnum(Ur).optional().describe("The custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the parent folder")};const Ng=rc`
2093
+ `,Rg={workspaceId:n.z.string().describe("The ID of the workspace where the folder will be created"),name:n.z.string().describe("The name of the folder to be created"),color:n.z.nativeEnum(Lr).optional().describe("The color of the folder"),fontWeight:n.z.nativeEnum(Pr).optional().describe("The font weight of the folder"),customIcon:n.z.nativeEnum(Ur).optional().describe("The custom icon of the folder"),parentFolderId:n.z.string().optional().describe("The ID of the parent folder")};const Cg=rc`
2058
2094
  mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
2059
2095
  update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
2060
2096
  success
@@ -2064,7 +2100,7 @@
2064
2100
  }
2065
2101
  }
2066
2102
  }
2067
- `,Dg=rc`
2103
+ `,kg=rc`
2068
2104
  mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
2069
2105
  update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
2070
2106
  success
@@ -2074,7 +2110,7 @@
2074
2110
  }
2075
2111
  }
2076
2112
  }
2077
- `,Og={objectType:n.z.nativeEnum(zs).describe("The type of object to move"),id:n.z.string().describe("The ID of the object to move"),position_object_id:n.z.string().optional().describe("The ID of the object to position the object relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(zs).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:n.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const Rg=rc`
2113
+ `,Lg={objectType:n.z.nativeEnum(zs).describe("The type of object to move"),id:n.z.string().describe("The ID of the object to move"),position_object_id:n.z.string().optional().describe("The ID of the object to position the object relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:n.z.nativeEnum(zs).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:n.z.boolean().optional().describe("Whether to position the object after the object"),parentFolderId:n.z.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:n.z.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:n.z.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};const Ug=rc`
2078
2114
  query aggregateBoardInsights($query: AggregateQueryInput!, $boardId: ID!) {
2079
2115
  boards(ids: [$boardId], limit: 1) {
2080
2116
  name
@@ -2096,14 +2132,14 @@
2096
2132
  }
2097
2133
  }
2098
2134
  }
2099
- `,Cg=new Set([ki.Case,ki.Between,ki.Left,ki.Raw,ki.None,ki.CountKeys]),kg=Object.values(ki).filter((e=>!Cg.has(e))),Lg=new Set([ki.Left,ki.Trim,ki.Upper,ki.Lower,ki.DateTruncDay,ki.DateTruncWeek,ki.DateTruncMonth,ki.DateTruncQuarter,ki.DateTruncYear,ki.Color,ki.Label,ki.EndDate,ki.StartDate,ki.Hour,ki.PhoneCountryShortName,ki.Person,ki.Upper,ki.Lower,ki.Order,ki.Length,ki.Flatten,ki.IsDone]);function Ug(e){return{column_id:e}}new Set([ki.Count,ki.CountDistinct,ki.CountSubitems,ki.CountItems,ki.First,ki.Sum,ki.Average,ki.Median,ki.Min,ki.Max,ki.MinMax]);const Pg={boardId:n.z.number().describe("The id of the board to get insights for"),aggregations:n.z.array(n.z.object({function:n.z.enum(kg).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:n.z.string().describe(`The id of the column to aggregate. Required for every function except ${ki.CountItems}, which counts items and takes no column.`).optional()})).describe(`The aggregations to get. Before sending the aggregations, read guidelines.aggregation from get_column_type_info with fetchMode "${hm.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).optional(),groupBy:n.z.array(n.z.string()).describe("The columns to group by. All columns in the group by must be in the aggregations as well without a function.").optional(),limit:n.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:t_,filtersOperator:a_,orderBy:n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to order by"),direction:n.z.nativeEnum(us).optional().default(us.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 $g=rc`
2135
+ `,Pg=new Set([ki.Case,ki.Between,ki.Left,ki.Raw,ki.None,ki.CountKeys]),$g=Object.values(ki).filter((e=>!Pg.has(e))),xg=new Set([ki.Left,ki.Trim,ki.Upper,ki.Lower,ki.DateTruncDay,ki.DateTruncWeek,ki.DateTruncMonth,ki.DateTruncQuarter,ki.DateTruncYear,ki.Color,ki.Label,ki.EndDate,ki.StartDate,ki.Hour,ki.PhoneCountryShortName,ki.Person,ki.Upper,ki.Lower,ki.Order,ki.Length,ki.Flatten,ki.IsDone]);function Mg(e){return{column_id:e}}new Set([ki.Count,ki.CountDistinct,ki.CountSubitems,ki.CountItems,ki.First,ki.Sum,ki.Average,ki.Median,ki.Min,ki.Max,ki.MinMax]);const Vg={boardId:n.z.number().describe("The id of the board to get insights for"),aggregations:n.z.array(n.z.object({function:n.z.enum($g).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:n.z.string().describe(`The id of the column to aggregate. Required for every function except ${ki.CountItems}, which counts items and takes no column.`).optional()})).describe(`The aggregations to get. Before sending the aggregations, read guidelines.aggregation from get_column_type_info with fetchMode "${hm.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).optional(),groupBy:n.z.array(n.z.string()).describe("The columns to group by. All columns in the group by must be in the aggregations as well without a function.").optional(),limit:n.z.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:o_,filtersOperator:r_,orderBy:n.z.array(n.z.object({columnId:n.z.string().describe("The id of the column to order by"),direction:n.z.nativeEnum(us).optional().default(us.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 Fg=rc`
2100
2136
  query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
2101
2137
  folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
2102
2138
  id
2103
2139
  name
2104
2140
  }
2105
2141
  }
2106
- `,xg=rc`
2142
+ `,Bg=rc`
2107
2143
  query SearchItems($query: String!, $limit: Int, $workspaceIds: [ID!], $boardIds: [ID!]) {
2108
2144
  search {
2109
2145
  items(query: $query, limit: $limit, workspace_ids: $workspaceIds, board_ids: $boardIds) {
@@ -2120,7 +2156,7 @@
2120
2156
  }
2121
2157
  }
2122
2158
  }
2123
- `,Mg=rc`
2159
+ `,zg=rc`
2124
2160
  query SearchBoards($query: String!, $limit: Int, $workspaceIds: [ID!], $boardIds: [ID!]) {
2125
2161
  search {
2126
2162
  boards(query: $query, limit: $limit, workspace_ids: $workspaceIds, board_ids: $boardIds) {
@@ -2136,7 +2172,7 @@
2136
2172
  }
2137
2173
  }
2138
2174
  }
2139
- `,Vg=rc`
2175
+ `,qg=rc`
2140
2176
  query SearchDocs($query: String!, $limit: Int, $workspaceIds: [ID!], $docIds: [ID!]) {
2141
2177
  search {
2142
2178
  docs(query: $query, limit: $limit, workspace_ids: $workspaceIds, ids: $docIds) {
@@ -2155,7 +2191,7 @@
2155
2191
  }
2156
2192
  }
2157
2193
  }
2158
- `,Fg=rc`
2194
+ `,jg=rc`
2159
2195
  query SearchWorkspaces($query: String!, $limit: Int) {
2160
2196
  search {
2161
2197
  workspaces(query: $query, limit: $limit) {
@@ -2170,7 +2206,7 @@
2170
2206
  }
2171
2207
  }
2172
2208
  }
2173
- `,Bg=rc`
2209
+ `,Gg=rc`
2174
2210
  query SearchUpdates(
2175
2211
  $query: String!
2176
2212
  $limit: Int
@@ -2199,7 +2235,7 @@
2199
2235
  }
2200
2236
  }
2201
2237
  }
2202
- `,zg=rc`
2238
+ `,Hg=rc`
2203
2239
  query SearchTimelineItems($query: String!, $limit: Int, $workspaceIds: [ID!], $boardIds: [ID!]) {
2204
2240
  search {
2205
2241
  timeline_items(query: $query, limit: $limit, workspace_ids: $workspaceIds, board_ids: $boardIds) {
@@ -2217,7 +2253,7 @@
2217
2253
  }
2218
2254
  }
2219
2255
  }
2220
- `,qg=rc`
2256
+ `,Wg=rc`
2221
2257
  query SearchItemsByCreatorDev(
2222
2258
  $query: String!
2223
2259
  $limit: Int
@@ -2246,7 +2282,7 @@
2246
2282
  }
2247
2283
  }
2248
2284
  }
2249
- `,jg=rc`
2285
+ `,Yg=rc`
2250
2286
  query SearchOverviewsDev($query: String!, $limit: Int, $workspaceIds: [ID!], $creatorIds: [ID!]) {
2251
2287
  search {
2252
2288
  overviews(query: $query, limit: $limit, workspace_ids: $workspaceIds, creator_ids: $creatorIds) {
@@ -2261,14 +2297,14 @@
2261
2297
  }
2262
2298
  }
2263
2299
  }
2264
- `,Gg=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,""),Hg=new Set(Object.values(__));function Wg(e){if(null!=e)return Array.isArray(e)?e:[e]}function Yg(e){return n.z.preprocess(Wg,n.z.array(n.z.coerce.number().finite()).optional()).describe(e)}function Kg(e){return e&&e.length>0?e:void 0}function Qg(e){if(!e)return;const t=Object.entries(e).filter((([,e])=>e&&e.length>0)).map((([e,t])=>({field:e,fragments:[...t]})));return t.length>0?t:void 0}const Jg=n.z.preprocess((function(e){if("string"!=typeof e)return e;const t=g_(e),a=b_[t]??t;return Hg.has(a)?a:e}),n.z.nativeEnum(__,{errorMap:function(e,t){if(e.code===n.z.ZodIssueCode.invalid_type)return"undefined"===e.received||"null"===e.received?{message:`searchType is required. Valid values: ${f_}.`}:{message:`searchType must be a string. Valid values: ${f_}.`};if(e.code===n.z.ZodIssueCode.invalid_enum_value){const t=String(e.received),a=y_[g_(t)],n=`Invalid searchType "${t}". Valid values: ${f_}.`;return{message:a?`${n} ${a}`:n}}return{message:t.defaultError}}})).describe(`The type of search to perform. Valid values: ${f_}.`),Xg=n.z.preprocess((function(e){return null==e?20:e}),n.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."),Zg={searchTerm:n.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:Jg,limit:Xg,workspaceIds:Yg("Array of workspace IDs (numbers) to search in. Optional for FOLDERS search (searches all accessible workspaces when omitted). For ITEMS, BOARD, DOCUMENTS, DASHBOARDS, UPDATES, and TIMELINE_ITEMS search, only pass this if the user explicitly asked to search within specific workspaces. Example: [12345, 67890]."),boardIds:Yg("Array of board IDs (numbers) to scope the search to. Applies to BOARD, ITEMS, UPDATES, and TIMELINE_ITEMS search. Only pass it if the user explicitly asked to search within specific boards. Example: [12345, 67890]."),creatorIds:Yg("Array of user IDs (numbers) to filter by creator. Applies to ITEMS (filters by item creator), 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]."),docIds:Yg("Array of document IDs (numbers), as they appear in document URLs, to scope the search to. Applies to DOCUMENTS search, with at most 512 ids. Use it to search within a known set of documents, for example to find which of them mention a term. Only pass it if the user explicitly asked to search within specific documents. Example: [12345, 67890].")};const eb=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Ds).describe("The type of mention: User, Team, Board, or Project")}),tb=n.z.array(eb),ab={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project')};const nb=rc`
2300
+ `,Kg=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,""),Qg=new Set(Object.values(y_));function Jg(e){if(null!=e)return Array.isArray(e)?e:[e]}function Xg(e){return n.z.preprocess(Jg,n.z.array(n.z.coerce.number().finite()).optional()).describe(e)}function Zg(e){return e&&e.length>0?e:void 0}function eb(e){if(!e)return;const t=Object.entries(e).filter((([,e])=>e&&e.length>0)).map((([e,t])=>({field:e,fragments:[...t]})));return t.length>0?t:void 0}const tb=n.z.preprocess((function(e){if("string"!=typeof e)return e;const t=I_(e),a=E_[t]??t;return Qg.has(a)?a:e}),n.z.nativeEnum(y_,{errorMap:function(e,t){if(e.code===n.z.ZodIssueCode.invalid_type)return"undefined"===e.received||"null"===e.received?{message:`searchType is required. Valid values: ${v_}.`}:{message:`searchType must be a string. Valid values: ${v_}.`};if(e.code===n.z.ZodIssueCode.invalid_enum_value){const t=String(e.received),a=T_[I_(t)],n=`Invalid searchType "${t}". Valid values: ${v_}.`;return{message:a?`${n} ${a}`:n}}return{message:t.defaultError}}})).describe(`The type of search to perform. Valid values: ${v_}.`),ab=n.z.preprocess((function(e){return null==e?20:e}),n.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."),nb={searchTerm:n.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:tb,limit:ab,workspaceIds:Xg("Array of workspace IDs (numbers) to search in. Optional for FOLDERS search (searches all accessible workspaces when omitted). For ITEMS, BOARD, DOCUMENTS, DASHBOARDS, UPDATES, and TIMELINE_ITEMS search, only pass this if the user explicitly asked to search within specific workspaces. Example: [12345, 67890]."),boardIds:Xg("Array of board IDs (numbers) to scope the search to. Applies to BOARD, ITEMS, UPDATES, and TIMELINE_ITEMS search. Only pass it if the user explicitly asked to search within specific boards. Example: [12345, 67890]."),creatorIds:Xg("Array of user IDs (numbers) to filter by creator. Applies to ITEMS (filters by item creator), 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]."),docIds:Xg("Array of document IDs (numbers), as they appear in document URLs, to scope the search to. Applies to DOCUMENTS search, with at most 512 ids. Use it to search within a known set of documents, for example to find which of them mention a term. Only pass it if the user explicitly asked to search within specific documents. Example: [12345, 67890].")};const ib=n.z.object({id:n.z.string().describe("The ID of the entity to mention"),type:n.z.nativeEnum(Ds).describe("The type of mention: User, Team, Board, or Project. Mention an AI agent as User, not Agent")}),ob=n.z.array(ib),rb={itemId:n.z.number().describe("The id of the item to which the update will be added"),body:n.z.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:n.z.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project. To mention an AI agent, use type User with the agent\'s user id from list_users_and_teams. Type Agent adds no mention')};const sb=rc`
2265
2301
  mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
2266
2302
  update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
2267
2303
  id
2268
2304
  name
2269
2305
  }
2270
2306
  }
2271
- `,ib=n.z.object({fileType:n.z.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:n.z.string().describe("File display name"),linkToFile:n.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:n.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:n.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),ob={boardId:n.z.string().describe("The board's unique identifier"),itemId:n.z.string().describe("The item's unique identifier"),columnId:n.z.string().describe("The file or doc column's unique identifier"),files:n.z.array(ib).describe("Array of file values to set on the column")};const rb=rc`
2307
+ `,db=n.z.object({fileType:n.z.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:n.z.string().describe("File display name"),linkToFile:n.z.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:n.z.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:n.z.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),pb={boardId:n.z.string().describe("The board's unique identifier"),itemId:n.z.string().describe("The item's unique identifier"),columnId:n.z.string().describe("The file or doc column's unique identifier"),files:n.z.array(db).describe("Array of file values to set on the column")};const lb=rc`
2272
2308
  query getAssets($ids: [ID!]!) {
2273
2309
  assets(ids: $ids) {
2274
2310
  id
@@ -2286,7 +2322,7 @@
2286
2322
  }
2287
2323
  }
2288
2324
  }
2289
- `,sb={ids:n.z.array(n.z.string()).min(1).describe("Array of asset IDs to fetch")};const db=rc`
2325
+ `,cb={ids:n.z.array(n.z.string()).min(1).describe("Array of asset IDs to fetch")};const mb=rc`
2290
2326
  query getUserContext {
2291
2327
  me {
2292
2328
  id
@@ -2330,7 +2366,7 @@
2330
2366
  }
2331
2367
  }
2332
2368
  }
2333
- `,pb=rc`
2369
+ `,ub=rc`
2334
2370
  query getFavoriteDetails(
2335
2371
  $boardIds: [ID!]
2336
2372
  $folderIds: [ID!]
@@ -2354,13 +2390,66 @@
2354
2390
  name
2355
2391
  }
2356
2392
  }
2357
- `,lb={[Qr.Board]:"boardIds",[Qr.Folder]:"folderIds",[Qr.Workspace]:"workspaceIds",[Qr.Dashboard]:"dashboardIds"},cb={[Qr.Board]:"boards",[Qr.Folder]:"folders",[Qr.Workspace]:"workspaces",[Qr.Dashboard]:"dashboards"};const mb=rc`
2393
+ `,hb={[Qr.Board]:"boardIds",[Qr.Folder]:"folderIds",[Qr.Workspace]:"workspaceIds",[Qr.Dashboard]:"dashboardIds"},_b={[Qr.Board]:"boards",[Qr.Folder]:"folders",[Qr.Workspace]:"workspaces",[Qr.Dashboard]:"dashboards"};const fb=rc`
2394
+ query GetNotetakerMeetings(
2395
+ $limit: Int
2396
+ $cursor: String
2397
+ $filters: MeetingsFilterInput
2398
+ $includeSummary: Boolean!
2399
+ $includeTopics: Boolean!
2400
+ $includeActionItems: Boolean!
2401
+ $includeTranscript: Boolean!
2402
+ ) {
2403
+ notetaker {
2404
+ meetings(limit: $limit, cursor: $cursor, filters: $filters) {
2405
+ meetings {
2406
+ id
2407
+ title
2408
+ start_time
2409
+ end_time
2410
+ recording_duration
2411
+ access_type
2412
+ meeting_link
2413
+ participants {
2414
+ email
2415
+ }
2416
+ summary @include(if: $includeSummary)
2417
+ topics @include(if: $includeTopics) {
2418
+ title
2419
+ talking_points {
2420
+ content
2421
+ timestamp
2422
+ }
2423
+ }
2424
+ action_items @include(if: $includeActionItems) {
2425
+ id
2426
+ content
2427
+ is_completed
2428
+ owner
2429
+ due_date
2430
+ }
2431
+ transcript @include(if: $includeTranscript) {
2432
+ text
2433
+ start_time
2434
+ end_time
2435
+ speaker
2436
+ language
2437
+ }
2438
+ }
2439
+ page_info {
2440
+ has_next_page
2441
+ cursor
2442
+ }
2443
+ }
2444
+ }
2445
+ }
2446
+ `,gb={ids:n.z.array(n.z.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:n.z.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:n.z.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:n.z.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:n.z.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:n.z.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:n.z.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:n.z.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:n.z.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const bb=rc`
2358
2447
  mutation BatchUndo($boardId: ID!, $undoRecordId: ID!) {
2359
2448
  batch_undo(board_id: $boardId, undo_record_id: $undoRecordId) {
2360
2449
  success
2361
2450
  }
2362
2451
  }
2363
- `,ub={boardId:n.z.number().describe("The id of the board where the action was performed"),undoRecordId:n.z.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const hb=rc`
2452
+ `,yb={boardId:n.z.number().describe("The id of the board where the action was performed"),undoRecordId:n.z.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const vb=rc`
2364
2453
  mutation CreateUpload($input: CreateUploadInput!) {
2365
2454
  create_upload(input: $input) {
2366
2455
  upload_id
@@ -2374,7 +2463,7 @@
2374
2463
  expires_at
2375
2464
  }
2376
2465
  }
2377
- `,_b={fileName:n.z.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:n.z.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:n.z.number().int().min(1).max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const fb=rc`
2466
+ `,Ib={fileName:n.z.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:n.z.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:n.z.number().int().min(1).max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Eb=rc`
2378
2467
  mutation CompleteUpload($input: CompleteUploadInput!) {
2379
2468
  complete_upload(input: $input) {
2380
2469
  id
@@ -2386,13 +2475,13 @@
2386
2475
  filelink
2387
2476
  }
2388
2477
  }
2389
- `,gb=rc`
2478
+ `,Tb=rc`
2390
2479
  mutation ChangeColumnValue($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {
2391
2480
  change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {
2392
2481
  id
2393
2482
  }
2394
2483
  }
2395
- `,bb={uploadId:n.z.string().describe("The upload_id returned by get_asset_upload_url"),etag:n.z.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:n.z.string().describe("The board's unique identifier"),itemId:n.z.string().describe("The item's unique identifier"),columnId:n.z.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const yb="\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(),vb={};const Ib=rc`
2484
+ `,wb={uploadId:n.z.string().describe("The upload_id returned by get_asset_upload_url"),etag:n.z.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:n.z.string().describe("The board's unique identifier"),itemId:n.z.string().describe("The item's unique identifier"),columnId:n.z.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Ab="\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(),Sb={};const Nb=rc`
2396
2485
  query GetItemAssets($itemId: ID!, $columnId: String!) {
2397
2486
  items(ids: [$itemId], limit: 1) {
2398
2487
  assets(column_ids: [$columnId]) {
@@ -2402,7 +2491,7 @@
2402
2491
  }
2403
2492
  }
2404
2493
  }
2405
- `,Eb=10485760,Tb=5e4,wb=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Ab=new Set([".pdf"]),Sb=new Set([".docx"]),Nb=new Set([".xlsx"]),Db=new Set([".xls"]),Ob=new Set([".txt",".md",".csv",".json"]),Rb={item_id:n.z.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:n.z.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:n.z.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:n.z.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function Cb(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function kb(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 kb(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Lb(e,t,a){const n=function(e,t){if(t){const e=Cb(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Cb(e.name)}(e,a);try{if(wb.has(n))return{file_name:e.name,file_extension:n,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(Db.has(n))return{file_name:e.name,file_extension:n,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)>Eb)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 n=t.body.getReader(),i=[];let o=0;try{let e=await n.read();for(;!e.done;){const{value:t}=e;if(o+=t.byteLength,o>Eb)throw await n.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");i.push(t),e=await n.read()}}catch(e){throw await n.cancel().catch((()=>{})),e}return Buffer.concat(i)}(e.public_url);let i,o;Ab.has(n)?(i=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"):Sb.has(n)?(i=await async function(e){return(await D.default.extractRawText({buffer:e})).value}(a),o="word"):Nb.has(n)?(i=await async function(e){const t=new O.default.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(kb).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):Ob.has(n)?(i=a.toString("utf-8"),o="text"):(i=a.toString("utf-8"),o="unknown");const r=i.slice(t,t+Tb),s=i.length>t+Tb;return{file_name:e.name,file_extension:n,content_type:o,text:r,total_length:i.length,...Ab.has(n)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+Tb}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:n}}}var Ub,Pb,$b,xb,Mb,Vb,Fb,Bb,zb,qb,jb,Gb,Hb,Wb,Yb,Kb,Qb,Jb,Xb,Zb,ey,ty,ay,ny,iy,oy,ry,sy,dy,py,ly,cy,my,uy,hy,_y,fy,gy,by,yy,vy,Iy,Ey,Ty,wy,Ay,Sy,Ny,Dy,Oy,Ry,Cy,ky,Ly,Uy,Py,$y,xy,My,Vy,Fy,By,zy,qy,jy,Gy,Hy,Wy,Yy,Ky,Qy,Jy,Xy,Zy,ev,tv,av,nv,iv,ov,rv,sv,dv,pv,lv,cv,mv,uv,hv,_v,fv,gv,bv,yv,vv,Iv,Ev,Tv,wv,Av,Sv,Nv,Dv,Ov,Rv,Cv,kv,Lv,Uv,Pv,$v,xv,Mv,Vv,Fv,Bv,zv,qv,jv,Gv,Hv,Wv,Yv,Kv,Qv,Jv,Xv,Zv,eI,tI,aI,nI,iI,oI,rI,sI,dI,pI,lI,cI,mI,uI,hI,_I,fI,gI,bI,yI,vI,II,EI,TI,wI,AI,SI,NI,DI,OI,RI,CI,kI,LI,UI,PI,$I,xI,MI,VI,FI,BI,zI,qI,jI,GI,HI,WI,YI,KI,QI,JI,XI,ZI,eE,tE,aE,nE,iE,oE,rE,sE,dE,pE,lE,cE,mE,uE,hE,_E,fE,gE,bE,yE,vE,IE,EE,TE,wE,AE,SE,NE,DE,OE,RE,CE,kE,LE,UE,PE,$E,xE,ME,VE,FE,BE,zE,qE,jE,GE,HE,WE,YE,KE,QE,JE,XE,ZE,eT,tT,aT,nT,iT,oT,rT,sT,dT,pT,lT,cT,mT,uT,hT,_T,fT,gT,bT,yT,vT,IT,ET,TT,wT,AT,ST,NT,DT,OT,RT,CT,kT,LT,UT,PT,$T,xT,MT,VT,FT,BT,zT,qT,jT,GT,HT,WT,YT,KT,QT,JT,XT,ZT,ew,tw,aw,nw,iw,ow,rw,sw,dw,pw,lw,cw,mw,uw,hw,_w,fw,gw,bw,yw,vw,Iw,Ew,Tw,ww,Aw,Sw,Nw,Dw,Ow,Rw,Cw,kw,Lw,Uw,Pw;!function(e){e.Create="CREATE",e.Destroy="DESTROY",e.Show="SHOW",e.Update="UPDATE"}(Ub||(Ub={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Pb||(Pb={})),function(e){e.Board="BOARD",e.User="USER"}($b||($b={})),function(e){e.Cancelled="CANCELLED",e.Failed="FAILED",e.Running="RUNNING",e.Success="SUCCESS"}(xb||(xb={})),function(e){e.Application="APPLICATION",e.Audio="AUDIO",e.Board="BOARD",e.Doc="DOC",e.Html="HTML",e.Image="IMAGE",e.Item="ITEM",e.Text="TEXT",e.Unknown="UNKNOWN",e.Update="UPDATE",e.VibeApp="VIBE_APP",e.Video="VIDEO",e.View="VIEW"}(Mb||(Mb={})),function(e){e.Asset="ASSET",e.MondayEntity="MONDAY_ENTITY"}(Vb||(Vb={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(Fb||(Fb={})),function(e){e.Member="MEMBER",e.Owner="OWNER"}(Bb||(Bb={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeOpus_5="CLAUDE_OPUS_5",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.ClaudeSonnet_5="CLAUDE_SONNET_5",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gemini_3_5FlashLite="GEMINI_3_5_FLASH_LITE",e.Gemini_3_7Flash="GEMINI_3_7_FLASH",e.Gpt_5_2="GPT_5_2",e.Gpt_5_6="GPT_5_6",e.Gpt_5_6Luna="GPT_5_6_LUNA",e.Gpt_5_6Sol="GPT_5_6_SOL"}(zb||(zb={})),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"}(qb||(qb={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(jb||(jb={})),function(e){e.Team="TEAM",e.User="USER"}(Gb||(Gb={})),function(e){e.High="HIGH",e.Low="LOW",e.Medium="MEDIUM"}(Hb||(Hb={})),function(e){e.Communication="COMMUNICATION",e.Tools="TOOLS"}(Wb||(Wb={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(Yb||(Yb={})),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"}(Kb||(Kb={})),function(e){e.Table="TABLE",e.Union="UNION"}(Qb||(Qb={})),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"}(Jb||(Jb={})),function(e){e.And="AND",e.Or="OR"}(Xb||(Xb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Zb||(Zb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(ey||(ey={})),function(e){e.Table="TABLE"}(ty||(ty={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(ay||(ay={})),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"}(ny||(ny={})),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"}(iy||(iy={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(oy||(oy={})),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"}(ry||(ry={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(sy||(sy={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(dy||(dy={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(py||(py={})),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"}(ly||(ly={})),function(e){e.MondayFast="MONDAY_FAST",e.MondayPowerful="MONDAY_POWERFUL",e.MondayStandard="MONDAY_STANDARD"}(cy||(cy={})),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"}(my||(my={})),function(e){e.AgentMember="AGENT_MEMBER",e.VibeUser="VIBE_USER"}(uy||(uy={})),function(e){e.Unpublish="UNPUBLISH"}(hy||(hy={})),function(e){e.Dependency="DEPENDENCY",e.Hosting="HOSTING"}(_y||(_y={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(fy||(fy={})),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"}(gy||(gy={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(by||(by={})),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"}(yy||(yy={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(vy||(vy={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(Iy||(Iy={})),function(e){e.Finalized="FINALIZED",e.Idle="IDLE",e.InProgress="IN_PROGRESS"}(Ey||(Ey={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Ty||(Ty={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.None="NONE",e.Pending="PENDING"}(wy||(wy={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.AiAgentIdentity="AI_AGENT_IDENTITY",e.Channel="CHANNEL",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(Ay||(Ay={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(Sy||(Sy={})),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"}(Ny||(Ny={})),function(e){e.Agent="AGENT"}(Dy||(Dy={})),function(e){e.Admin="ADMIN",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Oy||(Oy={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(Ry||(Ry={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Cy||(Cy={})),function(e){e.Edit="edit",e.View="view"}(ky||(ky={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Ly||(Ly={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Member="member",e.Viewer="viewer"}(Uy||(Uy={})),function(e){e.Classic="classic",e.DataSet="data_set"}(Py||(Py={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}($y||($y={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(xy||(xy={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(My||(My={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Share="SHARE"}(Vy||(Vy={})),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"}(Fy||(Fy={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(By||(By={})),function(e){e.BoardReportability="BOARD_REPORTABILITY"}(zy||(zy={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(qy||(qy={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(jy||(jy={})),function(e){e.Edit="edit",e.View="view"}(Gy||(Gy={})),function(e){e.AnyAssigneeColumn="any_assignee_column"}(Hy||(Hy={})),function(e){e.CalendarBoardView="CalendarBoardView",e.DocBoardView="DocBoardView",e.EmptyBoardView="EmptyBoardView",e.FormBoardView="FormBoardView",e.TableBoardView="TableBoardView"}(Wy||(Wy={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Yy||(Yy={})),function(e){e.Agent="AGENT",e.Automations="AUTOMATIONS",e.Board="BOARD",e.Dashboard="DASHBOARD",e.Domain="DOMAIN",e.Form="FORM",e.Items="ITEMS",e.Vibe="VIBE"}(Ky||(Ky={})),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"}(Qy||(Qy={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(Jy||(Jy={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(Xy||(Xy={})),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"}(Zy||(Zy={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(ev||(ev={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(tv||(tv={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(av||(av={})),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"}(nv||(nv={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(iv||(iv={})),function(e){e.Later="LATER",e.Now="NOW"}(ov||(ov={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(rv||(rv={})),function(e){e.Asc="ASC",e.Desc="DESC"}(sv||(sv={})),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"}(dv||(dv={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(pv||(pv={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(lv||(lv={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(cv||(cv={})),function(e){e.BoardConnected="BOARD_CONNECTED",e.BoardDisconnected="BOARD_DISCONNECTED",e.Chips="CHIPS",e.Cta="CTA",e.Error="ERROR",e.Indication="INDICATION",e.Processing="PROCESSING",e.Reasoning="REASONING",e.Text="TEXT",e.ToolCall="TOOL_CALL"}(mv||(mv={})),function(e){e.Ask="ASK",e.Build="BUILD",e.Plan="PLAN"}(uv||(uv={})),function(e){e.User="USER",e.Vibe="VIBE"}(hv||(hv={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(_v||(_v={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(fv||(fv={})),function(e){e.Description="description",e.Title="title"}(gv||(gv={})),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"}(bv||(bv={})),function(e){e.Or="OR"}(yv||(yv={})),function(e){e.Full="FULL",e.Partial="PARTIAL"}(vv||(vv={})),function(e){e.Id="ID",e.Name="NAME"}(Iv||(Iv={})),function(e){e.Ask="ASK",e.Build="BUILD",e.Plan="PLAN"}(Ev||(Ev={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(Tv||(Tv={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.SystemCreation="SYSTEM_CREATION"}(wv||(wv={})),function(e){e.Account="ACCOUNT",e.User="USER"}(Av||(Av={})),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"}(Sv||(Sv={})),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"}(Nv||(Nv={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(Dv||(Dv={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Ov||(Ov={})),function(e){e.Board="BOARD",e.Overview="OVERVIEW",e.VibeApp="VIBE_APP"}(Rv||(Rv={})),function(e){e.Board="BOARD",e.DataEntity="DATA_ENTITY"}(Cv||(Cv={})),function(e){e.Main="MAIN",e.Subitem="SUBITEM"}(kv||(kv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Lv||(Lv={})),function(e){e.Date="DATE",e.Timeline="TIMELINE"}(Uv||(Uv={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(Pv||(Pv={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}($v||($v={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(xv||(xv={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(Mv||(Mv={})),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"}(Vv||(Vv={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Fv||(Fv={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(Bv||(Bv={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(zv||(zv={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(qv||(qv={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(jv||(jv={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Gv||(Gv={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(Hv||(Hv={})),function(e){e.Public="PUBLIC",e.Restricted="RESTRICTED"}(Wv||(Wv={})),function(e){e.BoardDocsMap="BOARD_DOCS_MAP",e.BusinessContext="BUSINESS_CONTEXT",e.BusinessGoal="BUSINESS_GOAL",e.ColumnDictionary="COLUMN_DICTIONARY",e.DetectedWorkflows="DETECTED_WORKFLOWS",e.ExtractedKnowledge="EXTRACTED_KNOWLEDGE",e.LifecycleWorkflow="LIFECYCLE_WORKFLOW",e.Overview="OVERVIEW",e.PeopleAndRoles="PEOPLE_AND_ROLES",e.PeopleRoles="PEOPLE_ROLES",e.RelatedBoards="RELATED_BOARDS",e.WorkdocMetadata="WORKDOC_METADATA"}(Yv||(Yv={})),function(e){e.Markdown="MARKDOWN",e.Structured="STRUCTURED"}(Kv||(Kv={})),function(e){e.Fresh="FRESH",e.Stale="STALE"}(Qv||(Qv={})),function(e){e.Board="BOARD",e.Workdoc="WORKDOC",e.Workspace="WORKSPACE"}(Jv||(Jv={})),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"}(Xv||(Xv={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(Zv||(Zv={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(eI||(eI={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(tI||(tI={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Kanban="KANBAN",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE",e.Timeline="TIMELINE"}(aI||(aI={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(nI||(nI={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(iI||(iI={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(oI||(oI={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(rI||(rI={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(sI||(sI={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(dI||(dI={})),function(e){e.AllowOnly="ALLOW_ONLY",e.Exclude="EXCLUDE"}(pI||(pI={})),function(e){e.Monday="monday",e.Sunday="sunday"}(lI||(lI={})),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"}(cI||(cI={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(mI||(mI={})),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"}(uI||(uI={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(hI||(hI={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(_I||(_I={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(fI||(fI={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(gI||(gI={})),function(e){e.Classic="Classic",e.OneByOne="OneByOne"}(bI||(bI={})),function(e){e.Card="CARD",e.Flat="FLAT"}(yI||(yI={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(vI||(vI={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(II||(II={})),function(e){e.Email="Email",e.FirstName="FirstName",e.LastName="LastName",e.Location="Location",e.ManagerName="ManagerName",e.Name="Name",e.Phone="Phone",e.Timezone="Timezone",e.Title="Title"}(EI||(EI={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(TI||(TI={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(wI||(wI={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(AI||(AI={})),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"}(SI||(SI={})),function(e){e.High="High",e.Low="Low",e.Medium="Medium"}(NI||(NI={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(DI||(DI={})),function(e){e.Goodbye="GOODBYE",e.Hello="HELLO"}(OI||(OI={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(RI||(RI={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(CI||(CI={})),function(e){e.And="AND",e.Or="OR"}(kI||(kI={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(LI||(LI={})),function(e){e.DataLimit="DATA_LIMIT",e.PlanLimit="PLAN_LIMIT"}(UI||(UI={})),function(e){e.Board="BOARD",e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD",e.Item="ITEM",e.Workspace="WORKSPACE"}(PI||(PI={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}($I||($I={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(xI||(xI={})),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"}(MI||(MI={})),function(e){e.Error="ERROR"}(VI||(VI={})),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"}(FI||(FI={})),function(e){e.Table="TABLE"}(BI||(BI={})),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"}(zI||(zI={})),function(e){e.And="AND",e.Or="OR"}(qI||(qI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(jI||(jI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(GI||(GI={})),function(e){e.Asc="asc",e.Desc="desc"}(HI||(HI={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(WI||(WI={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(YI||(YI={})),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"}(KI||(KI={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(QI||(QI={})),function(e){e.And="and",e.Or="or"}(JI||(JI={})),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"}(XI||(XI={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(ZI||(ZI={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(eE||(eE={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(tE||(tE={})),function(e){e.Board="BOARD",e.Doc="DOC",e.Workspace="WORKSPACE"}(aE||(aE={})),function(e){e.File="FILE"}(nE||(nE={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(iE||(iE={})),function(e){e.Claude_4_5Sonnet="CLAUDE_4_5_SONNET",e.Claude_4_6Sonnet="CLAUDE_4_6_SONNET",e.Claude_5Sonnet="CLAUDE_5_SONNET",e.ClaudeHaiku_4_5="CLAUDE_HAIKU_4_5",e.ClaudeOpus_4_6="CLAUDE_OPUS_4_6",e.ClaudeOpus_5="CLAUDE_OPUS_5",e.Gemini_3_1FlashLite="GEMINI_3_1_FLASH_LITE",e.Gemini_3_1Pro="GEMINI_3_1_PRO",e.Gemini_3_5Flash="GEMINI_3_5_FLASH",e.Gemini_3_5FlashLite="GEMINI_3_5_FLASH_LITE",e.Gemini_3_6Flash="GEMINI_3_6_FLASH",e.Gemini_3_7Flash="GEMINI_3_7_FLASH",e.Gpt_5="GPT_5",e.Gpt_5_1="GPT_5_1",e.Gpt_5_2="GPT_5_2",e.Gpt_5Mini="GPT_5_MINI",e.Gpt_5Nano="GPT_5_NANO"}(oE||(oE={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(rE||(rE={})),function(e){e.CustomizedList="CustomizedList",e.PersonalList="PersonalList",e.Workspace="Workspace"}(sE||(sE={})),function(e){e.Core="CORE",e.Crm="CRM",e.Marketing="MARKETING",e.Service="SERVICE",e.Software="SOFTWARE"}(dE||(dE={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(pE||(pE={})),function(e){e.Dropdown="dropdown",e.Status="status"}(lE||(lE={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(cE||(cE={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(mE||(mE={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(uE||(uE={})),function(e){e.ActionItem="ACTION_ITEM",e.Summary="SUMMARY",e.Topic="TOPIC",e.Transcript="TRANSCRIPT"}(hE||(hE={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(_E||(_E={})),function(e){e.CreateSubmissionMapping="CREATE_SUBMISSION_MAPPING"}(fE||(fE={})),function(e){e.Agent="AGENT",e.User="USER"}(gE||(gE={})),function(e){e.AgentError="AGENT_ERROR",e.Standard="STANDARD"}(bE||(bE={})),function(e){e.Ask="ASK",e.Error="ERROR",e.Plan="PLAN",e.Text="TEXT"}(yE||(yE={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(vE||(vE={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(IE||(IE={})),function(e){e.Board="BOARD",e.Item="ITEM",e.Object="OBJECT"}(EE||(EE={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(TE||(TE={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(wE||(wE={})),function(e){e.Post="Post",e.Project="Project"}(AE||(AE={})),function(e){e.Left="left",e.Right="right"}(SE||(SE={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(NE||(NE={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(DE||(DE={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(OE||(OE={})),function(e){e.Must="MUST",e.MustNot="MUST_NOT",e.Should="SHOULD"}(RE||(RE={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(CE||(CE={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Queued="QUEUED",e.SessionPending="SESSION_PENDING"}(kE||(kE={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(LE||(LE={})),function(e){e.Name="NAME"}(UE||(UE={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(PE||(PE={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}($E||($E={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(xE||(xE={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(ME||(ME={})),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"}(VE||(VE={})),function(e){e.Board="BOARD",e.Item="ITEM",e.Object="OBJECT",e.SearchQuery="SEARCH_QUERY",e.User="USER",e.Widget="WIDGET"}(FE||(FE={})),function(e){e.Mobile="MOBILE",e.Web="WEB"}(BE||(BE={})),function(e){e.Downloads="DOWNLOADS",e.UpdatedAt="UPDATED_AT"}(zE||(zE={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(qE||(qE={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(jE||(jE={})),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"}(GE||(GE={})),function(e){e.Monday="MONDAY"}(HE||(HE={})),function(e){e.CrossEncoder="CROSS_ENCODER"}(WE||(WE={})),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"}(YE||(YE={})),function(e){e.Asset="ASSET",e.Board="BOARD",e.Post="POST",e.PostRef="POST_REF"}(KE||(KE={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(QE||(QE={})),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"}(JE||(JE={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(XE||(XE={})),function(e){e.Api="API",e.Assigned="ASSIGNED",e.Automation="AUTOMATION",e.Chat="CHAT",e.Mention="MENTION",e.Schedule="SCHEDULE"}(ZE||(ZE={})),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"}(eT||(eT={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(tT||(tT={})),function(e){e.Hybrid="HYBRID",e.Lexical="LEXICAL",e.Semantic="SEMANTIC"}(aT||(aT={})),function(e){e.BoardId="BOARD_ID",e.BoardKind="BOARD_KIND",e.BoardName="BOARD_NAME",e.BoardOwnerId="BOARD_OWNER_ID",e.BoardWithPulseViewPermissions="BOARD_WITH_PULSE_VIEW_PERMISSIONS",e.CreatedBy="CREATED_BY",e.GroupId="GROUP_ID",e.GroupName="GROUP_NAME",e.ItemsDates="ITEMS_DATES",e.ItemsNumerics="ITEMS_NUMERICS",e.ItemFreeText="ITEM_FREE_TEXT",e.ItemId="ITEM_ID",e.ItemLabels="ITEM_LABELS",e.ItemName="ITEM_NAME",e.ItemReferencedEmails="ITEM_REFERENCED_EMAILS",e.ItemStatuses="ITEM_STATUSES",e.ItemTags="ITEM_TAGS",e.LastUpdatedBy="LAST_UPDATED_BY",e.Persons="PERSONS",e.UpdatedAt="UPDATED_AT",e.WorkspaceId="WORKSPACE_ID"}(nT||(nT={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(iT||(iT={})),function(e){e.Board="BOARD"}(oT||(oT={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(rT||(rT={})),function(e){e.Marketplace="MARKETPLACE",e.Remix="REMIX"}(sT||(sT={})),function(e){e.Archived="ARCHIVED",e.Draft="DRAFT",e.PendingReview="PENDING_REVIEW",e.Published="PUBLISHED",e.Rejected="REJECTED",e.Unlisted="UNLISTED"}(dT||(dT={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(pT||(pT={})),function(e){e.Asc="ASC",e.Desc="DESC"}(lT||(lT={})),function(e){e.Asc="ASC",e.Desc="DESC"}(cT||(cT={})),function(e){e.Complete="COMPLETE",e.Start="START"}(mT||(mT={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(uT||(uT={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(hT||(hT={})),function(e){e.CountKeys="COUNT_KEYS"}(_T||(_T={})),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"}(fT||(fT={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(gT||(gT={})),function(e){e.Nominal="nominal",e.Percent="percent"}(bT||(bT={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(yT||(yT={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(vT||(vT={})),function(e){e.Active="active",e.Inactive="inactive"}(IT||(IT={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(ET||(ET={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(TT||(TT={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(wT||(wT={})),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"}(AT||(AT={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(ST||(ST={})),function(e){e.ManagedTemplate="managed_template",e.StandardTemplate="standard_template"}(NT||(NT={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(DT||(DT={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(OT||(OT={})),function(e){e.Custom="CUSTOM",e.Holiday="HOLIDAY"}(RT||(RT={})),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"}(CT||(CT={})),function(e){e.Crm="crm",e.Service="service"}(kT||(kT={})),function(e){e.Approved="APPROVED",e.Rejected="REJECTED"}(LT||(LT={})),function(e){e.Array="ARRAY",e.Date="DATE",e.Direct="DIRECT",e.DynamicNumber="DYNAMIC_NUMBER",e.DynamicText="DYNAMIC_TEXT",e.Hour="HOUR"}(UT||(UT={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(PT||(PT={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}($T||($T={})),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"}(xT||(xT={})),function(e){e.InvalidField="INVALID_FIELD"}(MT||(MT={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(VT||(VT={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.SystemCreation="SYSTEM_CREATION"}(FT||(FT={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(BT||(BT={})),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.EntityKnowledgeApiUser="ENTITY_KNOWLEDGE_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.OrgHubApiUser="ORG_HUB_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.ServiceAiAgentMember="SERVICE_AI_AGENT_MEMBER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY",e.WorkspacePrimaryAgentMember="WORKSPACE_PRIMARY_AGENT_MEMBER",e.WorkManagementAgentMember="WORK_MANAGEMENT_AGENT_MEMBER"}(zT||(zT={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.EntityKnowledgeApiUser="ENTITY_KNOWLEDGE_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.OrgHubApiUser="ORG_HUB_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.ServiceAiAgentMember="SERVICE_AI_AGENT_MEMBER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY",e.WorkspacePrimaryAgentMember="WORKSPACE_PRIMARY_AGENT_MEMBER",e.WorkManagementAgentMember="WORK_MANAGEMENT_AGENT_MEMBER"}(qT||(qT={})),function(e){e.Account="ACCOUNT",e.AccountProduct="ACCOUNT_PRODUCT",e.Board="BOARD",e.Workspace="WORKSPACE"}(jT||(jT={})),function(e){e.NotifyPlanCloseToLimit="notify_plan_close_to_limit",e.RequestToMakeAppPublic="request_to_make_app_public",e.RequestToPublishApp="request_to_publish_app",e.RequestToUpgradeBeforeAppsUnpublish="request_to_upgrade_before_apps_unpublish",e.RequestToUpgradeBoardConnection="request_to_upgrade_board_connection",e.RequestToUpgradePlan="request_to_upgrade_plan",e.RequestToUpgradeVibePackage="request_to_upgrade_vibe_package"}(GT||(GT={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(HT||(HT={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(WT||(WT={})),function(e){e.Asc="ASC",e.Desc="DESC"}(YT||(YT={})),function(e){e.CreatedAt="CREATED_AT"}(KT||(KT={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(QT||(QT={})),function(e){e.InvalidValue="INVALID_VALUE",e.QuestionNotFound="QUESTION_NOT_FOUND",e.Required="REQUIRED"}(JT||(JT={})),function(e){e.Board="board"}(XT||(XT={})),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"}(ZT||(ZT={})),function(e){e.Avg="AVG",e.Count="COUNT",e.Max="MAX",e.Min="MIN",e.Sum="SUM"}(ew||(ew={})),function(e){e.Editor="EDITOR"}(tw||(tw={})),function(e){e.Editor="EDITOR",e.Owner="OWNER"}(aw||(aw={})),function(e){e.CrossOriginDataFlow="CROSS_ORIGIN_DATA_FLOW",e.FeatureUnavailable="FEATURE_UNAVAILABLE",e.NotExternal="NOT_EXTERNAL",e.UnsupportedVariant="UNSUPPORTED_VARIANT"}(nw||(nw={})),function(e){e.Account="ACCOUNT",e.All="ALL",e.Collaborative="COLLABORATIVE",e.My="MY"}(iw||(iw={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME",e.UpdatedAt="UPDATED_AT",e.ViewCount="VIEW_COUNT"}(ow||(ow={})),function(e){e.CreatedAt="CREATED_AT",e.IsPublished="IS_PUBLISHED",e.Name="NAME",e.PublishedAt="PUBLISHED_AT",e.State="STATE",e.UpdatedAt="UPDATED_AT"}(rw||(rw={})),function(e){e.External="EXTERNAL",e.Internal="INTERNAL",e.OldInternal="OLD_INTERNAL",e.OldPrivate="OLD_PRIVATE",e.Private="PRIVATE"}(sw||(sw={})),function(e){e.Created="CREATED",e.Deploying="DEPLOYING",e.Generating="GENERATING",e.ProcessingMessage="PROCESSING_MESSAGE",e.Ready="READY"}(dw||(dw={})),function(e){e.Draft="DRAFT",e.Interrupted="INTERRUPTED",e.Live="LIVE",e.Retired="RETIRED"}(pw||(pw={})),function(e){e.Build="BUILD",e.View="VIEW"}(lw||(lw={})),function(e){e.ArrayContains="ARRAY_CONTAINS",e.Eq="EQ",e.Gt="GT",e.Gte="GTE",e.In="IN",e.Lt="LT",e.Lte="LTE",e.Neq="NEQ"}(cw||(cw={})),function(e){e.Account="ACCOUNT",e.App="APP",e.User="USER"}(mw||(mw={})),function(e){e.Crm="CRM",e.Dev="DEV",e.Service="SERVICE",e.WorkManagement="WORK_MANAGEMENT"}(uw||(uw={})),function(e){e.All="ALL",e.NotPublished="NOT_PUBLISHED",e.Published="PUBLISHED"}(hw||(hw={})),function(e){e.Backend="BACKEND",e.Frontend="FRONTEND"}(_w||(_w={})),function(e){e.Asc="ASC",e.Desc="DESC"}(fw||(fw={})),function(e){e.Chakra="CHAKRA",e.Shadcn="SHADCN"}(gw||(gw={})),function(e){e.BoardView="BOARD_VIEW",e.ItemView="ITEM_VIEW",e.Object="OBJECT",e.ObjectFullstack="OBJECT_FULLSTACK",e.VibeDashboardWidget="VIBE_DASHBOARD_WIDGET",e.VibeItemView="VIBE_ITEM_VIEW"}(bw||(bw={})),function(e){e.Board="BOARD",e.Item="ITEM"}(yw||(yw={})),function(e){e.App="APP",e.Calendar="CALENDAR",e.Chart="CHART",e.Dashboard="DASHBOARD",e.Form="FORM",e.Gantt="GANTT",e.Kanban="KANBAN",e.Map="MAP",e.Table="TABLE",e.Timeline="TIMELINE"}(vw||(vw={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(Iw||(Iw={})),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"}(Ew||(Ew={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(Tw||(Tw={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(ww||(ww={})),function(e){e.Error="ERROR",e.Ok="OK"}(Aw||(Aw={})),function(e){e.Wait="WAIT"}(Sw||(Sw={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(Nw||(Nw={})),function(e){e.ContentCreation="CONTENT_CREATION",e.Discovery="DISCOVERY",e.Immediately="IMMEDIATELY",e.Planning="PLANNING",e.StructureCreation="STRUCTURE_CREATION"}(Dw||(Dw={})),function(e){e.LiteBuilder="LITE_BUILDER"}(Ow||(Ow={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(Rw||(Rw={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(Cw||(Cw={})),function(e){e.All="all",e.Member="member"}(kw||(kw={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Lw||(Lw={})),function(e){e.CreatedAt="created_at"}(Uw||(Uw={})),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"}(Pw||(Pw={}));const $w=rc`
2494
+ `,Db=10485760,Ob=5e4,Rb=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Cb=new Set([".pdf"]),kb=new Set([".docx"]),Lb=new Set([".xlsx"]),Ub=new Set([".xls"]),Pb=new Set([".txt",".md",".csv",".json"]),$b={item_id:n.z.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:n.z.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:n.z.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:n.z.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function xb(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function Mb(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 Mb(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Vb(e,t,a){const n=function(e,t){if(t){const e=xb(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:xb(e.name)}(e,a);try{if(Rb.has(n))return{file_name:e.name,file_extension:n,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(Ub.has(n))return{file_name:e.name,file_extension:n,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)>Db)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 n=t.body.getReader(),i=[];let o=0;try{let e=await n.read();for(;!e.done;){const{value:t}=e;if(o+=t.byteLength,o>Db)throw await n.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");i.push(t),e=await n.read()}}catch(e){throw await n.cancel().catch((()=>{})),e}return Buffer.concat(i)}(e.public_url);let i,o;Cb.has(n)?(i=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"):kb.has(n)?(i=await async function(e){return(await D.default.extractRawText({buffer:e})).value}(a),o="word"):Lb.has(n)?(i=await async function(e){const t=new O.default.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(Mb).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):Pb.has(n)?(i=a.toString("utf-8"),o="text"):(i=a.toString("utf-8"),o="unknown");const r=i.slice(t,t+Ob),s=i.length>t+Ob;return{file_name:e.name,file_extension:n,content_type:o,text:r,total_length:i.length,...Cb.has(n)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+Ob}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:n}}}var Fb,Bb,zb,qb,jb,Gb,Hb,Wb,Yb,Kb,Qb,Jb,Xb,Zb,ey,ty,ay,ny,iy,oy,ry,sy,dy,py,ly,cy,my,uy,hy,_y,fy,gy,by,yy,vy,Iy,Ey,Ty,wy,Ay,Sy,Ny,Dy,Oy,Ry,Cy,ky,Ly,Uy,Py,$y,xy,My,Vy,Fy,By,zy,qy,jy,Gy,Hy,Wy,Yy,Ky,Qy,Jy,Xy,Zy,ev,tv,av,nv,iv,ov,rv,sv,dv,pv,lv,cv,mv,uv,hv,_v,fv,gv,bv,yv,vv,Iv,Ev,Tv,wv,Av,Sv,Nv,Dv,Ov,Rv,Cv,kv,Lv,Uv,Pv,$v,xv,Mv,Vv,Fv,Bv,zv,qv,jv,Gv,Hv,Wv,Yv,Kv,Qv,Jv,Xv,Zv,eI,tI,aI,nI,iI,oI,rI,sI,dI,pI,lI,cI,mI,uI,hI,_I,fI,gI,bI,yI,vI,II,EI,TI,wI,AI,SI,NI,DI,OI,RI,CI,kI,LI,UI,PI,$I,xI,MI,VI,FI,BI,zI,qI,jI,GI,HI,WI,YI,KI,QI,JI,XI,ZI,eE,tE,aE,nE,iE,oE,rE,sE,dE,pE,lE,cE,mE,uE,hE,_E,fE,gE,bE,yE,vE,IE,EE,TE,wE,AE,SE,NE,DE,OE,RE,CE,kE,LE,UE,PE,$E,xE,ME,VE,FE,BE,zE,qE,jE,GE,HE,WE,YE,KE,QE,JE,XE,ZE,eT,tT,aT,nT,iT,oT,rT,sT,dT,pT,lT,cT,mT,uT,hT,_T,fT,gT,bT,yT,vT,IT,ET,TT,wT,AT,ST,NT,DT,OT,RT,CT,kT,LT,UT,PT,$T,xT,MT,VT,FT,BT,zT,qT,jT,GT,HT,WT,YT,KT,QT,JT,XT,ZT,ew,tw,aw,nw,iw,ow,rw,sw,dw,pw,lw,cw,mw,uw,hw,_w,fw,gw,bw,yw,vw,Iw,Ew,Tw,ww,Aw,Sw,Nw,Dw,Ow,Rw,Cw,kw,Lw,Uw,Pw,$w,xw,Mw,Vw,Fw,Bw;!function(e){e.Create="CREATE",e.Destroy="DESTROY",e.Show="SHOW",e.Update="UPDATE"}(Fb||(Fb={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Bb||(Bb={})),function(e){e.Board="BOARD",e.User="USER"}(zb||(zb={})),function(e){e.Cancelled="CANCELLED",e.Failed="FAILED",e.Running="RUNNING",e.Success="SUCCESS"}(qb||(qb={})),function(e){e.Application="APPLICATION",e.Audio="AUDIO",e.Board="BOARD",e.Doc="DOC",e.Html="HTML",e.Image="IMAGE",e.Item="ITEM",e.Text="TEXT",e.Unknown="UNKNOWN",e.Update="UPDATE",e.VibeApp="VIBE_APP",e.Video="VIDEO",e.View="VIEW"}(jb||(jb={})),function(e){e.Asset="ASSET",e.MondayEntity="MONDAY_ENTITY"}(Gb||(Gb={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(Hb||(Hb={})),function(e){e.Member="MEMBER",e.Owner="OWNER"}(Wb||(Wb={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeOpus_5="CLAUDE_OPUS_5",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.ClaudeSonnet_5="CLAUDE_SONNET_5",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gemini_3_5FlashLite="GEMINI_3_5_FLASH_LITE",e.Gemini_3_7Flash="GEMINI_3_7_FLASH",e.Gpt_5_2="GPT_5_2",e.Gpt_5_6="GPT_5_6",e.Gpt_5_6Luna="GPT_5_6_LUNA",e.Gpt_5_6Sol="GPT_5_6_SOL"}(Yb||(Yb={})),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"}(Kb||(Kb={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(Qb||(Qb={})),function(e){e.Team="TEAM",e.User="USER"}(Jb||(Jb={})),function(e){e.High="HIGH",e.Low="LOW",e.Medium="MEDIUM"}(Xb||(Xb={})),function(e){e.Communication="COMMUNICATION",e.Tools="TOOLS"}(Zb||(Zb={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(ey||(ey={})),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"}(ty||(ty={})),function(e){e.Table="TABLE",e.Union="UNION"}(ay||(ay={})),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"}(ny||(ny={})),function(e){e.And="AND",e.Or="OR"}(iy||(iy={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(oy||(oy={})),function(e){e.Asc="ASC",e.Desc="DESC"}(ry||(ry={})),function(e){e.Table="TABLE"}(sy||(sy={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(dy||(dy={})),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"}(py||(py={})),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"}(ly||(ly={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(cy||(cy={})),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"}(my||(my={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(uy||(uy={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(hy||(hy={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(_y||(_y={})),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"}(fy||(fy={})),function(e){e.MondayFast="MONDAY_FAST",e.MondayPowerful="MONDAY_POWERFUL",e.MondayStandard="MONDAY_STANDARD"}(gy||(gy={})),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"}(by||(by={})),function(e){e.AgentMember="AGENT_MEMBER",e.VibeUser="VIBE_USER"}(yy||(yy={})),function(e){e.Unpublish="UNPUBLISH"}(vy||(vy={})),function(e){e.Dependency="DEPENDENCY",e.Hosting="HOSTING"}(Iy||(Iy={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(Ey||(Ey={})),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"}(Ty||(Ty={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(wy||(wy={})),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"}(Ay||(Ay={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(Sy||(Sy={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(Ny||(Ny={})),function(e){e.Finalized="FINALIZED",e.Idle="IDLE",e.InProgress="IN_PROGRESS"}(Dy||(Dy={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Oy||(Oy={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.None="NONE",e.Pending="PENDING"}(Ry||(Ry={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.AiAgentIdentity="AI_AGENT_IDENTITY",e.Channel="CHANNEL",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(Cy||(Cy={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(ky||(ky={})),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"}(Ly||(Ly={})),function(e){e.Agent="AGENT"}(Uy||(Uy={})),function(e){e.Admin="ADMIN",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Py||(Py={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}($y||($y={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(xy||(xy={})),function(e){e.Edit="edit",e.View="view"}(My||(My={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Vy||(Vy={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Member="member",e.Viewer="viewer"}(Fy||(Fy={})),function(e){e.Classic="classic",e.DataSet="data_set"}(By||(By={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(zy||(zy={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(qy||(qy={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(jy||(jy={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Share="SHARE"}(Gy||(Gy={})),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"}(Hy||(Hy={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Wy||(Wy={})),function(e){e.BoardReportability="BOARD_REPORTABILITY"}(Yy||(Yy={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Ky||(Ky={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(Qy||(Qy={})),function(e){e.Edit="edit",e.View="view"}(Jy||(Jy={})),function(e){e.AnyAssigneeColumn="any_assignee_column"}(Xy||(Xy={})),function(e){e.CalendarBoardView="CalendarBoardView",e.DocBoardView="DocBoardView",e.EmptyBoardView="EmptyBoardView",e.FormBoardView="FormBoardView",e.TableBoardView="TableBoardView"}(Zy||(Zy={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(ev||(ev={})),function(e){e.Agent="AGENT",e.Automations="AUTOMATIONS",e.Board="BOARD",e.Dashboard="DASHBOARD",e.Domain="DOMAIN",e.Form="FORM",e.Items="ITEMS",e.Vibe="VIBE"}(tv||(tv={})),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"}(av||(av={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(nv||(nv={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(iv||(iv={})),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"}(ov||(ov={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(rv||(rv={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(sv||(sv={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(dv||(dv={})),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"}(pv||(pv={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(lv||(lv={})),function(e){e.Later="LATER",e.Now="NOW"}(cv||(cv={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(mv||(mv={})),function(e){e.Asc="ASC",e.Desc="DESC"}(uv||(uv={})),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"}(hv||(hv={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(_v||(_v={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(fv||(fv={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(gv||(gv={})),function(e){e.BoardConnected="BOARD_CONNECTED",e.BoardDisconnected="BOARD_DISCONNECTED",e.Chips="CHIPS",e.Cta="CTA",e.Error="ERROR",e.Indication="INDICATION",e.Processing="PROCESSING",e.Reasoning="REASONING",e.Text="TEXT",e.ToolCall="TOOL_CALL"}(bv||(bv={})),function(e){e.Ask="ASK",e.Build="BUILD",e.Plan="PLAN"}(yv||(yv={})),function(e){e.User="USER",e.Vibe="VIBE"}(vv||(vv={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(Iv||(Iv={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(Ev||(Ev={})),function(e){e.Description="description",e.Title="title"}(Tv||(Tv={})),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"}(wv||(wv={})),function(e){e.Or="OR"}(Av||(Av={})),function(e){e.Full="FULL",e.Partial="PARTIAL"}(Sv||(Sv={})),function(e){e.Id="ID",e.Name="NAME"}(Nv||(Nv={})),function(e){e.Ask="ASK",e.Build="BUILD",e.Plan="PLAN"}(Dv||(Dv={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(Ov||(Ov={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.SystemCreation="SYSTEM_CREATION"}(Rv||(Rv={})),function(e){e.Account="ACCOUNT",e.User="USER"}(Cv||(Cv={})),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"}(kv||(kv={})),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"}(Lv||(Lv={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(Uv||(Uv={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Pv||(Pv={})),function(e){e.Board="BOARD",e.Overview="OVERVIEW",e.VibeApp="VIBE_APP"}($v||($v={})),function(e){e.Board="BOARD",e.DataEntity="DATA_ENTITY"}(xv||(xv={})),function(e){e.Main="MAIN",e.Subitem="SUBITEM"}(Mv||(Mv={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Vv||(Vv={})),function(e){e.Date="DATE",e.Timeline="TIMELINE"}(Fv||(Fv={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(Bv||(Bv={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(zv||(zv={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(qv||(qv={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(jv||(jv={})),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"}(Gv||(Gv={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Hv||(Hv={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(Wv||(Wv={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Yv||(Yv={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Kv||(Kv={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Qv||(Qv={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Jv||(Jv={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(Xv||(Xv={})),function(e){e.Public="PUBLIC",e.Restricted="RESTRICTED"}(Zv||(Zv={})),function(e){e.BoardDocsMap="BOARD_DOCS_MAP",e.BusinessContext="BUSINESS_CONTEXT",e.BusinessGoal="BUSINESS_GOAL",e.ColumnDictionary="COLUMN_DICTIONARY",e.DetectedWorkflows="DETECTED_WORKFLOWS",e.ExtractedKnowledge="EXTRACTED_KNOWLEDGE",e.LifecycleWorkflow="LIFECYCLE_WORKFLOW",e.Overview="OVERVIEW",e.PeopleAndRoles="PEOPLE_AND_ROLES",e.PeopleRoles="PEOPLE_ROLES",e.RelatedBoards="RELATED_BOARDS",e.WorkdocMetadata="WORKDOC_METADATA"}(eI||(eI={})),function(e){e.Markdown="MARKDOWN",e.Structured="STRUCTURED"}(tI||(tI={})),function(e){e.Fresh="FRESH",e.Stale="STALE"}(aI||(aI={})),function(e){e.Board="BOARD",e.Workdoc="WORKDOC",e.Workspace="WORKSPACE"}(nI||(nI={})),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"}(iI||(iI={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(oI||(oI={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(rI||(rI={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(sI||(sI={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Kanban="KANBAN",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE",e.Timeline="TIMELINE"}(dI||(dI={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(pI||(pI={})),function(e){e.Negative="NEGATIVE",e.Positive="POSITIVE"}(lI||(lI={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(cI||(cI={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(mI||(mI={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(uI||(uI={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(hI||(hI={})),function(e){e.AllowOnly="ALLOW_ONLY",e.Exclude="EXCLUDE"}(_I||(_I={})),function(e){e.Monday="monday",e.Sunday="sunday"}(fI||(fI={})),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"}(gI||(gI={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(bI||(bI={})),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"}(yI||(yI={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(vI||(vI={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(II||(II={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(EI||(EI={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(TI||(TI={})),function(e){e.Classic="Classic",e.OneByOne="OneByOne"}(wI||(wI={})),function(e){e.Card="CARD",e.Flat="FLAT"}(AI||(AI={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(SI||(SI={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(NI||(NI={})),function(e){e.Email="Email",e.FirstName="FirstName",e.LastName="LastName",e.Location="Location",e.ManagerName="ManagerName",e.Name="Name",e.Phone="Phone",e.Timezone="Timezone",e.Title="Title"}(DI||(DI={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(OI||(OI={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(RI||(RI={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(CI||(CI={})),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"}(kI||(kI={})),function(e){e.High="High",e.Low="Low",e.Medium="Medium"}(LI||(LI={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(UI||(UI={})),function(e){e.Goodbye="GOODBYE",e.Hello="HELLO"}(PI||(PI={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}($I||($I={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(xI||(xI={})),function(e){e.And="AND",e.Or="OR"}(MI||(MI={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(VI||(VI={})),function(e){e.DataLimit="DATA_LIMIT",e.PlanLimit="PLAN_LIMIT"}(FI||(FI={})),function(e){e.Board="BOARD",e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD",e.Item="ITEM",e.Workspace="WORKSPACE"}(BI||(BI={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(zI||(zI={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(qI||(qI={})),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"}(jI||(jI={})),function(e){e.Error="ERROR"}(GI||(GI={})),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"}(HI||(HI={})),function(e){e.Table="TABLE"}(WI||(WI={})),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"}(YI||(YI={})),function(e){e.And="AND",e.Or="OR"}(KI||(KI={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(QI||(QI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(JI||(JI={})),function(e){e.Asc="asc",e.Desc="desc"}(XI||(XI={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(ZI||(ZI={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(eE||(eE={})),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"}(tE||(tE={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(aE||(aE={})),function(e){e.And="and",e.Or="or"}(nE||(nE={})),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"}(iE||(iE={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(oE||(oE={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(rE||(rE={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(sE||(sE={})),function(e){e.Board="BOARD",e.Doc="DOC",e.Workspace="WORKSPACE"}(dE||(dE={})),function(e){e.File="FILE"}(pE||(pE={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(lE||(lE={})),function(e){e.Claude_4_5Sonnet="CLAUDE_4_5_SONNET",e.Claude_4_6Sonnet="CLAUDE_4_6_SONNET",e.Claude_5Sonnet="CLAUDE_5_SONNET",e.ClaudeHaiku_4_5="CLAUDE_HAIKU_4_5",e.ClaudeOpus_4_6="CLAUDE_OPUS_4_6",e.ClaudeOpus_5="CLAUDE_OPUS_5",e.Gemini_3_1FlashLite="GEMINI_3_1_FLASH_LITE",e.Gemini_3_1Pro="GEMINI_3_1_PRO",e.Gemini_3_5Flash="GEMINI_3_5_FLASH",e.Gemini_3_5FlashLite="GEMINI_3_5_FLASH_LITE",e.Gemini_3_6Flash="GEMINI_3_6_FLASH",e.Gemini_3_7Flash="GEMINI_3_7_FLASH",e.Gpt_5="GPT_5",e.Gpt_5_1="GPT_5_1",e.Gpt_5_2="GPT_5_2",e.Gpt_5Mini="GPT_5_MINI",e.Gpt_5Nano="GPT_5_NANO"}(cE||(cE={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(mE||(mE={})),function(e){e.CustomizedList="CustomizedList",e.PersonalList="PersonalList",e.Workspace="Workspace"}(uE||(uE={})),function(e){e.Core="CORE",e.Crm="CRM",e.Marketing="MARKETING",e.Service="SERVICE",e.Software="SOFTWARE"}(hE||(hE={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(_E||(_E={})),function(e){e.Dropdown="dropdown",e.Status="status"}(fE||(fE={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(gE||(gE={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(bE||(bE={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(yE||(yE={})),function(e){e.ActionItem="ACTION_ITEM",e.Summary="SUMMARY",e.Topic="TOPIC",e.Transcript="TRANSCRIPT"}(vE||(vE={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(IE||(IE={})),function(e){e.CreateSubmissionMapping="CREATE_SUBMISSION_MAPPING"}(EE||(EE={})),function(e){e.Agent="AGENT",e.User="USER"}(TE||(TE={})),function(e){e.AgentError="AGENT_ERROR",e.Standard="STANDARD"}(wE||(wE={})),function(e){e.Ask="ASK",e.Error="ERROR",e.Plan="PLAN",e.Text="TEXT"}(AE||(AE={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(SE||(SE={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(NE||(NE={})),function(e){e.Board="BOARD",e.Item="ITEM",e.Object="OBJECT"}(DE||(DE={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(OE||(OE={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(RE||(RE={})),function(e){e.Post="Post",e.Project="Project"}(CE||(CE={})),function(e){e.Left="left",e.Right="right"}(kE||(kE={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(LE||(LE={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(UE||(UE={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(PE||(PE={})),function(e){e.Must="MUST",e.MustNot="MUST_NOT",e.Should="SHOULD"}($E||($E={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(xE||(xE={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Queued="QUEUED",e.SessionPending="SESSION_PENDING"}(ME||(ME={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(VE||(VE={})),function(e){e.Name="NAME"}(FE||(FE={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(BE||(BE={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(zE||(zE={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(qE||(qE={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(jE||(jE={})),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"}(GE||(GE={})),function(e){e.Board="BOARD",e.Item="ITEM",e.Object="OBJECT",e.SearchQuery="SEARCH_QUERY",e.User="USER",e.Widget="WIDGET"}(HE||(HE={})),function(e){e.Mobile="MOBILE",e.Web="WEB"}(WE||(WE={})),function(e){e.Downloads="DOWNLOADS",e.UpdatedAt="UPDATED_AT"}(YE||(YE={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(KE||(KE={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(QE||(QE={})),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"}(JE||(JE={})),function(e){e.Monday="MONDAY"}(XE||(XE={})),function(e){e.CrossEncoder="CROSS_ENCODER"}(ZE||(ZE={})),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"}(eT||(eT={})),function(e){e.Asset="ASSET",e.Board="BOARD",e.Post="POST",e.PostRef="POST_REF"}(tT||(tT={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(aT||(aT={})),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"}(nT||(nT={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(iT||(iT={})),function(e){e.Api="API",e.Assigned="ASSIGNED",e.Automation="AUTOMATION",e.Chat="CHAT",e.Mention="MENTION",e.Schedule="SCHEDULE"}(oT||(oT={})),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"}(rT||(rT={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(sT||(sT={})),function(e){e.Hybrid="HYBRID",e.Lexical="LEXICAL",e.Semantic="SEMANTIC"}(dT||(dT={})),function(e){e.BoardId="BOARD_ID",e.BoardKind="BOARD_KIND",e.BoardName="BOARD_NAME",e.BoardOwnerId="BOARD_OWNER_ID",e.BoardWithPulseViewPermissions="BOARD_WITH_PULSE_VIEW_PERMISSIONS",e.CreatedBy="CREATED_BY",e.GroupId="GROUP_ID",e.GroupName="GROUP_NAME",e.ItemsDates="ITEMS_DATES",e.ItemsNumerics="ITEMS_NUMERICS",e.ItemFreeText="ITEM_FREE_TEXT",e.ItemId="ITEM_ID",e.ItemLabels="ITEM_LABELS",e.ItemName="ITEM_NAME",e.ItemReferencedEmails="ITEM_REFERENCED_EMAILS",e.ItemStatuses="ITEM_STATUSES",e.ItemTags="ITEM_TAGS",e.LastUpdatedBy="LAST_UPDATED_BY",e.Persons="PERSONS",e.UpdatedAt="UPDATED_AT",e.WorkspaceId="WORKSPACE_ID"}(pT||(pT={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(lT||(lT={})),function(e){e.Board="BOARD"}(cT||(cT={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(mT||(mT={})),function(e){e.Marketplace="MARKETPLACE",e.Remix="REMIX"}(uT||(uT={})),function(e){e.Archived="ARCHIVED",e.Draft="DRAFT",e.PendingReview="PENDING_REVIEW",e.Published="PUBLISHED",e.Rejected="REJECTED",e.Unlisted="UNLISTED"}(hT||(hT={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(_T||(_T={})),function(e){e.Asc="ASC",e.Desc="DESC"}(fT||(fT={})),function(e){e.Asc="ASC",e.Desc="DESC"}(gT||(gT={})),function(e){e.Complete="COMPLETE",e.Start="START"}(bT||(bT={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(yT||(yT={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(vT||(vT={})),function(e){e.CountKeys="COUNT_KEYS"}(IT||(IT={})),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"}(ET||(ET={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(TT||(TT={})),function(e){e.Nominal="nominal",e.Percent="percent"}(wT||(wT={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(AT||(AT={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(ST||(ST={})),function(e){e.Active="active",e.Inactive="inactive"}(NT||(NT={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(DT||(DT={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(OT||(OT={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(RT||(RT={})),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"}(CT||(CT={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(kT||(kT={})),function(e){e.ManagedTemplate="managed_template",e.StandardTemplate="standard_template"}(LT||(LT={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(UT||(UT={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(PT||(PT={})),function(e){e.Custom="CUSTOM",e.Holiday="HOLIDAY"}($T||($T={})),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"}(xT||(xT={})),function(e){e.Crm="crm",e.Service="service"}(MT||(MT={})),function(e){e.Approved="APPROVED",e.Rejected="REJECTED"}(VT||(VT={})),function(e){e.Array="ARRAY",e.Date="DATE",e.Direct="DIRECT",e.DynamicNumber="DYNAMIC_NUMBER",e.DynamicText="DYNAMIC_TEXT",e.Hour="HOUR"}(FT||(FT={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(BT||(BT={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(zT||(zT={})),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"}(qT||(qT={})),function(e){e.InvalidField="INVALID_FIELD"}(jT||(jT={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(GT||(GT={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.SystemCreation="SYSTEM_CREATION"}(HT||(HT={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(WT||(WT={})),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.EntityKnowledgeApiUser="ENTITY_KNOWLEDGE_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.OrgHubApiUser="ORG_HUB_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.ServiceAiAgentMember="SERVICE_AI_AGENT_MEMBER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY",e.WorkspacePrimaryAgentMember="WORKSPACE_PRIMARY_AGENT_MEMBER",e.WorkManagementAgentMember="WORK_MANAGEMENT_AGENT_MEMBER"}(YT||(YT={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.EntityKnowledgeApiUser="ENTITY_KNOWLEDGE_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.OrgHubApiUser="ORG_HUB_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.ServiceAiAgentMember="SERVICE_AI_AGENT_MEMBER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY",e.WorkspacePrimaryAgentMember="WORKSPACE_PRIMARY_AGENT_MEMBER",e.WorkManagementAgentMember="WORK_MANAGEMENT_AGENT_MEMBER"}(KT||(KT={})),function(e){e.Account="ACCOUNT",e.AccountProduct="ACCOUNT_PRODUCT",e.Board="BOARD",e.Workspace="WORKSPACE"}(QT||(QT={})),function(e){e.NotifyPlanCloseToLimit="notify_plan_close_to_limit",e.RequestToMakeAppPublic="request_to_make_app_public",e.RequestToPublishApp="request_to_publish_app",e.RequestToUpgradeBeforeAppsUnpublish="request_to_upgrade_before_apps_unpublish",e.RequestToUpgradeBoardConnection="request_to_upgrade_board_connection",e.RequestToUpgradePlan="request_to_upgrade_plan",e.RequestToUpgradeVibePackage="request_to_upgrade_vibe_package"}(JT||(JT={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(XT||(XT={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(ZT||(ZT={})),function(e){e.Asc="ASC",e.Desc="DESC"}(ew||(ew={})),function(e){e.CreatedAt="CREATED_AT"}(tw||(tw={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(aw||(aw={})),function(e){e.InvalidValue="INVALID_VALUE",e.QuestionNotFound="QUESTION_NOT_FOUND",e.Required="REQUIRED"}(nw||(nw={})),function(e){e.Board="board"}(iw||(iw={})),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"}(ow||(ow={})),function(e){e.Avg="AVG",e.Count="COUNT",e.Max="MAX",e.Min="MIN",e.Sum="SUM"}(rw||(rw={})),function(e){e.Editor="EDITOR"}(sw||(sw={})),function(e){e.Editor="EDITOR",e.Owner="OWNER"}(dw||(dw={})),function(e){e.CrossOriginDataFlow="CROSS_ORIGIN_DATA_FLOW",e.FeatureUnavailable="FEATURE_UNAVAILABLE",e.NotExternal="NOT_EXTERNAL",e.UnsupportedVariant="UNSUPPORTED_VARIANT"}(pw||(pw={})),function(e){e.Account="ACCOUNT",e.All="ALL",e.Collaborative="COLLABORATIVE",e.My="MY"}(lw||(lw={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME",e.UpdatedAt="UPDATED_AT",e.ViewCount="VIEW_COUNT"}(cw||(cw={})),function(e){e.CreatedAt="CREATED_AT",e.IsPublished="IS_PUBLISHED",e.Name="NAME",e.PublishedAt="PUBLISHED_AT",e.State="STATE",e.UpdatedAt="UPDATED_AT"}(mw||(mw={})),function(e){e.External="EXTERNAL",e.Internal="INTERNAL",e.OldInternal="OLD_INTERNAL",e.OldPrivate="OLD_PRIVATE",e.Private="PRIVATE"}(uw||(uw={})),function(e){e.Created="CREATED",e.Deploying="DEPLOYING",e.Generating="GENERATING",e.ProcessingMessage="PROCESSING_MESSAGE",e.Ready="READY"}(hw||(hw={})),function(e){e.Draft="DRAFT",e.Interrupted="INTERRUPTED",e.Live="LIVE",e.Retired="RETIRED"}(_w||(_w={})),function(e){e.Build="BUILD",e.View="VIEW"}(fw||(fw={})),function(e){e.ArrayContains="ARRAY_CONTAINS",e.Eq="EQ",e.Gt="GT",e.Gte="GTE",e.In="IN",e.Lt="LT",e.Lte="LTE",e.Neq="NEQ"}(gw||(gw={})),function(e){e.Account="ACCOUNT",e.App="APP",e.User="USER"}(bw||(bw={})),function(e){e.Crm="CRM",e.Dev="DEV",e.Service="SERVICE",e.WorkManagement="WORK_MANAGEMENT"}(yw||(yw={})),function(e){e.All="ALL",e.NotPublished="NOT_PUBLISHED",e.Published="PUBLISHED"}(vw||(vw={})),function(e){e.Backend="BACKEND",e.Frontend="FRONTEND"}(Iw||(Iw={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Ew||(Ew={})),function(e){e.Chakra="CHAKRA",e.Shadcn="SHADCN"}(Tw||(Tw={})),function(e){e.BoardView="BOARD_VIEW",e.ItemView="ITEM_VIEW",e.Object="OBJECT",e.ObjectFullstack="OBJECT_FULLSTACK",e.VibeDashboardWidget="VIBE_DASHBOARD_WIDGET",e.VibeItemView="VIBE_ITEM_VIEW"}(ww||(ww={})),function(e){e.Board="BOARD",e.Item="ITEM"}(Aw||(Aw={})),function(e){e.App="APP",e.Calendar="CALENDAR",e.Chart="CHART",e.Dashboard="DASHBOARD",e.Form="FORM",e.Gantt="GANTT",e.Kanban="KANBAN",e.Map="MAP",e.Table="TABLE",e.Timeline="TIMELINE"}(Sw||(Sw={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(Nw||(Nw={})),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"}(Dw||(Dw={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(Ow||(Ow={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(Rw||(Rw={})),function(e){e.Error="ERROR",e.Ok="OK"}(Cw||(Cw={})),function(e){e.Wait="WAIT"}(kw||(kw={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(Lw||(Lw={})),function(e){e.ContentCreation="CONTENT_CREATION",e.Discovery="DISCOVERY",e.Immediately="IMMEDIATELY",e.Planning="PLANNING",e.StructureCreation="STRUCTURE_CREATION"}(Uw||(Uw={})),function(e){e.LiteBuilder="LITE_BUILDER"}(Pw||(Pw={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}($w||($w={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(xw||(xw={})),function(e){e.All="all",e.Member="member"}(Mw||(Mw={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Vw||(Vw={})),function(e){e.CreatedAt="created_at"}(Fw||(Fw={})),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"}(Bw||(Bw={}));const zw=rc`
2406
2495
  fragment CustomAgentFields on CustomAgent {
2407
2496
  id
2408
2497
  kind
@@ -2421,65 +2510,65 @@
2421
2510
  created_at
2422
2511
  updated_at
2423
2512
  }
2424
- `,xw=rc`
2425
- ${$w}
2513
+ `,qw=rc`
2514
+ ${zw}
2426
2515
 
2427
2516
  query getCustomAgents($ids: [ID!], $limit: Int) {
2428
2517
  custom_agents(ids: $ids, limit: $limit) {
2429
2518
  ...CustomAgentFields
2430
2519
  }
2431
2520
  }
2432
- `,Mw=rc`
2433
- ${$w}
2521
+ `,jw=rc`
2522
+ ${zw}
2434
2523
 
2435
2524
  mutation createAgent($input: CreateAgentInput!) {
2436
2525
  create_agent(input: $input) {
2437
2526
  ...CustomAgentFields
2438
2527
  }
2439
2528
  }
2440
- `,Vw=rc`
2441
- ${$w}
2529
+ `,Gw=rc`
2530
+ ${zw}
2442
2531
 
2443
2532
  mutation createBlankAgent($input: CreateBlankAgentInput) {
2444
2533
  create_blank_agent(input: $input) {
2445
2534
  ...CustomAgentFields
2446
2535
  }
2447
2536
  }
2448
- `,Fw=rc`
2449
- ${$w}
2537
+ `,Hw=rc`
2538
+ ${zw}
2450
2539
 
2451
2540
  mutation updateAgent($id: ID!, $input: UpdateAgentInput!) {
2452
2541
  update_agent(id: $id, input: $input) {
2453
2542
  ...CustomAgentFields
2454
2543
  }
2455
2544
  }
2456
- `,Bw=rc`
2457
- ${$w}
2545
+ `,Ww=rc`
2546
+ ${zw}
2458
2547
 
2459
2548
  mutation deleteAgent($id: ID!) {
2460
2549
  delete_agent(id: $id) {
2461
2550
  ...CustomAgentFields
2462
2551
  }
2463
2552
  }
2464
- `,zw=rc`
2553
+ `,Yw=rc`
2465
2554
  mutation activateAgent($id: ID!) {
2466
2555
  activate_agent(id: $id) {
2467
2556
  success
2468
2557
  }
2469
2558
  }
2470
- `,qw=rc`
2559
+ `,Kw=rc`
2471
2560
  mutation deactivateAgent($id: ID!, $inactive_reason: InactiveReason) {
2472
2561
  deactivate_agent(id: $id, inactive_reason: $inactive_reason) {
2473
2562
  success
2474
2563
  }
2475
2564
  }
2476
- `,jw=rc`
2565
+ `,Qw=rc`
2477
2566
  mutation runAgent($id: ID!) {
2478
2567
  run_agent(id: $id) {
2479
2568
  trigger_uuid
2480
2569
  }
2481
2570
  }
2482
- `,Gw=rc`
2571
+ `,Jw=rc`
2483
2572
  query getAgentActiveTriggers($agent_id: ID!) {
2484
2573
  agent_active_triggers(agent_id: $agent_id) {
2485
2574
  node_id
@@ -2489,31 +2578,31 @@
2489
2578
  field_summary
2490
2579
  }
2491
2580
  }
2492
- `,Hw=rc`
2581
+ `,Xw=rc`
2493
2582
  mutation addTriggerToAgent($agent_id: ID!, $block_reference_id: ID!, $field_values: JSON) {
2494
2583
  add_trigger_to_agent(agent_id: $agent_id, block_reference_id: $block_reference_id, field_values: $field_values) {
2495
2584
  success
2496
2585
  }
2497
2586
  }
2498
- `,Ww=rc`
2587
+ `,Zw=rc`
2499
2588
  mutation removeTriggerFromAgent($agent_id: ID!, $node_id: ID!) {
2500
2589
  remove_trigger_from_agent(agent_id: $agent_id, node_id: $node_id) {
2501
2590
  success
2502
2591
  }
2503
2592
  }
2504
- `,Yw=rc`
2593
+ `,eA=rc`
2505
2594
  mutation addSkillToAgent($agent_id: ID!, $skill_id: ID!) {
2506
2595
  add_skill_to_agent(agent_id: $agent_id, skill_id: $skill_id) {
2507
2596
  success
2508
2597
  }
2509
2598
  }
2510
- `,Kw=rc`
2599
+ `,tA=rc`
2511
2600
  mutation removeSkillFromAgent($agent_id: ID!, $skill_id: ID!) {
2512
2601
  remove_skill_from_agent(agent_id: $agent_id, skill_id: $skill_id) {
2513
2602
  success
2514
2603
  }
2515
2604
  }
2516
- `,Qw=rc`
2605
+ `,aA=rc`
2517
2606
  query getAgentTriggersCatalog($block_reference_ids: [ID!]) {
2518
2607
  agent_triggers_catalog(block_reference_ids: $block_reference_ids) {
2519
2608
  block_reference_id
@@ -2530,7 +2619,7 @@
2530
2619
  }
2531
2620
  }
2532
2621
  }
2533
- `,Jw=rc`
2622
+ `,nA=rc`
2534
2623
  query getAgentSkillsCatalog {
2535
2624
  agent_skills_catalog {
2536
2625
  id
@@ -2538,7 +2627,7 @@
2538
2627
  description
2539
2628
  }
2540
2629
  }
2541
- `,Xw=rc`
2630
+ `,iA=rc`
2542
2631
  mutation createAgentSkill($name: String!, $content: String!, $description: String) {
2543
2632
  create_agent_skill(name: $name, content: $content, description: $description) {
2544
2633
  id
@@ -2546,7 +2635,7 @@
2546
2635
  description
2547
2636
  }
2548
2637
  }
2549
- `,Zw={action:n.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:n.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:n.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:n.z.nativeEnum(zb).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:n.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:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:n.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:n.z.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:n.z.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const eA={action:n.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:n.z.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:n.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:n.z.record(n.z.union([n.z.string(),n.z.number(),n.z.boolean(),n.z.object({value:n.z.string(),label:n.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:n.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 tA={action:n.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:n.z.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:n.z.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:n.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:n.z.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:n.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 aA=rc`
2638
+ `,oA={action:n.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:n.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:n.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:n.z.nativeEnum(Yb).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:n.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:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:n.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:n.z.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:n.z.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:n.z.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const rA={action:n.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:n.z.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:n.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:n.z.record(n.z.union([n.z.string(),n.z.number(),n.z.boolean(),n.z.object({value:n.z.string(),label:n.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:n.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 sA={action:n.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:n.z.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:n.z.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:n.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:n.z.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:n.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 dA=rc`
2550
2639
  query getAgentKnowledge($id: ID!) {
2551
2640
  agent_knowledge(id: $id) {
2552
2641
  resources {
@@ -2561,25 +2650,25 @@
2561
2650
  }
2562
2651
  }
2563
2652
  }
2564
- `,nA=rc`
2653
+ `,pA=rc`
2565
2654
  mutation addAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2566
2655
  add_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2567
2656
  success
2568
2657
  }
2569
2658
  }
2570
- `,iA=rc`
2659
+ `,lA=rc`
2571
2660
  mutation removeAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!) {
2572
2661
  remove_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type) {
2573
2662
  success
2574
2663
  }
2575
2664
  }
2576
- `,oA=rc`
2665
+ `,cA=rc`
2577
2666
  mutation updateAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2578
2667
  update_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2579
2668
  success
2580
2669
  }
2581
2670
  }
2582
- `,rA={action:n.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:n.z.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:n.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:n.z.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:n.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 sA={action:n.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:n.z.array(n.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 dA=rc`
2671
+ `,mA={action:n.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:n.z.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:n.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:n.z.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:n.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 uA={action:n.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:n.z.array(n.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 hA=rc`
2583
2672
  query getBoardAutomations($boardIds: [ID!], $limit: Int, $cursor: String, $includeLegacy: Boolean!) {
2584
2673
  board_automations(board_ids: $boardIds, limit: $limit, cursor: $cursor) {
2585
2674
  cursor
@@ -2601,39 +2690,39 @@
2601
2690
  }
2602
2691
  }
2603
2692
  }
2604
- `;function pA(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function lA(e){const{active:t,user_id:a,...n}=e;return{...n,user_id:pA(a),is_active:t??!1}}const cA={boardId:n.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:n.z.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:n.z.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const mA=rc`
2693
+ `;function _A(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function fA(e){const{active:t,user_id:a,...n}=e;return{...n,user_id:_A(a),is_active:t??!1}}const gA={boardId:n.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:n.z.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:n.z.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const bA=rc`
2605
2694
  mutation activateLiveWorkflow($id: ID!) {
2606
2695
  activate_live_workflow(id: $id) {
2607
2696
  is_success
2608
2697
  }
2609
2698
  }
2610
- `,uA=rc`
2699
+ `,yA=rc`
2611
2700
  mutation deactivateLiveWorkflow($id: ID!) {
2612
2701
  deactivate_live_workflow(id: $id) {
2613
2702
  is_success
2614
2703
  }
2615
2704
  }
2616
- `,hA=rc`
2705
+ `,vA=rc`
2617
2706
  mutation deleteLiveWorkflow($id: ID!) {
2618
2707
  delete_live_workflow(id: $id) {
2619
2708
  is_success
2620
2709
  }
2621
2710
  }
2622
- `,_A={action:n.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:n.z.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const fA=({path:e,method:t,headers:a,body:n,signal:i})=>fetch(`https://api.monday.com${e}`,{method:t,headers:a,body:n,signal:i}),gA={userPrompt:n.z.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:n.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const bA="\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",yA=rc`
2711
+ `,IA={action:n.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:n.z.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const EA=({path:e,method:t,headers:a,body:n,signal:i})=>fetch(`https://api.monday.com${e}`,{method:t,headers:a,body:n,signal:i}),TA={userPrompt:n.z.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:n.z.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const wA="\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",AA=rc`
2623
2712
  query GetTriggerEvents($nextPageOffset: Int, $filters: TriggerEventsFiltersInput) {
2624
2713
  trigger_events(nextPageOffset: $nextPageOffset, filters: $filters) {
2625
2714
  triggerEvents {
2626
- ${bA}
2715
+ ${wA}
2627
2716
  }
2628
2717
  }
2629
2718
  }
2630
- `,vA=rc`
2719
+ `,SA=rc`
2631
2720
  query GetTriggerEvent($triggerUuid: String!) {
2632
2721
  trigger_event(triggerUuid: $triggerUuid) {
2633
- ${bA}
2722
+ ${wA}
2634
2723
  }
2635
2724
  }
2636
- `,IA=rc`
2725
+ `,NA=rc`
2637
2726
  query GetBlockEvents($triggerUuid: String!, $nextPageOffset: Int) {
2638
2727
  block_events(triggerUuid: $triggerUuid, nextPageOffset: $nextPageOffset) {
2639
2728
  blockEvents {
@@ -2653,7 +2742,7 @@
2653
2742
  }
2654
2743
  }
2655
2744
  }
2656
- `,EA=rc`
2745
+ `,DA=rc`
2657
2746
  query GetToolEvents($triggerUuid: String!, $nextPageOffset: Int) {
2658
2747
  tool_events(trigger_uuid: $triggerUuid, next_page_offset: $nextPageOffset) {
2659
2748
  tool_events {
@@ -2669,7 +2758,7 @@
2669
2758
  }
2670
2759
  }
2671
2760
  }
2672
- `,TA=n.z.object({dateRange:n.z.object({startDate:n.z.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:n.z.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:n.z.array(n.z.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:n.z.array(n.z.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:n.z.array(n.z.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:n.z.string().optional().describe("Filter by item identifier"),entityKind:n.z.string().optional().describe("Filter by entity kind"),hostType:n.z.string().optional().describe("Filter by host type")}).optional(),wA={mode:n.z.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:n.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:n.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:n.z.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:TA.describe("history: run filters"),triggerUuid:n.z.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:n.z.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:n.z.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:n.z.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const AA=rc`
2761
+ `,OA=n.z.object({dateRange:n.z.object({startDate:n.z.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:n.z.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:n.z.array(n.z.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:n.z.array(n.z.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:n.z.array(n.z.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:n.z.string().optional().describe("Filter by item identifier"),entityKind:n.z.string().optional().describe("Filter by entity kind"),hostType:n.z.string().optional().describe("Filter by host type")}).optional(),RA={mode:n.z.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:n.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:n.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:n.z.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:OA.describe("history: run filters"),triggerUuid:n.z.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:n.z.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:n.z.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:n.z.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const CA=rc`
2673
2762
  query GetAccountTriggerStatistics($filters: AccountTriggerStatisticsFiltersInput) {
2674
2763
  account_trigger_statistics(filters: $filters) {
2675
2764
  id
@@ -2678,7 +2767,7 @@
2678
2767
  total
2679
2768
  }
2680
2769
  }
2681
- `,SA=rc`
2770
+ `,kA=rc`
2682
2771
  query GetAccountTriggersByEntity($runStatus: TriggerEventState!, $filters: AccountTriggersByEntityIdFiltersInput) {
2683
2772
  account_triggers_statistics_by_entity_id(run_status: $runStatus, filters: $filters) {
2684
2773
  id
@@ -2686,7 +2775,7 @@
2686
2775
  workflow_statistics
2687
2776
  }
2688
2777
  }
2689
- `,NA={breakdown:n.z.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:n.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:n.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:n.z.array(n.z.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:n.z.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:n.z.array(n.z.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const DA=rc`
2778
+ `,LA={breakdown:n.z.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:n.z.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:n.z.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:n.z.array(n.z.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:n.z.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:n.z.array(n.z.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const UA=rc`
2690
2779
  mutation ConfigureCategorizeAiColumn(
2691
2780
  $boardId: ID!
2692
2781
  $columnId: ID!
@@ -2706,7 +2795,7 @@
2706
2795
  column_id
2707
2796
  }
2708
2797
  }
2709
- `,OA=rc`
2798
+ `,PA=rc`
2710
2799
  mutation ConfigureSummarizeAiColumn(
2711
2800
  $boardId: ID!
2712
2801
  $columnId: ID!
@@ -2726,7 +2815,7 @@
2726
2815
  column_id
2727
2816
  }
2728
2817
  }
2729
- `,RA=rc`
2818
+ `,$A=rc`
2730
2819
  mutation ConfigureTranslateAiColumn(
2731
2820
  $boardId: ID!
2732
2821
  $columnId: ID!
@@ -2746,7 +2835,7 @@
2746
2835
  column_id
2747
2836
  }
2748
2837
  }
2749
- `,CA=rc`
2838
+ `,xA=rc`
2750
2839
  mutation ConfigureImproveTextAiColumn(
2751
2840
  $boardId: ID!
2752
2841
  $columnId: ID!
@@ -2770,7 +2859,7 @@
2770
2859
  column_id
2771
2860
  }
2772
2861
  }
2773
- `,kA=rc`
2862
+ `,MA=rc`
2774
2863
  mutation ConfigureExtractAiColumn(
2775
2864
  $boardId: ID!
2776
2865
  $columnId: ID!
@@ -2794,7 +2883,7 @@
2794
2883
  column_id
2795
2884
  }
2796
2885
  }
2797
- `,LA=rc`
2886
+ `,VA=rc`
2798
2887
  mutation ConfigureOpenBlockAiColumn(
2799
2888
  $boardId: ID!
2800
2889
  $columnId: ID!
@@ -2810,7 +2899,7 @@
2810
2899
  column_id
2811
2900
  }
2812
2901
  }
2813
- `,UA=rc`
2902
+ `,FA=rc`
2814
2903
  mutation ConfigureWriteMeAiColumn(
2815
2904
  $boardId: ID!
2816
2905
  $columnId: ID!
@@ -2830,7 +2919,7 @@
2830
2919
  column_id
2831
2920
  }
2832
2921
  }
2833
- `,PA=rc`
2922
+ `,BA=rc`
2834
2923
  mutation ConfigurePersonAssignmentAiColumn(
2835
2924
  $boardId: ID!
2836
2925
  $columnId: ID!
@@ -2850,14 +2939,14 @@
2850
2939
  column_id
2851
2940
  }
2852
2941
  }
2853
- `,$A={board_id:n.z.number().describe("The ID of the board containing the column"),column_id:n.z.string().describe("The ID of the column to configure with AI"),block_type:n.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:n.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:n.z.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:n.z.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:n.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:n.z.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:n.z.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:n.z.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:n.z.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:n.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:n.z.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:n.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:n.z.array(n.z.object({user_ids:n.z.array(n.z.number()).describe("Array of user IDs in this group"),description:n.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:n.z.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const xA=rc`
2942
+ `,zA={board_id:n.z.number().describe("The ID of the board containing the column"),column_id:n.z.string().describe("The ID of the column to configure with AI"),block_type:n.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:n.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:n.z.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:n.z.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:n.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:n.z.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:n.z.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:n.z.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:n.z.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:n.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:n.z.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:n.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:n.z.array(n.z.object({user_ids:n.z.array(n.z.number()).describe("Array of user IDs in this group"),description:n.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:n.z.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const qA=rc`
2854
2943
  mutation RemoveAiFromColumn($boardId: ID!, $columnId: ID!) {
2855
2944
  remove_ai_from_column(board_id: $boardId, column_id: $columnId) {
2856
2945
  column_id
2857
2946
  success
2858
2947
  }
2859
2948
  }
2860
- `,MA={board_id:n.z.number().describe("The ID of the board containing the column"),column_id:n.z.string().describe("The ID of the column to remove AI from")};const VA="Do NOT include any personally identifiable information (PII) such as names, email addresses, phone numbers, or any other personal data.",FA={kind:n.z.enum(["feedback","feature_request","bug"]).describe("The kind of submission: general feedback, a feature request, or a bug report"),title:n.z.string().describe(`A short summary of the feedback. ${VA}`),description:n.z.string().describe(`Full details — what happened, what was expected, or what is being requested. ${VA}`),tool_name:n.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 BA=rc`
2949
+ `,jA={board_id:n.z.number().describe("The ID of the board containing the column"),column_id:n.z.string().describe("The ID of the column to remove AI from")};const GA="Do NOT include any personally identifiable information (PII) such as names, email addresses, phone numbers, or any other personal data.",HA={kind:n.z.enum(["feedback","feature_request","bug"]).describe("The kind of submission: general feedback, a feature request, or a bug report"),title:n.z.string().describe(`A short summary of the feedback. ${GA}`),description:n.z.string().describe(`Full details — what happened, what was expected, or what is being requested. ${GA}`),tool_name:n.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 WA=rc`
2861
2950
  query KnowledgeBaseSearch($query: String!, $limit: Int) {
2862
2951
  knowledge_base_search(query: $query, limit: $limit) {
2863
2952
  answer
@@ -2871,7 +2960,7 @@
2871
2960
  }
2872
2961
  }
2873
2962
  }
2874
- `,zA=rc`
2963
+ `,YA=rc`
2875
2964
  query AskDeveloperDocs($query: String!, $retrieval_only: Boolean = true) {
2876
2965
  ask_developer_docs(query: $query, retrieval_only: $retrieval_only) {
2877
2966
  id
@@ -2880,7 +2969,7 @@
2880
2969
  conversation_id
2881
2970
  }
2882
2971
  }
2883
- `,qA="developer_docs",jA="general",GA={query:n.z.string().describe("The question or topic to search for in the monday.com knowledge base."),kind:n.z.enum([qA,jA]).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.')};n.z.enum(["enable","disable","status","list","detailed","reset"]).describe('Action to perform: "list" or "detailed" to discover available tools, "status" to check current states, "enable" to activate needed tools, "disable" to deactivate tools, "reset" to restore defaults'),n.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const HA=rc`
2972
+ `,KA="developer_docs",QA="general",JA={query:n.z.string().describe("The question or topic to search for in the monday.com knowledge base."),kind:n.z.enum([KA,QA]).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.')};n.z.enum(["enable","disable","status","list","detailed","reset"]).describe('Action to perform: "list" or "detailed" to discover available tools, "status" to check current states, "enable" to activate needed tools, "disable" to deactivate tools, "reset" to restore defaults'),n.z.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const XA=rc`
2884
2973
  query getSprintsByIds($ids: [ID!]) {
2885
2974
  items(ids: $ids) {
2886
2975
  id
@@ -2915,7 +3004,7 @@
2915
3004
  }
2916
3005
  }
2917
3006
  }
2918
- `,WA={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"},YA={...WA,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},KA="BOARD_NOT_FOUND:",QA="SPRINT_NOT_FOUND:",JA="DOCUMENT_NOT_FOUND:",XA="DOCUMENT_INVALID:",ZA="DOCUMENT_EMPTY:",eS="EXPORT_FAILED:",tS="INTERNAL_ERROR:",aS="VALIDATION_ERROR:",nS="task_sprint",iS={[YA.SPRINT_TASKS]:"Sprint Tasks",[YA.SPRINT_TIMELINE]:"Sprint Timeline",[YA.SPRINT_COMPLETION]:"Sprint Completion",[YA.SPRINT_START_DATE]:"Sprint Start Date",[YA.SPRINT_END_DATE]:"Sprint End Date",[YA.SPRINT_ACTIVATION]:"Sprint Activation",[YA.SPRINT_SUMMARY]:"Sprint Summary",[YA.SPRINT_CAPACITY]:"Sprint Capacity"},oS=wd,rS={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},sS=(e,t)=>e.column_values?.find((e=>e.id===t)),dS=(e,t)=>{const a=sS(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},pS=(e,t)=>{const a=sS(e,t);return"DateValue"===a?.__typename?a.date??null:null},lS=(e,t)=>{const a=sS(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},cS=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},mS=(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)))},uS=e=>mS(e,Object.values(WA)),hS=e=>mS(e,Object.values(rS)),_S=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},fS=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===hh.BoardRelation))||null,gS={sprintId:n.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const bS=rc`
3007
+ `,ZA={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"},eS={...ZA,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},tS="BOARD_NOT_FOUND:",aS="SPRINT_NOT_FOUND:",nS="DOCUMENT_NOT_FOUND:",iS="DOCUMENT_INVALID:",oS="DOCUMENT_EMPTY:",rS="EXPORT_FAILED:",sS="INTERNAL_ERROR:",dS="VALIDATION_ERROR:",pS="task_sprint",lS={[eS.SPRINT_TASKS]:"Sprint Tasks",[eS.SPRINT_TIMELINE]:"Sprint Timeline",[eS.SPRINT_COMPLETION]:"Sprint Completion",[eS.SPRINT_START_DATE]:"Sprint Start Date",[eS.SPRINT_END_DATE]:"Sprint End Date",[eS.SPRINT_ACTIVATION]:"Sprint Activation",[eS.SPRINT_SUMMARY]:"Sprint Summary",[eS.SPRINT_CAPACITY]:"Sprint Capacity"},cS=wd,mS={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},uS=(e,t)=>e.column_values?.find((e=>e.id===t)),hS=(e,t)=>{const a=uS(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},_S=(e,t)=>{const a=uS(e,t);return"DateValue"===a?.__typename?a.date??null:null},fS=(e,t)=>{const a=uS(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},gS=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},bS=(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)))},yS=e=>bS(e,Object.values(ZA)),vS=e=>bS(e,Object.values(mS)),IS=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},ES=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===hh.BoardRelation))||null,TS={sprintId:n.z.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const wS=rc`
2919
3008
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
2920
3009
  boards(ids: [$boardId], limit: 1) {
2921
3010
  items_page(limit: $limit) {
@@ -2951,7 +3040,7 @@
2951
3040
  }
2952
3041
  }
2953
3042
  }
2954
- `,yS={sprintsBoardId:n.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const vS=rc`
3043
+ `,AS={sprintsBoardId:n.z.number().describe("The ID of the monday-dev board containing the sprints"),limit:n.z.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const SS=rc`
2955
3044
  query GetRecentBoards($limit: Int) {
2956
3045
  boards(limit: $limit, order_by: used_at, state: active) {
2957
3046
  id
@@ -2967,7 +3056,7 @@
2967
3056
  }
2968
3057
  }
2969
3058
  }
2970
- `,IS={};const ES=[class extends ce{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=f.READ,this.annotations=le({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 IS}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(vS,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${KA} 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:`${tS} 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 n=fS(e,WA.SPRINT_TASKS);if(!n)return;const i=_S(n);if(!i)return;const o=`${e.id}:${i}`;if(a.has(o))return;const r=t.get(i);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(i,r,`Tasks Board ${i}`)})}processTasksBoard(e,t,a){const n=fS(e,nS);if(!n)return;const i=_S(n);if(!i)return;const o=`${i}:${e.id}`;if(a.has(o))return;const r=t.get(i);a.set(o,{sprintsBoard:this.createBoardInfo(i,r,`Sprints Board ${i}`),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 n of e)n.columns&&(uS(n)&&this.processSprintsBoard(n,a,t),hS(n)&&this.processTasksBoard(n,a,t));return Array.from(t.values())}},class extends ce{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=f.READ,this.annotations=le({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List the sprints of a monday-dev sprints board with their metadata.\n\nReturns comprehensive sprint metadata 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. If you do not already have it, call get_monday_dev_sprints_boards first to discover it.\n\n## Call this before:\n- get_sprint_summary — this tool returns the Sprint IDs that get_sprint_summary requires. Never guess a sprint ID."}getInputSchema(){return yS}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},n=await this.mondayApi.request(bS,a),i=n.boards?.[0],o=i?.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:`${tS} 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(uc,t),n=a.boards?.[0];if(!n)return{success:!1,error:`${KA} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const i=n.columns||[],o=this.validateSprintsBoardSchemaFromColumns(i);return o.isValid?{success:!0}:{success:!1,error:`${aS} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${tS} 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(WA),n=cS(t,a);if(!n.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return n.missingColumns.forEach((t=>{const a=(e=>iS[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=dS(e,YA.SPRINT_ACTIVATION),a=dS(e,YA.SPRINT_COMPLETION),n=pS(e,YA.SPRINT_START_DATE),i=pS(e,YA.SPRINT_END_DATE),o=((e,t)=>{const a=sS(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,YA.SPRINT_TIMELINE),r=lS(e,YA.SPRINT_SUMMARY);let s=oS.Planned;return a?s=oS.Completed:(t||n)&&(s=oS.Active),{id:e.id,name:e.name||"Unknown",status:s,timeline:o?{from:o.from,to:o.to}:null,start_date:n||null,end_date:i||null,is_completed:a,document_object_id:r||null}}))}},class extends ce{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=f.READ,this.annotations=le({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- Requires a sprintId. [REQUIRED PRECONDITION]: call get_sprints_metadata first to list the sprints on the board and resolve the sprintId (and to confirm the sprint is completed). If you do not know the sprints board ID either, start with get_monday_dev_sprints_boards.\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 gS}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${tS} 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||`${tS} Unknown error occurred while reading document content`}}catch(e){return{content:`${tS} 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(HA,t)).items||[];if(0===a.length)return{success:!1,error:`${QA} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const n=a[0];if(!n)return{success:!1,error:`${QA} Sprint with ID ${e} not found.`};const i=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),n=[...Object.values(WA),...t];return cS(a,n)})(n,[YA.SPRINT_SUMMARY]);if(!i.isValid)return{success:!1,error:`${aS} Sprint item is missing required columns: ${i.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=lS(n,YA.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:n.name}:{success:!1,error:`${JA} No sprint summary document found for sprint "${n.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${tS} 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(sc,t)).docs||[];if(0===a.length)return{success:!1,error:`${JA} Document with object ID ${e} not found or not accessible.`};const n=a[0];if(!n||!n.id)return{success:!1,error:`${XA} Document data is invalid for object ID ${e}.`};const i={docId:n.id,blockIds:[]},o=await this.mondayApi.request(Ac,i);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${eS} 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:`${ZA} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${tS} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],TS=[class extends ce{constructor(){super(...arguments),this.name="delete_item",this.type=f.WRITE,this.annotations=le({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Jh}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(cc,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_items_page",this.type=f.READ,this.annotations=le({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. [MULTI-LEVEL BOARDS]: The response includes hierarchy_type on the board ("multi_level" for MLS boards) and parent_item_id on each item. On multi-level boards, items form a tree (up to 5 levels). Use includeSubItems to get all descendants (returned flat with parent_item_id to reconstruct the tree). Top-level items have no parent_item_id. Subitems reference their parent. [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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing proper filters and knowing which columns are available. [VIRTUAL COLUMNS]: Four filterable columns exist that get_board_info never returns - "group" (the item\'s board group), "__creation_log__" (creation time), "__last_updated__" (update time) and "__item_id__" (item id). All four are also valid in orderBy, e.g. "__creation_log__" with direction "desc" to sort newest-first. Call get_column_type_info with the matching column type for each one\'s compareValue and operator rules. [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 with filters.views.names set to that view name (avoids downloading all views on large boards), extract the matching view\'s filter field, then pass it as the filters argument here.'}getInputSchema(){return v_}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){$c(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 n=await this.mondayApi.request(u_,a);return{content:this.mapResult(n,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:_s.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],n=a?.items_page,i=n?.items||[];return{board:{id:a?.id,name:a?.name,hierarchy_type:a?.hierarchy_type||null},items:i.map((e=>this.mapItem(e,t))),pagination:{has_more:!!n?.cursor,nextCursor:n?.cursor||null,count:i.length}}}mapItem(e,t){const a=e.parent_item?.id||null,n={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at,...a&&{parent_item_id:a}};if(t.includeColumns&&e.column_values){n.column_values={};for(const t of e.column_values)n.column_values[t.id]=this.getColumnValueData(t)}if(t.includeGroup&&"group"in e&&e.group&&(n.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})));n.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(n.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),n}getColumnValueData(e){switch(e.type){case hh.BoardRelation:return e.linked_items;case hh.Formula:return e.display_value;case hh.Mirror:return"Column value type is not supported"}if("battery_value"in e)return e.battery_value;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(h_,t,{versionOverride:"dev",timeout:jc})).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 n=e.itemIds??[];if(0===n.length)return a;const i=new Set(n);return a.filter((e=>i.has(e)))}},Oh,class extends ce{constructor(){super(...arguments),this.name="create_items",this.type=f.WRITE,this.annotations=le({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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?Rh:Ch}async executeInternal(e){const t=e.items.flatMap(((e,t)=>void 0===e.name?[kh(new Uc("Item name is required",Lc),t)]:[]));if(t.length)throw new Uc(`${t.length} of ${e.items.length} items are missing the required name field`,Lc,t);const a=this.context?.boardId??e.boardId;this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.items.length;const n=new Oh(this.mondayApi,{boardId:a}),i="Skipped: a previous item hit the minute rate limit; this item was not attempted",o=e.items.map(((e,t)=>async()=>{const a=await n.execute({name:e.name,columnValues:e.columnValues,groupId:e.groupId,parentItemId:e.parentItemId,duplicateFromItemId:e.duplicateFromItemId,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,...a.content}})),r=await Gc(o,{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:kh(e,t)})}),s=r.filter((e=>"error"in e)).map((e=>e._errorEntry)),d=r.map((({_errorEntry:e,...t})=>t)),p=r.length,l=s.length,c={board_id:a,summary:{total:p,created:p-l,failed:l},is_partial_success:l>0&&l<p,results:d};return s.length&&(c.errors=s),{content:c}}},Vh,class extends ce{constructor(){super(...arguments),this.name="create_updates",this.type=f.WRITE,this.annotations=le({title:"Create Multiple Updates",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create up to 40 updates (comments/posts) in a single call. Each entry is independent - it targets its own item, has its own body and mentions, and can reply to an existing update via parentId - so one call can post on many items, or post several replies. Use this instead of calling create_update repeatedly when posting more than one update. Each entry returns its own update_id and item_id on success or a raw error message on failure."}getInputSchema(){return Fh}async executeInternal(e){this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.updates.length;const t="Skipped: a previous update hit the minute rate limit, this update was not attempted",a=new Vh(this.mondayApi),n=e.updates.map(((e,t)=>async()=>{const n=await a.execute(e);return{index:t,...n.content}})),i=await Gc(n,{limit:10,onSkipped:e=>({index:e,error:t,_errorEntry:{code:"RATE_LIMIT_SKIPPED",message:t,path:["results",e]}}),onError:(e,t)=>({index:t,error:e instanceof Error?e.message:String(e),_errorEntry:Bh(e,t)})}),o=i.filter((e=>"error"in e)).map((e=>e._errorEntry)),r=i.map((({_errorEntry:e,...t})=>t)),s=i.length,d=o.length,p={summary:{total:s,created:s-d,failed:d},is_partial_success:d>0&&d<s,results:r};return o.length&&(p.errors=o),{content:p}}},class extends ce{constructor(){super(...arguments),this.name="delete_update",this.type=f.WRITE,this.annotations=le({title:"Delete Update",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an update (comment/post) from a monday.com item."}getInputSchema(){return qh}async executeInternal(e){try{const t={id:e.id.toString()},a=await this.mondayApi.request(zh,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){Pc(e,"delete update")}}},class extends ce{constructor(){super(...arguments),this.name="get_updates",this.type=f.READ,this.annotations=le({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 Wh}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===Hh.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const n={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let i;i=e.objectType===Hh.Item?await this.mondayApi.request(jh,{...n,itemId:e.objectId}):await this.mondayApi.request(Gh,{...n,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:Yh(e.fromDate),toDate:Yh(e.toDate)}:{}});const o=e.objectType===Hh.Item?i.items?.[0]?.updates:i.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===Hh.Item?i.items?.[0]?.url:i.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){Pc(e,"get updates")}}},class extends ce{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=f.WRITE,this.annotations=le({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 ab}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),n=tb.safeParse(a);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);t=n.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},n=await this.mondayApi.request(Uh,a);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${n.create_update.id} successfully created on item ${e.itemId}`,update_id:n.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){Pc(e,"create update")}}},class extends ce{constructor(){super(...arguments),this.name="get_board_schema",this.type=f.READ,this.annotations=le({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id. Returns each column id, title, type, and revision, plus each group id and title. Call this before tools that need a column id, type, and revision resolved from schema: update_column (which also needs the revision returned here), delete_column, configure_ai_column, and remove_ai_from_column — get_board_info returns the same column id/type/revision fields and also satisfies this precondition, but prefer this tool when you only need columns and groups, not the rest of the board. For broader board metadata (owners, views, and their filters) use get_board_info instead — pass filters.views.ids / filters.views.names and/or filters.columns.ids there when you only need a subset."}getInputSchema(){if(!this.context?.boardId)return I_}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},n=await this.mondayApi.request(uc,a);return{content:{message:"Board schema retrieved",board_id:t,columns:n.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:n.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_activity",this.type=f.READ,this.annotations=le({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. [REQUIRED PRECONDITION]: Call this with includeData=true before undo_action — it is the source of the action_record_uuid that identifies the action to undo."}getInputSchema(){return o_}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-qc.MONTH30Days),n=e?.fromDate||a.toISOString(),i=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:n,toDate:i,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(i_,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 (${n} to ${i}).`};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 ce{constructor(e,t,a){super(e,a),this.name="get_board_info",this.type=f.READ,this.annotations=le({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. "+(this.isKnowledgeEnabled()?"Set includeKnowledge to true only when generated business context is needed beyond the board structure, including workflow and status meanings, column purposes, people roles, and related boards. This adds a slower, more expensive request, and knowledge may be null while unavailable or still being generated. ":"")+'Also returns the board\'s views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. On large boards, ALWAYS narrow the response: use filters.views.names or filters.views.ids when you only need specific views, and/or filters.columns.ids when you only need specific columns. Set filters.views.only or filters.columns.only when you want just that section — full views[].settings across many views can be multi-MB. The response includes hierarchy_type which indicates if the board is a multi-level board ("multi_level") where items can have nested subitems up to 5 levels deep on the same board. On multi-level boards, subitems share the same columns as parent items and subItemColumns will be null. Call this FIRST whenever you are not already familiar with a board structure (column IDs, column types, column revisions, status labels) — before reading or writing its data, or before any tool that declares this as a required precondition (e.g. get_board_items_page, board_insights, create_item, create_items, update_items, change_item_column_values, update_column, create_view, create_view_table, update_view, update_view_table). Also use the views it returns to resolve a view referenced by name (pass that name in filters.views.names), and as the source of view ids for update_view and update_view_table. Each column\'s "settings" field is the raw API value for that existing column, shown so you can read current labels/config — it is NOT the format expected by the columnSettings parameter of create_column or update_column. Never copy a column\'s "settings" object verbatim into columnSettings — use get_column_type_info with fetchMode "schema" to get the correct shape for the column type you are creating or updating.'}getInputSchema(){return m_}async executeInternal(e){const{columnIds:t,viewIds:a,includeColumns:n,includeViews:i,unmatchedViewNames:o,availableViewNames:r}=await this.resolveFiltersAsync(e);if(e.filters?.views?.names?.length&&i&&void 0!==a&&0===a.length){const t=r.length>0?r.join(", "):"(none)";return{content:`None of the requested view names matched on board ${e.boardId}. Requested: ${e.filters.views.names.join(", ")}. Available views: ${t}.`}}const s={boardId:e.boardId.toString(),columnIds:n?t:void 0,viewIds:i?a:void 0,includeColumns:n,includeViews:i},d=this.mondayApi.request(r_,s),p=!0===e.includeKnowledge,l=p&&this.isKnowledgeEnabled()?this.mondayApi.request(p_,{boardId:e.boardId.toString()},{versionOverride:"dev",timeout:1e3}).catch((t=>(this.context?.deps?.logger?.warn({err:t,boardId:e.boardId,timeoutMs:1e3},"Failed to fetch board knowledge"),null))):Promise.resolve(null),[c,m]=await Promise.all([d,l]),u=c.boards?.[0];if(!u)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const h=n?await this.getSubItemsBoardAsync(u):null;return{content:l_(u,h,o,m?.entity_knowledge??null,p)}}isKnowledgeEnabled(){return this.context?.deps?.flagChecker?.("mcp-get-board-info-entity-knowledge")??!0}async resolveFiltersAsync(e){const t=e.filters?.columns,a=e.filters?.views,n=Boolean(t?.only),i=Boolean(a?.only),o=void 0!==a?.ids,r=Boolean(a?.names?.length),s=!i||n,d=!n||i,p=s?t?.ids:void 0;if(!d)return{columnIds:p,viewIds:void 0,includeColumns:s,includeViews:d,unmatchedViewNames:[],availableViewNames:[]};if(!o&&!r)return{columnIds:p,viewIds:void 0,includeColumns:s,includeViews:d,unmatchedViewNames:[],availableViewNames:[]};if(o&&!r)return{columnIds:p,viewIds:a?.ids??[],includeColumns:s,includeViews:d,unmatchedViewNames:[],availableViewNames:[]};const l=await this.mondayApi.request(s_,{boardId:e.boardId.toString()}),c=l.boards?.[0]?.views??[],m=c.map((e=>e?.name)).filter((e=>Boolean(e))),{viewIds:u,unmatchedViewNames:h}=((e,t)=>{const a=new Map;for(const t of e){if(!t?.id||!t.name)continue;const e=c_(t.name),n=a.get(e)??[];n.push(t.id),a.set(e,n)}const n=[],i=[];for(const e of t){const t=a.get(c_(e));t?.length?n.push(...t):i.push(e)}return{viewIds:n,unmatchedViewNames:i}})(c,a?.names??[]);return{columnIds:p,viewIds:[...new Set([...a?.ids??[],...u])],includeColumns:s,includeViews:d,unmatchedViewNames:h,availableViewNames:m}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===hh.Subtasks));if(!t)return null;const a=t.settings.boardIds[0];if(a===e.id)return null;const n=await this.mondayApi.request(d_,{boardId:a});return n.boards?.[0]??null}},class extends ce{constructor(){super(...arguments),this.name="get_full_board_data",this.type=f.READ,this.annotations=le({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 n_}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(Zh,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const n=a.boards[0],i=new Set;n.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&i.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&i.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&&i.add(e.id)}))}}))}));const o=Array.from(i).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(e_,e);r=t.users?.filter((e=>null!==e))||[]}const s=new Map(r.map((e=>[e.id,e])));return{content:{board:{id:n.id,name:n.name,columns:n.columns,items:n.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:n.items_page.items.length,total_updates:n.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){Pc(e,"get full board data")}}},class extends ce{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=f.READ,this.annotations=le({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 Z_}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,n=e.includeTeams||!1,i=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||n||i||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(q_);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=H_(s),p=await J_(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||n||i||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(z_,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 J_(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(i&&n)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>W_)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>Y_)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(i||!t&&a&&!n)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(B_,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(F_,t)}else if(n){const t={userIds:e.userIds,teamIds:e.teamIds,limit:K_};s=await this.mondayApi.request(V_,t)}else if(t){const t={userIds:e.userIds,limit:K_};s=await this.mondayApi.request(x_,t)}else{const e={userIds:void 0,limit:K_};s=await this.mondayApi.request(M_,e)}const d=H_(s),p=await J_(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Qc,class extends ce{constructor(){super(...arguments),this.name="update_items",this.type=f.WRITE,this.annotations=le({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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing valid column values."}getInputSchema(){return this.context?.boardId?Xc:Zc}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)),n=a.map(((e,t)=>null==e?t:-1)).filter((e=>e>=0));if(n.length>0)throw new Uc(`Missing boardId for update(s) at index ${n.join(", ")}. Set a boardId on each update or provide a batch-level boardId.`,"MISSING_REQUIRED_PARAMETER");const i="Skipped: a previous update hit the minute rate limit, this update was not attempted",o=new Qc(this.mondayApi),r=e.updates.map(((e,t)=>async()=>{const n=a[t],i=await o.execute({boardId:n,itemId:e.itemId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,board_id:n,...i.content}})),s=await Gc(r,{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:em(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 ce{constructor(){super(...arguments),this.name="move_item_to_group",this.type=f.WRITE,this.annotations=le({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to another group on the same monday.com board. It cannot move an item to a different board."}getInputSchema(){return ef}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId};let a;try{a=await this.mondayApi.request(_c,t)}catch(e){Pc(e,"move item to group")}return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends ce{constructor(){super(...arguments),this.name="create_board",this.type=f.WRITE,this.annotations=le({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Tm}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{},...void 0!==e.useMlsTemplate?{useMlsTemplate:e.useMlsTemplate}:{},...void 0!==e.useDatasetTemplate?{useDatasetTemplate:e.useDatasetTemplate}:{}},a=await this.mondayApi.request(fc,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends ce{constructor(){super(...arguments),this.name="use_template",this.type=f.WRITE,this.annotations=le({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 wm}async executeInternal(e){const t={templateId:e.templateId,destinationWorkspaceId:e.destinationWorkspaceId,destinationName:e.destinationName,boardKind:e.boardKind},a=await this.mondayApi.request(Nc,t),n=a.use_template?.process_id;return null==n?{content:{processId:null,message:"Failed to start template application. The request was rejected."}}:{content:{processId:n,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 ce{constructor(){super(...arguments),this.name="check_template_status",this.type=f.READ,this.annotations=le({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 Am}async executeInternal(e){const t={processId:e.processId},a=(await this.mondayApi.request(Dc,t)).template_installation_status;return a?a.status===xd.Complete?{content:{status:xd.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===xd.Failed?{content:{status:xd.Failed,board_ids:[],board_ids_map:[],message:"Template application failed. Please try again."}}:a.status===xd.Pending||a.status===xd.InProgress?{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Template application ${a.status===xd.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 ce{constructor(){super(...arguments),this.name="create_form",this.type=f.WRITE,this.annotations=le({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 uu}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(Hm,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends ce{constructor(){super(...arguments),this.name="update_form",this.type=f.WRITE,this.annotations=le({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new nh((()=>this.mondayApi)),this.actionHandlers=new Map([[Lu.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Lu.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Lu.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Lu.activate,this.helpers.activateForm.bind(this.helpers)],[Lu.createTag,this.helpers.createTag.bind(this.helpers)],[Lu.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Lu.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Lu.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Lu.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Lu.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Lu.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation. [REQUIRED PRECONDITION]: Call get_form first to read the current form state — you need it to resolve the formToken, and for actions that reference existing entities (updateQuestionOrder needs the question ids, deleteTag needs the tag id) or that overwrite existing settings (updateAppearance, updateAccessibility, updateFeatures, updateFormHeader)."}getInputSchema(){return ah}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends ce{constructor(){super(...arguments),this.name="get_form",this.type=f.READ,this.annotations=le({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token, including its pages, questions, question ids, settings, and conditional showIfRules. 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. Call this FIRST before any tool that acts on an existing form: create_form_submission (to know the questions and their constraints), form_questions_editor (to resolve question ids and current structure), and update_form (to see the current settings before changing them)."}getInputSchema(){return ih}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Wm,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends ce{constructor(){super(...arguments),this.name="form_questions_editor",this.type=f.WRITE,this.annotations=le({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new ku((()=>this.mondayApi)),this.actionHandlers=new Map([[Ou.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Ou.Update,this.helpers.updateQuestion.bind(this.helpers)],[Ou.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form. [REQUIRED PRECONDITION]: For update and delete, call get_form first to resolve the exact question id and see its current type and settings — never guess a question id. For create, get_form shows the existing questions so you do not duplicate one."}getInputSchema(){return Cu}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends ce{constructor(){super(...arguments),this.name="create_form_submission",this.type=f.WRITE,this.annotations=le({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 uh}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await v.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(oh,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){Pc(e,"submit form")}}},class extends ce{constructor(){super(...arguments),this.name="create_column",this.type=f.WRITE,this.annotations=le({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Create a new column in a monday.com board. [REQUIRED PRECONDITION]: If the column needs type-specific configuration (columnSettings) — e.g. status/dropdown labels, formula definitions, number units — first call get_column_type_info with fetchMode "${hm.Schema}" for that column type to learn the valid settings structure. Do not guess the settings shape. To give the new column AI behavior, create it here first, then call configure_ai_column.`}getInputSchema(){return this.context?.boardId?_h:fh}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},n=await this.mondayApi.request(gc,a);return{content:{message:"Column successfully created",column_id:n.create_column?.id,column_title:n.create_column?.title}}}},class extends ce{constructor(){super(...arguments),this.name="update_column",this.type=f.WRITE,this.annotations=le({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Update properties of an existing monday.com column (title, description, settings). [REQUIRED PRECONDITION]: Uses optimistic concurrency control via the revision field — fetch the column id, type, and current revision via get_board_schema first (preferred), or get_board_info if you already have it, then call this tool. If the update fails because the revision is stale, re-fetch and try again. After a successful update, use the new revision returned in the response for any further update to this column, not the one you started with. [REQUIRED PRECONDITION]: If you are changing columnSettings, also call get_column_type_info with fetchMode "${hm.Schema}" for that column type first to learn the valid settings structure. columnSettings is the flat payload for that column type (e.g. {"labels": [...]}) — not get_board_info's column.settings object copied as-is, and not wrapped again as {"settings": {"labels": [...]}}. To edit existing status or dropdown labels (rename, recolor, or reorder): first call get_board_info with filters.columns.ids for that column (or filters.columns.only) to read its current settings.labels, where each existing label's id lives. Editing an existing label requires sending its id in that label's entry — omitting it fails validation, since only a brand-new label can omit id. Status labels need the full label shape (id, label, color, index, and so on), not just a renamed string. Never invent an id — reuse the ids from get_board_info and add new labels without one. Flow: get_board_info for the revision and current settings.labels with ids, get_column_type_info (schema mode) for the valid shape, then build columnSettings.labels reusing existing ids and adding new labels without id.`}getInputSchema(){return this.context?.boardId?gh:bh}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},n=await this.mondayApi.request(yc,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:n.update_column?.id,column_title:n.update_column?.title,revision:n.update_column?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="create_group",this.type=f.WRITE,this.annotations=le({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 wh}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(Eh,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends ce{constructor(){super(...arguments),this.name="delete_column",this.type=f.WRITE,this.annotations=le({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board. This is irreversible — the column and all of its values are removed. [REQUIRED PRECONDITION]: Call get_board_schema or get_board_info first to resolve the exact columnId and confirm you are deleting the intended column. Never guess a column id."}getInputSchema(){return this.context?.boardId?Kh:Qh}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(bc,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},Fc,class extends Fc{constructor(e,t){super(e,t),this.name="all_api_read",this.type=f.READ,this.annotations=le({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 the get_type_details tool first to understand the schema before crafting your query."}async executeInternal(e){const t=st(e.query);this.recordGraphqlOperationCounts(t);const a=_i(t);if(a?.operation===Ne.MUTATION)throw new Uc("all_api_read only accepts read queries. Mutations are not allowed.",Cc);return super.executeInternal(e)}},class extends Fc{constructor(e,t){super(e,t),this.name="all_api_write",this.type=f.WRITE,this.annotations=le({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=st(e.query);this.recordGraphqlOperationCounts(t);const a=_i(t);if(a&&a.operation!==Ne.MUTATION)throw new Uc("all_api_write only accepts mutations. Read queries are not allowed.",Cc);return super.executeInternal(e)}},class extends ce{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=f.ALL_API,this.annotations=le({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 N_}async executeInternal(e){try{const t=await this.mondayApi.request(vc),a=e?.operationType,n=t.__schema,i="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=n?.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!==i&&{query_fields:i},...void 0!==o&&{mutation_fields:o},types:r}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="get_column_type_info",this.type=f.READ,this.annotations=le({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${hm.Schema}" (default) to get the JSON schema definition from the API — to understand structure, validation rules, and available properties for column settings. Call this BEFORE any tool that writes column settings: create_column, update_column, and manage_object_schema_columns. Use fetchMode "${hm.Guidelines}" to get only guidelines.filter and guidelines.aggregation (no schema, no GraphQL round-trip). Call this before building any filter rule that uses compare_value/operator for that column type — e.g. get_board_items_page, board_insights, or a view's filters (create_view, create_view_table, update_view, update_view_table) — and before building board insights aggregation counts. `}getInputSchema(){return S_}async executeInternal(e){if(e.fetchMode===hm.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:A_(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${ki.CountItems} function. Do not use ${ki.Count} function for that purpose.\n `}},url:T_}};const t={type:e.columnType},a=await this.mondayApi.request(E_,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:T_}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends ce{constructor(e,t){super("function"==typeof e?()=>Mc(e()):Mc(e),t),this.name="get_type_details",this.type=f.ALL_API,this.annotations=le({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, including its fields, input fields, and enum values. Call this with a known type name to confirm its exact fields, arguments, and enum values before referencing that type in an operation for all_monday_api, all_api_read, or all_api_write, so the fields and arguments you send actually exist."}getInputSchema(){return D_}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,rc`
3059
+ `,NS={};const DS=[class extends ce{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=f.READ,this.annotations=le({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 NS}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(SS,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${tS} 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:`${sS} 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 n=ES(e,ZA.SPRINT_TASKS);if(!n)return;const i=IS(n);if(!i)return;const o=`${e.id}:${i}`;if(a.has(o))return;const r=t.get(i);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(i,r,`Tasks Board ${i}`)})}processTasksBoard(e,t,a){const n=ES(e,pS);if(!n)return;const i=IS(n);if(!i)return;const o=`${i}:${e.id}`;if(a.has(o))return;const r=t.get(i);a.set(o,{sprintsBoard:this.createBoardInfo(i,r,`Sprints Board ${i}`),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 n of e)n.columns&&(yS(n)&&this.processSprintsBoard(n,a,t),vS(n)&&this.processTasksBoard(n,a,t));return Array.from(t.values())}},class extends ce{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=f.READ,this.annotations=le({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List the sprints of a monday-dev sprints board with their metadata.\n\nReturns comprehensive sprint metadata 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. If you do not already have it, call get_monday_dev_sprints_boards first to discover it.\n\n## Call this before:\n- get_sprint_summary — this tool returns the Sprint IDs that get_sprint_summary requires. Never guess a sprint ID."}getInputSchema(){return AS}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},n=await this.mondayApi.request(wS,a),i=n.boards?.[0],o=i?.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:`${sS} 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(uc,t),n=a.boards?.[0];if(!n)return{success:!1,error:`${tS} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const i=n.columns||[],o=this.validateSprintsBoardSchemaFromColumns(i);return o.isValid?{success:!0}:{success:!1,error:`${dS} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${sS} 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(ZA),n=gS(t,a);if(!n.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return n.missingColumns.forEach((t=>{const a=(e=>lS[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=hS(e,eS.SPRINT_ACTIVATION),a=hS(e,eS.SPRINT_COMPLETION),n=_S(e,eS.SPRINT_START_DATE),i=_S(e,eS.SPRINT_END_DATE),o=((e,t)=>{const a=uS(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,eS.SPRINT_TIMELINE),r=fS(e,eS.SPRINT_SUMMARY);let s=cS.Planned;return a?s=cS.Completed:(t||n)&&(s=cS.Active),{id:e.id,name:e.name||"Unknown",status:s,timeline:o?{from:o.from,to:o.to}:null,start_date:n||null,end_date:i||null,is_completed:a,document_object_id:r||null}}))}},class extends ce{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=f.READ,this.annotations=le({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- Requires a sprintId. [REQUIRED PRECONDITION]: call get_sprints_metadata first to list the sprints on the board and resolve the sprintId (and to confirm the sprint is completed). If you do not know the sprints board ID either, start with get_monday_dev_sprints_boards.\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 TS}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${sS} 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||`${sS} Unknown error occurred while reading document content`}}catch(e){return{content:`${sS} 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(XA,t)).items||[];if(0===a.length)return{success:!1,error:`${aS} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const n=a[0];if(!n)return{success:!1,error:`${aS} Sprint with ID ${e} not found.`};const i=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),n=[...Object.values(ZA),...t];return gS(a,n)})(n,[eS.SPRINT_SUMMARY]);if(!i.isValid)return{success:!1,error:`${dS} Sprint item is missing required columns: ${i.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=fS(n,eS.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:n.name}:{success:!1,error:`${nS} No sprint summary document found for sprint "${n.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${sS} 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(sc,t)).docs||[];if(0===a.length)return{success:!1,error:`${nS} Document with object ID ${e} not found or not accessible.`};const n=a[0];if(!n||!n.id)return{success:!1,error:`${iS} Document data is invalid for object ID ${e}.`};const i={docId:n.id,blockIds:[]},o=await this.mondayApi.request(Ac,i);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${rS} 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:`${oS} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${sS} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],OS=[class extends ce{constructor(){super(...arguments),this.name="delete_item",this.type=f.WRITE,this.annotations=le({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return t_}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(cc,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_items_page",this.type=f.READ,this.annotations=le({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. [MULTI-LEVEL BOARDS]: The response includes hierarchy_type on the board ("multi_level" for MLS boards) and parent_item_id on each item. On multi-level boards, items form a tree (up to 5 levels). Use includeSubItems to get all descendants (returned flat with parent_item_id to reconstruct the tree). Top-level items have no parent_item_id. Subitems reference their parent. [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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing proper filters and knowing which columns are available. [VIRTUAL COLUMNS]: Four filterable columns exist that get_board_info never returns - "group" (the item\'s board group), "__creation_log__" (creation time), "__last_updated__" (update time) and "__item_id__" (item id). All four are also valid in orderBy, e.g. "__creation_log__" with direction "desc" to sort newest-first. Call get_column_type_info with the matching column type for each one\'s compareValue and operator rules. [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 with filters.views.names set to that view name (avoids downloading all views on large boards), extract the matching view\'s filter field, then pass it as the filters argument here.'}getInputSchema(){return w_}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){$c(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 n=await this.mondayApi.request(g_,a);return{content:this.mapResult(n,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:_s.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],n=a?.items_page,i=n?.items||[];return{board:{id:a?.id,name:a?.name,hierarchy_type:a?.hierarchy_type||null},items:i.map((e=>this.mapItem(e,t))),pagination:{has_more:!!n?.cursor,nextCursor:n?.cursor||null,count:i.length}}}mapItem(e,t){const a=e.parent_item?.id||null,n={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at,...a&&{parent_item_id:a}};if(t.includeColumns&&e.column_values){n.column_values={};for(const t of e.column_values)n.column_values[t.id]=this.getColumnValueData(t)}if(t.includeGroup&&"group"in e&&e.group&&(n.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})));n.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(n.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),n}getColumnValueData(e){switch(e.type){case hh.BoardRelation:return e.linked_items;case hh.Formula:return e.display_value;case hh.Mirror:return"Column value type is not supported"}if("battery_value"in e)return e.battery_value;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(b_,t,{versionOverride:"dev",timeout:jc})).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 n=e.itemIds??[];if(0===n.length)return a;const i=new Set(n);return a.filter((e=>i.has(e)))}},Oh,class extends ce{constructor(){super(...arguments),this.name="create_items",this.type=f.WRITE,this.annotations=le({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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?Rh:Ch}async executeInternal(e){const t=e.items.flatMap(((e,t)=>void 0===e.name?[kh(new Uc("Item name is required",Lc),t)]:[]));if(t.length)throw new Uc(`${t.length} of ${e.items.length} items are missing the required name field`,Lc,t);const a=this.context?.boardId??e.boardId;this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.items.length;const n=new Oh(this.mondayApi,{boardId:a}),i="Skipped: a previous item hit the minute rate limit; this item was not attempted",o=e.items.map(((e,t)=>async()=>{const a=await n.execute({name:e.name,columnValues:e.columnValues,groupId:e.groupId,parentItemId:e.parentItemId,duplicateFromItemId:e.duplicateFromItemId,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,...a.content}})),r=await Gc(o,{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:kh(e,t)})}),s=r.filter((e=>"error"in e)).map((e=>e._errorEntry)),d=r.map((({_errorEntry:e,...t})=>t)),p=r.length,l=s.length,c={board_id:a,summary:{total:p,created:p-l,failed:l},is_partial_success:l>0&&l<p,results:d};return s.length&&(c.errors=s),{content:c}}},Vh,class extends ce{constructor(){super(...arguments),this.name="create_updates",this.type=f.WRITE,this.annotations=le({title:"Create Multiple Updates",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create up to 40 updates (comments/posts) in a single call. Each entry is independent - it targets its own item, has its own body and mentions, and can reply to an existing update via parentId - so one call can post on many items, or post several replies. Use this instead of calling create_update repeatedly when posting more than one update. Each entry returns its own update_id and item_id on success or a raw error message on failure."}getInputSchema(){return Fh}async executeInternal(e){this.sessionContext.metadata??={},this.sessionContext.metadata.items_count=e.updates.length;const t="Skipped: a previous update hit the minute rate limit, this update was not attempted",a=new Vh(this.mondayApi),n=e.updates.map(((e,t)=>async()=>{const n=await a.execute(e);return{index:t,...n.content}})),i=await Gc(n,{limit:10,onSkipped:e=>({index:e,error:t,_errorEntry:{code:"RATE_LIMIT_SKIPPED",message:t,path:["results",e]}}),onError:(e,t)=>({index:t,error:e instanceof Error?e.message:String(e),_errorEntry:Bh(e,t)})}),o=i.filter((e=>"error"in e)).map((e=>e._errorEntry)),r=i.map((({_errorEntry:e,...t})=>t)),s=i.length,d=o.length,p={summary:{total:s,created:s-d,failed:d},is_partial_success:d>0&&d<s,results:r};return o.length&&(p.errors=o),{content:p}}},class extends ce{constructor(){super(...arguments),this.name="delete_update",this.type=f.WRITE,this.annotations=le({title:"Delete Update",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an update (comment/post) from a monday.com item."}getInputSchema(){return qh}async executeInternal(e){try{const t={id:e.id.toString()},a=await this.mondayApi.request(zh,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){Pc(e,"delete update")}}},class extends ce{constructor(){super(...arguments),this.name="get_updates",this.type=f.READ,this.annotations=le({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. To read several items, pass up to 25 item IDs in objectIds in one call instead of calling once per item. 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, and add a date range to keep the response small. Returns update text (bodies over 2000 characters are truncated and flagged with text_body_truncated, and includeFullText returns them in full), creator info, timestamps, and optionally replies and assets."}getInputSchema(){return Kh}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===Wh.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");if(void 0===e.objectId==(void 0===e.objectIds))throw new Error("Provide exactly one of objectId or objectIds");if(e.objectIds&&e.objectType!==Wh.Item)throw new Error("objectIds is only supported for Item objectType");const n=e.limit??(e.objectIds?10:25),i={limit:n,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};if(e.objectIds){const t=((await this.mondayApi.request(Gh,{...i,itemIds:e.objectIds,itemsLimit:e.objectIds.length})).items??[]).filter((e=>!!e)),a=new Set(t.map((e=>e.id))),o=e.objectIds.filter((e=>!a.has(e)));return{content:{message:"Updates retrieved",items:t.map((t=>{const a=(t.updates??[]).map((t=>Xh(t,e)));return{item_id:t.id,url:t.url,updates:a,count:a.length}})),...o.length>0&&{not_found:o},pagination:{page:e.page??1,limit:n}}}}let o;o=e.objectType===Wh.Item?await this.mondayApi.request(jh,{...i,itemId:e.objectId}):await this.mondayApi.request(Hh,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:Qh(e.fromDate),toDate:Qh(e.toDate,!0)}:{}});const r=e.objectType===Wh.Item?o.items?.[0]?.updates:o.boards?.[0]?.updates;if(!r||0===r.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const s=r.map((t=>Xh(t,e))),d=e.objectType===Wh.Item?o.items?.[0]?.url:o.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:d,updates:s,pagination:{page:e.page??1,limit:n,count:s.length}}}}catch(e){Pc(e,"get updates")}}},class extends ce{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=f.WRITE,this.annotations=le({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 rb}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),n=ob.safeParse(a);if(!n.success)throw new Error(`Invalid mentionsList format: ${n.error.message}`);t=n.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},n=await this.mondayApi.request(Uh,a);if(!n.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${n.create_update.id} successfully created on item ${e.itemId}`,update_id:n.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){Pc(e,"create update")}}},class extends ce{constructor(){super(...arguments),this.name="get_board_schema",this.type=f.READ,this.annotations=le({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id. Returns each column id, title, type, and revision, plus each group id and title. Call this before tools that need a column id, type, and revision resolved from schema: update_column (which also needs the revision returned here), delete_column, configure_ai_column, and remove_ai_from_column — get_board_info returns the same column id/type/revision fields and also satisfies this precondition, but prefer this tool when you only need columns and groups, not the rest of the board. For broader board metadata (owners, views, and their filters) use get_board_info instead — pass filters.views.ids / filters.views.names and/or filters.columns.ids there when you only need a subset."}getInputSchema(){if(!this.context?.boardId)return A_}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},n=await this.mondayApi.request(uc,a);return{content:{message:"Board schema retrieved",board_id:t,columns:n.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:n.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends ce{constructor(){super(...arguments),this.name="get_board_activity",this.type=f.READ,this.annotations=le({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. [REQUIRED PRECONDITION]: Call this with includeData=true before undo_action — it is the source of the action_record_uuid that identifies the action to undo."}getInputSchema(){return p_}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-qc.MONTH30Days),n=e?.fromDate||a.toISOString(),i=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:n,toDate:i,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(d_,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 (${n} to ${i}).`};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 ce{constructor(e,t,a){super(e,a),this.name="get_board_info",this.type=f.READ,this.annotations=le({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. "+(this.isKnowledgeEnabled()?"Set includeKnowledge to true only when generated business context is needed beyond the board structure, including workflow and status meanings, column purposes, people roles, and related boards. This adds a slower, more expensive request, and knowledge may be null while unavailable or still being generated. ":"")+'Also returns the board\'s views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. On large boards, ALWAYS narrow the response: use filters.views.names or filters.views.ids when you only need specific views, and/or filters.columns.ids when you only need specific columns. Set filters.views.only or filters.columns.only when you want just that section — full views[].settings across many views can be multi-MB. The response includes hierarchy_type which indicates if the board is a multi-level board ("multi_level") where items can have nested subitems up to 5 levels deep on the same board. On multi-level boards, subitems share the same columns as parent items and subItemColumns will be null. Call this FIRST whenever you are not already familiar with a board structure (column IDs, column types, column revisions, status labels) — before reading or writing its data, or before any tool that declares this as a required precondition (e.g. get_board_items_page, board_insights, create_item, create_items, update_items, change_item_column_values, update_column, create_view, create_view_table, update_view, update_view_table). Also use the views it returns to resolve a view referenced by name (pass that name in filters.views.names), and as the source of view ids for update_view and update_view_table. Each column\'s "settings" field is the raw API value for that existing column, shown so you can read current labels/config — it is NOT the format expected by the columnSettings parameter of create_column or update_column. Never copy a column\'s "settings" object verbatim into columnSettings — use get_column_type_info with fetchMode "schema" to get the correct shape for the column type you are creating or updating.'}getInputSchema(){return f_}async executeInternal(e){const{columnIds:t,viewIds:a,includeColumns:n,includeViews:i,unmatchedViewNames:o,availableViewNames:r}=await this.resolveFiltersAsync(e);if(e.filters?.views?.names?.length&&i&&void 0!==a&&0===a.length){const t=r.length>0?r.join(", "):"(none)";return{content:`None of the requested view names matched on board ${e.boardId}. Requested: ${e.filters.views.names.join(", ")}. Available views: ${t}.`}}const s={boardId:e.boardId.toString(),columnIds:n?t:void 0,viewIds:i?a:void 0,includeColumns:n,includeViews:i},d=this.mondayApi.request(l_,s),p=!0===e.includeKnowledge,l=p&&this.isKnowledgeEnabled()?this.mondayApi.request(u_,{boardId:e.boardId.toString()},{versionOverride:"dev",timeout:1e3}).catch((t=>(this.context?.deps?.logger?.warn({err:t,boardId:e.boardId,timeoutMs:1e3},"Failed to fetch board knowledge"),null))):Promise.resolve(null),[c,m]=await Promise.all([d,l]),u=c.boards?.[0];if(!u)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const h=n?await this.getSubItemsBoardAsync(u):null;return{content:h_(u,h,o,m?.entity_knowledge??null,p)}}isKnowledgeEnabled(){return this.context?.deps?.flagChecker?.("mcp-get-board-info-entity-knowledge")??!0}async resolveFiltersAsync(e){const t=e.filters?.columns,a=e.filters?.views,n=Boolean(t?.only),i=Boolean(a?.only),o=void 0!==a?.ids,r=Boolean(a?.names?.length),s=!i||n,d=!n||i,p=s?t?.ids:void 0;if(!d)return{columnIds:p,viewIds:void 0,includeColumns:s,includeViews:d,unmatchedViewNames:[],availableViewNames:[]};if(!o&&!r)return{columnIds:p,viewIds:void 0,includeColumns:s,includeViews:d,unmatchedViewNames:[],availableViewNames:[]};if(o&&!r)return{columnIds:p,viewIds:a?.ids??[],includeColumns:s,includeViews:d,unmatchedViewNames:[],availableViewNames:[]};const l=await this.mondayApi.request(c_,{boardId:e.boardId.toString()}),c=l.boards?.[0]?.views??[],m=c.map((e=>e?.name)).filter((e=>Boolean(e))),{viewIds:u,unmatchedViewNames:h}=((e,t)=>{const a=new Map;for(const t of e){if(!t?.id||!t.name)continue;const e=__(t.name),n=a.get(e)??[];n.push(t.id),a.set(e,n)}const n=[],i=[];for(const e of t){const t=a.get(__(e));t?.length?n.push(...t):i.push(e)}return{viewIds:n,unmatchedViewNames:i}})(c,a?.names??[]);return{columnIds:p,viewIds:[...new Set([...a?.ids??[],...u])],includeColumns:s,includeViews:d,unmatchedViewNames:h,availableViewNames:m}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===hh.Subtasks));if(!t)return null;const a=t.settings.boardIds[0];if(a===e.id)return null;const n=await this.mondayApi.request(m_,{boardId:a});return n.boards?.[0]??null}},class extends ce{constructor(){super(...arguments),this.name="get_full_board_data",this.type=f.READ,this.annotations=le({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 s_}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(n_,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const n=a.boards[0],i=new Set;n.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&i.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&i.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&&i.add(e.id)}))}}))}));const o=Array.from(i).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(i_,e);r=t.users?.filter((e=>null!==e))||[]}const s=new Map(r.map((e=>[e.id,e])));return{content:{board:{id:n.id,name:n.name,columns:n.columns,items:n.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:n.items_page.items.length,total_updates:n.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){Pc(e,"get full board data")}}},class extends ce{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=f.READ,this.annotations=le({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 nf}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,n=e.includeTeams||!1,i=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||n||i||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(W_);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=Q_(s),p=await tf(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||n||i||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(H_,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 tf(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(i&&n)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>J_)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>X_)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(i||!t&&a&&!n)if(o){const t={teamIds:e.teamIds};s=await this.mondayApi.request(G_,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(j_,t)}else if(n){const t={userIds:e.userIds,teamIds:e.teamIds,limit:Z_};s=await this.mondayApi.request(q_,t)}else if(t){const t={userIds:e.userIds,limit:Z_};s=await this.mondayApi.request(B_,t)}else{const e={userIds:void 0,limit:Z_};s=await this.mondayApi.request(z_,e)}const d=Q_(s),p=await tf(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Qc,class extends ce{constructor(){super(...arguments),this.name="update_items",this.type=f.WRITE,this.annotations=le({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 with filters.columns.only to get column metadata without fetching views. This is essential for constructing valid column values."}getInputSchema(){return this.context?.boardId?Xc:Zc}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)),n=a.map(((e,t)=>null==e?t:-1)).filter((e=>e>=0));if(n.length>0)throw new Uc(`Missing boardId for update(s) at index ${n.join(", ")}. Set a boardId on each update or provide a batch-level boardId.`,"MISSING_REQUIRED_PARAMETER");const i="Skipped: a previous update hit the minute rate limit, this update was not attempted",o=new Qc(this.mondayApi),r=e.updates.map(((e,t)=>async()=>{const n=a[t],i=await o.execute({boardId:n,itemId:e.itemId,columnValues:e.columnValues,createLabelsIfMissing:e.createLabelsIfMissing});return{index:t,board_id:n,...i.content}})),s=await Gc(r,{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:em(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 ce{constructor(){super(...arguments),this.name="move_item_to_group",this.type=f.WRITE,this.annotations=le({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to another group on the same monday.com board. It cannot move an item to a different board."}getInputSchema(){return of}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId};let a;try{a=await this.mondayApi.request(_c,t)}catch(e){Pc(e,"move item to group")}return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends ce{constructor(){super(...arguments),this.name="create_board",this.type=f.WRITE,this.annotations=le({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Tm}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{},...void 0!==e.useMlsTemplate?{useMlsTemplate:e.useMlsTemplate}:{},...void 0!==e.useDatasetTemplate?{useDatasetTemplate:e.useDatasetTemplate}:{}},a=await this.mondayApi.request(fc,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends ce{constructor(){super(...arguments),this.name="use_template",this.type=f.WRITE,this.annotations=le({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 wm}async executeInternal(e){const t={templateId:e.templateId,destinationWorkspaceId:e.destinationWorkspaceId,destinationName:e.destinationName,boardKind:e.boardKind},a=await this.mondayApi.request(Nc,t),n=a.use_template?.process_id;return null==n?{content:{processId:null,message:"Failed to start template application. The request was rejected."}}:{content:{processId:n,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 ce{constructor(){super(...arguments),this.name="check_template_status",this.type=f.READ,this.annotations=le({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 Am}async executeInternal(e){const t={processId:e.processId},a=(await this.mondayApi.request(Dc,t)).template_installation_status;return a?a.status===xd.Complete?{content:{status:xd.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===xd.Failed?{content:{status:xd.Failed,board_ids:[],board_ids_map:[],message:"Template application failed. Please try again."}}:a.status===xd.Pending||a.status===xd.InProgress?{content:{status:a.status,board_ids:[],board_ids_map:[],message:`Template application ${a.status===xd.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 ce{constructor(){super(...arguments),this.name="create_form",this.type=f.WRITE,this.annotations=le({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 uu}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(Hm,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends ce{constructor(){super(...arguments),this.name="update_form",this.type=f.WRITE,this.annotations=le({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new nh((()=>this.mondayApi)),this.actionHandlers=new Map([[Lu.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Lu.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Lu.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Lu.activate,this.helpers.activateForm.bind(this.helpers)],[Lu.createTag,this.helpers.createTag.bind(this.helpers)],[Lu.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Lu.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Lu.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Lu.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Lu.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Lu.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation. [REQUIRED PRECONDITION]: Call get_form first to read the current form state — you need it to resolve the formToken, and for actions that reference existing entities (updateQuestionOrder needs the question ids, deleteTag needs the tag id) or that overwrite existing settings (updateAppearance, updateAccessibility, updateFeatures, updateFormHeader)."}getInputSchema(){return ah}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends ce{constructor(){super(...arguments),this.name="get_form",this.type=f.READ,this.annotations=le({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token, including its pages, questions, question ids, settings, and conditional showIfRules. 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. Call this FIRST before any tool that acts on an existing form: create_form_submission (to know the questions and their constraints), form_questions_editor (to resolve question ids and current structure), and update_form (to see the current settings before changing them)."}getInputSchema(){return ih}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Wm,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends ce{constructor(){super(...arguments),this.name="form_questions_editor",this.type=f.WRITE,this.annotations=le({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new ku((()=>this.mondayApi)),this.actionHandlers=new Map([[Ou.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Ou.Update,this.helpers.updateQuestion.bind(this.helpers)],[Ou.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form. [REQUIRED PRECONDITION]: For update and delete, call get_form first to resolve the exact question id and see its current type and settings — never guess a question id. For create, get_form shows the existing questions so you do not duplicate one."}getInputSchema(){return Cu}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends ce{constructor(){super(...arguments),this.name="create_form_submission",this.type=f.WRITE,this.annotations=le({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 uh}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await v.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(oh,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){Pc(e,"submit form")}}},class extends ce{constructor(){super(...arguments),this.name="create_column",this.type=f.WRITE,this.annotations=le({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Create a new column in a monday.com board. [REQUIRED PRECONDITION]: If the column needs type-specific configuration (columnSettings) — e.g. status/dropdown labels, formula definitions, number units — first call get_column_type_info with fetchMode "${hm.Schema}" for that column type to learn the valid settings structure. Do not guess the settings shape. To give the new column AI behavior, create it here first, then call configure_ai_column.`}getInputSchema(){return this.context?.boardId?_h:fh}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},n=await this.mondayApi.request(gc,a);return{content:{message:"Column successfully created",column_id:n.create_column?.id,column_title:n.create_column?.title}}}},class extends ce{constructor(){super(...arguments),this.name="update_column",this.type=f.WRITE,this.annotations=le({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Update properties of an existing monday.com column (title, description, settings). [REQUIRED PRECONDITION]: Uses optimistic concurrency control via the revision field — fetch the column id, type, and current revision via get_board_schema first (preferred), or get_board_info if you already have it, then call this tool. If the update fails because the revision is stale, re-fetch and try again. After a successful update, use the new revision returned in the response for any further update to this column, not the one you started with. [REQUIRED PRECONDITION]: If you are changing columnSettings, also call get_column_type_info with fetchMode "${hm.Schema}" for that column type first to learn the valid settings structure. columnSettings is the flat payload for that column type (e.g. {"labels": [...]}) — not get_board_info's column.settings object copied as-is, and not wrapped again as {"settings": {"labels": [...]}}. To edit existing status or dropdown labels (rename, recolor, or reorder): first call get_board_info with filters.columns.ids for that column (or filters.columns.only) to read its current settings.labels, where each existing label's id lives. Editing an existing label requires sending its id in that label's entry — omitting it fails validation, since only a brand-new label can omit id. Status labels need the full label shape (id, label, color, index, and so on), not just a renamed string. Never invent an id — reuse the ids from get_board_info and add new labels without one. Flow: get_board_info for the revision and current settings.labels with ids, get_column_type_info (schema mode) for the valid shape, then build columnSettings.labels reusing existing ids and adding new labels without id.`}getInputSchema(){return this.context?.boardId?gh:bh}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},n=await this.mondayApi.request(yc,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:n.update_column?.id,column_title:n.update_column?.title,revision:n.update_column?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="create_group",this.type=f.WRITE,this.annotations=le({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 wh}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(Eh,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends ce{constructor(){super(...arguments),this.name="delete_column",this.type=f.WRITE,this.annotations=le({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board. This is irreversible — the column and all of its values are removed. [REQUIRED PRECONDITION]: Call get_board_schema or get_board_info first to resolve the exact columnId and confirm you are deleting the intended column. Never guess a column id."}getInputSchema(){return this.context?.boardId?Zh:e_}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(bc,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},Fc,class extends Fc{constructor(e,t){super(e,t),this.name="all_api_read",this.type=f.READ,this.annotations=le({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 the get_type_details tool first to understand the schema before crafting your query."}async executeInternal(e){const t=st(e.query);this.recordGraphqlOperationCounts(t);const a=_i(t);if(a?.operation===Ne.MUTATION)throw new Uc("all_api_read only accepts read queries. Mutations are not allowed.",Cc);return super.executeInternal(e)}},class extends Fc{constructor(e,t){super(e,t),this.name="all_api_write",this.type=f.WRITE,this.annotations=le({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=st(e.query);this.recordGraphqlOperationCounts(t);const a=_i(t);if(a&&a.operation!==Ne.MUTATION)throw new Uc("all_api_write only accepts mutations. Read queries are not allowed.",Cc);return super.executeInternal(e)}},class extends ce{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=f.ALL_API,this.annotations=le({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 C_}async executeInternal(e){try{const t=await this.mondayApi.request(vc),a=e?.operationType,n=t.__schema,i="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=n?.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!==i&&{query_fields:i},...void 0!==o&&{mutation_fields:o},types:r}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends ce{constructor(){super(...arguments),this.name="get_column_type_info",this.type=f.READ,this.annotations=le({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${hm.Schema}" (default) to get the JSON schema definition from the API — to understand structure, validation rules, and available properties for column settings. Call this BEFORE any tool that writes column settings: create_column, update_column, and manage_object_schema_columns. Use fetchMode "${hm.Guidelines}" to get only guidelines.filter and guidelines.aggregation (no schema, no GraphQL round-trip). Call this before building any filter rule that uses compare_value/operator for that column type — e.g. get_board_items_page, board_insights, or a view's filters (create_view, create_view_table, update_view, update_view_table) — and before building board insights aggregation counts. `}getInputSchema(){return R_}async executeInternal(e){if(e.fetchMode===hm.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:O_(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${ki.CountItems} function. Do not use ${ki.Count} function for that purpose.\n `}},url:N_}};const t={type:e.columnType},a=await this.mondayApi.request(S_,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:N_}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends ce{constructor(e,t){super("function"==typeof e?()=>Mc(e()):Mc(e),t),this.name="get_type_details",this.type=f.ALL_API,this.annotations=le({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, including its fields, input fields, and enum values. Call this with a known type name to confirm its exact fields, arguments, and enum values before referencing that type in an operation for all_monday_api, all_api_read, or all_api_write, so the fields and arguments you send actually exist."}getInputSchema(){return k_}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,rc`
2971
3060
  query getTypeDetails {
2972
3061
  __type(name: "${t}") {
2973
3062
  name
@@ -3055,5 +3144,5 @@
3055
3144
  }
3056
3145
  }
3057
3146
  }
3058
- `),n=await this.mondayApi.request(a);return n.__type?{content:{message:"Type details retrieved",data:{name:n.__type.name,kind:n.__type.kind,description:n.__type.description??null,fields:n.__type.fields??[],inputFields:n.__type.inputFields??[],interfaces:n.__type.interfaces??[],enumValues:n.__type.enumValues??[],possibleTypes:n.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends ce{constructor(){super(...arguments),this.name="create_custom_activity",this.type=f.WRITE,this.annotations=le({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return yh}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Ec,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends ce{constructor(){super(...arguments),this.name="create_notification",this.type=f.WRITE,this.annotations=le({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 Ih}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{const a=await this.mondayApi.request(vh,t);if(!a.create_notification?.id)throw new Uc(`No notification was created for user ${e.user_id} on ${e.target_type} target ${e.target_id}. Verify the user has access to the target and that target_id matches target_type ("Post" for an update/reply id, "Project" for an item/board id).`,kc);return{content:{message:`Notification ${a.create_notification.id} sent to user ${e.user_id}`,notification_id:a.create_notification.id,user_id:e.user_id,target_id:e.target_id,target_type:e.target_type,text:a.create_notification.text??e.text}}}catch(t){Pc(t,`send notification to user ${e.user_id}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_timeline_item",this.type=f.WRITE,this.annotations=le({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return Lh}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(Tc,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends ce{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=f.READ,this.annotations=le({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Xh}async executeInternal(e){const t=await this.mondayApi.request(wc);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:{message:`Found ${a.length} custom activities`,data:a}}}},class extends ce{constructor(){super(...arguments),this.name="read_docs",this.type=f.READ,this.annotations=le({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 ff}async executeInternal(e){return e.mode===hf?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,n;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??uf,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":n=e.ids}const i=e.include_blocks??!1,o=i?{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:n,includeBlocks:i,...o};let s=await this.mondayApi.request(sc,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:n,includeBlocks:i,...o};s=await this.mondayApi.request(sc,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,i,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:n,version_history_limit:i}=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:hf,object_ids:[o]};try{const e={docId:o,since:a,until:n},r=await this.mondayApi.request(dc,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 i&&(s=s.slice(0,i)),{content:{doc_id:o,since:a,until:n,restoring_points:s}};const d=Math.min(i??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 n={docId:o,date:e.date,prevDate:a.date},i=await this.mondayApi.request(lc,n);return{...e,diff:i?.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:n,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 n=0;for(const i of e){const e=i.insert,o="string"==typeof e?e.length:1,r=i.attributes,s=r?.comments;if(s&&Array.isArray(s))for(const e of s){const i=String(e),r=t.get(i);if(r&&r.block_id===a.id){const e=Math.max(r.selection_from+r.selection_length,n+o);r.selection_length=e-r.selection_from}else r||t.set(i,{block_id:a.id,selection_from:n,selection_length:o})}n+=o}}return t}async fetchDocComments(e,t,a){try{const n={boardId:e,itemsLimit:100,updatesLimit:a},[i,o]=await Promise.all([this.mondayApi.request(pc,n),this.mondayApi.request(lf,{docId:t}).catch((()=>null))]),r=i.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,n=!1,i=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(Ac,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 n&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,i)),{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,...n&&{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 ce{constructor(){super(...arguments),this.name="workspace_info",this.type=f.READ,this.annotations=le({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 gf}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(Sc,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const n=function(e,t){const{workspaces:a,boards:n,docs:i,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=[];(n||[]).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(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&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?X_(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 J_(this.mondayApi));return{content:{message:"Workspace info retrieved",data:n}}}},class extends ce{constructor(){super(...arguments),this.name="list_workspaces",this.type=f.READ,this.annotations=le({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 If}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=yf(await this.mondayApi.request(bf,t(xp.Member)));let n=a;if(!vf(a)){n=yf(await this.mondayApi.request(bf,t(xp.All)))}if(!vf(n))return{content:{message:"No workspaces found.",data:[]}};const i=n.length===e.limit,o=await J_(this.mondayApi),r=n.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:o&&e.id?X_(o,e.id):void 0})));return{content:{message:"Workspaces retrieved",...i?{next_page:e.page+1}:{},data:r}}}},class extends ce{constructor(){super(...arguments),this.name="create_doc",this.type=f.WRITE,this.annotations=le({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 Df}async executeInternal(e){const t=Nf.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,n,i;if(a.type===Sf.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||mo.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},r=await this.mondayApi.request(Tf,o);t=r?.create_doc?.id??void 0,n=r?.create_doc?.object_id??void 0,i=r?.create_doc?.url??void 0}else if(a.type===Sf.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(Ef,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===hh.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:hh.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(gc,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(Tf,c);if(t=m.create_doc?.id??void 0,n=m.create_doc?.object_id??void 0,i=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Af,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(wf,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},...n&&{object_id:n}},{content:{message:"Document successfully created",doc_id:t,object_id:n,doc_url:i,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 ce{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=f.WRITE,this.annotations=le({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 kf}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(Cf,{docId:e.doc_id});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Rf,{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},n=await this.mondayApi.request(Of,a);if(!n?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:i,block_ids:o,error:r}=n.add_content_to_doc_from_markdown;if(!i)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 ce{constructor(){super(...arguments),this.name="update_doc",this.type=f.WRITE,this.annotations=le({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_blocks: Permanently delete 1–100 blocks in one call. Provide all block IDs in the block_ids array. 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_blocks 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\nBATCHING DELETES: delete_blocks accepts 1..100 IDs. Put ALL IDs in one operation\'s block_ids array. Never emit multiple delete_blocks operations in a row.\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 ug}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(nf,{objectId:e.object_id}),n=a.docs?.[0];if(!n)return{content:`Error: No document found for object_id ${e.object_id}.`};t=n.id}const a=[];let n=null;for(let i=0;i<e.operations.length;i++){const o=e.operations[i];try{const n=await this.executeOperation(t,o,e.object_id);a.push(`- [OK] ${o.operation_type}${n?`: ${n}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${o.operation_type}: ${t}`),n=i;break}}const i=null!==n?n:e.operations.length,o=e.operations.length,r=`Completed ${i}/${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_blocks":return this.executeDeleteBlocks(t.block_ids);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},n=await this.mondayApi.request(tf,a);if(!n?.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 n={docId:e,markdown:t,afterBlockId:a},i=await this.mondayApi.request(af,n),o=i?.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:xf(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:xf(e.delta_format),language:e.language};case"list_item":return{deltaFormat:xf(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),n={blockId:e,content:JSON.stringify(a)},i=await this.mondayApi.request(of,n);if(!i?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,n){const i=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:$f(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:Lf(e.alignment),direction:Uf(e.direction)}};case"list_item":return{list_block:{delta_format:$f(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:$f(e.delta_format),text_block_type:Vd.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(n){const e=Object.keys(i);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=i[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=n}const o={docId:e,afterBlockId:a,blocksInput:[i]},r=await this.mondayApi.request(mf,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(rf,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async executeDeleteBlocks(e){if(0===e.length)throw new Error("block_ids must not be empty");const t={blockIds:e},a=await this.mondayApi.request(sf,t);if(!a?.delete_doc_blocks||0===a.delete_doc_blocks.length)throw new Error("No response from delete_doc_blocks");const n=a.delete_doc_blocks.map((e=>e.id)).join(", ");return`${a.delete_doc_blocks.length} block(s) deleted (IDs: ${n})`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(df,{docId:e}),n=a.docs?.[0];if(!n?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return n.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(pf,{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(lf,{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,n,i,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(i){const e=JSON.parse(i),t=xh.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:n?.toString(),mentionsList:c},u=await this.mondayApi.request(cf,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,_=Number(h),f=n?`Reply to update ${n}`:"Comment";if(d.length>0){if(Number.isNaN(_))throw new Error(`${f} 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 n=t.find((e=>e.id===a));if(!n)throw new Error(`${f} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const i=n.content.deltaFormat;if(!i)throw new Error(`${f} 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 i)o+="string"==typeof e.insert?e.insert.length:1;if(0===o)throw new Error(`${f} 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(`${f} 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=Vf(i,_,d,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${f} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...n.content,deltaFormat:l},m=await this.mondayApi.request(of,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${f} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${f} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,n,i){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,n,i)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends ce{constructor(){super(...arguments),this.name="update_workspace",this.type=f.WRITE,this.annotations=le({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return vg}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(yg,t),n=await J_(this.mondayApi),i=n?X_(n,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:i}}}},class extends ce{constructor(){super(...arguments),this.name="update_folder",this.type=f.WRITE,this.annotations=le({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Eg}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:n}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const i={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?{is_after:n,object_id:t,object_type:a}:void 0},o=await this.mondayApi.request(Ig,i);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="create_workspace",this.type=f.WRITE,this.annotations=le({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return wg}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Tg,t),n=await J_(this.mondayApi),i=n&&a.create_workspace?.id?X_(n,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:i}}}},class extends ce{constructor(){super(...arguments),this.name="create_folder",this.type=f.WRITE,this.annotations=le({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Sg}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(Ag,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="move_object",this.type=f.WRITE,this.annotations=le({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 Og}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{is_after:i,object_id:a,object_type:n}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},p=await this.mondayApi.request(Ig,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:n,position_is_after:i,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{is_after:i,object_id:a,object_type:n}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Ng,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:n,position_is_after:i,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{is_after:i,object_id:a,object_type:n}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Dg,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 zs.Folder:return this.executeUpdateFolder(e);case zs.Board:return this.executeUpdateBoardHierarchy(e);case zs.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_dashboard",this.type=f.WRITE,this.annotations=le({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 gg}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(hg,t);if(!a.create_dashboard)throw new Uc("Failed to create dashboard",kc);const n=a.create_dashboard;return{content:{message:`Dashboard ${n.id} successfully created`,dashboard_id:n.id,dashboard_name:n.name}}}catch(e){Pc(e,"create dashboard")}}},class extends ce{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=f.READ,this.annotations=le({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(_g,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 n=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,i=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:i,schema:e.schema},n++}if(0===n)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:T_}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_widget",this.type=f.WRITE,this.annotations=le({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 bg}async executeInternal(e){if(!e.settings)throw new Uc("You must pass the settings parameter",Lc);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(fg,t);if(!a.create_widget)throw new Uc("Failed to create widget",kc);const n=a.create_widget;n.parent?.kind===Op.Dashboard?n.parent.id:n.parent;return{content:{message:`Widget ${n.id} created`,widget_id:n.id,widget_name:n.name,dashboard_id:n.parent?.id}}}catch(t){Pc(t,`create ${e.widget_kind} widget`)}}},class extends ce{constructor(){super(...arguments),this.name="board_insights",this.type=f.READ,this.annotations=le({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 with filters.columns.only to get column metadata without fetching views. 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 Pg}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};if(e.aggregations.some((e=>!e.columnId&&e.function!==ki.CountItems)))return{content:`Every aggregation must have a "columnId", except the ${ki.CountItems} function.`};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],n=new Set(e.aggregations.filter((e=>e.function===ki.Label)).map((e=>e.columnId))),i=e.groupBy?.filter((e=>!n.has(e))).map((e=>({function:ki.Label,columnId:e})))??[],o=e.aggregations.concat(i).map((e=>{if(e.function){const o=e.columnId?`${e.function}_${e.columnId}`:e.function,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return Lg.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Ci.Function,function:(n=e.function,i=e.columnId,{function:n,params:n===ki.CountItems?[]:[{type:Ci.Column,column:Ug(i),as:i}]}),as:s}}var n,i;const o={type:Ci.Column,column:Ug(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:Ci.Column,column:Ug(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),n=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),i=function(e){return{id:e.boardId.toString(),type:Ti.Table}}(e),o={query:{from:i,query:n,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},r=await this.mondayApi.request(Rg,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const n=e.value;if(!n)return void(t[a]=null);const i=n.result??n.value??null;t[a]=i})),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 ce{constructor(){super(...arguments),this.name="search",this.type=f.READ,this.annotations=le({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Search within monday.com platform. Supported searchType values: ${f_}.\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. Optionally scope it with boardIds.\nDOCUMENTS search returns id, title, workspaceId, and highlights. highlights is an array of { field, fragments } entries (field is "name" or "content") where fragments contain matched text snippets with <em> tags around matched terms. highlights is omitted when no lexical match was made. Optionally scope it with workspaceIds and/or docIds.\nITEMS search returns id, title, url, boardId, and workspaceId. Optionally scope it with workspaceIds, boardIds, and/or creatorIds.\nWORKSPACES search returns id, title, and description.\nUPDATES search returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with workspaceIds, boardIds, and/or creatorIds.\nTIMELINE_ITEMS search returns id, title, summary, content, itemId, and boardId. Optionally scope it with workspaceIds and/or boardIds.\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 Zg}async executeInternal(e){const{searchTerm:t}=e;if(!t)throw new Uc("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).",Lc);try{if(e.searchType===__.FOLDERS){const{results:a,truncated:n}=await this.searchFoldersAsync(e,t);return{content:{message:n?"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 $c(e),e}}async runSmartSearchAsync(e,t){const a=Kg(e.workspaceIds?.map((e=>e.toString())));if(e.searchType===__.BOARD){const n=Kg(e.boardIds?.map((e=>e.toString())));return this.searchBoardsAsync(t,e.limit,a,n)}if(e.searchType===__.DOCUMENTS){const n=Kg(e.docIds?.map((e=>e.toString())));return this.searchDocsAsync(t,e.limit,a,n)}if(e.searchType===__.WORKSPACES)return this.searchWorkspacesAsync(t,e.limit);if(e.searchType===__.UPDATES){const n=Kg(e.boardIds?.map((e=>e.toString()))),i=Kg(e.creatorIds?.map((e=>e.toString())));return this.searchUpdatesAsync(t,e.limit,a,n,i)}if(e.searchType===__.ITEMS){const n=Kg(e.boardIds?.map((e=>e.toString()))),i=Kg(e.creatorIds?.map((e=>e.toString())));return this.searchItemsAsync(t,e.limit,a,n,i)}if(e.searchType===__.TIMELINE_ITEMS){const n=Kg(e.boardIds?.map((e=>e.toString())));return this.searchTimelineItemsAsync(t,e.limit,a,n)}if(e.searchType===__.DASHBOARDS){const n=e.creatorIds?.map((e=>e.toString()));return this.searchOverviewsAsync(t,e.limit,a,n)}throw new Uc(`Unsupported search type for smart search: ${e.searchType}`,Oc)}async searchBoardsAsync(e,t,a,n){const i={query:e,limit:t,workspaceIds:a,boardIds:n};return(await this.mondayApi.request(Mg,i,{timeout:jc})).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,n){const i={query:e,limit:t,workspaceIds:a,docIds:n};return(await this.mondayApi.request(Vg,i,{timeout:jc})).search.docs.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,workspaceId:e.indexed_data.workspace_id??void 0,highlights:Qg(e.indexed_data.highlights)})))}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return(await this.mondayApi.request(Fg,a,{timeout:jc})).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,n,i){const o={query:e,limit:t,workspaceIds:a,boardIds:n,creatorIds:i};return(await this.mondayApi.request(Bg,o,{timeout:jc})).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,n,i){return(i?await this.mondayApi.request(qg,{query:e,limit:t,workspaceIds:a,boardIds:n,creatorIds:i},{versionOverride:"dev",timeout:jc}):await this.mondayApi.request(xg,{query:e,limit:t,workspaceIds:a,boardIds:n},{timeout:jc})).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,a,n){const i={query:e,limit:t,workspaceIds:a,boardIds:n};return(await this.mondayApi.request(zg,i,{timeout:jc})).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,n){const i={query:e,limit:t,workspaceIds:a,creatorIds:n};return(await this.mondayApi.request(jg,i,{versionOverride:"dev",timeout:jc})).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=Gg(t);if(!a)return{results:[],truncated:!1};const n={page:1,limit:100,workspace_ids:Kg(e.workspaceIds?.map((e=>e.toString())))},i=(await this.mondayApi.request($g,n)).folders||[];return{results:i.filter((e=>e?.name&&Gg(e.name).includes(a))).filter((e=>e?.id)).slice(0,e.limit).map((e=>({id:e.id,title:e.name}))),truncated:100===i.length}}},class extends ce{constructor(){super(...arguments),this.name="get_user_context",this.type=f.READ,this.annotations=le({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, docs, 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 docs based on load 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(db,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const n=await this.fetchFavorites(t||[]),i=this.extractRelevantBoards(a),o=this.extractRelevantDocs(a),r=this.extractRelevantPeople(a),{account:s,...d}=e;return{content:{message:"User context",...{user:d,account:s?{tier:s.tier,active_members_count:s.active_members_count,is_during_trial:s.is_during_trial,products:s.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:n,relevantBoards:i,relevantDocs:o,relevantPeople:r}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const n={};for(const e of a)n[lb[e]]=t[e];const i=await this.mondayApi.request(pb,n),o=[];for(const e of a){const t=cb[e];for(const a of i[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}extractRelevantDocs(e){if(!e?.relevant_docs)return[];const t=[];for(const a of e.relevant_docs)a?.id&&a?.document?.name&&t.push({id:a.id,name:a.document.name,objectId:a.object_id});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends ce{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=f.WRITE,this.annotations=le({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 ob}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(nb,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends ce{constructor(){super(...arguments),this.name="get_assets",this.type=f.READ,this.annotations=le({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 sb}async executeInternal(e){const t=await this.mondayApi.request(rb,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends ce{constructor(){super(...arguments),this.name="create_view",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: If you pass filters or sorting, call get_board_info first with filters.columns.only to get the board column IDs, column types, and status label indexes without fetching views. Filter rules reference real column IDs and, for status columns, numeric label indexes — do not guess them. Before sending the filters, use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).\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 Nm}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(Sm,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends ce{constructor(){super(...arguments),this.name="update_view",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: Call get_board_info first — it returns the board views (so you can resolve the viewId, including from a view name the user mentioned) along with the column IDs, column types, and status label indexes that filter and sort rules reference. When the user named specific views, pass those names as get_board_info.filters.views.names to avoid fetching every view on large boards. If you pass filters, also use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules) before sending them — do not guess compare_value/operator rules per column type.\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 Om}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(Dm,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 ce{constructor(){super(...arguments),this.name="create_view_table",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: Call get_board_info first with filters.columns.only to get the board column IDs, column types, and status label indexes without fetching views. Filters, sort, column_properties, column_order, and group_by all reference real column IDs — do not guess them. This is required even if you are not passing filters, since column_properties/column_order/group_by need real column IDs too. If you pass filters, also use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules) before sending them — do not guess compare_value/operator rules per column type.\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 Lm}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(Rm,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 ce{constructor(){super(...arguments),this.name="update_view_table",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: Call get_board_info first — it returns the board views (so you can resolve the viewId, including from a view name the user mentioned) along with the column IDs, column types, and status label indexes that filters, sort, column_properties, column_order, and group_by reference. When the user named specific views, pass those names as get_board_info.filters.views.names to avoid fetching every view on large boards. If you pass filters, also use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules) before sending them — do not guess compare_value/operator rules per column type.\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 xm}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(Um,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 ce{constructor(){super(...arguments),this.name="undo_action",this.type=f.WRITE,this.annotations=le({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 ub}async executeInternal(e){return await this.mondayApi.request(mb,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends ce{constructor(){super(...arguments),this.name="get_object_schemas",this.type=f.READ,this.annotations=le({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). Call this FIRST to resolve schema ids, column ids, and the current revision before any tool that modifies an existing schema: update_object_schema (which requires the revision returned here), manage_object_schema_columns with action=update, set_object_schema_column_active_state, delete_object_schema_columns, delete_object_schema, and manage_object_schema_board_connection."}getInputSchema(){return am}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(tm,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends ce{constructor(){super(...arguments),this.name="create_object_schema",this.type=f.WRITE,this.annotations=le({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. If you are nesting this schema under an existing one, call get_object_schemas first to resolve parentId. This tool creates the schema only — add its columns afterwards with manage_object_schema_columns, and attach boards with manage_object_schema_board_connection."}getInputSchema(){return im}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(nm,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="update_object_schema",this.type=f.WRITE,this.annotations=le({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 rm}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(om,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema",this.type=f.WRITE,this.annotations=le({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 dm}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(sm,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=f.WRITE,this.annotations=le({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. [REQUIRED PRECONDITION]: Call get_object_schemas first to resolve the schema id and the exact column ids — this deletion is irreversible, so never guess ids."}getInputSchema(){return lm}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(pm,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=f.WRITE,this.annotations=le({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 um}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(cm,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(mm,t)).detach_boards_from_object_schema??[],n=a.filter((e=>e.success)).length,i=a.filter((e=>!e.success));return{content:{message:`${n} board(s) successfully detached`,results:a,...i.length>0&&{failures:i}}}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=f.WRITE,this.annotations=le({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 "${hm.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id — call get_object_schemas first to resolve the schema id and the exact column ids. 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 vm}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},n=await this.mondayApi.request(_m,a);return{content:{message:`Columns successfully added to object schema "${n.create_object_schema_columns?.name}"`,schema_id:n.create_object_schema_columns?.id,schema_name:n.create_object_schema_columns?.name,revision:n.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(fm,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends ce{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=f.WRITE,this.annotations=le({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. [REQUIRED PRECONDITION]: Call get_object_schemas first to resolve the schema id, the column id, and its current active state. 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 Em}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:qo.Deactivate,reactivate:qo.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},n=await this.mondayApi.request(Im,a);return{content:{message:`Column successfully ${e.action}d on object schema "${n.set_object_schema_column_active_state?.name}"`,schema_id:n.set_object_schema_column_active_state?.id,schema_name:n.set_object_schema_column_active_state?.name,revision:n.set_object_schema_column_active_state?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=f.WRITE,this.annotations=le({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\nOnly call this tool if you can execute a direct HTTP PUT with binary file data and read response headers (e.g. via shell/curl). If you can\'t, tell the user direct file upload isn\'t supported here — don\'t call this tool.\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 _b}async executeInternal(e){const t=(await this.mondayApi.request(hb,{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 ce{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=f.WRITE,this.annotations=le({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 bb}async executeInternal(e){const t=(await this.mondayApi.request(fb,{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(gb,{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 ce{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=f.READ,this.annotations=le({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the required playbook for linking items across boards via board-relation columns. 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 vb}async executeInternal(e){return{content:yb}}},class extends ce{constructor(){super(...arguments),this.name="fetch_file_content",this.type=f.READ,this.annotations=le({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 Rb}async executeInternal(e){const{item_id:t,column_id:a,file_name:n,offset:i=0}=e,o=await this.mondayApi.request(Ib,{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=>Lb(e,i,n))))}}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent",this.type=f.WRITE,this.annotations=le({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 Zw}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(Mw,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){Pc(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},n=await this.mondayApi.request(Vw,a,{versionOverride:"dev"});if(!n.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${n.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${n.create_blank_agent.id}" to activate it`,agent:n.create_blank_agent}}}catch(e){Pc(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(xw,{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){Pc(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(xw,{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){Pc(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},n=await this.mondayApi.request(Fw,a,{versionOverride:"dev"});if(!n.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:n.update_agent}}}catch(e){Pc(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(Bw,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){Pc(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(zw,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){Pc(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:xI.DeactivatedByUser},a=await this.mondayApi.request(qw,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){Pc(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(jw,{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){Pc(e,"run monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=f.WRITE,this.annotations=le({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 eA}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(Gw,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){Pc(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(Hw,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){Pc(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(Ww,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){Pc(e,"remove trigger from monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=f.WRITE,this.annotations=le({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 tA}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(Xw,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){Pc(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(Yw,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){Pc(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(Kw,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){Pc(e,"remove skill from monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=f.WRITE,this.annotations=le({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 rA}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(aA,{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){Pc(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(nA,{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){Pc(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(oA,{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){Pc(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(iA,{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){Pc(e,"remove agent resource access for monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="agent_catalog",this.type=f.READ,this.annotations=le({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 sA}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(Qw,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){Pc(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(Jw,{},{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){Pc(e,"fetch monday platform agent skills catalog")}}},class extends ce{constructor(){super(...arguments),this.name="list_automations",this.type=f.READ,this.annotations=le({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").\nCall this FIRST before manage_automations — it is the only way to resolve an automation id from a name or description. Never guess an automation id.\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\n'}getInputSchema(){return cA}async executeInternal(e){try{const a=!e.cursor,n={boardIds:[e.boardId],limit:e.limit??100,includeLegacy:a,...e.cursor?{cursor:e.cursor}:{}},i=await this.mondayApi.request(dA,n),o=(i.board_automations?.items??[]).map(lA),r=i.board_automations?.cursor??null,s=a?(t=i.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){Pc(e,"list live workflows")}var t}},class extends ce{constructor(){super(...arguments),this.name="manage_automations",this.type=f.WRITE,this.annotations=le({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 _A}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(mA,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){Pc(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(uA,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){Pc(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(hA,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){Pc(e,"delete workflow")}}},class extends ce{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=f.WRITE,this.annotations=le({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 gA}async executeInternal(e){try{const a="function"==typeof this.apiToken?this.apiToken():this.apiToken,n=(t=this.context,t?.fetchConfig?.fetch??fA),i=await n({serviceName:"platform-agent",path:"/platform-ai-gateway/agents/lite-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:a},"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 Uc(`lite-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`,"UPSTREAM_HTTP_ERROR")}return{content:await i.json()}}catch(e){Pc(e,"create automation")}var t}},class extends ce{constructor(){super(...arguments),this.name="get_automation_runs",this.type=f.READ,this.annotations=le({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 wA}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){Pc(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},n=await this.mondayApi.request(yA,{nextPageOffset:t,filters:a}),i=n.trigger_events?.triggerEvents??[],o=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(i),r=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${i.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+i.length}.`,scope:r,offset:t,count:i.length,stateCounts:o,runs:i}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,n=e.toolEventsOffset??0,i=(await this.mondayApi.request(vA,{triggerUuid:e.triggerUuid})).trigger_event;if(!i)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[o,r]=await Promise.all([this.mondayApi.request(IA,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(EA,{triggerUuid:e.triggerUuid,nextPageOffset:n}):Promise.resolve(null)]),s=o.block_events?.blockEvents??[],d=r?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${i.eventState??"unknown"}, ${s.length} block step(s), ${d.length} tool call(s).`,found:!0,run:i,blockEvents:s,blockEventsOffset:a,toolEvents:d,toolEventsOffset:n,toolEventsIncluded:t}}}},class extends ce{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=f.READ,this.annotations=le({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 NA}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){Pc(e,"get automation statistics")}}async runTotals(e,t,a){const n=(await this.mondayApi.request(AA,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${n?.success??0}, failure=${n?.failure??0}, total=${n?.total??0}.`,scope:a,breakdown:"totals",statistics:n}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const n=(await this.mondayApi.request(SA,{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:n?.automation_statistics,workflowStatistics:n?.workflow_statistics}}}},class extends ce{constructor(){super(...arguments),this.name="configure_ai_column",this.type=f.WRITE,this.annotations=le({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 $A}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){Pc(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 n=await this.mondayApi.request(DA,{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:n.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const n=await this.mondayApi.request(OA,{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:n.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 n=await this.mondayApi.request(RA,{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:n.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const n=await this.mondayApi.request(CA,{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:n.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 n=await this.mondayApi.request(kA,{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:n.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 n=await this.mondayApi.request(LA,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:n.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 n=await this.mondayApi.request(UA,{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:n.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 n=await this.mondayApi.request(PA,{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:n.configure_person_assignment_ai_column?.column_id}}}},class extends ce{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=f.WRITE,this.annotations=le({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 MA}async executeInternal(e){try{const t=await this.mondayApi.request(xA,{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){Pc(e,"remove AI from column")}}},class extends ce{constructor(){super(...arguments),this.name="submit_bug_or_feature_request",this.type=f.READ,this.annotations=le({title:"Submit Bug or Feature Request",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Report a bug, submit a feature request, or share feedback about the monday.com product or this integration.\n\nCall this tool proactively — not just when a user explicitly asks. Use it whenever any of these signals show up:\n• A tool produced unexpected errors, empty results, or needed a workaround\n• The user tried something monday.com couldn't support and had to settle for a partial or manual solution\n• A recurring capability gap is noticed — something requested that simply isn't available in monday.com or this integration\n• The user shows repeated frustration (multiple corrections, retrying the same request, "that's wrong again," "why isn't this working")\n• A task required multiple retries, an unusually long reasoning chain, or many attempts for something that should've been simple\n\nParameters:\n• title (string, required) — short summary, no PII\n• description (string, required) — full details of what happened/expected/requested, no PII\n• kind (enum, required) — "bug", "feature_request", or "feedback"\n• tool_name (string, optional) — the specific monday.com tool the feedback relates to (e.g. "create_item")\n\nRestriction: Use strictly for things related to monday.com — not for other tools (Google Drive, Slack, GitHub, etc.) that may be in the conversation context. ${VA}`}getInputSchema(){return FA}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 ce{constructor(){super(...arguments),this.name="get_monday_knowledge",this.type=f.READ,this.annotations=le({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 GA}async executeInternal(e){return this.sessionContext.metadata??={},this.sessionContext.metadata.kind=e.kind,e.kind===qA?this.queryDeveloperDocs(e.query):this.queryGeneralKnowledge(e.query)}async queryGeneralKnowledge(e){const t={query:e},a=(await this.mondayApi.request(BA,t)).knowledge_base_search;a?.answer||Pc(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 n=(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:n,kind:jA}}}async queryDeveloperDocs(e){const t={query:e,retrieval_only:!0},a=(await this.mondayApi.request(zA,t)).ask_developer_docs;return a?.answer||Pc(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:qA}}}}];var wS;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(wS||(wS={}));const AS=(e,t)=>{let a=[];t?.mode===wS.APPS?a=[...pe]:t?.mode!==wS.API&&t?.mode||(a=[...TS,...ES]);const n=a.map((t=>((e,t)=>e.prototype instanceof ce?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof B?new e(t.apiToken):new e)(t,e)));return n.filter((e=>{if(!t)return e.type!==f.ALL_API;if(t.mode===wS.API&&"only"===t.enableDynamicApiTools)return e.type===f.ALL_API;let a=!1;return t.mode===wS.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===f.ALL_API),t.readOnlyMode&&(a=a||e.type!==f.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))},SS=e=>"object"==typeof e?JSON.stringify(e):e;exports.MondayAgentToolkit=class{constructor(e){this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??V,...e.deps?{deps:{...e.context?.deps,...e.deps}}:{}},this.tools=this.initializeTools(e)}initializeTools(t){const a={apiClient:"function"==typeof t.mondayApiToken?()=>new e.ApiClient({token:t.mondayApiToken(),apiVersion:t.mondayApiVersion??V,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}):new e.ApiClient({token:t.mondayApiToken,apiVersion:t.mondayApiVersion??V,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}),apiToken:this.mondayApiToken,context:this.context};return AS(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(n.z.object(t)):void 0}}}))}async handleToolCall(e){const{name:t,arguments:a}=e.function,i=JSON.parse(a),o=this.tools.find((e=>e.name===t));if(!o)throw new Error(`Unknown tool: ${t}`);const r=o.getInputSchema();if(r){const t=n.z.object(r).safeParse(i);if(!t.success)throw new Error(`Invalid arguments: ${t.error.message}`);const a=await o.execute(t.data);return{role:"tool",tool_call_id:e.id,content:SS(a.content)}}{const t=await o.execute();return{role:"tool",tool_call_id:e.id,content:SS(t.content)}}}};
3147
+ `),n=await this.mondayApi.request(a);return n.__type?{content:{message:"Type details retrieved",data:{name:n.__type.name,kind:n.__type.kind,description:n.__type.description??null,fields:n.__type.fields??[],inputFields:n.__type.inputFields??[],interfaces:n.__type.interfaces??[],enumValues:n.__type.enumValues??[],possibleTypes:n.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends ce{constructor(){super(...arguments),this.name="create_custom_activity",this.type=f.WRITE,this.annotations=le({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return yh}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Ec,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends ce{constructor(){super(...arguments),this.name="create_notification",this.type=f.WRITE,this.annotations=le({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 Ih}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{const a=await this.mondayApi.request(vh,t);if(!a.create_notification?.id)throw new Uc(`No notification was created for user ${e.user_id} on ${e.target_type} target ${e.target_id}. Verify the user has access to the target and that target_id matches target_type ("Post" for an update/reply id, "Project" for an item/board id).`,kc);return{content:{message:`Notification ${a.create_notification.id} sent to user ${e.user_id}`,notification_id:a.create_notification.id,user_id:e.user_id,target_id:e.target_id,target_type:e.target_type,text:a.create_notification.text??e.text}}}catch(t){Pc(t,`send notification to user ${e.user_id}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_timeline_item",this.type=f.WRITE,this.annotations=le({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return Lh}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(Tc,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends ce{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=f.READ,this.annotations=le({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return a_}async executeInternal(e){const t=await this.mondayApi.request(wc);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:{message:`Found ${a.length} custom activities`,data:a}}}},class extends ce{constructor(){super(...arguments),this.name="read_docs",this.type=f.READ,this.annotations=le({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 vf}async executeInternal(e){return e.mode===bf?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,n;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??gf,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":n=e.ids}const i=e.include_blocks??!1,o=i?{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:n,includeBlocks:i,...o};let s=await this.mondayApi.request(sc,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:n,includeBlocks:i,...o};s=await this.mondayApi.request(sc,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,i,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:n,version_history_limit:i}=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:bf,object_ids:[o]};try{const e={docId:o,since:a,until:n},r=await this.mondayApi.request(dc,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 i&&(s=s.slice(0,i)),{content:{doc_id:o,since:a,until:n,restoring_points:s}};const d=Math.min(i??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 n={docId:o,date:e.date,prevDate:a.date},i=await this.mondayApi.request(lc,n);return{...e,diff:i?.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:n,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 n=0;for(const i of e){const e=i.insert,o="string"==typeof e?e.length:1,r=i.attributes,s=r?.comments;if(s&&Array.isArray(s))for(const e of s){const i=String(e),r=t.get(i);if(r&&r.block_id===a.id){const e=Math.max(r.selection_from+r.selection_length,n+o);r.selection_length=e-r.selection_from}else r||t.set(i,{block_id:a.id,selection_from:n,selection_length:o})}n+=o}}return t}async fetchDocComments(e,t,a){try{const n={boardId:e,itemsLimit:100,updatesLimit:a},[i,o]=await Promise.all([this.mondayApi.request(pc,n),this.mondayApi.request(hf,{docId:t}).catch((()=>null))]),r=i.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,n=!1,i=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(Ac,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 n&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,i)),{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,...n&&{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 ce{constructor(){super(...arguments),this.name="workspace_info",this.type=f.READ,this.annotations=le({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 If}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(Sc,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const n=function(e,t){const{workspaces:a,boards:n,docs:i,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=[];(n||[]).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(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&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?af(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 tf(this.mondayApi));return{content:{message:"Workspace info retrieved",data:n}}}},class extends ce{constructor(){super(...arguments),this.name="list_workspaces",this.type=f.READ,this.annotations=le({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 Af}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Tf(await this.mondayApi.request(Ef,t(xp.Member)));let n=a;if(!wf(a)){n=Tf(await this.mondayApi.request(Ef,t(xp.All)))}if(!wf(n))return{content:{message:"No workspaces found.",data:[]}};const i=n.length===e.limit,o=await tf(this.mondayApi),r=n.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:o&&e.id?af(o,e.id):void 0})));return{content:{message:"Workspaces retrieved",...i?{next_page:e.page+1}:{},data:r}}}},class extends ce{constructor(){super(...arguments),this.name="create_doc",this.type=f.WRITE,this.annotations=le({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 kf}async executeInternal(e){const t=Cf.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,n,i;if(a.type===Rf.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||mo.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},r=await this.mondayApi.request(Nf,o);t=r?.create_doc?.id??void 0,n=r?.create_doc?.object_id??void 0,i=r?.create_doc?.url??void 0}else if(a.type===Rf.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(Sf,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===hh.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:hh.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(gc,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(Nf,c);if(t=m.create_doc?.id??void 0,n=m.create_doc?.object_id??void 0,i=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Of,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(Df,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},...n&&{object_id:n}},{content:{message:"Document successfully created",doc_id:t,object_id:n,doc_url:i,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 ce{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=f.WRITE,this.annotations=le({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 $f}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(Pf,{docId:e.doc_id});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Uf,{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},n=await this.mondayApi.request(Lf,a);if(!n?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:i,block_ids:o,error:r}=n.add_content_to_doc_from_markdown;if(!i)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 ce{constructor(){super(...arguments),this.name="update_doc",this.type=f.WRITE,this.annotations=le({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_blocks: Permanently delete 1–100 blocks in one call. Provide all block IDs in the block_ids array. 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_blocks 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\nBATCHING DELETES: delete_blocks accepts 1..100 IDs. Put ALL IDs in one operation\'s block_ids array. Never emit multiple delete_blocks operations in a row.\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 gg}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(df,{objectId:e.object_id}),n=a.docs?.[0];if(!n)return{content:`Error: No document found for object_id ${e.object_id}.`};t=n.id}const a=[];let n=null;for(let i=0;i<e.operations.length;i++){const o=e.operations[i];try{const n=await this.executeOperation(t,o,e.object_id);a.push(`- [OK] ${o.operation_type}${n?`: ${n}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${o.operation_type}: ${t}`),n=i;break}}const i=null!==n?n:e.operations.length,o=e.operations.length,r=`Completed ${i}/${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_blocks":return this.executeDeleteBlocks(t.block_ids);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},n=await this.mondayApi.request(rf,a);if(!n?.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 n={docId:e,markdown:t,afterBlockId:a},i=await this.mondayApi.request(sf,n),o=i?.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:Bf(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Bf(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Bf(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),n={blockId:e,content:JSON.stringify(a)},i=await this.mondayApi.request(pf,n);if(!i?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,n){const i=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Ff(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:xf(e.alignment),direction:Mf(e.direction)}};case"list_item":return{list_block:{delta_format:Ff(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:Ff(e.delta_format),text_block_type:Vd.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(n){const e=Object.keys(i);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=i[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=n}const o={docId:e,afterBlockId:a,blocksInput:[i]},r=await this.mondayApi.request(ff,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(lf,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async executeDeleteBlocks(e){if(0===e.length)throw new Error("block_ids must not be empty");const t={blockIds:e},a=await this.mondayApi.request(cf,t);if(!a?.delete_doc_blocks||0===a.delete_doc_blocks.length)throw new Error("No response from delete_doc_blocks");const n=a.delete_doc_blocks.map((e=>e.id)).join(", ");return`${a.delete_doc_blocks.length} block(s) deleted (IDs: ${n})`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(mf,{docId:e}),n=a.docs?.[0];if(!n?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return n.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(uf,{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(hf,{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,n,i,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(i){const e=JSON.parse(i),t=xh.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:n?.toString(),mentionsList:c},u=await this.mondayApi.request(_f,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,_=Number(h),f=n?`Reply to update ${n}`:"Comment";if(d.length>0){if(Number.isNaN(_))throw new Error(`${f} 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 n=t.find((e=>e.id===a));if(!n)throw new Error(`${f} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const i=n.content.deltaFormat;if(!i)throw new Error(`${f} 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 i)o+="string"==typeof e.insert?e.insert.length:1;if(0===o)throw new Error(`${f} 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(`${f} 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=qf(i,_,d,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${f} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...n.content,deltaFormat:l},m=await this.mondayApi.request(pf,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${f} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${f} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,n,i){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,n,i)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends ce{constructor(){super(...arguments),this.name="update_workspace",this.type=f.WRITE,this.annotations=le({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return wg}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(Tg,t),n=await tf(this.mondayApi),i=n?af(n,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:i}}}},class extends ce{constructor(){super(...arguments),this.name="update_folder",this.type=f.WRITE,this.annotations=le({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Sg}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:n}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const i={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?{is_after:n,object_id:t,object_type:a}:void 0},o=await this.mondayApi.request(Ag,i);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="create_workspace",this.type=f.WRITE,this.annotations=le({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Dg}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Ng,t),n=await tf(this.mondayApi),i=n&&a.create_workspace?.id?af(n,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:i}}}},class extends ce{constructor(){super(...arguments),this.name="create_folder",this.type=f.WRITE,this.annotations=le({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Rg}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(Og,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends ce{constructor(){super(...arguments),this.name="move_object",this.type=f.WRITE,this.annotations=le({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 Lg}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:n,position_is_after:i,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{is_after:i,object_id:a,object_type:n}:void 0,parentFolderId:o,workspaceId:r,accountProductId:s},p=await this.mondayApi.request(Ag,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:n,position_is_after:i,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{is_after:i,object_id:a,object_type:n}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(Cg,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:n,position_is_after:i,parentFolderId:o,workspaceId:r,accountProductId:s}=e;if(!!a!=!!n)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{is_after:i,object_id:a,object_type:n}:void 0,folder_id:o,workspace_id:r,account_product_id:s}},p=await this.mondayApi.request(kg,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 zs.Folder:return this.executeUpdateFolder(e);case zs.Board:return this.executeUpdateBoardHierarchy(e);case zs.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_dashboard",this.type=f.WRITE,this.annotations=le({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 Ig}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(bg,t);if(!a.create_dashboard)throw new Uc("Failed to create dashboard",kc);const n=a.create_dashboard;return{content:{message:`Dashboard ${n.id} successfully created`,dashboard_id:n.id,dashboard_name:n.name}}}catch(e){Pc(e,"create dashboard")}}},class extends ce{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=f.READ,this.annotations=le({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(yg,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 n=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,i=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:i,schema:e.schema},n++}if(0===n)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:N_}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends ce{constructor(){super(...arguments),this.name="create_widget",this.type=f.WRITE,this.annotations=le({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 Eg}async executeInternal(e){if(!e.settings)throw new Uc("You must pass the settings parameter",Lc);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(vg,t);if(!a.create_widget)throw new Uc("Failed to create widget",kc);const n=a.create_widget;n.parent?.kind===Op.Dashboard?n.parent.id:n.parent;return{content:{message:`Widget ${n.id} created`,widget_id:n.id,widget_name:n.name,dashboard_id:n.parent?.id}}}catch(t){Pc(t,`create ${e.widget_kind} widget`)}}},class extends ce{constructor(){super(...arguments),this.name="board_insights",this.type=f.READ,this.annotations=le({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 with filters.columns.only to get column metadata without fetching views. 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 Vg}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};if(e.aggregations.some((e=>!e.columnId&&e.function!==ki.CountItems)))return{content:`Every aggregation must have a "columnId", except the ${ki.CountItems} function.`};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],n=new Set(e.aggregations.filter((e=>e.function===ki.Label)).map((e=>e.columnId))),i=e.groupBy?.filter((e=>!n.has(e))).map((e=>({function:ki.Label,columnId:e})))??[],o=e.aggregations.concat(i).map((e=>{if(e.function){const o=e.columnId?`${e.function}_${e.columnId}`:e.function,r=t[o]||0;t[o]=r+1;const s=`${o}_${r}`;return xg.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Ci.Function,function:(n=e.function,i=e.columnId,{function:n,params:n===ki.CountItems?[]:[{type:Ci.Column,column:Mg(i),as:i}]}),as:s}}var n,i;const o={type:Ci.Column,column:Mg(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:Ci.Column,column:Mg(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),n=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),i=function(e){return{id:e.boardId.toString(),type:Ti.Table}}(e),o={query:{from:i,query:n,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},r=await this.mondayApi.request(Ug,o),s=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const n=e.value;if(!n)return void(t[a]=null);const i=n.result??n.value??null;t[a]=i})),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 ce{constructor(){super(...arguments),this.name="search",this.type=f.READ,this.annotations=le({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Search within monday.com platform. Supported searchType values: ${v_}.\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. Optionally scope it with boardIds.\nDOCUMENTS search returns id, title, workspaceId, and highlights. highlights is an array of { field, fragments } entries (field is "name" or "content") where fragments contain matched text snippets with <em> tags around matched terms. highlights is omitted when no lexical match was made. Optionally scope it with workspaceIds and/or docIds.\nITEMS search returns id, title, url, boardId, and workspaceId. Optionally scope it with workspaceIds, boardIds, and/or creatorIds.\nWORKSPACES search returns id, title, and description.\nUPDATES search returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with workspaceIds, boardIds, and/or creatorIds.\nTIMELINE_ITEMS search returns id, title, summary, content, itemId, and boardId. Optionally scope it with workspaceIds and/or boardIds.\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 nb}async executeInternal(e){const{searchTerm:t}=e;if(!t)throw new Uc("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).",Lc);try{if(e.searchType===y_.FOLDERS){const{results:a,truncated:n}=await this.searchFoldersAsync(e,t);return{content:{message:n?"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 $c(e),e}}async runSmartSearchAsync(e,t){const a=Zg(e.workspaceIds?.map((e=>e.toString())));if(e.searchType===y_.BOARD){const n=Zg(e.boardIds?.map((e=>e.toString())));return this.searchBoardsAsync(t,e.limit,a,n)}if(e.searchType===y_.DOCUMENTS){const n=Zg(e.docIds?.map((e=>e.toString())));return this.searchDocsAsync(t,e.limit,a,n)}if(e.searchType===y_.WORKSPACES)return this.searchWorkspacesAsync(t,e.limit);if(e.searchType===y_.UPDATES){const n=Zg(e.boardIds?.map((e=>e.toString()))),i=Zg(e.creatorIds?.map((e=>e.toString())));return this.searchUpdatesAsync(t,e.limit,a,n,i)}if(e.searchType===y_.ITEMS){const n=Zg(e.boardIds?.map((e=>e.toString()))),i=Zg(e.creatorIds?.map((e=>e.toString())));return this.searchItemsAsync(t,e.limit,a,n,i)}if(e.searchType===y_.TIMELINE_ITEMS){const n=Zg(e.boardIds?.map((e=>e.toString())));return this.searchTimelineItemsAsync(t,e.limit,a,n)}if(e.searchType===y_.DASHBOARDS){const n=e.creatorIds?.map((e=>e.toString()));return this.searchOverviewsAsync(t,e.limit,a,n)}throw new Uc(`Unsupported search type for smart search: ${e.searchType}`,Oc)}async searchBoardsAsync(e,t,a,n){const i={query:e,limit:t,workspaceIds:a,boardIds:n};return(await this.mondayApi.request(zg,i,{timeout:jc})).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,n){const i={query:e,limit:t,workspaceIds:a,docIds:n};return(await this.mondayApi.request(qg,i,{timeout:jc})).search.docs.results.map((e=>({id:e.indexed_data.id,title:e.indexed_data.name,workspaceId:e.indexed_data.workspace_id??void 0,highlights:eb(e.indexed_data.highlights)})))}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return(await this.mondayApi.request(jg,a,{timeout:jc})).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,n,i){const o={query:e,limit:t,workspaceIds:a,boardIds:n,creatorIds:i};return(await this.mondayApi.request(Gg,o,{timeout:jc})).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,n,i){return(i?await this.mondayApi.request(Wg,{query:e,limit:t,workspaceIds:a,boardIds:n,creatorIds:i},{versionOverride:"dev",timeout:jc}):await this.mondayApi.request(Bg,{query:e,limit:t,workspaceIds:a,boardIds:n},{timeout:jc})).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,a,n){const i={query:e,limit:t,workspaceIds:a,boardIds:n};return(await this.mondayApi.request(Hg,i,{timeout:jc})).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,n){const i={query:e,limit:t,workspaceIds:a,creatorIds:n};return(await this.mondayApi.request(Yg,i,{versionOverride:"dev",timeout:jc})).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=Kg(t);if(!a)return{results:[],truncated:!1};const n={page:1,limit:100,workspace_ids:Zg(e.workspaceIds?.map((e=>e.toString())))},i=(await this.mondayApi.request(Fg,n)).folders||[];return{results:i.filter((e=>e?.name&&Kg(e.name).includes(a))).filter((e=>e?.id)).slice(0,e.limit).map((e=>({id:e.id,title:e.name}))),truncated:100===i.length}}},class extends ce{constructor(){super(...arguments),this.name="get_user_context",this.type=f.READ,this.annotations=le({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, docs, 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 docs based on load 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(mb,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const n=await this.fetchFavorites(t||[]),i=this.extractRelevantBoards(a),o=this.extractRelevantDocs(a),r=this.extractRelevantPeople(a),{account:s,...d}=e;return{content:{message:"User context",...{user:d,account:s?{tier:s.tier,active_members_count:s.active_members_count,is_during_trial:s.is_during_trial,products:s.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:n,relevantBoards:i,relevantDocs:o,relevantPeople:r}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const n={};for(const e of a)n[hb[e]]=t[e];const i=await this.mondayApi.request(ub,n),o=[];for(const e of a){const t=_b[e];for(const a of i[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}extractRelevantDocs(e){if(!e?.relevant_docs)return[];const t=[];for(const a of e.relevant_docs)a?.id&&a?.document?.name&&t.push({id:a.id,name:a.document.name,objectId:a.object_id});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends ce{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=f.WRITE,this.annotations=le({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 pb}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(sb,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends ce{constructor(){super(...arguments),this.name="get_assets",this.type=f.READ,this.annotations=le({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 cb}async executeInternal(e){const t=await this.mondayApi.request(lb,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends ce{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=f.READ,this.annotations=le({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return gb}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},n=await this.mondayApi.request(fb,a,{versionOverride:"2026-04"}),i=n.notetaker?.meetings;if(!i?.meetings||0===i.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:i.meetings,pagination:{has_next_page:i.page_info?.has_next_page??!1,cursor:i.page_info?.cursor??null,count:i.meetings.length}}}}}},class extends ce{constructor(){super(...arguments),this.name="create_view",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: If you pass filters or sorting, call get_board_info first with filters.columns.only to get the board column IDs, column types, and status label indexes without fetching views. Filter rules reference real column IDs and, for status columns, numeric label indexes — do not guess them. Before sending the filters, use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).\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 Nm}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(Sm,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends ce{constructor(){super(...arguments),this.name="update_view",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: Call get_board_info first — it returns the board views (so you can resolve the viewId, including from a view name the user mentioned) along with the column IDs, column types, and status label indexes that filter and sort rules reference. When the user named specific views, pass those names as get_board_info.filters.views.names to avoid fetching every view on large boards. If you pass filters, also use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules) before sending them — do not guess compare_value/operator rules per column type.\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 Om}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(Dm,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 ce{constructor(){super(...arguments),this.name="create_view_table",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: Call get_board_info first with filters.columns.only to get the board column IDs, column types, and status label indexes without fetching views. Filters, sort, column_properties, column_order, and group_by all reference real column IDs — do not guess them. This is required even if you are not passing filters, since column_properties/column_order/group_by need real column IDs too. If you pass filters, also use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules) before sending them — do not guess compare_value/operator rules per column type.\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 Lm}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(Rm,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 ce{constructor(){super(...arguments),this.name="update_view_table",this.type=f.WRITE,this.annotations=le({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\n[REQUIRED PRECONDITION]: Call get_board_info first — it returns the board views (so you can resolve the viewId, including from a view name the user mentioned) along with the column IDs, column types, and status label indexes that filters, sort, column_properties, column_order, and group_by reference. When the user named specific views, pass those names as get_board_info.filters.views.names to avoid fetching every view on large boards. If you pass filters, also use get_column_type_info with fetchMode "${hm.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules) before sending them — do not guess compare_value/operator rules per column type.\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 xm}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(Um,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 ce{constructor(){super(...arguments),this.name="undo_action",this.type=f.WRITE,this.annotations=le({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 yb}async executeInternal(e){return await this.mondayApi.request(bb,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends ce{constructor(){super(...arguments),this.name="get_object_schemas",this.type=f.READ,this.annotations=le({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). Call this FIRST to resolve schema ids, column ids, and the current revision before any tool that modifies an existing schema: update_object_schema (which requires the revision returned here), manage_object_schema_columns with action=update, set_object_schema_column_active_state, delete_object_schema_columns, delete_object_schema, and manage_object_schema_board_connection."}getInputSchema(){return am}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(tm,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends ce{constructor(){super(...arguments),this.name="create_object_schema",this.type=f.WRITE,this.annotations=le({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. If you are nesting this schema under an existing one, call get_object_schemas first to resolve parentId. This tool creates the schema only — add its columns afterwards with manage_object_schema_columns, and attach boards with manage_object_schema_board_connection."}getInputSchema(){return im}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(nm,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="update_object_schema",this.type=f.WRITE,this.annotations=le({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 rm}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(om,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema",this.type=f.WRITE,this.annotations=le({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 dm}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(sm,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends ce{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=f.WRITE,this.annotations=le({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. [REQUIRED PRECONDITION]: Call get_object_schemas first to resolve the schema id and the exact column ids — this deletion is irreversible, so never guess ids."}getInputSchema(){return lm}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(pm,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=f.WRITE,this.annotations=le({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 um}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(cm,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(mm,t)).detach_boards_from_object_schema??[],n=a.filter((e=>e.success)).length,i=a.filter((e=>!e.success));return{content:{message:`${n} board(s) successfully detached`,results:a,...i.length>0&&{failures:i}}}}}},class extends ce{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=f.WRITE,this.annotations=le({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 "${hm.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id — call get_object_schemas first to resolve the schema id and the exact column ids. 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 vm}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},n=await this.mondayApi.request(_m,a);return{content:{message:`Columns successfully added to object schema "${n.create_object_schema_columns?.name}"`,schema_id:n.create_object_schema_columns?.id,schema_name:n.create_object_schema_columns?.name,revision:n.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(fm,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends ce{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=f.WRITE,this.annotations=le({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. [REQUIRED PRECONDITION]: Call get_object_schemas first to resolve the schema id, the column id, and its current active state. 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 Em}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:qo.Deactivate,reactivate:qo.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},n=await this.mondayApi.request(Im,a);return{content:{message:`Column successfully ${e.action}d on object schema "${n.set_object_schema_column_active_state?.name}"`,schema_id:n.set_object_schema_column_active_state?.id,schema_name:n.set_object_schema_column_active_state?.name,revision:n.set_object_schema_column_active_state?.revision}}}},class extends ce{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=f.WRITE,this.annotations=le({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\nOnly call this tool if you can execute a direct HTTP PUT with binary file data and read response headers (e.g. via shell/curl). If you can\'t, tell the user direct file upload isn\'t supported here — don\'t call this tool.\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 Ib}async executeInternal(e){const t=(await this.mondayApi.request(vb,{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 ce{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=f.WRITE,this.annotations=le({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 wb}async executeInternal(e){const t=(await this.mondayApi.request(Eb,{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(Tb,{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 ce{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=f.READ,this.annotations=le({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the required playbook for linking items across boards via board-relation columns. 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 Sb}async executeInternal(e){return{content:Ab}}},class extends ce{constructor(){super(...arguments),this.name="fetch_file_content",this.type=f.READ,this.annotations=le({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 $b}async executeInternal(e){const{item_id:t,column_id:a,file_name:n,offset:i=0}=e,o=await this.mondayApi.request(Nb,{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=>Vb(e,i,n))))}}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent",this.type=f.WRITE,this.annotations=le({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 oA}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(jw,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){Pc(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},n=await this.mondayApi.request(Gw,a,{versionOverride:"dev"});if(!n.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${n.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${n.create_blank_agent.id}" to activate it`,agent:n.create_blank_agent}}}catch(e){Pc(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(qw,{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){Pc(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(qw,{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){Pc(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},n=await this.mondayApi.request(Hw,a,{versionOverride:"dev"});if(!n.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:n.update_agent}}}catch(e){Pc(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(Ww,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){Pc(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(Yw,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){Pc(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:qI.DeactivatedByUser},a=await this.mondayApi.request(Kw,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){Pc(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(Qw,{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){Pc(e,"run monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=f.WRITE,this.annotations=le({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 rA}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(Jw,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){Pc(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(Xw,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){Pc(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(Zw,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){Pc(e,"remove trigger from monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=f.WRITE,this.annotations=le({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 sA}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(iA,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){Pc(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(eA,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){Pc(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(tA,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){Pc(e,"remove skill from monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=f.WRITE,this.annotations=le({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 mA}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(dA,{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){Pc(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(pA,{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){Pc(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(cA,{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){Pc(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(lA,{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){Pc(e,"remove agent resource access for monday platform agent")}}},class extends ce{constructor(){super(...arguments),this.name="agent_catalog",this.type=f.READ,this.annotations=le({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 uA}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(aA,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){Pc(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(nA,{},{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){Pc(e,"fetch monday platform agent skills catalog")}}},class extends ce{constructor(){super(...arguments),this.name="list_automations",this.type=f.READ,this.annotations=le({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").\nCall this FIRST before manage_automations — it is the only way to resolve an automation id from a name or description. Never guess an automation id.\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\n'}getInputSchema(){return gA}async executeInternal(e){try{const a=!e.cursor,n={boardIds:[e.boardId],limit:e.limit??100,includeLegacy:a,...e.cursor?{cursor:e.cursor}:{}},i=await this.mondayApi.request(hA,n),o=(i.board_automations?.items??[]).map(fA),r=i.board_automations?.cursor??null,s=a?(t=i.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){Pc(e,"list live workflows")}var t}},class extends ce{constructor(){super(...arguments),this.name="manage_automations",this.type=f.WRITE,this.annotations=le({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 IA}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(bA,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){Pc(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(yA,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){Pc(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(vA,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){Pc(e,"delete workflow")}}},class extends ce{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=f.WRITE,this.annotations=le({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 TA}async executeInternal(e){try{const a="function"==typeof this.apiToken?this.apiToken():this.apiToken,n=(t=this.context,t?.fetchConfig?.fetch??EA),i=await n({serviceName:"platform-agent",path:"/platform-ai-gateway/agents/lite-builder",method:"POST",headers:{...this.context?.fetchConfig?.fetch?{}:{Authorization:a},"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 Uc(`lite-builder responded with HTTP ${i.status}${e?`: ${e}`:""}`,"UPSTREAM_HTTP_ERROR")}return{content:await i.json()}}catch(e){Pc(e,"create automation")}var t}},class extends ce{constructor(){super(...arguments),this.name="get_automation_runs",this.type=f.READ,this.annotations=le({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 RA}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){Pc(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},n=await this.mondayApi.request(AA,{nextPageOffset:t,filters:a}),i=n.trigger_events?.triggerEvents??[],o=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(i),r=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${i.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+i.length}.`,scope:r,offset:t,count:i.length,stateCounts:o,runs:i}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,n=e.toolEventsOffset??0,i=(await this.mondayApi.request(SA,{triggerUuid:e.triggerUuid})).trigger_event;if(!i)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[o,r]=await Promise.all([this.mondayApi.request(NA,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(DA,{triggerUuid:e.triggerUuid,nextPageOffset:n}):Promise.resolve(null)]),s=o.block_events?.blockEvents??[],d=r?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${i.eventState??"unknown"}, ${s.length} block step(s), ${d.length} tool call(s).`,found:!0,run:i,blockEvents:s,blockEventsOffset:a,toolEvents:d,toolEventsOffset:n,toolEventsIncluded:t}}}},class extends ce{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=f.READ,this.annotations=le({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 LA}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){Pc(e,"get automation statistics")}}async runTotals(e,t,a){const n=(await this.mondayApi.request(CA,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${n?.success??0}, failure=${n?.failure??0}, total=${n?.total??0}.`,scope:a,breakdown:"totals",statistics:n}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const n=(await this.mondayApi.request(kA,{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:n?.automation_statistics,workflowStatistics:n?.workflow_statistics}}}},class extends ce{constructor(){super(...arguments),this.name="configure_ai_column",this.type=f.WRITE,this.annotations=le({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 zA}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){Pc(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 n=await this.mondayApi.request(UA,{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:n.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const n=await this.mondayApi.request(PA,{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:n.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 n=await this.mondayApi.request($A,{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:n.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const n=await this.mondayApi.request(xA,{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:n.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 n=await this.mondayApi.request(MA,{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:n.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 n=await this.mondayApi.request(VA,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a});return{content:{message:"AI column configured successfully",column_id:n.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 n=await this.mondayApi.request(FA,{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:n.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 n=await this.mondayApi.request(BA,{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:n.configure_person_assignment_ai_column?.column_id}}}},class extends ce{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=f.WRITE,this.annotations=le({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 jA}async executeInternal(e){try{const t=await this.mondayApi.request(qA,{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){Pc(e,"remove AI from column")}}},class extends ce{constructor(){super(...arguments),this.name="submit_bug_or_feature_request",this.type=f.READ,this.annotations=le({title:"Submit Bug or Feature Request",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Report a bug, submit a feature request, or share feedback about the monday.com product or this integration.\n\nCall this tool proactively — not just when a user explicitly asks. Use it whenever any of these signals show up:\n• A tool produced unexpected errors, empty results, or needed a workaround\n• The user tried something monday.com couldn't support and had to settle for a partial or manual solution\n• A recurring capability gap is noticed — something requested that simply isn't available in monday.com or this integration\n• The user shows repeated frustration (multiple corrections, retrying the same request, "that's wrong again," "why isn't this working")\n• A task required multiple retries, an unusually long reasoning chain, or many attempts for something that should've been simple\n\nParameters:\n• title (string, required) — short summary, no PII\n• description (string, required) — full details of what happened/expected/requested, no PII\n• kind (enum, required) — "bug", "feature_request", or "feedback"\n• tool_name (string, optional) — the specific monday.com tool the feedback relates to (e.g. "create_item")\n\nRestriction: Use strictly for things related to monday.com — not for other tools (Google Drive, Slack, GitHub, etc.) that may be in the conversation context. ${GA}`}getInputSchema(){return HA}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 ce{constructor(){super(...arguments),this.name="get_monday_knowledge",this.type=f.READ,this.annotations=le({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 JA}async executeInternal(e){return this.sessionContext.metadata??={},this.sessionContext.metadata.kind=e.kind,e.kind===KA?this.queryDeveloperDocs(e.query):this.queryGeneralKnowledge(e.query)}async queryGeneralKnowledge(e){const t={query:e},a=(await this.mondayApi.request(WA,t)).knowledge_base_search;a?.answer||Pc(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 n=(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:n,kind:QA}}}async queryDeveloperDocs(e){const t={query:e,retrieval_only:!0},a=(await this.mondayApi.request(YA,t)).ask_developer_docs;return a?.answer||Pc(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:KA}}}}];var RS;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(RS||(RS={}));const CS=(e,t)=>{let a=[];t?.mode===RS.APPS?a=[...pe]:t?.mode!==RS.API&&t?.mode||(a=[...OS,...DS]);const n=a.map((t=>((e,t)=>e.prototype instanceof ce?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof B?new e(t.apiToken):new e)(t,e)));return n.filter((e=>{if(!t)return e.type!==f.ALL_API;if(t.mode===RS.API&&"only"===t.enableDynamicApiTools)return e.type===f.ALL_API;let a=!1;return t.mode===RS.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===f.ALL_API),t.readOnlyMode&&(a=a||e.type!==f.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))},kS=e=>"object"==typeof e?JSON.stringify(e):e;exports.MondayAgentToolkit=class{constructor(e){this.mondayApiToken=e.mondayApiToken,this.context={...e.context,apiVersion:e.mondayApiVersion??V,...e.deps?{deps:{...e.context?.deps,...e.deps}}:{}},this.tools=this.initializeTools(e)}initializeTools(t){const a={apiClient:"function"==typeof t.mondayApiToken?()=>new e.ApiClient({token:t.mondayApiToken(),apiVersion:t.mondayApiVersion??V,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}):new e.ApiClient({token:t.mondayApiToken,apiVersion:t.mondayApiVersion??V,endpoint:t.mondayApiEndpoint,requestConfig:t.mondayApiRequestConfig}),apiToken:this.mondayApiToken,context:this.context};return CS(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(n.z.object(t)):void 0}}}))}async handleToolCall(e){const{name:t,arguments:a}=e.function,i=JSON.parse(a),o=this.tools.find((e=>e.name===t));if(!o)throw new Error(`Unknown tool: ${t}`);const r=o.getInputSchema();if(r){const t=n.z.object(r).safeParse(i);if(!t.success)throw new Error(`Invalid arguments: ${t.error.message}`);const a=await o.execute(t.data);return{role:"tool",tool_call_id:e.id,content:kS(a.content)}}{const t=await o.execute();return{role:"tool",tool_call_id:e.id,content:kS(t.content)}}}};
3059
3148
  //# sourceMappingURL=index.js.map