@mondaydotcomorg/agent-toolkit 5.36.0 → 5.38.0

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.
@@ -2054,14 +2054,31 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2054
2054
  }
2055
2055
  }
2056
2056
  }
2057
- `,nh=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");var oh,rh;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-",e.WORKSPACE="workspace-",e.ITEM="item-"}(oh||(oh={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.WORKSPACES="WORKSPACES",e.ITEMS="ITEMS"}(rh||(rh={}));const dh={searchTerm:r.string().optional().describe("The search term to use for the search."),searchType:r.nativeEnum(rh).describe("The type of search to perform."),limit:r.number().max(20).optional().default(20).describe("The number of items to get. The max and default value is 20."),page:r.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:r.array(r.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const sh=r.object({id:r.string().describe("The ID of the entity to mention"),type:r.nativeEnum(Vo).describe("The type of mention: User, Team, Board, or Project")}),ph=r.array(sh),lh={itemId:r.number().describe("The id of the item to which the update will be added"),body:r.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:r.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 ch=ns`
2057
+ `,nh=ns`
2058
+ query SearchUpdates($query: String!, $limit: Int, $boardIds: [ID!], $creatorIds: [ID!]) {
2059
+ search {
2060
+ updates(query: $query, limit: $limit, board_ids: $boardIds, creator_ids: $creatorIds) {
2061
+ results {
2062
+ id
2063
+ indexed_data {
2064
+ id
2065
+ body
2066
+ creator_id
2067
+ item_id
2068
+ board_id
2069
+ }
2070
+ }
2071
+ }
2072
+ }
2073
+ }
2074
+ `,oh=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");var rh,dh;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-",e.WORKSPACE="workspace-",e.UPDATE="update-",e.ITEM="item-"}(rh||(rh={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.WORKSPACES="WORKSPACES",e.UPDATES="UPDATES",e.ITEMS="ITEMS"}(dh||(dh={}));const sh={searchTerm:r.string().optional().describe("The search term to use for the search."),searchType:r.nativeEnum(dh).describe("The type of search to perform."),limit:r.number().max(20).optional().default(20).describe("The number of items to get. The max and default value is 20."),page:r.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:r.array(r.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces."),boardIds:r.array(r.number()).optional().describe("The ids of the boards to scope the search to. [IMPORTANT] Only applies to UPDATES search, and only pass it if the user explicitly asked to search within specific boards."),creatorIds:r.array(r.number()).optional().describe("The ids of the users whose updates to search. [IMPORTANT] Only applies to UPDATES search, and only pass it if the user explicitly asked to search updates by specific authors.")};const ph=r.object({id:r.string().describe("The ID of the entity to mention"),type:r.nativeEnum(Vo).describe("The type of mention: User, Team, Board, or Project")}),lh=r.array(ph),ch={itemId:r.number().describe("The id of the item to which the update will be added"),body:r.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:r.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 mh=ns`
2058
2075
  mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
2059
2076
  update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
2060
2077
  id
2061
2078
  name
2062
2079
  }
2063
2080
  }
2064
- `,mh=r.object({fileType:r.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:r.string().describe("File display name"),linkToFile:r.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:r.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:r.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),uh={boardId:r.string().describe("The board's unique identifier"),itemId:r.string().describe("The item's unique identifier"),columnId:r.string().describe("The file or doc column's unique identifier"),files:r.array(mh).describe("Array of file values to set on the column")};const hh=ns`
2081
+ `,uh=r.object({fileType:r.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:r.string().describe("File display name"),linkToFile:r.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:r.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:r.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),hh={boardId:r.string().describe("The board's unique identifier"),itemId:r.string().describe("The item's unique identifier"),columnId:r.string().describe("The file or doc column's unique identifier"),files:r.array(uh).describe("Array of file values to set on the column")};const fh=ns`
2065
2082
  query getAssets($ids: [ID!]!) {
2066
2083
  assets(ids: $ids) {
2067
2084
  id
@@ -2079,7 +2096,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2079
2096
  }
2080
2097
  }
2081
2098
  }
2082
- `,fh={ids:r.array(r.string()).min(1).describe("Array of asset IDs to fetch")};const _h=ns`
2099
+ `,_h={ids:r.array(r.string()).min(1).describe("Array of asset IDs to fetch")};const gh=ns`
2083
2100
  query getUserContext {
2084
2101
  me {
2085
2102
  id
@@ -2116,7 +2133,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2116
2133
  }
2117
2134
  }
2118
2135
  }
2119
- `,gh=ns`
2136
+ `,bh=ns`
2120
2137
  query getFavoriteDetails(
2121
2138
  $boardIds: [ID!]
2122
2139
  $folderIds: [ID!]
@@ -2140,7 +2157,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2140
2157
  name
2141
2158
  }
2142
2159
  }
2143
- `,bh={[Eo.Board]:"boardIds",[Eo.Folder]:"folderIds",[Eo.Workspace]:"workspaceIds",[Eo.Dashboard]:"dashboardIds"},vh={[Eo.Board]:"boards",[Eo.Folder]:"folders",[Eo.Workspace]:"workspaces",[Eo.Dashboard]:"dashboards"};const yh=ns`
2160
+ `,vh={[Eo.Board]:"boardIds",[Eo.Folder]:"folderIds",[Eo.Workspace]:"workspaceIds",[Eo.Dashboard]:"dashboardIds"},yh={[Eo.Board]:"boards",[Eo.Folder]:"folders",[Eo.Workspace]:"workspaces",[Eo.Dashboard]:"dashboards"};const wh=ns`
2144
2161
  query GetNotetakerMeetings(
2145
2162
  $limit: Int
2146
2163
  $cursor: String
@@ -2193,13 +2210,13 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2193
2210
  }
2194
2211
  }
2195
2212
  }
2196
- `,wh={ids:r.array(r.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:r.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:r.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:r.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:r.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:r.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:r.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:r.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:r.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const Ih=ns`
2213
+ `,Ih={ids:r.array(r.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:r.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:r.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:r.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:r.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:r.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:r.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:r.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:r.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const Th=ns`
2197
2214
  mutation BatchUndo($boardId: ID!, $undoRecordId: ID!) {
2198
2215
  batch_undo(board_id: $boardId, undo_record_id: $undoRecordId) {
2199
2216
  success
2200
2217
  }
2201
2218
  }
2202
- `,Th={boardId:r.number().describe("The id of the board where the action was performed"),undoRecordId:r.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 Eh=ns`
2219
+ `,Eh={boardId:r.number().describe("The id of the board where the action was performed"),undoRecordId:r.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 Ah=ns`
2203
2220
  mutation CreateUpload($input: CreateUploadInput!) {
2204
2221
  create_upload(input: $input) {
2205
2222
  upload_id
@@ -2213,7 +2230,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2213
2230
  expires_at
2214
2231
  }
2215
2232
  }
2216
- `,Ah={fileName:r.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:r.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:r.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Sh=ns`
2233
+ `,Sh={fileName:r.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:r.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:r.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const Nh=ns`
2217
2234
  mutation CompleteUpload($input: CompleteUploadInput!) {
2218
2235
  complete_upload(input: $input) {
2219
2236
  id
@@ -2225,13 +2242,13 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2225
2242
  filelink
2226
2243
  }
2227
2244
  }
