@mondaydotcomorg/agent-toolkit 2.12.0 → 2.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -902,7 +902,7 @@ import{z as e}from"zod";import a from"util";import t,{Readable as i}from"stream"
902
902
  is_guest
903
903
  }
904
904
  }
905
- `;const Ex=e=>{const a=[];return"users"in e&&e.users&&e.users.length>0&&(a.push("Users:"),e.users.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),a.push(` Email: ${e.email}`),a.push(` Title: ${e.title||"N/A"}`),a.push(` Enabled: ${e.enabled}`),a.push(` Admin: ${e.is_admin||!1}`),a.push(` Guest: ${e.is_guest||!1}`),a.push(` Pending: ${e.is_pending||!1}`),a.push(` Verified: ${e.is_verified||!1}`),a.push(` View Only: ${e.is_view_only||!1}`),a.push(` Join Date: ${e.join_date||"N/A"}`),a.push(` Last Activity: ${e.last_activity||"N/A"}`),a.push(` Location: ${e.location||"N/A"}`),a.push(` Mobile Phone: ${e.mobile_phone||"N/A"}`),a.push(` Phone: ${e.phone||"N/A"}`),a.push(` Timezone: ${e.time_zone_identifier||"N/A"}`),a.push(` UTC Hours Diff: ${e.utc_hours_diff||"N/A"}`),e.teams&&e.teams.length>0&&(a.push(" Teams:"),e.teams.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}`)}))),a.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(a.push("Teams:"),e.teams.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(a.push(` Guest Team: ${e.is_guest||!1}`),a.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(a.push(" Owners:"),e.owners.forEach((e=>{a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(a.push(" Members:"),e.users.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}, Title: ${e.title||"N/A"}, Admin: ${e.is_admin||!1}, Guest: ${e.is_guest||!1}`)})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},Tx=500,Nx=500,Ix=1e3,Sx={userIds:e.array(e.string()).max(Tx).optional().describe('[HIGH PRIORITY] Specific user IDs to fetch (max 500). ALWAYS use this when you have user IDs from board assignments, mentions, previous queries, or any context where user IDs are available.\n \n AI AGENT DIRECTIVE: This is the MOST EFFICIENT parameter. Use whenever you have specific user IDs - never use broad searches when IDs are available.\n \n RETURNS: Complete user profiles with team memberships. EXAMPLES: ["12345678", "87654321"]'),teamIds:e.array(e.string()).max(Nx).optional().describe('[HIGH PRIORITY] Specific team IDs to fetch (max 500). ALWAYS use this when you have team IDs from board permissions, assignments, team context or elsewhere.\n \n AI AGENT DIRECTIVE: Use with teamsOnly: true for teams without user data, or includeTeamMembers: true for detailed member analysis. NEVER fetch all teams when specific IDs are available.\n \n RETURNS: Team details with owners and optional member data. EXAMPLES: ["98765432", "11223344"]'),name:e.string().optional().describe('[SECOND PRIORITY] Name-based user search. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ONLY when you have user names but no IDs. This is your PREFERRED method for finding users when you know names. Performs fuzzy matching.\n \n CRITICAL: This parameter CONFLICTS with all others. EXAMPLES: "John Smith", "john", "smith"'),getMe:e.boolean().optional().describe('[TOP PRIORITY] Current authenticated user lookup. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ALWAYS when requesting current user information. Returns basic profile: id, name, title, enabled, is_admin, is_guest. Should be used when a user asks to get "my user" or "me".\n \n CRITICAL: This parameter CONFLICTS with all others. Pass boolean value true (not string "true") for authenticated user\'s basic details.'),includeTeams:e.boolean().optional().describe("[AVOID UNLESS NECESSARY] Include teams data alongside users. Creates dual query overhead.\n \n AI AGENT DIRECTIVE: AVOID this parameter unless you specifically need both users AND teams in one response. Use teamsOnly: true for teams-only queries instead.\n \n PERFORMANCE WARNING: Adds significant query overhead. Use sparingly."),teamsOnly:e.boolean().optional().describe("[RECOMMENDED FOR TEAMS] Fetch only teams, no users returned. Optimized single-purpose query.\n \n AI AGENT DIRECTIVE: Use teamsOnly: true when you only need team information. More efficient than includeTeams: true. Combine with includeTeamMembers for member details.\n \n USAGE: teamsOnly: true for team lists, add includeTeamMembers: true for member analysis."),includeTeamMembers:e.boolean().optional().describe("[CONDITIONAL] Control team member data inclusion. Use strategically for performance.\n \n AI AGENT DIRECTIVE: Set to false for simple team lists (faster), true only when you need member composition analysis. Default is false for better performance.\n \n DECISION LOGIC: false=team names/IDs only, true=full member details with roles and permissions.")};const Dx={itemId:e.number().describe("The id of the item to which the update will be added"),groupId:e.string().describe("The id of the group to which the item will be moved")};const Ax=e.enum(["ids","object_ids","workspace_ids"]),Ox={ids:e.object({type:Ax.describe("Type of id to query by: ids, object_ids, or workspace_ids"),values:e.array(e.string()).min(1).describe("Array of ID values for this query type (at least 1 required)")}).describe("ID query object that specifies a type (ids/object_ids/workspace_ids) and an array of values."),limit:e.number().optional().describe("Number of docs per page (default: 25). Affects pagination - if you get exactly this many results, there may be more pages."),order_by:e.nativeEnum(Eb).optional().describe("The order in which to retrieve your docs. The default shows created_at with the newest docs listed first. This argument will not be applied if you query docs by specific ids."),page:e.number().optional().describe("The page number to return (starts at 1). Use this to paginate through large result sets. Check response for has_more_pages indicator.")};const kx={workspace_id:e.number().describe("The ID of the workspace to get information for")};const Rx=Zy`
905
+ `;const Ex=e=>{const a=[];return"users"in e&&e.users&&e.users.length>0&&(a.push("Users:"),e.users.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),a.push(` Email: ${e.email}`),a.push(` Title: ${e.title||"N/A"}`),a.push(` Enabled: ${e.enabled}`),a.push(` Admin: ${e.is_admin||!1}`),a.push(` Guest: ${e.is_guest||!1}`),a.push(` Pending: ${e.is_pending||!1}`),a.push(` Verified: ${e.is_verified||!1}`),a.push(` View Only: ${e.is_view_only||!1}`),a.push(` Join Date: ${e.join_date||"N/A"}`),a.push(` Last Activity: ${e.last_activity||"N/A"}`),a.push(` Location: ${e.location||"N/A"}`),a.push(` Mobile Phone: ${e.mobile_phone||"N/A"}`),a.push(` Phone: ${e.phone||"N/A"}`),a.push(` Timezone: ${e.time_zone_identifier||"N/A"}`),a.push(` UTC Hours Diff: ${e.utc_hours_diff||"N/A"}`),e.teams&&e.teams.length>0&&(a.push(" Teams:"),e.teams.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}`)}))),a.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(a.push("Teams:"),e.teams.forEach((e=>{e&&(a.push(` ID: ${e.id}`),a.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(a.push(` Guest Team: ${e.is_guest||!1}`),a.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(a.push(" Owners:"),e.owners.forEach((e=>{a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(a.push(" Members:"),e.users.forEach((e=>{e&&a.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}, Title: ${e.title||"N/A"}, Admin: ${e.is_admin||!1}, Guest: ${e.is_guest||!1}`)})))),a.push(""))}))),0===a.length?"No users or teams found with the specified filters.":a.join("\n").trim()},Tx=500,Nx=500,Ix=1e3,Sx={userIds:e.array(e.string()).max(Tx).optional().describe('[HIGH PRIORITY] Specific user IDs to fetch (max 500). ALWAYS use this when you have user IDs from board assignments, mentions, previous queries, or any context where user IDs are available.\n \n AI AGENT DIRECTIVE: This is the MOST EFFICIENT parameter. Use whenever you have specific user IDs - never use broad searches when IDs are available.\n \n RETURNS: Complete user profiles with team memberships. EXAMPLES: ["12345678", "87654321"]'),teamIds:e.array(e.string()).max(Nx).optional().describe('[HIGH PRIORITY] Specific team IDs to fetch (max 500). ALWAYS use this when you have team IDs from board permissions, assignments, team context or elsewhere.\n \n AI AGENT DIRECTIVE: Use with teamsOnly: true for teams without user data, or includeTeamMembers: true for detailed member analysis. NEVER fetch all teams when specific IDs are available.\n \n RETURNS: Team details with owners and optional member data. EXAMPLES: ["98765432", "11223344"]'),name:e.string().optional().describe('[SECOND PRIORITY] Name-based user search. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ONLY when you have user names but no IDs. This is your PREFERRED method for finding users when you know names. Performs fuzzy matching.\n \n CRITICAL: This parameter CONFLICTS with all others. EXAMPLES: "John Smith", "john", "smith"'),getMe:e.boolean().optional().describe('[TOP PRIORITY] Current authenticated user lookup. STANDALONE parameter - cannot be combined with others.\n \n AI AGENT DIRECTIVE: Use ALWAYS when requesting current user information. Returns basic profile: id, name, title, enabled, is_admin, is_guest. Should be used when a user asks to get "my user" or "me".\n \n CRITICAL: This parameter CONFLICTS with all others. Pass boolean value true (not string "true") for authenticated user\'s basic details.'),includeTeams:e.boolean().optional().describe("[AVOID UNLESS NECESSARY] Include general teams data alongside users. Creates dual query overhead. This does not fetch a specific user's teams rather all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get the team memberships.\n \n AI AGENT DIRECTIVE: AVOID this parameter unless you specifically need both users AND teams in one response. Use teamsOnly: true for teams-only queries instead.\n \n PERFORMANCE WARNING: Adds significant query overhead. Use sparingly."),teamsOnly:e.boolean().optional().describe("[RECOMMENDED FOR TEAMS] Fetch only teams, no users returned. Optimized single-purpose query.\n \n AI AGENT DIRECTIVE: Use teamsOnly: true when you only need team information. More efficient than includeTeams: true. Combine with includeTeamMembers for member details.\n \n USAGE: teamsOnly: true for team lists, add includeTeamMembers: true for member analysis."),includeTeamMembers:e.boolean().optional().describe("[CONDITIONAL] Control team member data inclusion. Use strategically for performance.\n \n AI AGENT DIRECTIVE: Set to false for simple team lists (faster), true only when you need member composition analysis. Default is false for better performance.\n \n DECISION LOGIC: false=team names/IDs only, true=full member details with roles and permissions.")};const Dx={itemId:e.number().describe("The id of the item to which the update will be added"),groupId:e.string().describe("The id of the group to which the item will be moved")};const Ax=e.enum(["ids","object_ids","workspace_ids"]),Ox={ids:e.object({type:Ax.describe("Type of id to query by: ids, object_ids, or workspace_ids"),values:e.array(e.string()).min(1).describe("Array of ID values for this query type (at least 1 required)")}).describe("ID query object that specifies a type (ids/object_ids/workspace_ids) and an array of values."),limit:e.number().optional().describe("Number of docs per page (default: 25). Affects pagination - if you get exactly this many results, there may be more pages."),order_by:e.nativeEnum(Eb).optional().describe("The order in which to retrieve your docs. The default shows created_at with the newest docs listed first. This argument will not be applied if you query docs by specific ids."),page:e.number().optional().describe("The page number to return (starts at 1). Use this to paginate through large result sets. Check response for has_more_pages indicator.")};const kx={workspace_id:e.number().describe("The ID of the workspace to get information for")};const Rx=Zy`
906
906
  query listWorkspaces($limit: Int!) {
907
907
  workspaces(limit: $limit) {
908
908
  id
@@ -951,7 +951,7 @@ import{z as e}from"zod";import a from"util";import t,{Readable as i}from"stream"
951
951
  }
952
952
  }
953
953
  }
954
- `,Px={name:e.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:e.number().int("Workspace ID must be an integer").positive("Workspace ID must be positive").describe("ID of the workspace that will own the dashboard"),board_ids:e.array(e.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:e.nativeEnum(bb).default(bb.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:e.number().int("Board folder ID must be an integer").positive("Board folder ID must be positive").optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const Ux={parent_container_id:e.number().int("Parent container ID must be an integer").positive("Parent container ID must be positive").describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.nativeEnum(Og).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.nativeEnum(Ib).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:e.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:e.record(e.unknown()).describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};e.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'),e.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const Bx=[class extends Vm{constructor(){super(...arguments),this.name="delete_item",this.type=b.WRITE,this.annotations=jm({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Hw}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(ew,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_items_by_name",this.type=b.READ,this.annotations=jm({title:"Get Board Items",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get items by board id and term"}getInputSchema(){return this.context?.boardId?Zw:ex}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),term:e.term},t=await this.mondayApi.request(aw,a);return{content:`Items ${t.boards?.[0]?.items_page?.items?.map((e=>`name: ${e.name}, id: ${e.id}`)).join(", ")} successfully fetched`}}},class extends Vm{constructor(){super(...arguments),this.name="create_item",this.type=b.WRITE,this.annotations=jm({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item in a monday.com board"}getInputSchema(){return this.context?.boardId?Uw:Bw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},t=await this.mondayApi.request(tw,a);return{content:`Item ${t.create_item?.id} successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="create_update",this.type=b.WRITE,this.annotations=jm({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update in a monday.com board"}getInputSchema(){return qw}async executeInternal(e){const a={itemId:e.itemId.toString(),body:e.body},t=await this.mondayApi.request(iw,a);return{content:`Update ${t.create_update?.id} successfully created on item ${e.itemId}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_schema",this.type=b.READ,this.annotations=jm({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 ax}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(nw,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_activity",this.type=b.READ,this.annotations=jm({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return Yw}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-Fm.MONTH30Days),i=e?.fromDate||t.toISOString(),n=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},p=await this.mondayApi.request(Kw,o),s=p.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const r=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${r}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_info",this.type=b.READ,this.annotations=jm({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return Qw}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(Jw,a),i=t.boards?.[0];return i?{content:Xw(i)}:{content:`Board with id ${e.boardId} not found or you don't have access to it.`}}},class extends Vm{constructor(){super(...arguments),this.name="get_users_by_name",this.type=b.READ,this.annotations=jm({title:"Get Users",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get users, can be filtered by name or partial name"}getInputSchema(){return sx}async executeInternal(e){const a={name:e.name},t=await this.mondayApi.request(ow,a);return{content:`Relevant users:\n ${t.users?.map((e=>` id: ${e?.id}, name: ${e?.name}, title: ${e?.title}`)).join("\n")}`}}},class extends Vm{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=b.READ,this.annotations=jm({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'PRECISION-FIRST user and team retrieval tool. AI agents MUST prioritize specific queries over broad searches.\n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs when available (userIds, teamIds) - highest precision and performance\n 2. ALWAYS use name search when you have user names but no IDs \n 3. ALWAYS use boolean getMe: true when requesting current user information\n 4. AVOID broad queries (no parameters) - use only as absolute last resort\n 5. COMBINE parameters strategically to minimize API calls\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe: true (when requesting current user) - STANDALONE ONLY\n 2. name="exact_name" (when searching by name) - STANDALONE ONLY \n 3. userIds=["id1","id2"] (when you have specific user IDs)\n 4. teamIds=["id1","id2"] + teamsOnly: true (when you have specific team IDs)\n 5. No parameters (LAST RESORT - fetches up to 1000 users, avoid unless absolutely necessary)\n\n CRITICAL USAGE RULES:\n • getMe and name parameters CANNOT be combined with any other parameters\n • userIds + teamIds requires explicit includeTeams: true flag\n • teamsOnly: true prevents user data fetching (teams-only queries)\n • includeTeamMembers: true adds detailed member data to teams\n • includeTeams: true fetches both users and teams, can be used to get a user\'s teams if their user id is known\n\n OPTIMIZATION DIRECTIVES:\n • NEVER fetch all users when specific IDs are available\n • NEVER use broad queries for single user/team lookups \n • ALWAYS prefer name search over ID-less queries for individual users\n • SET includeTeamMembers: false for team lists, true only for member analysis \n • AVOID includeTeams: true unless you specifically need both users AND teams\n • AVOID broad queries for single user/team, if you have specific IDs, use them. For example getting a user\'s teams, use that user\'s ID and fetch their team using the includeTeams flag.\n\n RESPONSE CONTENT:\n • Users: id, name, email, title, permissions, contact details, team memberships\n • Teams: id, name, owners, members (when includeTeamMembers: true)\n • Current user: id, name, title, enabled, is_admin, is_guest (basic profile only)'}getInputSchema(){return Sx}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,p=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||p)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(_x);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:Ex(s)}}if(p){if(a||t||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const p={name:e.name},s=await this.mondayApi.request(xx,p);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const r=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${r}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>Tx)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(t&&e.teamIds&&e.teamIds.length>Nx)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};s=await this.mondayApi.request(wx,a)}else{const a={teamIds:e.teamIds};s=await this.mondayApi.request(yx,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:Ix};s=await this.mondayApi.request(gx,a)}else if(a){const a={userIds:e.userIds,limit:Ix};s=await this.mondayApi.request(vx,a)}else{const e={userIds:void 0,limit:Ix};s=await this.mondayApi.request(bx,e)}return{content:Ex(s)}}},class extends Vm{constructor(){super(...arguments),this.name="change_item_column_values",this.type=b.WRITE,this.annotations=jm({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board"}getInputSchema(){return this.context?.boardId?Nw:Iw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(pw,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}},class extends Vm{constructor(){super(...arguments),this.name="move_item_to_group",this.type=b.WRITE,this.annotations=jm({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 Dx}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(sw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Vm{constructor(){super(...arguments),this.name="create_board",this.type=b.WRITE,this.annotations=jm({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Sw}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(rw,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="create_form",this.type=b.WRITE,this.annotations=jm({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return Rw}async executeInternal(e){const a={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},t=await this.mondayApi.request(Dw,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_form",this.type=b.READ,this.annotations=jm({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return Cw}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(Aw,a);return t.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(t.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Vm{constructor(){super(...arguments),this.name="create_column",this.type=b.WRITE,this.annotations=jm({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?Lw:$w}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},t=await this.mondayApi.request(dw,a);return{content:`Column ${t.create_column?.id} successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="create_group",this.type=b.WRITE,this.annotations=jm({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 Pw}async executeInternal(e){const a={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},t=await this.mondayApi.request(jw,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="delete_column",this.type=b.WRITE,this.annotations=jm({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?Gw:zw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(lw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},Tw,class extends Vm{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=b.ALL_API,this.annotations=jm({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 nx}async executeInternal(e){try{const a=await this.mondayApi.request(cw),t=e?.operationType,i=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,p=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return t&&"read"!==t||(s+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(s+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${p}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Vm{constructor(){super(...arguments),this.name="get_column_type_info",this.type=b.READ,this.annotations=jm({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return ix}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(tx,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_type_details",this.type=b.ALL_API,this.annotations=jm({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 ox}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const t=(a=e.typeName,Zy`
954
+ `,Px={name:e.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:e.number().int("Workspace ID must be an integer").positive("Workspace ID must be positive").describe("ID of the workspace that will own the dashboard"),board_ids:e.array(e.string()).min(1,"At least one board ID is required").max(50,"A maximum of 50 board IDs are allowed").describe("List of board IDs as strings (min 1 element)"),kind:e.nativeEnum(bb).default(bb.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:e.number().int("Board folder ID must be an integer").positive("Board folder ID must be positive").optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const Ux={parent_container_id:e.number().int("Parent container ID must be an integer").positive("Parent container ID must be positive").describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.nativeEnum(Og).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.nativeEnum(Ib).describe("Type of widget to create: i.e CHART, NUMBER, BATTERY"),widget_name:e.string().min(1,"Widget name is required").max(255,"Widget name must be 255 characters or less").describe("Widget display name (1-255 UTF-8 chars)"),settings:e.record(e.unknown()).describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};e.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'),e.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)");const Bx=[class extends Vm{constructor(){super(...arguments),this.name="delete_item",this.type=b.WRITE,this.annotations=jm({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Hw}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(ew,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_items_by_name",this.type=b.READ,this.annotations=jm({title:"Get Board Items",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get items by board id and term"}getInputSchema(){return this.context?.boardId?Zw:ex}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),term:e.term},t=await this.mondayApi.request(aw,a);return{content:`Items ${t.boards?.[0]?.items_page?.items?.map((e=>`name: ${e.name}, id: ${e.id}`)).join(", ")} successfully fetched`}}},class extends Vm{constructor(){super(...arguments),this.name="create_item",this.type=b.WRITE,this.annotations=jm({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item in a monday.com board"}getInputSchema(){return this.context?.boardId?Uw:Bw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},t=await this.mondayApi.request(tw,a);return{content:`Item ${t.create_item?.id} successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="create_update",this.type=b.WRITE,this.annotations=jm({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update in a monday.com board"}getInputSchema(){return qw}async executeInternal(e){const a={itemId:e.itemId.toString(),body:e.body},t=await this.mondayApi.request(iw,a);return{content:`Update ${t.create_update?.id} successfully created on item ${e.itemId}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_schema",this.type=b.READ,this.annotations=jm({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 ax}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(nw,t);return{content:`The current schema of the board ${a} is: \n \n\nColumns:\n ${i.boards?.[0]?.columns?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}\n Type - ${e?.type}`)).join("\n")}\n \n\nGroups:\n ${i.boards?.[0]?.groups?.map((e=>`Id - ${e?.id}\n Title - ${e?.title}`)).join("\n")}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_activity",this.type=b.READ,this.annotations=jm({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days)"}getInputSchema(){return Yw}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-Fm.MONTH30Days),i=e?.fromDate||t.toISOString(),n=e?.toDate||a.toISOString(),o={boardId:e.boardId.toString(),fromDate:i,toDate:n,limit:this.defaultLimit,page:1},p=await this.mondayApi.request(Kw,o),s=p.boards?.[0]?.activity_logs;if(!s||0===s.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const r=s.filter((e=>null!=e)).map((e=>`• ${e.created_at}: ${e.event} on ${e.entity} by user ${e.user_id}${e.data?` - Data: ${e.data}`:""}`)).join("\n");return{content:`Activity logs for board ${e.boardId} from ${i} to ${n} (${s.length} entries):\n\n${r}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_board_info",this.type=b.READ,this.annotations=jm({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return Qw}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(Jw,a),i=t.boards?.[0];return i?{content:Xw(i)}:{content:`Board with id ${e.boardId} not found or you don't have access to it.`}}},class extends Vm{constructor(){super(...arguments),this.name="get_users_by_name",this.type=b.READ,this.annotations=jm({title:"Get Users",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get users, can be filtered by name or partial name"}getInputSchema(){return sx}async executeInternal(e){const a={name:e.name},t=await this.mondayApi.request(ow,a);return{content:`Relevant users:\n ${t.users?.map((e=>` id: ${e?.id}, name: ${e?.name}, title: ${e?.title}`)).join("\n")}`}}},class extends Vm{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=b.READ,this.annotations=jm({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'PRECISION-FIRST user and team retrieval tool. AI agents MUST prioritize specific queries over broad searches.\n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs when available (userIds, teamIds) - highest precision and performance\n 2. ALWAYS use name search when you have user names but no IDs \n 3. ALWAYS use boolean getMe: true when requesting current user information\n 4. AVOID broad queries (no parameters) - use only as absolute last resort\n 5. COMBINE parameters strategically to minimize API calls\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe: true (when requesting current user) - STANDALONE ONLY\n 2. name="exact_name" (when searching by name) - STANDALONE ONLY \n 3. userIds=["id1","id2"] (when you have specific user IDs)\n 4. teamIds=["id1","id2"] + teamsOnly: true (when you have specific team IDs)\n 5. No parameters (LAST RESORT - fetches up to 1000 users, avoid unless absolutely necessary)\n\n CRITICAL USAGE RULES:\n • getMe and name parameters CANNOT be combined with any other parameters\n • userIds + teamIds requires explicit includeTeams: true flag\n • teamsOnly: true prevents user data fetching (teams-only queries)\n • includeTeamMembers: true adds detailed member data to teams\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user\'s teams rather fetch that user by id and you will get their team memberships.\n\n OPTIMIZATION DIRECTIVES:\n • NEVER fetch all users when specific IDs are available\n • NEVER use broad queries for single user/team lookups \n • ALWAYS prefer name search over ID-less queries for individual users\n • SET includeTeamMembers: false for team lists, true only for member analysis \n • AVOID includeTeams: true unless you specifically need both users AND teams\n • AVOID broad queries for single user/team, if you have specific IDs, use them. For example getting a user\'s teams, use that user\'s ID and fetch their team using the includeTeams flag.\n\n RESPONSE CONTENT:\n • Users: id, name, email, title, permissions, contact details, team memberships\n • Teams: id, name, owners, members (when includeTeamMembers: true)\n • Current user: id, name, title, enabled, is_admin, is_guest (basic profile only)'}getInputSchema(){return Sx}async executeInternal(e){const a=e.userIds&&e.userIds.length>0,t=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,n=e.teamsOnly||!1,o=e.includeTeamMembers||!1,p=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||p)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(_x);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]};return{content:Ex(s)}}if(p){if(a||t||i||n||o)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const p={name:e.name},s=await this.mondayApi.request(xx,p);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const r=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${s.users.length} user(s) matching "${e.name}":\n\n${r}`}}if(n&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(a&&e.userIds&&e.userIds.length>Tx)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(t&&e.teamIds&&e.teamIds.length>Nx)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let s;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};s=await this.mondayApi.request(wx,a)}else{const a={teamIds:e.teamIds};s=await this.mondayApi.request(yx,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:Ix};s=await this.mondayApi.request(gx,a)}else if(a){const a={userIds:e.userIds,limit:Ix};s=await this.mondayApi.request(vx,a)}else{const e={userIds:void 0,limit:Ix};s=await this.mondayApi.request(bx,e)}return{content:Ex(s)}}},class extends Vm{constructor(){super(...arguments),this.name="change_item_column_values",this.type=b.WRITE,this.annotations=jm({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board"}getInputSchema(){return this.context?.boardId?Nw:Iw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(pw,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}},class extends Vm{constructor(){super(...arguments),this.name="move_item_to_group",this.type=b.WRITE,this.annotations=jm({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 Dx}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(sw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Vm{constructor(){super(...arguments),this.name="create_board",this.type=b.WRITE,this.annotations=jm({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Sw}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(rw,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="create_form",this.type=b.WRITE,this.annotations=jm({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. This will create a new form as well as a new board for which the form’s responses will be stored. The returned board_id is the ID of the board that was created while the returned formToken can be used for all future queries and mutations to continue editing the form."}getInputSchema(){return Rw}async executeInternal(e){const a={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},t=await this.mondayApi.request(Dw,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_form",this.type=b.READ,this.annotations=jm({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form’s url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the token is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the token is abc123def456ghi789."}getInputSchema(){return Cw}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(Aw,a);return t.form?{content:`The form with the token ${e.formToken} is: ${JSON.stringify(t.form,null,2)}`}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Vm{constructor(){super(...arguments),this.name="create_column",this.type=b.WRITE,this.annotations=jm({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?Lw:$w}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},t=await this.mondayApi.request(dw,a);return{content:`Column ${t.create_column?.id} successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="create_group",this.type=b.WRITE,this.annotations=jm({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 Pw}async executeInternal(e){const a={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},t=await this.mondayApi.request(jw,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends Vm{constructor(){super(...arguments),this.name="delete_column",this.type=b.WRITE,this.annotations=jm({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?Gw:zw}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(lw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},Tw,class extends Vm{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=b.ALL_API,this.annotations=jm({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 nx}async executeInternal(e){try{const a=await this.mondayApi.request(cw),t=e?.operationType,i=a.queryType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No query fields found",n=a.mutationType?.fields?.map((e=>`- ${e.name}${e.description?`: ${e.description}`:""}`)).join("\n")||"No mutation fields found",o=a.__schema,p=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let s="## GraphQL Schema\n";return t&&"read"!==t||(s+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,s+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(s+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,s+=`## Mutation Fields\n${n}\n\n`),s+=`## Available Types\n${p}\n\n`,s+='To get detailed information about a specific type, use the get_type_details tool with the type name.\nFor example: get_type_details(typeName: "Board") to see Board type details.',{content:s}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Vm{constructor(){super(...arguments),this.name="get_column_type_info",this.type=b.READ,this.annotations=jm({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieves comprehensive information about a specific column type, including JSON schema definition and other metadata. Use this before creating columns with the create_column tool to understand the structure, validation rules, and available properties for column settings."}getInputSchema(){return ix}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(tx,a);if(!t?.get_column_type_schema)return{content:`Information for column type "${e.columnType}" not found or not available.`};const i={schema:t.get_column_type_schema};return{content:`Column Type Information for "${e.columnType}":\n\n${JSON.stringify(i,null,2)}`}}},class extends Vm{constructor(){super(...arguments),this.name="get_type_details",this.type=b.ALL_API,this.annotations=jm({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 ox}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const t=(a=e.typeName,Zy`
955
955
  query getTypeDetails {
956
956
  __type(name: "${a}") {
957
957
  name