2228
- `,Nh=ns`
2245
+ `,Dh=ns`
2229
2246
  mutation ChangeColumnValue($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {
2230
2247
  change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {
2231
2248
  id
2232
2249
  }
2233
2250
  }
2234
- `,Dh={uploadId:r.string().describe("The upload_id returned by get_asset_upload_url"),etag:r.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:r.string().describe("The board's unique identifier"),itemId:r.string().describe("The item's unique identifier"),columnId:r.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const kh="\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(),Oh={};const Ch=ns`
2251
+ `,kh={uploadId:r.string().describe("The upload_id returned by get_asset_upload_url"),etag:r.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:r.string().describe("The board's unique identifier"),itemId:r.string().describe("The item's unique identifier"),columnId:r.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Oh="\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(),Ch={};const Rh=ns`
2235
2252
  query GetItemAssets($itemId: [ID!]!, $columnId: [String!]!) {
2236
2253
  items(ids: $itemId) {
2237
2254
  assets(column_ids: $columnId) {
@@ -2241,8 +2258,8 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2241
2258
  }
2242
2259
  }
2243
2260
  }
2244
- `,Rh=10485760,$h=5e4,Lh=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),xh=new Set([".pdf"]),Uh=new Set([".docx"]),Ph=new Set([".xlsx"]),Fh=new Set([".xls"]),Vh=new Set([".txt",".md",".csv",".json"]),Mh={item_id:r.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:r.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:r.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:r.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 Bh(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function jh(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 jh(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function qh(e,t,a){const i=function(e,t){if(t){const e=Bh(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:Bh(e.name)}(e,a);try{if(Lh.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(Fh.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>Rh)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),n=[];let o=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(o+=t.byteLength,o>Rh)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");n.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(n)}(e.public_url);let n,o;xh.has(i)?(n=await async function(e){const t=await h(new Uint8Array(e)),{text:a}=await f(t,{mergePages:!0});return a}(a),o="pdf"):Uh.has(i)?(n=await async function(e){return(await m.extractRawText({buffer:e})).value}(a),o="word"):Ph.has(i)?(n=await async function(e){const t=new u.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(jh).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):Vh.has(i)?(n=a.toString("utf-8"),o="text"):(n=a.toString("utf-8"),o="unknown");const r=n.slice(t,t+$h),d=n.length>t+$h;return{file_name:e.name,file_extension:i,content_type:o,text:r,total_length:n.length,...xh.has(i)&&{public_url:e.public_url},...d&&{has_more:!0,next_offset:t+$h}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var Hh,Gh,Wh,Yh,Kh,Qh,zh,Jh,Xh,Zh,ef,tf,af,nf,of,rf,df,sf,pf,lf,cf,mf,uf,hf,ff,_f,gf,bf,vf,yf,wf,If,Tf,Ef,Af,Sf,Nf,Df,kf,Of,Cf,Rf,$f,Lf,xf,Uf,Pf,Ff,Vf,Mf,Bf,jf,qf,Hf,Gf,Wf,Yf,Kf,Qf,zf,Jf,Xf,Zf,e_,t_,a_,i_,n_,o_,r_,d_,s_,p_,l_,c_,m_,u_,h_,f_,__,g_,b_,v_,y_,w_,I_,T_,E_,A_,S_,N_,D_,k_,O_,C_,R_,$_,L_,x_,U_,P_,F_,V_,M_,B_,j_,q_,H_,G_,W_,Y_,K_,Q_,z_,J_,X_,Z_,eg,tg,ag,ig,ng,og,rg,dg,sg,pg,lg,cg,mg,ug,hg,fg,_g,gg,bg,vg,yg,wg,Ig,Tg,Eg,Ag,Sg,Ng,Dg,kg,Og,Cg,Rg,$g,Lg,xg,Ug,Pg,Fg,Vg,Mg,Bg,jg,qg,Hg,Gg,Wg,Yg,Kg,Qg,zg,Jg,Xg,Zg,eb,tb,ab,ib,nb,ob,rb,db,sb,pb,lb,cb,mb,ub,hb,fb,_b,gb,bb,vb,yb,wb,Ib,Tb,Eb,Ab,Sb,Nb,Db,kb,Ob,Cb,Rb,$b,Lb,xb,Ub,Pb,Fb,Vb,Mb,Bb,jb;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Hh||(Hh={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(Gh||(Gh={})),function(e){e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(Wh||(Wh={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(Yh||(Yh={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(Kh||(Kh={})),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"}(Qh||(Qh={})),function(e){e.Table="TABLE",e.Union="UNION"}(zh||(zh={})),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"}(Jh||(Jh={})),function(e){e.And="AND",e.Or="OR"}(Xh||(Xh={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Zh||(Zh={})),function(e){e.Asc="ASC",e.Desc="DESC"}(ef||(ef={})),function(e){e.Table="TABLE"}(tf||(tf={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(af||(af={})),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"}(nf||(nf={})),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"}(of||(of={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(rf||(rf={})),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"}(df||(df={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(sf||(sf={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(pf||(pf={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(lf||(lf={})),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"}(cf||(cf={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(mf||(mf={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(uf||(uf={})),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"}(hf||(hf={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(ff||(ff={})),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"}(_f||(_f={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(gf||(gf={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(bf||(bf={})),function(e){e.Account="ACCOUNT",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(vf||(vf={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(yf||(yf={})),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"}(wf||(wf={})),function(e){e.Agent="AGENT"}(If||(If={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Tf||(Tf={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(Ef||(Ef={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Af||(Af={})),function(e){e.Edit="edit",e.View="view"}(Sf||(Sf={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Nf||(Nf={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(Df||(Df={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(kf||(kf={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(Of||(Of={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Cf||(Cf={})),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"}(Rf||(Rf={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}($f||($f={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Lf||(Lf={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(xf||(xf={})),function(e){e.Edit="edit",e.View="view"}(Uf||(Uf={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Pf||(Pf={})),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"}(Ff||(Ff={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(Vf||(Vf={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(Mf||(Mf={})),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"}(Bf||(Bf={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(jf||(jf={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(qf||(qf={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(Hf||(Hf={})),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"}(Gf||(Gf={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(Wf||(Wf={})),function(e){e.Later="LATER",e.Now="NOW"}(Yf||(Yf={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(Kf||(Kf={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Qf||(Qf={})),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"}(zf||(zf={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(Jf||(Jf={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(Xf||(Xf={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(Zf||(Zf={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(e_||(e_={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(t_||(t_={})),function(e){e.Description="description",e.Title="title"}(a_||(a_={})),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"}(i_||(i_={})),function(e){e.Or="OR"}(n_||(n_={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(o_||(o_={})),function(e){e.Account="ACCOUNT",e.User="USER"}(r_||(r_={})),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"}(d_||(d_={})),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"}(s_||(s_={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(p_||(p_={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(l_||(l_={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(c_||(c_={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(m_||(m_={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(u_||(u_={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(h_||(h_={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(f_||(f_={})),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"}(__||(__={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(g_||(g_={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(b_||(b_={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(v_||(v_={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(y_||(y_={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(w_||(w_={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(I_||(I_={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(T_||(T_={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(E_||(E_={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT"}(A_||(A_={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(S_||(S_={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(N_||(N_={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(D_||(D_={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(k_||(k_={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(O_||(O_={})),function(e){e.Monday="monday",e.Sunday="sunday"}(C_||(C_={})),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"}(R_||(R_={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}($_||($_={})),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"}(L_||(L_={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(x_||(x_={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(U_||(U_={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(P_||(P_={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(F_||(F_={})),function(e){e.Card="CARD",e.Flat="FLAT"}(V_||(V_={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(M_||(M_={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(B_||(B_={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(j_||(j_={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(q_||(q_={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(H_||(H_={})),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"}(G_||(G_={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(W_||(W_={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(Y_||(Y_={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(K_||(K_={})),function(e){e.And="AND",e.Or="OR"}(Q_||(Q_={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(z_||(z_={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(J_||(J_={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(X_||(X_={})),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"}(Z_||(Z_={})),function(e){e.Error="ERROR"}(eg||(eg={})),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"}(tg||(tg={})),function(e){e.Table="TABLE"}(ag||(ag={})),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"}(ig||(ig={})),function(e){e.And="AND",e.Or="OR"}(ng||(ng={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(og||(og={})),function(e){e.Asc="ASC",e.Desc="DESC"}(rg||(rg={})),function(e){e.Asc="asc",e.Desc="desc"}(dg||(dg={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(sg||(sg={})),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"}(pg||(pg={})),function(e){e.And="and",e.Or="or"}(lg||(lg={})),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"}(cg||(cg={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(mg||(mg={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(ug||(ug={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(hg||(hg={})),function(e){e.Board="BOARD",e.Doc="DOC"}(fg||(fg={})),function(e){e.File="FILE"}(_g||(_g={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(gg||(gg={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(bg||(bg={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(vg||(vg={})),function(e){e.Dropdown="dropdown",e.Status="status"}(yg||(yg={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(wg||(wg={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(Ig||(Ig={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(Tg||(Tg={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(Eg||(Eg={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(Ag||(Ag={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(Sg||(Sg={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(Ng||(Ng={})),function(e){e.Post="Post",e.Project="Project"}(Dg||(Dg={})),function(e){e.Left="left",e.Right="right"}(kg||(kg={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(Og||(Og={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(Cg||(Cg={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(Rg||(Rg={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}($g||($g={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(Lg||(Lg={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(xg||(xg={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(Ug||(Ug={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(Pg||(Pg={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Fg||(Fg={})),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"}(Vg||(Vg={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(Mg||(Mg={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(Bg||(Bg={})),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"}(jg||(jg={})),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"}(qg||(qg={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(Hg||(Hg={})),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"}(Gg||(Gg={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(Wg||(Wg={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(Yg||(Yg={})),function(e){e.Board="BOARD"}(Kg||(Kg={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(Qg||(Qg={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(zg||(zg={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Jg||(Jg={})),function(e){e.Complete="COMPLETE",e.Start="START"}(Xg||(Xg={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(Zg||(Zg={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(eb||(eb={})),function(e){e.CountKeys="COUNT_KEYS"}(tb||(tb={})),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"}(ab||(ab={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(ib||(ib={})),function(e){e.Nominal="nominal",e.Percent="percent"}(nb||(nb={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(ob||(ob={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(rb||(rb={})),function(e){e.Active="active",e.Inactive="inactive"}(db||(db={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(sb||(sb={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(pb||(pb={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(lb||(lb={})),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"}(cb||(cb={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(mb||(mb={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(ub||(ub={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(hb||(hb={})),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"}(fb||(fb={})),function(e){e.InvalidField="INVALID_FIELD"}(_b||(_b={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(gb||(gb={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(bb||(bb={})),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.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.ViewOnly="VIEW_ONLY"}(vb||(vb={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(yb||(yb={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(wb||(wb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Ib||(Ib={})),function(e){e.CreatedAt="CREATED_AT"}(Tb||(Tb={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(Eb||(Eb={})),function(e){e.Board="board"}(Ab||(Ab={})),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"}(Sb||(Sb={})),function(e){e.Board="BOARD",e.Item="ITEM"}(Nb||(Nb={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(Db||(Db={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(kb||(kb={})),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"}(Ob||(Ob={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(Cb||(Cb={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(Rb||(Rb={})),function(e){e.Error="ERROR",e.Ok="OK"}($b||($b={})),function(e){e.Wait="WAIT"}(Lb||(Lb={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(xb||(xb={})),function(e){e.LiteBuilder="LITE_BUILDER"}(Ub||(Ub={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(Pb||(Pb={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(Fb||(Fb={})),function(e){e.All="all",e.Member="member"}(Vb||(Vb={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Mb||(Mb={})),function(e){e.CreatedAt="created_at"}(Bb||(Bb={})),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"}(jb||(jb={}));const qb=ns`
2245
- fragment AgentFields on Agent {
2261
+ `,$h=10485760,Lh=5e4,xh=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),Uh=new Set([".pdf"]),Ph=new Set([".docx"]),Fh=new Set([".xlsx"]),Vh=new Set([".xls"]),Mh=new Set([".txt",".md",".csv",".json"]),Bh={item_id:r.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:r.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:r.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:r.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 jh(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function qh(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 qh(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function Hh(e,t,a){const i=function(e,t){if(t){const e=jh(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:jh(e.name)}(e,a);try{if(xh.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(Vh.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>$h)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),n=[];let o=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(o+=t.byteLength,o>$h)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");n.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(n)}(e.public_url);let n,o;Uh.has(i)?(n=await async function(e){const t=await h(new Uint8Array(e)),{text:a}=await f(t,{mergePages:!0});return a}(a),o="pdf"):Ph.has(i)?(n=await async function(e){return(await m.extractRawText({buffer:e})).value}(a),o="word"):Fh.has(i)?(n=await async function(e){const t=new u.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(qh).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),o="excel"):Mh.has(i)?(n=a.toString("utf-8"),o="text"):(n=a.toString("utf-8"),o="unknown");const r=n.slice(t,t+Lh),d=n.length>t+Lh;return{file_name:e.name,file_extension:i,content_type:o,text:r,total_length:n.length,...Uh.has(i)&&{public_url:e.public_url},...d&&{has_more:!0,next_offset:t+Lh}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var Gh,Wh,Yh,Kh,Qh,zh,Jh,Xh,Zh,ef,tf,af,nf,of,rf,df,sf,pf,lf,cf,mf,uf,hf,ff,_f,gf,bf,vf,yf,wf,If,Tf,Ef,Af,Sf,Nf,Df,kf,Of,Cf,Rf,$f,Lf,xf,Uf,Pf,Ff,Vf,Mf,Bf,jf,qf,Hf,Gf,Wf,Yf,Kf,Qf,zf,Jf,Xf,Zf,e_,t_,a_,i_,n_,o_,r_,d_,s_,p_,l_,c_,m_,u_,h_,f_,__,g_,b_,v_,y_,w_,I_,T_,E_,A_,S_,N_,D_,k_,O_,C_,R_,$_,L_,x_,U_,P_,F_,V_,M_,B_,j_,q_,H_,G_,W_,Y_,K_,Q_,z_,J_,X_,Z_,eg,tg,ag,ig,ng,og,rg,dg,sg,pg,lg,cg,mg,ug,hg,fg,_g,gg,bg,vg,yg,wg,Ig,Tg,Eg,Ag,Sg,Ng,Dg,kg,Og,Cg,Rg,$g,Lg,xg,Ug,Pg,Fg,Vg,Mg,Bg,jg,qg,Hg,Gg,Wg,Yg,Kg,Qg,zg,Jg,Xg,Zg,eb,tb,ab,ib,nb,ob,rb,db,sb,pb,lb,cb,mb,ub,hb,fb,_b,gb,bb,vb,yb,wb,Ib,Tb,Eb,Ab,Sb,Nb,Db,kb,Ob,Cb,Rb,$b,Lb,xb,Ub,Pb,Fb,Vb,Mb,Bb,jb,qb,Hb,Gb,Wb;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Gh||(Gh={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(Wh||(Wh={})),function(e){e.ClaudeFable_5="CLAUDE_FABLE_5",e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(Yh||(Yh={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(Kh||(Kh={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(Qh||(Qh={})),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"}(zh||(zh={})),function(e){e.Table="TABLE",e.Union="UNION"}(Jh||(Jh={})),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"}(Xh||(Xh={})),function(e){e.And="AND",e.Or="OR"}(Zh||(Zh={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(ef||(ef={})),function(e){e.Asc="ASC",e.Desc="DESC"}(tf||(tf={})),function(e){e.Table="TABLE"}(af||(af={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(nf||(nf={})),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"}(of||(of={})),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"}(rf||(rf={})),function(e){e.Longer="longer",e.Same="same",e.Shorter="shorter"}(df||(df={})),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"}(sf||(sf={})),function(e){e.Brief="brief",e.InDepth="in_depth",e.Paragraph="paragraph",e.Sentence="sentence"}(pf||(pf={})),function(e){e.HighCreativity="high_creativity",e.MinimalChanges="minimal_changes",e.ModerateChanges="moderate_changes"}(lf||(lf={})),function(e){e.Column="column",e.EmailsAndActivities="emails_and_activities",e.ItemName="item_name",e.Thread="thread"}(cf||(cf={})),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"}(mf||(mf={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ApplicationXlsx="APPLICATION_XLSX",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP",e.TextCsv="TEXT_CSV"}(uf||(uf={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(hf||(hf={})),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"}(ff||(ff={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(_f||(_f={})),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"}(gf||(gf={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(bf||(bf={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(vf||(vf={})),function(e){e.Account="ACCOUNT",e.AiAgentBrain="AI_AGENT_BRAIN",e.AiAgentConversation="AI_AGENT_CONVERSATION",e.Channel="CHANNEL",e.Initiative="INITIATIVE",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(yf||(yf={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(wf||(wf={})),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"}(If||(If={})),function(e){e.Agent="AGENT"}(Tf||(Tf={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Ef||(Ef={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(Af||(Af={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Sf||(Sf={})),function(e){e.Edit="edit",e.View="view"}(Nf||(Nf={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Df||(Df={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(kf||(kf={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(Of||(Of={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(Cf||(Cf={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Rf||(Rf={})),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"}($f||($f={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Lf||(Lf={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(xf||(xf={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(Uf||(Uf={})),function(e){e.Edit="edit",e.View="view"}(Pf||(Pf={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Ff||(Ff={})),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"}(Vf||(Vf={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(Mf||(Mf={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(Bf||(Bf={})),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"}(jf||(jf={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(qf||(qf={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(Hf||(Hf={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(Gf||(Gf={})),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"}(Wf||(Wf={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(Yf||(Yf={})),function(e){e.Later="LATER",e.Now="NOW"}(Kf||(Kf={})),function(e){e.CreatedAt="CREATED_AT",e.Name="NAME"}(Qf||(Qf={})),function(e){e.Asc="ASC",e.Desc="DESC"}(zf||(zf={})),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"}(Jf||(Jf={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(Xf||(Xf={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(Zf||(Zf={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(e_||(e_={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(t_||(t_={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(a_||(a_={})),function(e){e.Description="description",e.Title="title"}(i_||(i_={})),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"}(n_||(n_={})),function(e){e.Or="OR"}(o_||(o_={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(r_||(r_={})),function(e){e.Account="ACCOUNT",e.User="USER"}(d_||(d_={})),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"}(s_||(s_={})),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"}(p_||(p_={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(l_||(l_={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(c_||(c_={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(m_||(m_={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(u_||(u_={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(h_||(h_={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(f_||(f_={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(__||(__={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(g_||(g_={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(b_||(b_={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(v_||(v_={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(y_||(y_={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(w_||(w_={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(I_||(I_={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(T_||(T_={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(E_||(E_={})),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"}(A_||(A_={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(S_||(S_={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Running="RUNNING"}(N_||(N_={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT",e.Openai="OPENAI"}(D_||(D_={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(k_||(k_={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(O_||(O_={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(C_||(C_={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(R_||(R_={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}($_||($_={})),function(e){e.Monday="monday",e.Sunday="sunday"}(L_||(L_={})),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"}(x_||(x_={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(U_||(U_={})),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"}(P_||(P_={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(F_||(F_={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(V_||(V_={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(M_||(M_={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(B_||(B_={})),function(e){e.Card="CARD",e.Flat="FLAT"}(j_||(j_={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(q_||(q_={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(H_||(H_={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(G_||(G_={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(W_||(W_={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(Y_||(Y_={})),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"}(K_||(K_={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(Q_||(Q_={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(z_||(z_={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(J_||(J_={})),function(e){e.And="AND",e.Or="OR"}(X_||(X_={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(Z_||(Z_={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(eg||(eg={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(tg||(tg={})),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"}(ag||(ag={})),function(e){e.Error="ERROR"}(ig||(ig={})),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"}(ng||(ng={})),function(e){e.Table="TABLE"}(og||(og={})),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"}(rg||(rg={})),function(e){e.And="AND",e.Or="OR"}(dg||(dg={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(sg||(sg={})),function(e){e.Asc="ASC",e.Desc="DESC"}(pg||(pg={})),function(e){e.Asc="asc",e.Desc="desc"}(lg||(lg={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(cg||(cg={})),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"}(mg||(mg={})),function(e){e.And="and",e.Or="or"}(ug||(ug={})),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"}(hg||(hg={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(fg||(fg={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(_g||(_g={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(gg||(gg={})),function(e){e.Board="BOARD",e.Doc="DOC"}(bg||(bg={})),function(e){e.File="FILE"}(vg||(vg={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(yg||(yg={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(wg||(wg={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(Ig||(Ig={})),function(e){e.Dropdown="dropdown",e.Status="status"}(Tg||(Tg={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(Eg||(Eg={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(Ag||(Ag={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(Sg||(Sg={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(Ng||(Ng={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(Dg||(Dg={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(kg||(kg={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(Og||(Og={})),function(e){e.Post="Post",e.Project="Project"}(Cg||(Cg={})),function(e){e.Left="left",e.Right="right"}(Rg||(Rg={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}($g||($g={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(Lg||(Lg={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(xg||(xg={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(Ug||(Ug={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(Pg||(Pg={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(Fg||(Fg={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(Vg||(Vg={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(Mg||(Mg={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Bg||(Bg={})),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"}(jg||(jg={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(qg||(qg={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(Hg||(Hg={})),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"}(Gg||(Gg={})),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"}(Wg||(Wg={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(Yg||(Yg={})),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"}(Kg||(Kg={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(Qg||(Qg={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(zg||(zg={})),function(e){e.Board="BOARD"}(Jg||(Jg={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(Xg||(Xg={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(Zg||(Zg={})),function(e){e.Asc="ASC",e.Desc="DESC"}(eb||(eb={})),function(e){e.Complete="COMPLETE",e.Start="START"}(tb||(tb={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(ab||(ab={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(ib||(ib={})),function(e){e.CountKeys="COUNT_KEYS"}(nb||(nb={})),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"}(ob||(ob={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(rb||(rb={})),function(e){e.Nominal="nominal",e.Percent="percent"}(db||(db={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(sb||(sb={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(pb||(pb={})),function(e){e.Active="active",e.Inactive="inactive"}(lb||(lb={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(cb||(cb={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(mb||(mb={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(ub||(ub={})),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"}(hb||(hb={})),function(e){e.Complete="COMPLETE",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.Pending="PENDING"}(fb||(fb={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(_b||(_b={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(gb||(gb={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(bb||(bb={})),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"}(vb||(vb={})),function(e){e.InvalidField="INVALID_FIELD"}(yb||(yb={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(wb||(wb={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(Ib||(Ib={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.ExternalAgentDetachedMember="EXTERNAL_AGENT_DETACHED_MEMBER",e.ExternalAgentMember="EXTERNAL_AGENT_MEMBER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.VibeUser="VIBE_USER",e.ViewOnly="VIEW_ONLY"}(Tb||(Tb={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Eb||(Eb={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(Ab||(Ab={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Sb||(Sb={})),function(e){e.CreatedAt="CREATED_AT"}(Nb||(Nb={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(Db||(Db={})),function(e){e.Board="board"}(kb||(kb={})),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"}(Ob||(Ob={})),function(e){e.Board="BOARD",e.Item="ITEM"}(Cb||(Cb={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(Rb||(Rb={})),function(e){e.Create="CREATE",e.Update="UPDATE"}($b||($b={})),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"}(Lb||(Lb={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(xb||(xb={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(Ub||(Ub={})),function(e){e.Error="ERROR",e.Ok="OK"}(Pb||(Pb={})),function(e){e.Wait="WAIT"}(Fb||(Fb={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(Vb||(Vb={})),function(e){e.LiteBuilder="LITE_BUILDER"}(Mb||(Mb={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(Bb||(Bb={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(jb||(jb={})),function(e){e.All="all",e.Member="member"}(qb||(qb={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Hb||(Hb={})),function(e){e.CreatedAt="created_at"}(Gb||(Gb={})),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"}(Wb||(Wb={}));const Yb=ns`
2262
+ fragment CustomAgentFields on CustomAgent {
2246
2263
  id
2247
2264
  kind
2248
2265
  state
@@ -2260,65 +2277,65 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2260
2277
  created_at
2261
2278
  updated_at
2262
2279
  }
2263
- `,Hb=ns`
2264
- ${qb}
2280
+ `,Kb=ns`
2281
+ ${Yb}
2265
2282
 
2266
- query getAgents($ids: [ID!], $limit: Int) {
2267
- agents(ids: $ids, limit: $limit) {
2268
- ...AgentFields
2283
+ query getCustomAgents($ids: [ID!], $limit: Int) {
2284
+ custom_agents(ids: $ids, limit: $limit) {
2285
+ ...CustomAgentFields
2269
2286
  }
2270
2287
  }
2271
- `,Gb=ns`
2272
- ${qb}
2288
+ `,Qb=ns`
2289
+ ${Yb}
2273
2290
 
2274
2291
  mutation createAgent($input: CreateAgentInput!) {
2275
2292
  create_agent(input: $input) {
2276
- ...AgentFields
2293
+ ...CustomAgentFields
2277
2294
  }
2278
2295
  }
2279
- `,Wb=ns`
2280
- ${qb}
2296
+ `,zb=ns`
2297
+ ${Yb}
2281
2298
 
2282
2299
  mutation createBlankAgent($input: CreateBlankAgentInput) {
2283
2300
  create_blank_agent(input: $input) {
2284
- ...AgentFields
2301
+ ...CustomAgentFields
2285
2302
  }
2286
2303
  }
2287
- `,Yb=ns`
2288
- ${qb}
2304
+ `,Jb=ns`
2305
+ ${Yb}
2289
2306
 
2290
2307
  mutation updateAgent($id: ID!, $input: UpdateAgentInput!) {
2291
2308
  update_agent(id: $id, input: $input) {
2292
- ...AgentFields
2309
+ ...CustomAgentFields
2293
2310
  }
2294
2311
  }
2295
- `,Kb=ns`
2296
- ${qb}
2312
+ `,Xb=ns`
2313
+ ${Yb}
2297
2314
 
2298
2315
  mutation deleteAgent($id: ID!) {
2299
2316
  delete_agent(id: $id) {
2300
- ...AgentFields
2317
+ ...CustomAgentFields
2301
2318
  }
2302
2319
  }
2303
- `,Qb=ns`
2320
+ `,Zb=ns`
2304
2321
  mutation activateAgent($id: ID!) {
2305
2322
  activate_agent(id: $id) {
2306
2323
  success
2307
2324
  }
2308
2325
  }
2309
- `,zb=ns`
2326
+ `,ev=ns`
2310
2327
  mutation deactivateAgent($id: ID!, $inactive_reason: InactiveReason) {
2311
2328
  deactivate_agent(id: $id, inactive_reason: $inactive_reason) {
2312
2329
  success
2313
2330
  }
2314
2331
  }
2315
- `,Jb=ns`
2332
+ `,tv=ns`
2316
2333
  mutation runAgent($id: ID!) {
2317
2334
  run_agent(id: $id) {
2318
2335
  trigger_uuid
2319
2336
  }
2320
2337
  }
2321
- `,Xb=ns`
2338
+ `,av=ns`
2322
2339
  query getAgentActiveTriggers($agent_id: ID!) {
2323
2340
  agent_active_triggers(agent_id: $agent_id) {
2324
2341
  node_id
@@ -2328,31 +2345,31 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2328
2345
  field_summary
2329
2346
  }
2330
2347
  }
2331
- `,Zb=ns`
2348
+ `,iv=ns`
2332
2349
  mutation addTriggerToAgent($agent_id: ID!, $block_reference_id: ID!, $field_values: JSON) {
2333
2350
  add_trigger_to_agent(agent_id: $agent_id, block_reference_id: $block_reference_id, field_values: $field_values) {
2334
2351
  success
2335
2352
  }
2336
2353
  }
2337
- `,ev=ns`
2354
+ `,nv=ns`
2338
2355
  mutation removeTriggerFromAgent($agent_id: ID!, $node_id: ID!) {
2339
2356
  remove_trigger_from_agent(agent_id: $agent_id, node_id: $node_id) {
2340
2357
  success
2341
2358
  }
2342
2359
  }
2343
- `,tv=ns`
2360
+ `,ov=ns`
2344
2361
  mutation addSkillToAgent($agent_id: ID!, $skill_id: ID!) {
2345
2362
  add_skill_to_agent(agent_id: $agent_id, skill_id: $skill_id) {
2346
2363
  success
2347
2364
  }
2348
2365
  }
2349
- `,av=ns`
2366
+ `,rv=ns`
2350
2367
  mutation removeSkillFromAgent($agent_id: ID!, $skill_id: ID!) {
2351
2368
  remove_skill_from_agent(agent_id: $agent_id, skill_id: $skill_id) {
2352
2369
  success
2353
2370
  }
2354
2371
  }
2355
- `,iv=ns`
2372
+ `,dv=ns`
2356
2373
  query getAgentTriggersCatalog($block_reference_ids: [ID!]) {
2357
2374
  agent_triggers_catalog(block_reference_ids: $block_reference_ids) {
2358
2375
  block_reference_id
@@ -2369,7 +2386,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2369
2386
  }
2370
2387
  }
2371
2388
  }
2372
- `,nv=ns`
2389
+ `,sv=ns`
2373
2390
  query getAgentSkillsCatalog {
2374
2391
  agent_skills_catalog {
2375
2392
  id
@@ -2377,7 +2394,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2377
2394
  description
2378
2395
  }
2379
2396
  }
2380
- `,ov=ns`
2397
+ `,pv=ns`
2381
2398
  mutation createAgentSkill($name: String!, $content: String!, $description: String) {
2382
2399
  create_agent_skill(name: $name, content: $content, description: $description) {
2383
2400
  id
@@ -2385,7 +2402,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2385
2402
  description
2386
2403
  }
2387
2404
  }
2388
- `,rv={action:r.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:r.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:r.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:r.nativeEnum(Wh).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:r.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:r.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:r.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:r.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:r.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:r.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:r.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:r.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const dv={action:r.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:r.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:r.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:r.record(r.union([r.string(),r.number(),r.boolean(),r.object({value:r.string(),label:r.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:r.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 sv={action:r.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:r.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:r.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:r.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:r.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:r.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 pv=ns`
2405
+ `,lv={action:r.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:r.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:r.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:r.nativeEnum(Yh).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:r.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:r.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:r.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:r.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:r.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:r.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:r.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:r.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const cv={action:r.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:r.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:r.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:r.record(r.union([r.string(),r.number(),r.boolean(),r.object({value:r.string(),label:r.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:r.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 mv={action:r.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:r.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:r.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:r.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:r.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:r.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 uv=ns`
2389
2406
  query getAgentKnowledge($id: ID!) {
2390
2407
  agent_knowledge(id: $id) {
2391
2408
  resources {
@@ -2400,25 +2417,25 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2400
2417
  }
2401
2418
  }
2402
2419
  }
2403
- `,lv=ns`
2420
+ `,hv=ns`
2404
2421
  mutation addAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2405
2422
  add_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2406
2423
  success
2407
2424
  }
2408
2425
  }
2409
- `,cv=ns`
2426
+ `,fv=ns`
2410
2427
  mutation removeAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!) {
2411
2428
  remove_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type) {
2412
2429
  success
2413
2430
  }
2414
2431
  }
2415
- `,mv=ns`
2432
+ `,_v=ns`
2416
2433
  mutation updateAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
2417
2434
  update_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
2418
2435
  success
2419
2436
  }
2420
2437
  }
2421
- `,uv={action:r.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:r.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:r.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:r.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:r.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 hv={action:r.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:r.array(r.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 fv=ns`
2438
+ `,gv={action:r.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:r.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:r.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:r.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:r.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 bv={action:r.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:r.array(r.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 vv=ns`
2422
2439
  query getBoardAutomations($boardIds: [ID!], $limit: Int, $cursor: String) {
2423
2440
  board_automations(board_ids: $boardIds, limit: $limit, cursor: $cursor) {
2424
2441
  cursor
@@ -2439,25 +2456,92 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2439
2456
  }
2440
2457
  }
2441
2458
  }
2442
- `;function _v(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function gv(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:_v(a),is_active:t??!1}}const bv={boardId:r.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:r.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:r.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const vv=ns`
2459
+ `;function yv(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function wv(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:yv(a),is_active:t??!1}}const Iv={boardId:r.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:r.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:r.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const Tv=ns`
2443
2460
  mutation activateLiveWorkflow($id: ID!) {
2444
2461
  activate_live_workflow(id: $id) {
2445
2462
  is_success
2446
2463
  }
2447
2464
  }
2448
- `,yv=ns`
2465
+ `,Ev=ns`
2449
2466
  mutation deactivateLiveWorkflow($id: ID!) {
2450
2467
  deactivate_live_workflow(id: $id) {
2451
2468
  is_success
2452
2469
  }
2453
2470
  }
2454
- `,wv=ns`
2471
+ `,Av=ns`
2455
2472
  mutation deleteLiveWorkflow($id: ID!) {
2456
2473
  delete_live_workflow(id: $id) {
2457
2474
  is_success
2458
2475
  }
2459
2476
  }
2460
- `,Iv={action:r.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:r.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const Tv={userPrompt:r.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:r.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const Ev=ns`
2477
+ `,Sv={action:r.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:r.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const Nv={userPrompt:r.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:r.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const Dv="\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",kv=ns`
2478
+ query GetTriggerEvents($nextPageOffset: Int, $filters: TriggerEventsFiltersInput) {
2479
+ trigger_events(nextPageOffset: $nextPageOffset, filters: $filters) {
2480
+ triggerEvents {
2481
+ ${Dv}
2482
+ }
2483
+ }
2484
+ }
2485
+ `,Ov=ns`
2486
+ query GetTriggerEvent($triggerUuid: String!) {
2487
+ trigger_event(triggerUuid: $triggerUuid) {
2488
+ ${Dv}
2489
+ }
2490
+ }
2491
+ `,Cv=ns`
2492
+ query GetBlockEvents($triggerUuid: String!, $nextPageOffset: Int) {
2493
+ block_events(triggerUuid: $triggerUuid, nextPageOffset: $nextPageOffset) {
2494
+ blockEvents {
2495
+ atomicActionId
2496
+ title
2497
+ eventState
2498
+ errorReason
2499
+ conditionSatisfied
2500
+ blockStartTimestamp
2501
+ blockFinishTimestamp
2502
+ billingActionCountForBlock
2503
+ entityKind
2504
+ workflowNodeId
2505
+ iterator_id
2506
+ current_iteration
2507
+ max_iterations
2508
+ }
2509
+ }
2510
+ }
2511
+ `,Rv=ns`
2512
+ query GetToolEvents($triggerUuid: String!, $nextPageOffset: Int) {
2513
+ tool_events(trigger_uuid: $triggerUuid, next_page_offset: $nextPageOffset) {
2514
+ tool_events {
2515
+ id
2516
+ tool_name
2517
+ mcp_server
2518
+ event_status
2519
+ error_message
2520
+ execution_duration_ms
2521
+ tool_start_timestamp
2522
+ tool_finish_timestamp
2523
+ atomic_action_id
2524
+ }
2525
+ }
2526
+ }
2527
+ `,$v=r.object({dateRange:r.object({startDate:r.string().min(1).describe('Start date (ISO 8601 or date-only, e.g. "2026-05-01")'),endDate:r.string().min(1).describe("End date (ISO 8601 or date-only)")}).optional().describe("Date range filter"),stateFilter:r.array(r.string()).optional().describe('Filter by event state (e.g. ["success", "failure"])'),automationIds:r.array(r.number().int()).optional().describe("Filter by automation IDs"),workflowEntityIds:r.array(r.number().int()).optional().describe("Filter by workflow entity IDs"),itemId:r.string().optional().describe("Filter by item identifier"),entityKind:r.string().optional().describe("Filter by entity kind"),hostType:r.string().optional().describe("Filter by host type")}).optional(),Lv={mode:r.enum(["history","detail"]).describe("history = paginated run feed, detail = single run by triggerUuid"),boardId:r.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:r.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),nextPageOffset:r.number().int().nonnegative().optional().describe("history: page offset (offset-only pagination)"),filters:$v.describe("history: run filters"),triggerUuid:r.string().optional().describe("detail: required — the run UUID to inspect"),includeToolEvents:r.boolean().optional().describe("detail: include MCP tool calls (default true)"),blockEventsOffset:r.number().int().nonnegative().optional().describe("detail: block-events page offset"),toolEventsOffset:r.number().int().nonnegative().optional().describe("detail: tool-events page offset")};const xv=ns`
2528
+ query GetAccountTriggerStatistics($filters: AccountTriggerStatisticsFiltersInput) {
2529
+ account_trigger_statistics(filters: $filters) {
2530
+ id
2531
+ success
2532
+ failure
2533
+ total
2534
+ }
2535
+ }
2536
+ `,Uv=ns`
2537
+ query GetAccountTriggersByEntity($runStatus: TriggerEventState!, $filters: AccountTriggersByEntityIdFiltersInput) {
2538
+ account_triggers_statistics_by_entity_id(run_status: $runStatus, filters: $filters) {
2539
+ id
2540
+ automation_statistics
2541
+ workflow_statistics
2542
+ }
2543
+ }
2544
+ `,Pv={breakdown:r.enum(["totals","by_entity"]).describe("totals = success/failure/total counts, by_entity = per automation/workflow"),boardId:r.string().min(1).optional().describe("Target a specific board by numeric ID"),accountWide:r.boolean().optional().describe("Set true to query account-wide (required if no boardId)"),userIds:r.array(r.number().int()).optional().describe("Narrow to specific creator user IDs"),runStatus:r.enum(["success","failure","exhausted"]).optional().describe("by_entity: required run status to break down"),excludeAutomationIds:r.array(r.number().int()).optional().describe("by_entity: automation IDs to exclude from breakdown")};const Fv=ns`
2461
2545
  mutation createWorkflow(
2462
2546
  $workspace_id: ID!
2463
2547
  $title: String
@@ -2478,7 +2562,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2478
2562
  workflow_draft_id
2479
2563
  }
2480
2564
  }
2481
- `,Av={workspaceId:r.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:r.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:r.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:r.string().optional().describe("Optional workflow description."),folderId:r.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:r.array(r.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const Sv={workflowObjectId:r.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:r.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:r.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const Nv={prompt:r.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const Dv=ns`
2565
+ `,Vv={workspaceId:r.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:r.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:r.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:r.string().optional().describe("Optional workflow description."),folderId:r.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:r.array(r.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const Mv={workflowObjectId:r.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:r.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:r.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const Bv={prompt:r.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const jv=ns`
2482
2566
  mutation publishWorkflow($workflow_object_id: ID!, $workflow_draft_id: ID!, $should_activate: Boolean) {
2483
2567
  publish_workflow(
2484
2568
  workflow_object_id: $workflow_object_id
@@ -2489,7 +2573,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2489
2573
  workflow_live_id
2490
2574
  }
2491
2575
  }
2492
- `,kv={workflowObjectId:r.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:r.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:r.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const Ov=ns`
2576
+ `,qv={workflowObjectId:r.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:r.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:r.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const Hv=ns`
2493
2577
  mutation ConfigureCategorizeAiColumn(
2494
2578
  $boardId: ID!
2495
2579
  $columnId: ID!
@@ -2509,7 +2593,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2509
2593
  column_id
2510
2594
  }
2511
2595
  }
2512
- `,Cv=ns`
2596
+ `,Gv=ns`
2513
2597
  mutation ConfigureSummarizeAiColumn(
2514
2598
  $boardId: ID!
2515
2599
  $columnId: ID!
@@ -2529,7 +2613,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2529
2613
  column_id
2530
2614
  }
2531
2615
  }
2532
- `,Rv=ns`
2616
+ `,Wv=ns`
2533
2617
  mutation ConfigureTranslateAiColumn(
2534
2618
  $boardId: ID!
2535
2619
  $columnId: ID!
@@ -2549,7 +2633,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2549
2633
  column_id
2550
2634
  }
2551
2635
  }
2552
- `,$v=ns`
2636
+ `,Yv=ns`
2553
2637
  mutation ConfigureImproveTextAiColumn(
2554
2638
  $boardId: ID!
2555
2639
  $columnId: ID!
@@ -2573,7 +2657,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2573
2657
  column_id
2574
2658
  }
2575
2659
  }
2576
- `,Lv=ns`
2660
+ `,Kv=ns`
2577
2661
  mutation ConfigureExtractAiColumn(
2578
2662
  $boardId: ID!
2579
2663
  $columnId: ID!
@@ -2597,7 +2681,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2597
2681
  column_id
2598
2682
  }
2599
2683
  }
2600
- `,xv=ns`
2684
+ `,Qv=ns`
2601
2685
  mutation ConfigureOpenBlockAiColumn(
2602
2686
  $boardId: ID!
2603
2687
  $columnId: ID!
@@ -2613,7 +2697,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2613
2697
  column_id
2614
2698
  }
2615
2699
  }
2616
- `,Uv=ns`
2700
+ `,zv=ns`
2617
2701
  mutation ConfigureWriteMeAiColumn(
2618
2702
  $boardId: ID!
2619
2703
  $columnId: ID!
@@ -2633,7 +2717,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2633
2717
  column_id
2634
2718
  }
2635
2719
  }
2636
- `,Pv=ns`
2720
+ `,Jv=ns`
2637
2721
  mutation ConfigurePersonAssignmentAiColumn(
2638
2722
  $boardId: ID!
2639
2723
  $columnId: ID!
@@ -2653,14 +2737,14 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2653
2737
  column_id
2654
2738
  }
2655
2739
  }
2656
- `,Fv={board_id:r.number().describe("The ID of the board containing the column"),column_id:r.string().describe("The ID of the column to configure with AI"),block_type:r.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:r.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:r.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:r.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:r.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:r.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:r.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:r.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:r.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:r.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:r.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:r.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:r.array(r.object({user_ids:r.array(r.number()).describe("Array of user IDs in this group"),description:r.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:r.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const Vv=ns`
2740
+ `,Xv={board_id:r.number().describe("The ID of the board containing the column"),column_id:r.string().describe("The ID of the column to configure with AI"),block_type:r.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:r.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:r.string().optional().describe('The ID of the source column. Required when source_type is "column".'),additional_instructions:r.string().max(3e3).optional().describe("Custom instructions for categorize/summarize/extract blocks (max 3000 chars)."),target_language:r.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:r.enum(["empathic","promotional","confident","professional","natural","casual","friendly","same"]).optional().describe("Writing tone. Required for write_me, optional for improve_text."),output_length:r.enum(["sentence","paragraph","brief","in_depth"]).optional().describe("Required for write_me block. Approximate desired output length."),improver_length:r.enum(["same","shorter","longer"]).optional().describe("For improve_text only. Desired length relative to input text."),refinement_type:r.enum(["minimal_changes","moderate_changes","high_creativity"]).optional().describe("For improve_text only. Level of text refinement to apply."),entity_type:r.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:r.string().max(3e3).optional().describe('Required for extract when entity_type is "custom". Describes what to extract (max 3000 chars).'),ai_query:r.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:r.array(r.object({user_ids:r.array(r.number()).describe("Array of user IDs in this group"),description:r.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:r.boolean().optional().describe("Whether to immediately apply AI to existing items (up to 200). Defaults to true.")};const Zv=ns`
2657
2741
  mutation RemoveAiFromColumn($boardId: ID!, $columnId: ID!) {
2658
2742
  remove_ai_from_column(board_id: $boardId, column_id: $columnId) {
2659
2743
  column_id
2660
2744
  success
2661
2745
  }
2662
2746
  }
2663
- `,Mv={board_id:r.number().describe("The ID of the board containing the column"),column_id:r.string().describe("The ID of the column to remove AI from")};r.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'),r.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const Bv=ns`
2747
+ `,ey={board_id:r.number().describe("The ID of the board containing the column"),column_id:r.string().describe("The ID of the column to remove AI from")};r.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'),r.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const ty=ns`
2664
2748
  query getSprintsByIds($ids: [ID!]) {
2665
2749
  items(ids: $ids) {
2666
2750
  id
@@ -2695,7 +2779,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2695
2779
  }
2696
2780
  }
2697
2781
  }
2698
- `,jv={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"},qv={...jv,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},Hv="BOARD_NOT_FOUND:",Gv="SPRINT_NOT_FOUND:",Wv="DOCUMENT_NOT_FOUND:",Yv="DOCUMENT_INVALID:",Kv="DOCUMENT_EMPTY:",Qv="EXPORT_FAILED:",zv="INTERNAL_ERROR:",Jv="VALIDATION_ERROR:",Xv="task_sprint",Zv={[qv.SPRINT_TASKS]:"Sprint Tasks",[qv.SPRINT_TIMELINE]:"Sprint Timeline",[qv.SPRINT_COMPLETION]:"Sprint Completion",[qv.SPRINT_START_DATE]:"Sprint Start Date",[qv.SPRINT_END_DATE]:"Sprint End Date",[qv.SPRINT_ACTIVATION]:"Sprint Activation",[qv.SPRINT_SUMMARY]:"Sprint Summary",[qv.SPRINT_CAPACITY]:"Sprint Capacity"},ey=dr,ty={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},ay=(e,t)=>e.column_values?.find((e=>e.id===t)),iy=(e,t)=>{const a=ay(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},ny=(e,t)=>{const a=ay(e,t);return"DateValue"===a?.__typename?a.date??null:null},oy=(e,t)=>{const a=ay(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},ry=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},dy=(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)))},sy=e=>dy(e,Object.values(jv)),py=e=>dy(e,Object.values(ty)),ly=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},cy=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Ql.BoardRelation))||null,my={sprintId:r.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const uy=ns`
2782
+ `,ay={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"},iy={...ay,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},ny="BOARD_NOT_FOUND:",oy="SPRINT_NOT_FOUND:",ry="DOCUMENT_NOT_FOUND:",dy="DOCUMENT_INVALID:",sy="DOCUMENT_EMPTY:",py="EXPORT_FAILED:",ly="INTERNAL_ERROR:",cy="VALIDATION_ERROR:",my="task_sprint",uy={[iy.SPRINT_TASKS]:"Sprint Tasks",[iy.SPRINT_TIMELINE]:"Sprint Timeline",[iy.SPRINT_COMPLETION]:"Sprint Completion",[iy.SPRINT_START_DATE]:"Sprint Start Date",[iy.SPRINT_END_DATE]:"Sprint End Date",[iy.SPRINT_ACTIVATION]:"Sprint Activation",[iy.SPRINT_SUMMARY]:"Sprint Summary",[iy.SPRINT_CAPACITY]:"Sprint Capacity"},hy=dr,fy={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},_y=(e,t)=>e.column_values?.find((e=>e.id===t)),gy=(e,t)=>{const a=_y(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},by=(e,t)=>{const a=_y(e,t);return"DateValue"===a?.__typename?a.date??null:null},vy=(e,t)=>{const a=_y(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},yy=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},wy=(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)))},Iy=e=>wy(e,Object.values(ay)),Ty=e=>wy(e,Object.values(fy)),Ey=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},Ay=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===Ql.BoardRelation))||null,Sy={sprintId:r.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const Ny=ns`
2699
2783
  query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
2700
2784
  boards(ids: [$boardId]) {
2701
2785
  items_page(limit: $limit) {
@@ -2731,7 +2815,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2731
2815
  }
2732
2816
  }
2733
2817
  }
2734
- `,hy={sprintsBoardId:r.number().describe("The ID of the monday-dev board containing the sprints"),limit:r.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const fy=ns`
2818
+ `,Dy={sprintsBoardId:r.number().describe("The ID of the monday-dev board containing the sprints"),limit:r.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const ky=ns`
2735
2819
  query GetRecentBoards($limit: Int) {
2736
2820
  boards(limit: $limit, order_by: used_at, state: active) {
2737
2821
  id
@@ -2747,7 +2831,7 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2747
2831
  }
2748
2832
  }
2749
2833
  }
2750
- `,_y={};const gy=[class extends te{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=_.READ,this.annotations=ee({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 _y}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(fy,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${Hv} 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:`${zv} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=cy(e,jv.SPRINT_TASKS);if(!i)return;const n=ly(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=cy(e,Xv);if(!i)return;const n=ly(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(sy(i)&&this.processSprintsBoard(i,a,t),py(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends te{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=_.READ,this.annotations=ee({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return hy}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(uy,a),n=i.boards?.[0],o=n?.items_page?.items||[],r=this.buildSprintsMetadata(o);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:o.length,data:r}}}catch(e){return{content:`${zv} 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(cs,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${Hv} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${Jv} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${zv} 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(jv),i=ry(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>Zv[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=iy(e,qv.SPRINT_ACTIVATION),a=iy(e,qv.SPRINT_COMPLETION),i=ny(e,qv.SPRINT_START_DATE),n=ny(e,qv.SPRINT_END_DATE),o=((e,t)=>{const a=ay(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,qv.SPRINT_TIMELINE),r=oy(e,qv.SPRINT_SUMMARY);let d=ey.Planned;return a?d=ey.Completed:(t||i)&&(d=ey.Active),{id:e.id,name:e.name||"Unknown",status:d,timeline:o?{from:o.from,to:o.to}:null,start_date:i||null,end_date:n||null,is_completed:a,document_object_id:r||null}}))}},class extends te{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=_.READ,this.annotations=ee({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return my}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${zv} 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||`${zv} Unknown error occurred while reading document content`}}catch(e){return{content:`${zv} 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(Bv,t)).items||[];if(0===a.length)return{success:!1,error:`${Gv} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${Gv} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(jv),...t];return ry(a,i)})(i,[qv.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${Jv} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=oy(i,qv.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${Wv} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${zv} 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(os,t)).docs||[];if(0===a.length)return{success:!1,error:`${Wv} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${Yv} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(Ts,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${Qv} 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:`${Kv} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${zv} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],by=[class extends te{constructor(){super(...arguments),this.name="delete_item",this.type=_.WRITE,this.annotations=ee({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Ic}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(ps,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends te{constructor(){super(...arguments),this.name="get_board_items_page",this.type=_.READ,this.annotations=ee({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the nextCursor parameter from the response to get the next page of results when has_more is true. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return Pc}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){Cs(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(xc,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:Co.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case Ql.BoardRelation:return e.linked_items;case Ql.Formula:return e.display_value;case Ql.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(Uc,t,{versionOverride:"dev",timeout:ks})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const n=new Set(i);return a.filter((e=>n.has(e)))}},class extends te{constructor(){super(...arguments),this.name="create_item",this.type=_.WRITE,this.annotations=ee({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?sc:pc}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(rc,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new Us(this.mondayApi,{boardId:t});return await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){Os(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(dc,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){Os(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(ls,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){Os(e,"create item")}}},class extends te{constructor(){super(...arguments),this.name="create_update",this.type=_.WRITE,this.annotations=ee({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 hc}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=uc.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(cc,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){Os(e,"create update")}}},class extends te{constructor(){super(...arguments),this.name="get_updates",this.type=_.READ,this.annotations=ee({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 bc}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===gc.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let n;n=e.objectType===gc.Item?await this.mondayApi.request(fc,{...i,itemId:e.objectId}):await this.mondayApi.request(_c,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:vc(e.fromDate),toDate:vc(e.toDate)}:{}});const o=e.objectType===gc.Item?n.items?.[0]?.updates:n.boards?.[0]?.updates;if(!o||0===o.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const r=o.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),d=e.objectType===gc.Item?n.items?.[0]?.url:n.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:d,updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}}}}catch(e){Os(e,"get updates")}}},class extends te{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=_.WRITE,this.annotations=ee({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 lh}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=ph.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(cc,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received."}}}catch(e){Os(e,"create update")}}},class extends te{constructor(){super(...arguments),this.name="get_board_schema",this.type=_.READ,this.annotations=ee({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id"}getInputSchema(){if(!this.context?.boardId)return Fc}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(cs,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends te{constructor(){super(...arguments),this.name="get_board_activity",this.type=_.READ,this.annotations=ee({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return Oc}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-Ds.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(kc,o),d=r.boards?.[0]?.activity_logs;if(!d||0===d.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const s=r.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:s?.name,board_url:s?.url,data:d.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends te{constructor(){super(...arguments),this.name="get_board_info",this.type=_.READ,this.annotations=ee({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return Lc}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(Cc,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:$c(i,n)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Ql.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(Rc,{boardId:a});return i.boards?.[0]??null}},class extends te{constructor(){super(...arguments),this.name="get_full_board_data",this.type=_.READ,this.annotations=ee({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 Dc}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(Ec,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(Ac,e);r=t.users?.filter((e=>null!==e))||[]}const d=new Map(r.map((e=>[e.id,e])));return{content:{board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){Os(e,"get full board data")}}},class extends te{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=_.READ,this.annotations=ee({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 _m}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(rm);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const d={users:[e.me]},s=pm(d),p=await hm(this.mondayApi);return{content:{data:s,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},d=await this.mondayApi.request(om,r);if(!d.users||0===d.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const s=d.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${d.users.length} user(s) matching "${e.name}":\n\n${s}`,l=await hm(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>lm)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>cm)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let d;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};d=await this.mondayApi.request(nm,t)}else{const t={teamIds:e.teamIds};d=await this.mondayApi.request(im,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:mm};d=await this.mondayApi.request(am,t)}else if(t){const t={userIds:e.userIds,limit:mm};d=await this.mondayApi.request(em,t)}else{const e={userIds:void 0,limit:mm};d=await this.mondayApi.request(tm,e)}const s=pm(d),p=await hm(this.mondayApi);return{content:{data:s,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Us,class extends te{constructor(){super(...arguments),this.name="move_item_to_group",this.type=_.WRITE,this.annotations=ee({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to a group in a monday.com board"}getInputSchema(){return gm}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(us,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends te{constructor(){super(...arguments),this.name="create_board",this.type=_.WRITE,this.annotations=ee({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return op}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(hs,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 te{constructor(){super(...arguments),this.name="create_form",this.type=_.WRITE,this.annotations=ee({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 Kp}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(Sp,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends te{constructor(){super(...arguments),this.name="update_form",this.type=_.WRITE,this.annotations=ee({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Fl(this.mondayApi),this.actionHandlers=new Map([[hl.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[hl.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[hl.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[hl.activate,this.helpers.activateForm.bind(this.helpers)],[hl.createTag,this.helpers.createTag.bind(this.helpers)],[hl.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[hl.updateTag,this.helpers.updateTag.bind(this.helpers)],[hl.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[hl.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[hl.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[hl.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[hl.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Pl}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 te{constructor(){super(...arguments),this.name="get_form",this.type=_.READ,this.annotations=ee({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form's url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return Vl}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Np,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 te{constructor(){super(...arguments),this.name="form_questions_editor",this.type=_.WRITE,this.annotations=ee({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new ul(this.mondayApi),this.actionHandlers=new Map([[ll.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[ll.Update,this.helpers.updateQuestion.bind(this.helpers)],[ll.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return ml}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends te{constructor(){super(...arguments),this.name="create_form_submission",this.type=_.WRITE,this.annotations=ee({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 Kl}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(t){if(t.includes("wkf.ms")){const a=(await e.head(t,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return a?this.extractTokenFromUrl(a):null}return t.startsWith("http://")||t.startsWith("https://")?this.extractTokenFromUrl(t):t}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(Ml,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){Os(e,"submit form")}}},class extends te{constructor(){super(...arguments),this.name="create_column",this.type=_.WRITE,this.annotations=ee({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new column in a monday.com board"}getInputSchema(){return this.context?.boardId?zl:Jl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(fs,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends te{constructor(){super(...arguments),this.name="update_column",this.type=_.WRITE,this.annotations=ee({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?Xl:Zl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(gs,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends te{constructor(){super(...arguments),this.name="create_group",this.type=_.WRITE,this.annotations=ee({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 oc}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(ic,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 te{constructor(){super(...arguments),this.name="delete_column",this.type=_.WRITE,this.annotations=ee({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?yc:wc}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(_s,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},$s,class extends te{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=_.ALL_API,this.annotations=ee({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 Hc}async executeInternal(e){try{const t=await this.mondayApi.request(bs),a=e?.operationType,i=t.__schema,n="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,r=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==n&&{query_fields:n},...void 0!==o&&{mutation_fields:o},types:r}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends te{constructor(){super(...arguments),this.name="get_column_type_info",this.type=_.READ,this.annotations=ee({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${zs.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${zs.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return qc}async executeInternal(e){if(e.fetchMode===zs.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:jc(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${sn.CountItems} function. Do not use ${sn.Count} function for that purpose.\n `}},url:Mc}};const t={type:e.columnType},a=await this.mondayApi.request(Vc,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:Mc}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends te{constructor(){super(...arguments),this.name="get_type_details",this.type=_.ALL_API,this.annotations=ee({title:"Get Type Details",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get detailed information about a specific GraphQL type from the monday.com API schema"}getInputSchema(){return Gc}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,ns`
2834
+ `,Oy={};const Cy=[class extends te{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=_.READ,this.annotations=ee({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 Oy}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(ky,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${ny} 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:`${ly} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=Ay(e,ay.SPRINT_TASKS);if(!i)return;const n=Ey(i);if(!n)return;const o=`${e.id}:${n}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(n,r,`Tasks Board ${n}`)})}processTasksBoard(e,t,a){const i=Ay(e,my);if(!i)return;const n=Ey(i);if(!n)return;const o=`${n}:${e.id}`;if(a.has(o))return;const r=t.get(n);a.set(o,{sprintsBoard:this.createBoardInfo(n,r,`Sprints Board ${n}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(Iy(i)&&this.processSprintsBoard(i,a,t),Ty(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends te{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=_.READ,this.annotations=ee({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return Dy}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(Ny,a),n=i.boards?.[0],o=n?.items_page?.items||[],r=this.buildSprintsMetadata(o);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:o.length,data:r}}}catch(e){return{content:`${ly} 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(cs,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${ny} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const n=i.columns||[],o=this.validateSprintsBoardSchemaFromColumns(n);return o.isValid?{success:!0}:{success:!1,error:`${cy} ${o.errorMessage}`}}catch(e){return{success:!1,error:`${ly} 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(ay),i=yy(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>uy[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=gy(e,iy.SPRINT_ACTIVATION),a=gy(e,iy.SPRINT_COMPLETION),i=by(e,iy.SPRINT_START_DATE),n=by(e,iy.SPRINT_END_DATE),o=((e,t)=>{const a=_y(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,iy.SPRINT_TIMELINE),r=vy(e,iy.SPRINT_SUMMARY);let d=hy.Planned;return a?d=hy.Completed:(t||i)&&(d=hy.Active),{id:e.id,name:e.name||"Unknown",status:d,timeline:o?{from:o.from,to:o.to}:null,start_date:i||null,end_date:n||null,is_completed:a,document_object_id:r||null}}))}},class extends te{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=_.READ,this.annotations=ee({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return Sy}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${ly} 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||`${ly} Unknown error occurred while reading document content`}}catch(e){return{content:`${ly} 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(ty,t)).items||[];if(0===a.length)return{success:!1,error:`${oy} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${oy} Sprint with ID ${e} not found.`};const n=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(ay),...t];return yy(a,i)})(i,[iy.SPRINT_SUMMARY]);if(!n.isValid)return{success:!1,error:`${cy} Sprint item is missing required columns: ${n.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const o=vy(i,iy.SPRINT_SUMMARY);return o?{success:!0,documentObjectId:o,sprintName:i.name}:{success:!1,error:`${ry} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${ly} 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(os,t)).docs||[];if(0===a.length)return{success:!1,error:`${ry} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${dy} Document data is invalid for object ID ${e}.`};const n={docId:i.id,blockIds:[]},o=await this.mondayApi.request(Ts,n);if(!o.export_markdown_from_doc?.success)return{success:!1,error:`${py} 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:`${sy} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${ly} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],Ry=[class extends te{constructor(){super(...arguments),this.name="delete_item",this.type=_.WRITE,this.annotations=ee({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Ic}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(ps,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends te{constructor(){super(...arguments),this.name="get_board_items_page",this.type=_.READ,this.annotations=ee({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the nextCursor parameter from the response to get the next page of results when has_more is true. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return Pc}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){Cs(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(xc,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:Co.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,n=i?.items||[];return{board:{id:a?.id,name:a?.name},items:n.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case Ql.BoardRelation:return e.linked_items;case Ql.Formula:return e.display_value;case Ql.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(Uc,t,{versionOverride:"dev",timeout:ks})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const n=new Set(i);return a.filter((e=>n.has(e)))}},class extends te{constructor(){super(...arguments),this.name="create_item",this.type=_.WRITE,this.annotations=ee({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?sc:pc}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(rc,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let n;try{n=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const o={...n,name:e.name},r=new Us(this.mondayApi,{boardId:t});return await r.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){Os(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(dc,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){Os(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(ls,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){Os(e,"create item")}}},class extends te{constructor(){super(...arguments),this.name="create_update",this.type=_.WRITE,this.annotations=ee({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 hc}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=uc.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(cc,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){Os(e,"create update")}}},class extends te{constructor(){super(...arguments),this.name="get_updates",this.type=_.READ,this.annotations=ee({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 bc}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===gc.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let n;n=e.objectType===gc.Item?await this.mondayApi.request(fc,{...i,itemId:e.objectId}):await this.mondayApi.request(_c,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:vc(e.fromDate),toDate:vc(e.toDate)}:{}});const o=e.objectType===gc.Item?n.items?.[0]?.updates:n.boards?.[0]?.updates;if(!o||0===o.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const r=o.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),d=e.objectType===gc.Item?n.items?.[0]?.url:n.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:d,updates:r,pagination:{page:e.page??1,limit:e.limit??25,count:r.length}}}}catch(e){Os(e,"get updates")}}},class extends te{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=_.WRITE,this.annotations=ee({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 ch}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=lh.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(cc,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received."}}}catch(e){Os(e,"create update")}}},class extends te{constructor(){super(...arguments),this.name="get_board_schema",this.type=_.READ,this.annotations=ee({title:"Get Board Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get board schema (columns and groups) by board id"}getInputSchema(){if(!this.context?.boardId)return Fc}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(cs,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends te{constructor(){super(...arguments),this.name="get_board_activity",this.type=_.READ,this.annotations=ee({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return Oc}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-Ds.MONTH30Days),i=e?.fromDate||a.toISOString(),n=e?.toDate||t.toISOString(),o={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:n,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},r=await this.mondayApi.request(kc,o),d=r.boards?.[0]?.activity_logs;if(!d||0===d.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const s=r.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:s?.name,board_url:s?.url,data:d.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends te{constructor(){super(...arguments),this.name="get_board_info",this.type=_.READ,this.annotations=ee({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return Lc}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(Cc,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const n=await this.getSubItemsBoardAsync(i);return{content:$c(i,n)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===Ql.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(Rc,{boardId:a});return i.boards?.[0]??null}},class extends te{constructor(){super(...arguments),this.name="get_full_board_data",this.type=_.READ,this.annotations=ee({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 Dc}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(Ec,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],n=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&n.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&n.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&n.add(e.id)}))}}))}));const o=Array.from(n).filter((e=>!(Number(e)<0)));let r=[];if(o.length>0){const e={userIds:o},t=await this.mondayApi.request(Ac,e);r=t.users?.filter((e=>null!==e))||[]}const d=new Map(r.map((e=>[e.id,e])));return{content:{board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&d.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:r,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:r.length}}}}catch(e){Os(e,"get full board data")}}},class extends te{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=_.READ,this.annotations=ee({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 _m}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,r=!!e.name;if(e.getMe||!1){if(t||a||i||n||o||r)return{content:"PARAMETER_CONFLICT: getMe is STANDALONE only. Remove all other parameters when using getMe: true for current user lookup."};const e=await this.mondayApi.request(rm);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const d={users:[e.me]},s=pm(d),p=await hm(this.mondayApi);return{content:{data:s,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}if(r){if(t||a||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const r={name:e.name},d=await this.mondayApi.request(om,r);if(!d.users||0===d.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const s=d.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${d.users.length} user(s) matching "${e.name}":\n\n${s}`,l=await hm(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>lm)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>cm)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let d;if(n||!t&&a&&!i)if(o){const t={teamIds:e.teamIds};d=await this.mondayApi.request(nm,t)}else{const t={teamIds:e.teamIds};d=await this.mondayApi.request(im,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:mm};d=await this.mondayApi.request(am,t)}else if(t){const t={userIds:e.userIds,limit:mm};d=await this.mondayApi.request(em,t)}else{const e={userIds:void 0,limit:mm};d=await this.mondayApi.request(tm,e)}const s=pm(d),p=await hm(this.mondayApi);return{content:{data:s,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},Us,class extends te{constructor(){super(...arguments),this.name="move_item_to_group",this.type=_.WRITE,this.annotations=ee({title:"Move Item to Group",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move an item to a group in a monday.com board"}getInputSchema(){return gm}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(us,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends te{constructor(){super(...arguments),this.name="create_board",this.type=_.WRITE,this.annotations=ee({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return op}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(hs,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 te{constructor(){super(...arguments),this.name="create_form",this.type=_.WRITE,this.annotations=ee({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 Kp}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(Sp,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends te{constructor(){super(...arguments),this.name="update_form",this.type=_.WRITE,this.annotations=ee({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new Fl(this.mondayApi),this.actionHandlers=new Map([[hl.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[hl.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[hl.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[hl.activate,this.helpers.activateForm.bind(this.helpers)],[hl.createTag,this.helpers.createTag.bind(this.helpers)],[hl.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[hl.updateTag,this.helpers.updateTag.bind(this.helpers)],[hl.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[hl.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[hl.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[hl.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[hl.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return Pl}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 te{constructor(){super(...arguments),this.name="get_form",this.type=_.READ,this.annotations=ee({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form's url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return Vl}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Np,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 te{constructor(){super(...arguments),this.name="form_questions_editor",this.type=_.WRITE,this.annotations=ee({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new ul(this.mondayApi),this.actionHandlers=new Map([[ll.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[ll.Update,this.helpers.updateQuestion.bind(this.helpers)],[ll.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return ml}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends te{constructor(){super(...arguments),this.name="create_form_submission",this.type=_.WRITE,this.annotations=ee({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 Kl}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(t){if(t.includes("wkf.ms")){const a=(await e.head(t,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return a?this.extractTokenFromUrl(a):null}return t.startsWith("http://")||t.startsWith("https://")?this.extractTokenFromUrl(t):t}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(Ml,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){Os(e,"submit form")}}},class extends te{constructor(){super(...arguments),this.name="create_column",this.type=_.WRITE,this.annotations=ee({title:"Create Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new column in a monday.com board"}getInputSchema(){return this.context?.boardId?zl:Jl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(fs,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends te{constructor(){super(...arguments),this.name="update_column",this.type=_.WRITE,this.annotations=ee({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?Xl:Zl}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(gs,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends te{constructor(){super(...arguments),this.name="create_group",this.type=_.WRITE,this.annotations=ee({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 oc}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(ic,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 te{constructor(){super(...arguments),this.name="delete_column",this.type=_.WRITE,this.annotations=ee({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?yc:wc}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(_s,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},$s,class extends te{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=_.ALL_API,this.annotations=ee({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 Hc}async executeInternal(e){try{const t=await this.mondayApi.request(bs),a=e?.operationType,i=t.__schema,n="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,r=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==n&&{query_fields:n},...void 0!==o&&{mutation_fields:o},types:r}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends te{constructor(){super(...arguments),this.name="get_column_type_info",this.type=_.READ,this.annotations=ee({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${zs.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${zs.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return qc}async executeInternal(e){if(e.fetchMode===zs.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:jc(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${sn.CountItems} function. Do not use ${sn.Count} function for that purpose.\n `}},url:Mc}};const t={type:e.columnType},a=await this.mondayApi.request(Vc,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:Mc}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends te{constructor(){super(...arguments),this.name="get_type_details",this.type=_.ALL_API,this.annotations=ee({title:"Get Type Details",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get detailed information about a specific GraphQL type from the monday.com API schema"}getInputSchema(){return Gc}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,ns`
2751
2835
  query getTypeDetails {
2752
2836
  __type(name: "${t}") {
2753
2837
  name
@@ -2835,5 +2919,5 @@ import e from"axios";import*as t from"crypto";import{randomUUID as a}from"crypto
2835
2919
  }
2836
2920
  }
2837
2921
  }
2838
- `),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends te{constructor(){super(...arguments),this.name="create_custom_activity",this.type=_.WRITE,this.annotations=ee({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return ec}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(ys,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 te{constructor(){super(...arguments),this.name="create_notification",this.type=_.WRITE,this.annotations=ee({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 ac}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(tc,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends te{constructor(){super(...arguments),this.name="create_timeline_item",this.type=_.WRITE,this.annotations=ee({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return lc}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(ws,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 te{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=_.READ,this.annotations=ee({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Tc}async executeInternal(e){const t=await this.mondayApi.request(Is);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 te{constructor(){super(...arguments),this.name="read_docs",this.type=_.READ,this.annotations=ee({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 Cm}async executeInternal(e){return e.mode===km?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??Dm,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n=e.include_blocks??!1,o=n?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},r={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n,...o};let d=await this.mondayApi.request(os,r);if((!d.docs||0===d.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n,...o};d=await this.mondayApi.request(os,a)}if(!d.docs||0===d.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const s=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:d.docs.flatMap((e=>e?[e.id]:[])),object_ids:d.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(d.docs,r,n,s,p,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:n}=e,o=e.ids?.[0];if(!o)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:km,object_ids:[o]};try{const e={docId:o,since:a,until:i},r=await this.mondayApi.request(rs,e);let d=r?.doc_version_history?.restoring_points;if(!d||0===d.length)return{content:`No version history found for document ${o}${a?` from ${a}`:""}.`};if(!t)return n&&(d=d.slice(0,n)),{content:{doc_id:o,since:a,until:i,restoring_points:d}};const s=Math.min(n??10,10),p=d.slice(0,s+1),l=d.length>s,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:o,date:e.date,prevDate:a.date},n=await this.mondayApi.request(ss,i);return{...e,diff:n?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,s);return{content:{doc_id:o,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:d.length}}}}catch(e){return{content:`Error fetching version history for document ${o}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const n of e){const e=n.insert,o="string"==typeof e?e.length:1,r=n.attributes,d=r?.comments;if(d&&Array.isArray(d))for(const e of d){const n=String(e),r=t.get(n);if(r&&r.block_id===a.id){const e=Math.max(r.selection_from+r.selection_length,i+o);r.selection_length=e-r.selection_from}else r||t.set(n,{block_id:a.id,selection_from:i,selection_length:o})}i+=o}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[n,o]=await Promise.all([this.mondayApi.request(ds,i),this.mondayApi.request(Am,{docId:[t]}).catch((()=>null))]),r=n.boards?.[0]?.items_page?.items;if(!r)return[];let d=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}}));d=this.buildCommentAnchorMap(e)}const s=[];for(const e of r)if(e.updates&&0!==e.updates.length)for(const t of e.updates)s.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:d.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 s}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,n=50,o,r){const d=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,d="";try{const t={docId:e.id},a=await this.mondayApi.request(Ts,t);d=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){d=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,n)),{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==o||void 0!==r?{blocks_pagination:{current_page:r??1,limit:o??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(o??25)}}:{}},blocks_as_markdown:d,...i&&{comments:t}}}))),s=t.page||1,p=t.limit||25,l=d.length,c=l===p;return{content:{message:`Documents retrieved (${d.length})`,pagination:{current_page:s,limit:p,count:l,has_more_pages:c},data:d}}}},class extends te{constructor(){super(...arguments),this.name="workspace_info",this.type=_.READ,this.annotations=ee({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 Rm}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(Es,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:n,folders:o}=e,r=a?.[0];if(!r)throw new Error("No workspace found");const d=new Map((o||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&d.has(e.board_folder_id)?d.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&d.has(e.doc_folder_id)?d.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:r.id,name:r.name,url:t?fm(t,r.id):void 0,description:r.description||"",kind:r.kind||"",created_at:r.created_at||"",state:r.state||"",is_default_workspace:r.is_default_workspace||!1,owners_subscribers:(r.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(d.values()),root_items:{boards:s,docs:p}}}(a,await hm(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends te{constructor(){super(...arguments),this.name="list_workspaces",this.type=_.READ,this.annotations=ee({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 Um}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Lm(await this.mondayApi.request($m,t(xr.Member)));let i=a;if(!xm(a)){i=Lm(await this.mondayApi.request($m,t(xr.All)))}if(!xm(i))return{content:{message:"No workspaces found.",data:[]}};const n=i.length===e.limit,o=await hm(this.mondayApi),r=i.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:o&&e.id?fm(o,e.id):void 0})));return{content:{message:"Workspaces retrieved",...n?{next_page:e.page+1}:{},data:r}}}},class extends te{constructor(){super(...arguments),this.name="create_doc",this.type=_.WRITE,this.annotations=ee({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 qm}async executeInternal(e){const t=jm.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,n;if(a.type===Bm.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||An.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},r=await this.mondayApi.request(Fm,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===Bm.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(Pm,o),d=r.items?.[0];if(!d)return{content:`Error: Item with id ${a.item_id} not found.`};const s=d.board?.id,p=d.board?.columns?.find((e=>e&&e.type===Ql.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:s.toString(),columnType:Ql.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(fs,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(Fm,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Mm,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(Vm,o),d=r?.add_content_to_doc_from_markdown?.success,s=r?.add_content_to_doc_from_markdown?.error;return d?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:n,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends te{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=_.WRITE,this.annotations=ee({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 Ym}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(Wm,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Gm,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(Hm,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const d=o?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${d} block${1===d?"":"s"} created.`,doc_id:t.id,block_ids:o,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends te{constructor(){super(...arguments),this.name="update_doc",this.type=_.WRITE,this.annotations=ee({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Du}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(ym,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let n=0;n<e.operations.length;n++){const o=e.operations[n];try{const i=await this.executeOperation(t,o,e.object_id);a.push(`- [OK] ${o.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${o.operation_type}: ${t}`),i=n;break}}const n=null!==i?i:e.operations.length,o=e.operations.length,r=`Completed ${n}/${o} operation${1===o?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${r}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(bm,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},n=await this.mondayApi.request(vm,i),o=n?.add_content_to_doc_from_markdown;if(!o?.success)throw new Error(o?.error||"Failed to add markdown content");const r=o.block_ids?.length??0;return`${r} block${1===r?"":"s"} added${o.block_ids?.length?`. Block IDs: ${o.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Xm(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Xm(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Xm(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},n=await this.mondayApi.request(wm,i);if(!n?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const n=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Jm(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:Km(e.alignment),direction:Qm(e.direction)}};case"list_item":return{list_block:{delta_format:Jm(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:Jm(e.delta_format),text_block_type:gr.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(n);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=n[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const o={docId:e,afterBlockId:a,blocksInput:[n]},r=await this.mondayApi.request(Nm,o),d=r?.create_doc_blocks;if(!d||0===d.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${d.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(Im,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(Tm,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(Em,{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(Am,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,n,o,r,d){if((null!=r||null!=d)&&!o)throw new Error("selection_from and selection_length require block_id");if(null!=r!=(null!=d))throw new Error("selection_from and selection_length must both be provided together");const s=o?Array.isArray(o)?o:[o]:[];if((null!=r||null!=d)&&s.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(n){const e=JSON.parse(n),t=uc.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(Sm,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(s.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of s){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const n=i.content.deltaFormat;if(!n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let o=0;for(const e of n)o+="string"==typeof e.insert?e.insert.length:1;if(0===o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const s=r??0,p=d??o;if(s+p>o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${s}, ${s+p}) is out of range for block ${a} (total length ${o})`);let l;try{l=eu(n,f,s,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...i.content,deltaFormat:l},m=await this.mondayApi.request(wm,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=s.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,n){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,n)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends te{constructor(){super(...arguments),this.name="update_workspace",this.type=_.WRITE,this.annotations=ee({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return xu}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(Lu,t),i=await hm(this.mondayApi),n=i?fm(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:n}}}},class extends te{constructor(){super(...arguments),this.name="update_folder",this.type=_.WRITE,this.annotations=ee({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Pu}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(Uu,n);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends te{constructor(){super(...arguments),this.name="create_workspace",this.type=_.WRITE,this.annotations=ee({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Vu}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Fu,t),i=await hm(this.mondayApi),n=i&&a.create_workspace?.id?fm(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:n}}}},class extends te{constructor(){super(...arguments),this.name="create_folder",this.type=_.WRITE,this.annotations=ee({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Bu}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(Mu,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 te{constructor(){super(...arguments),this.name="move_object",this.type=_.WRITE,this.annotations=ee({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use position for relative placement based on another object, parentFolderId for folder changes, workspaceId for workspace moves, and accountProductId for account product changes."}getInputSchema(){return Hu}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const s={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:d},p=await this.mondayApi.request(Uu,s);return{content:{message:"Object moved",object_id:p.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const s={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},p=await this.mondayApi.request(ju,s);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const s={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},p=await this.mondayApi.request(qu,s);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 Go.Folder:return this.executeUpdateFolder(e);case Go.Board:return this.executeUpdateBoardHierarchy(e);case Go.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends te{constructor(){super(...arguments),this.name="create_dashboard",this.type=_.WRITE,this.annotations=ee({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 Ru}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(ku,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends te{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=_.READ,this.annotations=ee({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(Ou,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:Mc}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends te{constructor(){super(...arguments),this.name="create_widget",this.type=_.WRITE,this.annotations=ee({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return $u}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(Cu,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===$r.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends te{constructor(){super(...arguments),this.name="board_insights",this.type=_.READ,this.annotations=ee({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return zu}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===sn.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:sn.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const d=`${o}_${r}`;return Ku.has(e.function)&&(a.some((e=>e.column_id===d))||a.push({column_id:d})),{type:dn.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===sn.CountItems?[]:[{type:dn.Column,column:Qu(n),as:n}]}),as:d}}var i,n;const o={type:dn.Column,column:Qu(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:dn.Column,column:Qu(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:rn.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},r=await this.mondayApi.request(Gu,o),d=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return d.length?{content:{message:"Board insights retrieved",board_name:r.boards?.[0]?.name,board_url:r.boards?.[0]?.url,data:d}}:{content:"No board insights found for the given query."}}},class extends te{constructor(){super(...arguments),this.name="search",this.type=_.READ,this.annotations=ee({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, folders, workspaces, and items.\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 groups, use get_board_info tool.\nITEMS search requires a searchTerm and only returns id, title, and url.\nWORKSPACES search requires a searchTerm and only returns id, title, and description.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789, workspace-101, item-321). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return dh}async executeInternal(e){if(e.searchType!==rh.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.runSmartSearchAsync(e)).items}}}catch(t){if(Cs(t),e.searchType===rh.ITEMS||e.searchType===rh.WORKSPACES)throw t}const t={[rh.BOARD]:this.searchBoardsAsync.bind(this),[rh.DOCUMENTS]:this.searchDocsAsync.bind(this),[rh.FOLDERS]:this.searchFoldersAsync.bind(this),[rh.WORKSPACES]:()=>{throw new Error("Workspaces search requires a searchTerm")},[rh.ITEMS]:()=>{throw new Error("Items search requires a searchTerm")}},a=await t[e.searchType](e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async runSmartSearchAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===rh.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===rh.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===rh.WORKSPACES)return this.searchWorkspacesAsync(e.searchTerm,e.limit);if(e.searchType===rh.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);throw new Error(`Unsupported search type for smart search: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ah,i,{versionOverride:"dev",timeout:ks})).search.boards.results.map((e=>({id:oh.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ih,i,{versionOverride:"dev",timeout:ks})).search.docs.results.map((e=>({id:oh.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return{items:(await this.mondayApi.request(th,a,{timeout:ks})).search.workspaces.results.map((e=>({id:oh.WORKSPACE+e.indexed_data.id,title:e.indexed_data.name,description:e.indexed_data.description||void 0}))),wasFiltered:!0}}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(eh,i,{timeout:ks})).search.items.results.map((e=>({id:oh.ITEM+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&Os(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Zu,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:oh.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Xu,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:oh.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Ju,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:oh.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=nh(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>nh(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends te{constructor(){super(...arguments),this.name="get_user_context",this.type=_.READ,this.annotations=ee({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(_h,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),n=this.extractRelevantBoards(a),o=this.extractRelevantPeople(a),{account:r,...d}=e;return{content:{message:"User context",...{user:d,account:r?{tier:r.tier,active_members_count:r.active_members_count,is_during_trial:r.is_during_trial,products:r.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:n,relevantPeople:o}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[bh[e]]=t[e];const n=await this.mondayApi.request(gh,i),o=[];for(const e of a){const t=vh[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends te{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=_.WRITE,this.annotations=ee({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 uh}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(ch,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends te{constructor(){super(...arguments),this.name="get_assets",this.type=_.READ,this.annotations=ee({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 fh}async executeInternal(e){const t=await this.mondayApi.request(hh,{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 te{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=_.READ,this.annotations=ee({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 wh}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(yh,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}}}}}},class extends te{constructor(){super(...arguments),this.name="create_view",this.type=_.WRITE,this.annotations=ee({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return dp}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(rp,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 te{constructor(){super(...arguments),this.name="update_view",this.type=_.WRITE,this.annotations=ee({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return pp}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(sp,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 te{constructor(){super(...arguments),this.name="create_view_table",this.type=_.WRITE,this.annotations=ee({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return up}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(lp,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 te{constructor(){super(...arguments),this.name="update_view_table",this.type=_.WRITE,this.annotations=ee({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return gp}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(hp,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 te{constructor(){super(...arguments),this.name="undo_action",this.type=_.WRITE,this.annotations=ee({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 Th}async executeInternal(e){return await this.mondayApi.request(Ih,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends te{constructor(){super(...arguments),this.name="get_object_schemas",this.type=_.READ,this.annotations=ee({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return Fs}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(Ps,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends te{constructor(){super(...arguments),this.name="create_object_schema",this.type=_.WRITE,this.annotations=ee({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return Ms}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Vs,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 te{constructor(){super(...arguments),this.name="update_object_schema",this.type=_.WRITE,this.annotations=ee({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 js}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Bs,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 te{constructor(){super(...arguments),this.name="delete_object_schema",this.type=_.WRITE,this.annotations=ee({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 Hs}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(qs,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 te{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=_.WRITE,this.annotations=ee({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return Ws}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(Gs,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 te{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=_.WRITE,this.annotations=ee({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 Qs}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(Ys,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(Ks,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,n=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...n.length>0&&{failures:n}}}}}},class extends te{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=_.WRITE,this.annotations=ee({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 "${zs.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in).`}getInputSchema(){return ap}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(Js,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(Xs,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 te{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=_.WRITE,this.annotations=ee({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return np}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:Fn.Deactivate,reactivate:Fn.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(ip,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends te{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=_.WRITE,this.annotations=ee({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Ah}async executeInternal(e){const t=(await this.mondayApi.request(Eh,{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 te{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=_.WRITE,this.annotations=ee({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 Dh}async executeInternal(e){const t=(await this.mondayApi.request(Sh,{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(Nh,{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 te{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=_.READ,this.annotations=ee({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Oh}async executeInternal(e){return{content:kh}}},class extends te{constructor(){super(...arguments),this.name="fetch_file_content",this.type=_.READ,this.annotations=ee({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 Mh}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:n=0}=e,o=await this.mondayApi.request(Ch,{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=>qh(e,n,i))))}}}},class extends te{constructor(){super(...arguments),this.name="manage_agent",this.type=_.WRITE,this.annotations=ee({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 rv}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(Gb,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){Os(e,"create monday platform agent")}}async handleCreateBlank(e){try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(Wb,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){Os(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{agents:t}=await this.mondayApi.request(Hb,{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){Os(e,"get monday platform agent")}try{const{agents:e}=await this.mondayApi.request(Hb,{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){Os(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(Yb,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){Os(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(Kb,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){Os(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(Qb,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){Os(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:X_.DeactivatedByUser},a=await this.mondayApi.request(zb,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){Os(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(Jb,{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){Os(e,"run monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=_.WRITE,this.annotations=ee({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 dv}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(Xb,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){Os(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(Zb,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){Os(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(ev,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){Os(e,"remove trigger from monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=_.WRITE,this.annotations=ee({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 sv}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(ov,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){Os(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(tv,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){Os(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(av,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){Os(e,"remove skill from monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=_.WRITE,this.annotations=ee({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 uv}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(pv,{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){Os(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(lv,{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){Os(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(mv,{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){Os(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(cv,{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){Os(e,"remove agent resource access for monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="agent_catalog",this.type=_.READ,this.annotations=ee({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 hv}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(iv,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){Os(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(nv,{},{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){Os(e,"fetch monday platform agent skills catalog")}}},class extends te{constructor(){super(...arguments),this.name="list_automations",this.type=_.READ,this.annotations=ee({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.\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\nNote: Some legacy automations may not appear — mention this if users ask about missing automations.\n"}getInputSchema(){return bv}async executeInternal(e){try{const t={boardIds:[e.boardId],limit:e.limit??100,...e.cursor?{cursor:e.cursor}:{}},a=await this.mondayApi.request(fv,t,{versionOverride:"2026-10"}),i=(a.board_automations?.items??[]).map(gv),n=a.board_automations?.cursor??null;return{content:{message:`Found ${i.length} live workflow(s) on board ${e.boardId}`,workflows:i,pagination:{nextCursor:n,hasMore:null!==n}}}}catch(e){Os(e,"list live workflows")}}},class extends te{constructor(){super(...arguments),this.name="manage_automations",this.type=_.WRITE,this.annotations=ee({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 Iv}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(vv,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){Os(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(yv,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){Os(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(wv,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){Os(e,"delete workflow")}}},class extends te{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=_.WRITE,this.annotations=ee({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 Tv}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/lite-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`lite-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Os(e,"create automation")}}},class extends te{constructor(){super(...arguments),this.name="create_workflow",this.type=_.WRITE,this.annotations=ee({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n"}getInputSchema(){return Av}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(Ev,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:n}=a.create_workflow;if(!i||!n)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:n}}}catch(e){Os(e,"create Workflow Builder workflow")}}},class extends te{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=_.WRITE,this.annotations=ee({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return Sv}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Os(e,"update workflow")}}},class extends te{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=_.READ,this.annotations=ee({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return Nv}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-planner",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Os(e,"plan workflow")}}},class extends te{constructor(){super(...arguments),this.name="publish_workflow",this.type=_.WRITE,this.annotations=ee({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nUse this after create_workflow (and optionally update_workflow) to make the workflow active. Before publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\n"}getInputSchema(){return kv}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(Dv,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:n}=a.publish_workflow;if(!i||!n)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:n}}}catch(e){Os(e,"publish workflow")}}},class extends te{constructor(){super(...arguments),this.name="configure_ai_column",this.type=_.WRITE,this.annotations=ee({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 Fv}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){Os(e,"configure AI column")}}validateSourceType(e,t){if(!e.source_type)throw new Error(`source_type is required for ${t} block`);if("column"===e.source_type&&!e.source_column_id)throw new Error('source_column_id is required when source_type is "column"')}async handleCategorize(e,t,a){this.validateSourceType(t,"categorize");const i=await this.mondayApi.request(Ov,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const i=await this.mondayApi.request(Cv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_summarize_ai_column?.column_id}}}async handleTranslate(e,t,a){if(this.validateSourceType(t,"translate"),!t.target_language)throw new Error("target_language is required for translate block");const i=await this.mondayApi.request(Rv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,targetLanguage:t.target_language,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const i=await this.mondayApi.request($v,{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},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_improve_text_ai_column?.column_id}}}async handleExtract(e,t,a){if(this.validateSourceType(t,"extract"),!t.entity_type)throw new Error("entity_type is required for extract block");if("custom"===t.entity_type&&!t.custom_instructions)throw new Error('custom_instructions is required for extract block when entity_type is "custom"');const i=await this.mondayApi.request(Lv,{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},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_extract_ai_column?.column_id}}}async handleOpenBlock(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for open_block block");const i=await this.mondayApi.request(xv,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_open_block_ai_column?.column_id}}}async handleWriteMe(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for write_me block");if(!t.tone)throw new Error("tone is required for write_me block");if(!t.output_length)throw new Error("output_length is required for write_me block");const i=await this.mondayApi.request(Uv,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,tone:t.tone,length:t.output_length,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_write_me_ai_column?.column_id}}}async handlePersonAssignment(e,t,a){if(this.validateSourceType(t,"person_assignment"),!t.groups||0===t.groups.length)throw new Error("groups is required for person_assignment block");const i=await this.mondayApi.request(Pv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,groups:t.groups,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_person_assignment_ai_column?.column_id}}}},class extends te{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=_.WRITE,this.annotations=ee({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 Mv}async executeInternal(e){try{const t=await this.mondayApi.request(Vv,{boardId:e.board_id.toString(),columnId:e.column_id},{versionOverride:"2026-10"});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){Os(e,"remove AI from column")}}}],vy=[...by,...gy,...Z];export{As as ToolMode,_ as ToolType,by as allGraphqlApiTools,Z as allMondayAppsTools,gy as allMondayDevTools,vy as allTools};
2922
+ `),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends te{constructor(){super(...arguments),this.name="create_custom_activity",this.type=_.WRITE,this.annotations=ee({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return ec}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(ys,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 te{constructor(){super(...arguments),this.name="create_notification",this.type=_.WRITE,this.annotations=ee({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 ac}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(tc,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends te{constructor(){super(...arguments),this.name="create_timeline_item",this.type=_.WRITE,this.annotations=ee({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return lc}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(ws,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 te{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=_.READ,this.annotations=ee({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Tc}async executeInternal(e){const t=await this.mondayApi.request(Is);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 te{constructor(){super(...arguments),this.name="read_docs",this.type=_.READ,this.annotations=ee({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 Cm}async executeInternal(e){return e.mode===km?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??Dm,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const n=e.include_blocks??!1,o=n?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},r={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n,...o};let d=await this.mondayApi.request(os,r);if((!d.docs||0===d.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:n,...o};d=await this.mondayApi.request(os,a)}if(!d.docs||0===d.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const s=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:d.docs.flatMap((e=>e?[e.id]:[])),object_ids:d.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(d.docs,r,n,s,p,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:n}=e,o=e.ids?.[0];if(!o)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:km,object_ids:[o]};try{const e={docId:o,since:a,until:i},r=await this.mondayApi.request(rs,e);let d=r?.doc_version_history?.restoring_points;if(!d||0===d.length)return{content:`No version history found for document ${o}${a?` from ${a}`:""}.`};if(!t)return n&&(d=d.slice(0,n)),{content:{doc_id:o,since:a,until:i,restoring_points:d}};const s=Math.min(n??10,10),p=d.slice(0,s+1),l=d.length>s,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:o,date:e.date,prevDate:a.date},n=await this.mondayApi.request(ss,i);return{...e,diff:n?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,s);return{content:{doc_id:o,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:d.length}}}}catch(e){return{content:`Error fetching version history for document ${o}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const n of e){const e=n.insert,o="string"==typeof e?e.length:1,r=n.attributes,d=r?.comments;if(d&&Array.isArray(d))for(const e of d){const n=String(e),r=t.get(n);if(r&&r.block_id===a.id){const e=Math.max(r.selection_from+r.selection_length,i+o);r.selection_length=e-r.selection_from}else r||t.set(n,{block_id:a.id,selection_from:i,selection_length:o})}i+=o}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[n,o]=await Promise.all([this.mondayApi.request(ds,i),this.mondayApi.request(Am,{docId:[t]}).catch((()=>null))]),r=n.boards?.[0]?.items_page?.items;if(!r)return[];let d=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}}));d=this.buildCommentAnchorMap(e)}const s=[];for(const e of r)if(e.updates&&0!==e.updates.length)for(const t of e.updates)s.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:d.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 s}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,n=50,o,r){const d=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,d="";try{const t={docId:e.id},a=await this.mondayApi.request(Ts,t);d=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){d=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,n)),{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==o||void 0!==r?{blocks_pagination:{current_page:r??1,limit:o??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(o??25)}}:{}},blocks_as_markdown:d,...i&&{comments:t}}}))),s=t.page||1,p=t.limit||25,l=d.length,c=l===p;return{content:{message:`Documents retrieved (${d.length})`,pagination:{current_page:s,limit:p,count:l,has_more_pages:c},data:d}}}},class extends te{constructor(){super(...arguments),this.name="workspace_info",this.type=_.READ,this.annotations=ee({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 Rm}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(Es,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:n,folders:o}=e,r=a?.[0];if(!r)throw new Error("No workspace found");const d=new Map((o||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),s=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&d.has(e.board_folder_id)?d.get(e.board_folder_id).boards.push(t):s.push(t)}));const p=[];return(n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&d.has(e.doc_folder_id)?d.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:r.id,name:r.name,url:t?fm(t,r.id):void 0,description:r.description||"",kind:r.kind||"",created_at:r.created_at||"",state:r.state||"",is_default_workspace:r.is_default_workspace||!1,owners_subscribers:(r.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(d.values()),root_items:{boards:s,docs:p}}}(a,await hm(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends te{constructor(){super(...arguments),this.name="list_workspaces",this.type=_.READ,this.annotations=ee({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 Um}async executeInternal(e){const t=t=>({limit:e.limit,page:e.page,membershipKind:t}),a=Lm(await this.mondayApi.request($m,t(xr.Member)));let i=a;if(!xm(a)){i=Lm(await this.mondayApi.request($m,t(xr.All)))}if(!xm(i))return{content:{message:"No workspaces found.",data:[]}};const n=i.length===e.limit,o=await hm(this.mondayApi),r=i.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:o&&e.id?fm(o,e.id):void 0})));return{content:{message:"Workspaces retrieved",...n?{next_page:e.page+1}:{},data:r}}}},class extends te{constructor(){super(...arguments),this.name="create_doc",this.type=_.WRITE,this.annotations=ee({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 qm}async executeInternal(e){const t=jm.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,n;if(a.type===Bm.enum.workspace){const o={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||An.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},r=await this.mondayApi.request(Fm,o);t=r?.create_doc?.id??void 0,i=r?.create_doc?.object_id??void 0,n=r?.create_doc?.url??void 0}else if(a.type===Bm.enum.item){const o={itemId:a.item_id.toString()},r=await this.mondayApi.request(Pm,o),d=r.items?.[0];if(!d)return{content:`Error: Item with id ${a.item_id} not found.`};const s=d.board?.id,p=d.board?.columns?.find((e=>e&&e.type===Ql.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:s.toString(),columnType:Ql.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(fs,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(Fm,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,n=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(Mm,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(Vm,o),d=r?.add_content_to_doc_from_markdown?.success,s=r?.add_content_to_doc_from_markdown?.error;return d?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:n,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${s||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends te{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=_.WRITE,this.annotations=ee({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 Ym}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(Wm,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(Gm,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(Hm,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:n,block_ids:o,error:r}=i.add_content_to_doc_from_markdown;if(!n)return{content:`Error adding content to document: ${r||"Unknown error"}`};const d=o?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${d} block${1===d?"":"s"} created.`,doc_id:t.id,block_ids:o,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends te{constructor(){super(...arguments),this.name="update_doc",this.type=_.WRITE,this.annotations=ee({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Du}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(ym,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let n=0;n<e.operations.length;n++){const o=e.operations[n];try{const i=await this.executeOperation(t,o,e.object_id);a.push(`- [OK] ${o.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${o.operation_type}: ${t}`),i=n;break}}const n=null!==i?i:e.operations.length,o=e.operations.length,r=`Completed ${n}/${o} operation${1===o?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${r}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(bm,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},n=await this.mondayApi.request(vm,i),o=n?.add_content_to_doc_from_markdown;if(!o?.success)throw new Error(o?.error||"Failed to add markdown content");const r=o.block_ids?.length??0;return`${r} block${1===r?"":"s"} added${o.block_ids?.length?`. Block IDs: ${o.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Xm(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Xm(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Xm(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},n=await this.mondayApi.request(wm,i);if(!n?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const n=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Jm(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:Km(e.alignment),direction:Qm(e.direction)}};case"list_item":return{list_block:{delta_format:Jm(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:Jm(e.delta_format),text_block_type:gr.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(n);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=n[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const o={docId:e,afterBlockId:a,blocksInput:[n]},r=await this.mondayApi.request(Nm,o),d=r?.create_doc_blocks;if(!d||0===d.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${d.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(Im,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(Tm,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(Em,{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(Am,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,n,o,r,d){if((null!=r||null!=d)&&!o)throw new Error("selection_from and selection_length require block_id");if(null!=r!=(null!=d))throw new Error("selection_from and selection_length must both be provided together");const s=o?Array.isArray(o)?o:[o]:[];if((null!=r||null!=d)&&s.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(n){const e=JSON.parse(n),t=uc.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(Sm,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(s.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of s){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const n=i.content.deltaFormat;if(!n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let o=0;for(const e of n)o+="string"==typeof e.insert?e.insert.length:1;if(0===o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const s=r??0,p=d??o;if(s+p>o)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${s}, ${s+p}) is out of range for block ${a} (total length ${o})`);let l;try{l=eu(n,f,s,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...i.content,deltaFormat:l},m=await this.mondayApi.request(wm,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=s.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,n){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,n)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends te{constructor(){super(...arguments),this.name="update_workspace",this.type=_.WRITE,this.annotations=ee({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return xu}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(Lu,t),i=await hm(this.mondayApi),n=i?fm(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:n}}}},class extends te{constructor(){super(...arguments),this.name="update_folder",this.type=_.WRITE,this.annotations=ee({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return Pu}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const n={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},o=await this.mondayApi.request(Uu,n);return{content:{message:`Folder ${o.update_folder?.id} updated`,folder_id:o.update_folder?.id,folder_name:o.update_folder?.name}}}},class extends te{constructor(){super(...arguments),this.name="create_workspace",this.type=_.WRITE,this.annotations=ee({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return Vu}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(Fu,t),i=await hm(this.mondayApi),n=i&&a.create_workspace?.id?fm(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:n}}}},class extends te{constructor(){super(...arguments),this.name="create_folder",this.type=_.WRITE,this.annotations=ee({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return Bu}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(Mu,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 te{constructor(){super(...arguments),this.name="move_object",this.type=_.WRITE,this.annotations=ee({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use position for relative placement based on another object, parentFolderId for folder changes, workspaceId for workspace moves, and accountProductId for account product changes."}getInputSchema(){return Hu}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const s={folderId:t,position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,parentFolderId:o,workspaceId:r,accountProductId:d},p=await this.mondayApi.request(Uu,s);return{content:{message:"Object moved",object_id:p.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const s={boardId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},p=await this.mondayApi.request(ju,s);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:n,parentFolderId:o,workspaceId:r,accountProductId:d}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const s={overviewId:t,attributes:{position:a?{position_is_after:n,position_object_id:a,position_object_type:i}:void 0,folder_id:o,workspace_id:r,account_product_id:d}},p=await this.mondayApi.request(qu,s);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 Go.Folder:return this.executeUpdateFolder(e);case Go.Board:return this.executeUpdateBoardHierarchy(e);case Go.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends te{constructor(){super(...arguments),this.name="create_dashboard",this.type=_.WRITE,this.annotations=ee({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 Ru}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(ku,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends te{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=_.READ,this.annotations=ee({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(Ou,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,n=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:n,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:Mc}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends te{constructor(){super(...arguments),this.name="create_widget",this.type=_.WRITE,this.annotations=ee({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return $u}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(Cu,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===$r.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends te{constructor(){super(...arguments),this.name="board_insights",this.type=_.READ,this.annotations=ee({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return zu}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===sn.Label)).map((e=>e.columnId))),n=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:sn.Label,columnId:e})))??[],o=e.aggregations.concat(n).map((e=>{if(e.function){const o=`${e.function}_${e.columnId}`,r=t[o]||0;t[o]=r+1;const d=`${o}_${r}`;return Ku.has(e.function)&&(a.some((e=>e.column_id===d))||a.push({column_id:d})),{type:dn.Function,function:(i=e.function,n=e.columnId,{function:i,params:i===sn.CountItems?[]:[{type:dn.Column,column:Qu(n),as:n}]}),as:d}}var i,n;const o={type:dn.Column,column:Qu(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:dn.Column,column:Qu(e.column_id),as:e.column_id})})),{selectElements:o,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),n=function(e){return{id:e.boardId.toString(),type:rn.Table}}(e),o={query:{from:n,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},r=await this.mondayApi.request(Gu,o),d=(r.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const n=i.result??i.value??null;t[a]=n})),t}));return d.length?{content:{message:"Board insights retrieved",board_name:r.boards?.[0]?.name,board_url:r.boards?.[0]?.url,data:d}}:{content:"No board insights found for the given query."}}},class extends te{constructor(){super(...arguments),this.name="search",this.type=_.READ,this.annotations=ee({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, folders, workspaces, updates, and items.\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 groups, use get_board_info tool.\nITEMS search requires a searchTerm and only returns id, title, and url.\nWORKSPACES search requires a searchTerm and only returns id, title, and description.\nUPDATES search requires a searchTerm and returns id, title (the update body), itemId, boardId, and creatorId. Optionally scope it with boardIds and/or creatorIds.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789, workspace-101, update-303, item-321). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return sh}async executeInternal(e){if(e.searchType!==dh.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.runSmartSearchAsync(e)).items}}}catch(t){if(Cs(t),e.searchType===dh.ITEMS||e.searchType===dh.WORKSPACES||e.searchType===dh.UPDATES)throw t}const t={[dh.BOARD]:this.searchBoardsAsync.bind(this),[dh.DOCUMENTS]:this.searchDocsAsync.bind(this),[dh.FOLDERS]:this.searchFoldersAsync.bind(this),[dh.WORKSPACES]:()=>{throw new Error("Workspaces search requires a searchTerm")},[dh.UPDATES]:()=>{throw new Error("Updates search requires a searchTerm")},[dh.ITEMS]:()=>{throw new Error("Items search requires a searchTerm")}},a=await t[e.searchType](e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async runSmartSearchAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===dh.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===dh.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===dh.WORKSPACES)return this.searchWorkspacesAsync(e.searchTerm,e.limit);if(e.searchType===dh.UPDATES){const t=e.boardIds?.map((e=>e.toString())),a=e.creatorIds?.map((e=>e.toString()));return this.searchUpdatesAsync(e.searchTerm,e.limit,t,a)}if(e.searchType===dh.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);throw new Error(`Unsupported search type for smart search: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ah,i,{versionOverride:"dev",timeout:ks})).search.boards.results.map((e=>({id:rh.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(ih,i,{versionOverride:"dev",timeout:ks})).search.docs.results.map((e=>({id:rh.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchWorkspacesAsync(e,t){const a={query:e,limit:t};return{items:(await this.mondayApi.request(th,a,{timeout:ks})).search.workspaces.results.map((e=>({id:rh.WORKSPACE+e.indexed_data.id,title:e.indexed_data.name,description:e.indexed_data.description||void 0}))),wasFiltered:!0}}async searchUpdatesAsync(e,t,a,i){const n={query:e,limit:t,boardIds:a,creatorIds:i};return{items:(await this.mondayApi.request(nh,n,{versionOverride:"2026-10",timeout:ks})).search.updates.results.map((e=>({id:rh.UPDATE+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}))),wasFiltered:!0}}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(eh,i,{timeout:ks})).search.items.results.map((e=>({id:rh.ITEM+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&Os(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Zu,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:rh.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Xu,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:rh.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Ju,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:rh.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=oh(e.searchTerm??""),n=(e.page-1)*e.limit,o=n+e.limit;return{items:t.filter((e=>oh(a(e)).includes(i))).slice(n,o),wasFiltered:!0}}},class extends te{constructor(){super(...arguments),this.name="get_user_context",this.type=_.READ,this.annotations=ee({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(gh,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),n=this.extractRelevantBoards(a),o=this.extractRelevantPeople(a),{account:r,...d}=e;return{content:{message:"User context",...{user:d,account:r?{tier:r.tier,active_members_count:r.active_members_count,is_during_trial:r.is_during_trial,products:r.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:n,relevantPeople:o}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[vh[e]]=t[e];const n=await this.mondayApi.request(bh,i),o=[];for(const e of a){const t=yh[e];for(const a of n[t]??[])a?.id&&o.push({id:a.id,name:a.name,type:e})}return o}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends te{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=_.WRITE,this.annotations=ee({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 hh}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(mh,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends te{constructor(){super(...arguments),this.name="get_assets",this.type=_.READ,this.annotations=ee({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 _h}async executeInternal(e){const t=await this.mondayApi.request(fh,{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 te{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=_.READ,this.annotations=ee({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 Ih}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(wh,a,{versionOverride:"2026-04"}),n=i.notetaker?.meetings;if(!n?.meetings||0===n.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:n.meetings,pagination:{has_next_page:n.page_info?.has_next_page??!1,cursor:n.page_info?.cursor??null,count:n.meetings.length}}}}}},class extends te{constructor(){super(...arguments),this.name="create_view",this.type=_.WRITE,this.annotations=ee({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return dp}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(rp,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 te{constructor(){super(...arguments),this.name="update_view",this.type=_.WRITE,this.annotations=ee({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return pp}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(sp,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 te{constructor(){super(...arguments),this.name="create_view_table",this.type=_.WRITE,this.annotations=ee({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return up}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(lp,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 te{constructor(){super(...arguments),this.name="update_view_table",this.type=_.WRITE,this.annotations=ee({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return gp}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(hp,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 te{constructor(){super(...arguments),this.name="undo_action",this.type=_.WRITE,this.annotations=ee({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 Eh}async executeInternal(e){return await this.mondayApi.request(Th,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends te{constructor(){super(...arguments),this.name="get_object_schemas",this.type=_.READ,this.annotations=ee({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return Fs}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(Ps,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends te{constructor(){super(...arguments),this.name="create_object_schema",this.type=_.WRITE,this.annotations=ee({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return Ms}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Vs,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 te{constructor(){super(...arguments),this.name="update_object_schema",this.type=_.WRITE,this.annotations=ee({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 js}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(Bs,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 te{constructor(){super(...arguments),this.name="delete_object_schema",this.type=_.WRITE,this.annotations=ee({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 Hs}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(qs,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 te{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=_.WRITE,this.annotations=ee({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return Ws}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(Gs,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 te{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=_.WRITE,this.annotations=ee({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 Qs}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(Ys,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(Ks,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,n=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...n.length>0&&{failures:n}}}}}},class extends te{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=_.WRITE,this.annotations=ee({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 "${zs.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in).`}getInputSchema(){return ap}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(Js,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(Xs,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 te{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=_.WRITE,this.annotations=ee({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return np}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:Fn.Deactivate,reactivate:Fn.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(ip,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends te{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=_.WRITE,this.annotations=ee({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Sh}async executeInternal(e){const t=(await this.mondayApi.request(Ah,{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 te{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=_.WRITE,this.annotations=ee({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 kh}async executeInternal(e){const t=(await this.mondayApi.request(Nh,{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(Dh,{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 te{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=_.READ,this.annotations=ee({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Ch}async executeInternal(e){return{content:Oh}}},class extends te{constructor(){super(...arguments),this.name="fetch_file_content",this.type=_.READ,this.annotations=ee({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 Bh}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:n=0}=e,o=await this.mondayApi.request(Rh,{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=>Hh(e,n,i))))}}}},class extends te{constructor(){super(...arguments),this.name="manage_agent",this.type=_.WRITE,this.annotations=ee({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 lv}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(Qb,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){Os(e,"create monday platform agent")}}async handleCreateBlank(e){try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(zb,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){Os(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{custom_agents:t}=await this.mondayApi.request(Kb,{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){Os(e,"get monday platform agent")}try{const{custom_agents:e}=await this.mondayApi.request(Kb,{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){Os(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(Jb,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){Os(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(Xb,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){Os(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(Zb,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){Os(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:tg.DeactivatedByUser},a=await this.mondayApi.request(ev,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){Os(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(tv,{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){Os(e,"run monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=_.WRITE,this.annotations=ee({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 cv}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(av,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){Os(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(iv,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){Os(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(nv,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){Os(e,"remove trigger from monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=_.WRITE,this.annotations=ee({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 mv}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(pv,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){Os(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(ov,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){Os(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(rv,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){Os(e,"remove skill from monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=_.WRITE,this.annotations=ee({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 gv}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(uv,{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){Os(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(hv,{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){Os(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(_v,{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){Os(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(fv,{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){Os(e,"remove agent resource access for monday platform agent")}}},class extends te{constructor(){super(...arguments),this.name="agent_catalog",this.type=_.READ,this.annotations=ee({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 bv}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(dv,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){Os(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(sv,{},{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){Os(e,"fetch monday platform agent skills catalog")}}},class extends te{constructor(){super(...arguments),this.name="list_automations",this.type=_.READ,this.annotations=ee({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.\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\nNote: Some legacy automations may not appear — mention this if users ask about missing automations.\n"}getInputSchema(){return Iv}async executeInternal(e){try{const t={boardIds:[e.boardId],limit:e.limit??100,...e.cursor?{cursor:e.cursor}:{}},a=await this.mondayApi.request(vv,t,{versionOverride:"2026-10"}),i=(a.board_automations?.items??[]).map(wv),n=a.board_automations?.cursor??null;return{content:{message:`Found ${i.length} live workflow(s) on board ${e.boardId}`,workflows:i,pagination:{nextCursor:n,hasMore:null!==n}}}}catch(e){Os(e,"list live workflows")}}},class extends te{constructor(){super(...arguments),this.name="manage_automations",this.type=_.WRITE,this.annotations=ee({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 Sv}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(Tv,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){Os(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Ev,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){Os(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(Av,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){Os(e,"delete workflow")}}},class extends te{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=_.WRITE,this.annotations=ee({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 Nv}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/lite-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`lite-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Os(e,"create automation")}}},class extends te{constructor(){super(...arguments),this.name="get_automation_runs",this.type=_.READ,this.annotations=ee({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 Lv}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){Os(e,"get automation runs")}}async runHistory(e){const t=e.nextPageOffset??0,a={...e.filters??{},...e.boardId?{boardId:e.boardId}:{}},i=await this.mondayApi.request(kv,{nextPageOffset:t,filters:a}),n=i.trigger_events?.triggerEvents??[],o=function(e){return e.reduce(((e,t)=>{const a=t.eventState??"unknown";return e[a]=(e[a]??0)+1,e}),{})}(n),r=e.boardId?`board ${e.boardId}`:"account-wide";return{content:{message:`Returned ${n.length} run(s) (${r}) at offset ${t}. By state: ${function(e){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`));return t.length?t.join(", "):"none"}(o)}. Offset-only pagination — for the next page request offset ${t+n.length}.`,scope:r,offset:t,count:n.length,stateCounts:o,runs:n}}}async runDetail(e){if(!e.triggerUuid)return{content:{message:'detail mode requires "triggerUuid".'}};const t=!1!==e.includeToolEvents,a=e.blockEventsOffset??0,i=e.toolEventsOffset??0,n=(await this.mondayApi.request(Ov,{triggerUuid:e.triggerUuid})).trigger_event;if(!n)return{content:{message:`No run found for triggerUuid ${e.triggerUuid}.`,triggerUuid:e.triggerUuid,found:!1}};const[o,r]=await Promise.all([this.mondayApi.request(Cv,{triggerUuid:e.triggerUuid,nextPageOffset:a}),t?this.mondayApi.request(Rv,{triggerUuid:e.triggerUuid,nextPageOffset:i}):Promise.resolve(null)]),d=o.block_events?.blockEvents??[],s=r?.tool_events?.tool_events??[];return{content:{message:`Run ${e.triggerUuid}: state=${n.eventState??"unknown"}, ${d.length} block step(s), ${s.length} tool call(s).`,found:!0,run:n,blockEvents:d,blockEventsOffset:a,toolEvents:s,toolEventsOffset:i,toolEventsIncluded:t}}}},class extends te{constructor(){super(...arguments),this.name="get_automation_statistics",this.type=_.READ,this.annotations=ee({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 Pv}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){Os(e,"get automation statistics")}}async runTotals(e,t,a){const i=(await this.mondayApi.request(xv,{filters:{board_id:t,user_ids:e.userIds}})).account_trigger_statistics;return{content:{message:`Totals (${a}): success=${i?.success??0}, failure=${i?.failure??0}, total=${i?.total??0}.`,scope:a,breakdown:"totals",statistics:i}}}async runByEntity(e,t,a){if(!e.runStatus)return{content:{message:'by_entity breakdown requires "runStatus" (success | failure | exhausted).'}};const i=(await this.mondayApi.request(Uv,{runStatus:e.runStatus,filters:{board_id:t,automation_ids:e.excludeAutomationIds,user_ids:e.userIds}})).account_triggers_statistics_by_entity_id;return{content:{message:`By-entity '${e.runStatus}' statistics (${a}).`,scope:a,breakdown:"by_entity",runStatus:e.runStatus,automationStatistics:i?.automation_statistics,workflowStatistics:i?.workflow_statistics}}}},class extends te{constructor(){super(...arguments),this.name="create_workflow",this.type=_.WRITE,this.annotations=ee({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n"}getInputSchema(){return Vv}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(Fv,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:n}=a.create_workflow;if(!i||!n)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:n}}}catch(e){Os(e,"create Workflow Builder workflow")}}},class extends te{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=_.WRITE,this.annotations=ee({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return Mv}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Os(e,"update workflow")}}},class extends te{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=_.READ,this.annotations=ee({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return Bv}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-planner",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Os(e,"plan workflow")}}},class extends te{constructor(){super(...arguments),this.name="publish_workflow",this.type=_.WRITE,this.annotations=ee({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nUse this after create_workflow (and optionally update_workflow) to make the workflow active. Before publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\nNote: if directing the user to the workflow in the UI, the correct URL path is custom_objects/, not workflows/ — e.g. {account}.monday.com/custom_objects/{workflowObjectId}.\n\n"}getInputSchema(){return qv}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(jv,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:n}=a.publish_workflow;if(!i||!n)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:n}}}catch(e){Os(e,"publish workflow")}}},class extends te{constructor(){super(...arguments),this.name="configure_ai_column",this.type=_.WRITE,this.annotations=ee({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 Xv}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){Os(e,"configure AI column")}}validateSourceType(e,t){if(!e.source_type)throw new Error(`source_type is required for ${t} block`);if("column"===e.source_type&&!e.source_column_id)throw new Error('source_column_id is required when source_type is "column"')}async handleCategorize(e,t,a){this.validateSourceType(t,"categorize");const i=await this.mondayApi.request(Hv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_categorize_ai_column?.column_id}}}async handleSummarize(e,t,a){this.validateSourceType(t,"summarize");const i=await this.mondayApi.request(Gv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,additionalInstructions:t.additional_instructions,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_summarize_ai_column?.column_id}}}async handleTranslate(e,t,a){if(this.validateSourceType(t,"translate"),!t.target_language)throw new Error("target_language is required for translate block");const i=await this.mondayApi.request(Wv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,targetLanguage:t.target_language,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_translate_ai_column?.column_id}}}async handleImproveText(e,t,a){this.validateSourceType(t,"improve_text");const i=await this.mondayApi.request(Yv,{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},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_improve_text_ai_column?.column_id}}}async handleExtract(e,t,a){if(this.validateSourceType(t,"extract"),!t.entity_type)throw new Error("entity_type is required for extract block");if("custom"===t.entity_type&&!t.custom_instructions)throw new Error('custom_instructions is required for extract block when entity_type is "custom"');const i=await this.mondayApi.request(Kv,{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},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_extract_ai_column?.column_id}}}async handleOpenBlock(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for open_block block");const i=await this.mondayApi.request(Qv,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_open_block_ai_column?.column_id}}}async handleWriteMe(e,t,a){if(!t.ai_query)throw new Error("ai_query is required for write_me block");if(!t.tone)throw new Error("tone is required for write_me block");if(!t.output_length)throw new Error("output_length is required for write_me block");const i=await this.mondayApi.request(zv,{boardId:e.toString(),columnId:t.column_id,aiQuery:t.ai_query,tone:t.tone,length:t.output_length,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_write_me_ai_column?.column_id}}}async handlePersonAssignment(e,t,a){if(this.validateSourceType(t,"person_assignment"),!t.groups||0===t.groups.length)throw new Error("groups is required for person_assignment block");const i=await this.mondayApi.request(Jv,{boardId:e.toString(),columnId:t.column_id,sourceType:t.source_type,sourceColumnId:t.source_column_id,groups:t.groups,extraSettings:a},{versionOverride:"2026-10"});return{content:{message:"AI column configured successfully",column_id:i.configure_person_assignment_ai_column?.column_id}}}},class extends te{constructor(){super(...arguments),this.name="remove_ai_from_column",this.type=_.WRITE,this.annotations=ee({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 ey}async executeInternal(e){try{const t=await this.mondayApi.request(Zv,{boardId:e.board_id.toString(),columnId:e.column_id},{versionOverride:"2026-10"});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){Os(e,"remove AI from column")}}}],$y=[...Ry,...Cy,...Z];export{As as ToolMode,_ as ToolType,Ry as allGraphqlApiTools,Z as allMondayAppsTools,Cy as allMondayDevTools,$y as allTools};
2839
2923
  //# sourceMappingURL=index.js.map