@mondaydotcomorg/agent-toolkit 2.19.1 → 2.19.2

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.
@@ -1246,7 +1246,7 @@ import{z as e}from"zod";import a from"util";import t,{Readable as i}from"stream"
1246
1246
  }
1247
1247
  }
1248
1248
  }
1249
- `,DT={objectType:e.nativeEnum(pb).describe("The type of object to move"),id:e.string().describe("The ID of the object to move"),position:e.object({object_id:e.string().describe("The ID of the object to position the object relative to"),object_type:e.nativeEnum(pb).describe("The type of object to position the object relative to"),is_after:e.boolean().optional().describe("Whether to position the object after the object")}).optional().describe("The new position of the object. Required if changing the position based on another object."),parentFolderId:e.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:e.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:e.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};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 OT=[class extends $m{constructor(){super(...arguments),this.name="delete_item",this.type=g.WRITE,this.annotations=Cm({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return g_}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(pw,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends $m{constructor(){super(...arguments),this.name="get_board_items_page",this.type=g.READ,this.annotations=Cm({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. 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.[REQUIRED PRECONDITION]: Before using this tool, 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."}getInputSchema(){return C_}parseAndAssignJsonField(e,a,t){if(e[t]&&!e[a])try{e[a]=JSON.parse(e[t])}catch{throw new Error(`${t} is not a valid JSON`)}}async executeInternal(e){const a=!e.cursor;if(a&&e.searchTerm&&(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length))return{content:"No items found matching the specified searchTerm"};const t={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor,includeColumns:e.includeColumns,columnIds:e.columnIds};this.parseAndAssignJsonField(e,"filters","filtersStringified"),this.parseAndAssignJsonField(e,"orderBy","orderByStringified"),a&&(e.itemIds||e.filters||e.orderBy)&&(t.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(k_,t),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}mapResult(e,a){const t=e.boards?.[0],i=t?.items_page,n=i?.items||[];return{board:{id:t?.id,name:t?.name},items:n.map((e=>{const t={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};return a.includeColumns&&e.column_values&&(t.column_values={},e.column_values.forEach((e=>{if(e.value)try{t.column_values[e.id]=JSON.parse(e.value)}catch{t.column_values[e.id]=e.value}else t.column_values[e.id]=e.text||null}))),t})),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}async getItemIdsFromSmartSearchAsync(e){const a={boardId:e.boardId.toString(),searchTerm:e.searchTerm},t=await this.mondayApi.request(R_,a),i=t.search_items?.results?.map((e=>Number(e.data.id)))??[],n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends $m{constructor(){super(...arguments),this.name="create_item",this.type=g.WRITE,this.annotations=Cm({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."}getInputSchema(){return this.context?.boardId?c_:m_}async executeInternal(e){const a=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,a):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,a)}async duplicateAndUpdateItem(e,a){try{const t={boardId:a.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(d_,t);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},s=new $w(this.mondayApi,this.apiToken,{boardId:a}),r=await s.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(r.content.includes("Error"))throw new Error("Failed to update duplicated item: "+r.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){this.rethrowWrapped(e,"duplicate item")}}async createSubitem(e){const a={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const t=await this.mondayApi.request(l_,a);if(!t.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${t.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){this.rethrowWrapped(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(dw,t);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){this.rethrowWrapped(e,"create item")}}rethrowWrapped(e,a){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)throw new Error(`Failed to ${a}: ${t.response.errors.map((e=>e.message)).join(", ")}`)}throw new Error(`Failed to ${a}: ${t}`)}},class extends $m{constructor(){super(...arguments),this.name="create_update",this.type=g.WRITE,this.annotations=Cm({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update in a monday.com board"}getInputSchema(){return f_}async executeInternal(e){let a;if(e.mentionsList)try{a=JSON.parse(e.mentionsList)}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e instanceof Error?e.message:"Unknown error"}`)}const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(lw,t);return{content:`Update ${i.create_update?.id} successfully created on item ${e.itemId}`}}},class extends $m{constructor(){super(...arguments),this.name="get_board_schema",this.type=g.READ,this.annotations=Cm({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 $_}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(cw,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 $m{constructor(){super(...arguments),this.name="get_board_activity",this.type=g.READ,this.annotations=Cm({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 E_}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-T_.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},s=await this.mondayApi.request(y_,o),r=s.boards?.[0]?.activity_logs;if(!r||0===r.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=r.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} (${r.length} entries):\n\n${p}`}}},class extends $m{constructor(){super(...arguments),this.name="get_board_info",this.type=g.READ,this.annotations=Cm({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return O_}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(I_,a),i=t.boards?.[0];return i?{content:N_(i)}:{content:`Board with id ${e.boardId} not found or you don't have access to it.`}}},class extends $m{constructor(){super(...arguments),this.name="get_users_by_name",this.type=g.READ,this.annotations=Cm({title:"Get Users",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get users, can be filtered by name or partial name"}getInputSchema(){return U_}async executeInternal(e){const a={name:e.name},t=await this.mondayApi.request(mw,a);return{content:`Relevant users:\n ${t.users?.map((e=>` id: ${e?.id}, name: ${e?.name}, title: ${e?.title}`)).join("\n")}`}}},class extends $m{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=g.READ,this.annotations=Cm({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 sT}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,s=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||s)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(aT);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const r={users:[e.me]};return{content:tT(r)}}if(s){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 s={name:e.name},r=await this.mondayApi.request(eT,s);if(!r.users||0===r.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=r.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${r.users.length} user(s) matching "${e.name}":\n\n${p}`}}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>iT)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>nT)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let r;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};r=await this.mondayApi.request(Z_,a)}else{const a={teamIds:e.teamIds};r=await this.mondayApi.request(X_,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:oT};r=await this.mondayApi.request(Q_,a)}else if(a){const a={userIds:e.userIds,limit:oT};r=await this.mondayApi.request(K_,a)}else{const e={userIds:void 0,limit:oT};r=await this.mondayApi.request(J_,e)}return{content:tT(r)}}},$w,class extends $m{constructor(){super(...arguments),this.name="move_item_to_group",this.type=g.WRITE,this.annotations=Cm({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 rT}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(fw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends $m{constructor(){super(...arguments),this.name="create_board",this.type=g.WRITE,this.annotations=Cm({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Lw}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(hw,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends $m{constructor(){super(...arguments),this.name="create_form",this.type=g.WRITE,this.annotations=Cm({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 mx}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(Gw,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends $m{constructor(){super(...arguments),this.name="update_form",this.type=g.WRITE,this.annotations=Cm({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new a_(this.mondayApi),this.actionHandlers=new Map([[Rx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Rx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Rx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Rx.activate,this.helpers.activateForm.bind(this.helpers)],[Rx.createTag,this.helpers.createTag.bind(this.helpers)],[Rx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Rx.updateTag,this.helpers.updateTag.bind(this.helpers)],[Rx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Rx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Rx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Rx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Rx.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return'Update a monday.com form. Handles the following form update actions that can only be done one at a time using the correct "action" input: \n - update form\'s feature settings with the action "updateFeatures",\n - update form\'s appearance settings with the action "updateAppearance",\n - update form\'s accessibility settings with the action "updateAccessibility",\n - update form\'s title with the action "updateFormHeader",\n - update form\'s description with the action "updateFormHeader",\n - update form\'s question order with the action "updateQuestionOrder",\n - create a new form tag with the action "createTag",\n - delete a form tag with the action "deleteTag",\n - update a form tag with the action "updateTag",\n - set or update the form\'s password with the action "setFormPassword"\n - shorten form\'s url with the action "shortenFormUrl"\n - deactivate form with the action "deactivateForm"\n - reactivate form with the action "activateForm"'}getInputSchema(){return e_}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:"Received an invalid action for the update form tool."}}},class extends $m{constructor(){super(...arguments),this.name="get_form",this.type=g.READ,this.annotations=Cm({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 t_}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(Hw,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 $m{constructor(){super(...arguments),this.name="form_questions_editor",this.type=g.WRITE,this.annotations=Cm({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new kx(this.mondayApi),this.actionHandlers=new Map([[Ax.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Ax.Update,this.helpers.updateQuestion.bind(this.helpers)],[Ax.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Ox}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:`Unknown action: ${e.action}`}}},class extends $m{constructor(){super(...arguments),this.name="create_column",this.type=g.WRITE,this.annotations=Cm({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?i_:n_}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(vw,a);return{content:`Column ${t.create_column?.id} successfully created`}}},class extends $m{constructor(){super(...arguments),this.name="create_group",this.type=g.WRITE,this.annotations=Cm({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 p_}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(s_,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends $m{constructor(){super(...arguments),this.name="delete_column",this.type=g.WRITE,this.annotations=Cm({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?h_:v_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(gw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},kw,class extends $m{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=g.ALL_API,this.annotations=Cm({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 j_}async executeInternal(e){try{const a=await this.mondayApi.request(bw),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,s=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let r="## GraphQL Schema\n";return t&&"read"!==t||(r+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,r+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(r+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,r+=`## Mutation Fields\n${n}\n\n`),r+=`## Available Types\n${s}\n\n`,r+='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:r}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends $m{constructor(){super(...arguments),this.name="get_column_type_info",this.type=g.READ,this.annotations=Cm({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 F_}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(L_,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 $m{constructor(){super(...arguments),this.name="get_type_details",this.type=g.ALL_API,this.annotations=Cm({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 V_}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,rw`
1249
+ `,DT={objectType:e.nativeEnum(pb).describe("The type of object to move"),id:e.string().describe("The ID of the object to move"),position:e.object({object_id:e.string().describe("The ID of the object to position the object relative to"),object_type:e.nativeEnum(pb).describe("The type of object to position the object relative to"),is_after:e.boolean().optional().describe("Whether to position the object after the object")}).optional().describe("The new position of the object. Required if changing the position based on another object."),parentFolderId:e.string().optional().describe("The ID of the new parent folder. Required if moving to a different folder."),workspaceId:e.string().optional().describe("The ID of the workspace containing the object. Required if moving to a different workspace."),accountProductId:e.string().optional().describe("The ID of the account product containing the object. Required if moving to a different account product.")};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 OT=[class extends $m{constructor(){super(...arguments),this.name="delete_item",this.type=g.WRITE,this.annotations=Cm({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return g_}async executeInternal(e){const a={id:e.itemId.toString()},t=await this.mondayApi.request(pw,a);return{content:`Item ${t.delete_item?.id} successfully deleted`}}},class extends $m{constructor(){super(...arguments),this.name="get_board_items_page",this.type=g.READ,this.annotations=Cm({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. 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.[REQUIRED PRECONDITION]: Before using this tool, 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."}getInputSchema(){return C_}parseAndAssignJsonField(e,a,t){if(e[t]&&!e[a])try{e[a]=JSON.parse(e[t])}catch{throw new Error(`${t} is not a valid JSON`)}}async executeInternal(e){const a=!e.cursor;if(a&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch{this.parseAndAssignJsonField(e,"filters","filtersStringified"),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const t={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor,includeColumns:e.includeColumns,columnIds:e.columnIds};this.parseAndAssignJsonField(e,"filters","filtersStringified"),this.parseAndAssignJsonField(e,"orderBy","orderByStringified"),a&&(e.itemIds||e.filters||e.orderBy)&&(t.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(k_,t),n=this.mapResult(i,e);return{content:JSON.stringify(n,null,2)}}rebuildFiltersWithManualSearch(e,a){return(a=(a=a??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:Xg.ContainsText,compareValue:e}),a}mapResult(e,a){const t=e.boards?.[0],i=t?.items_page,n=i?.items||[];return{board:{id:t?.id,name:t?.name},items:n.map((e=>{const t={id:e.id,name:e.name,created_at:e.created_at,updated_at:e.updated_at};return a.includeColumns&&e.column_values&&(t.column_values={},e.column_values.forEach((e=>{if(e.value)try{t.column_values[e.id]=JSON.parse(e.value)}catch{t.column_values[e.id]=e.value}else t.column_values[e.id]=e.text||null}))),t})),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:n.length}}}async getItemIdsFromSmartSearchAsync(e){const a={boardId:e.boardId.toString(),searchTerm:e.searchTerm},t=await this.mondayApi.request(R_,a),i=t.search_items?.results?.map((e=>Number(e.data.id)))??[];if(0===i.length)throw new Error("No items found for search term or new search is not enabled for this account");const n=e.itemIds??[];if(0===n.length)return i;const o=new Set(n);return i.filter((e=>o.has(e)))}},class extends $m{constructor(){super(...arguments),this.name="create_item",this.type=g.WRITE,this.annotations=Cm({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."}getInputSchema(){return this.context?.boardId?c_:m_}async executeInternal(e){const a=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,a):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,a)}async duplicateAndUpdateItem(e,a){try{const t={boardId:a.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(d_,t);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},s=new $w(this.mondayApi,this.apiToken,{boardId:a}),r=await s.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(o)});if(r.content.includes("Error"))throw new Error("Failed to update duplicated item: "+r.content);return{content:`Item ${i.duplicate_item.id} successfully duplicated from ${e.duplicateFromItemId} and updated`}}catch(e){this.rethrowWrapped(e,"duplicate item")}}async createSubitem(e){const a={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const t=await this.mondayApi.request(l_,a);if(!t.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:`Subitem ${t.create_subitem.id} successfully created under parent item ${e.parentItemId}`}}catch(e){this.rethrowWrapped(e,"create subitem")}}async createNewItem(e,a){try{const t={boardId:a.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(dw,t);return{content:`Item ${i.create_item?.id} successfully created`}}catch(e){this.rethrowWrapped(e,"create item")}}rethrowWrapped(e,a){const t=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const t=e;if(t.response?.errors)throw new Error(`Failed to ${a}: ${t.response.errors.map((e=>e.message)).join(", ")}`)}throw new Error(`Failed to ${a}: ${t}`)}},class extends $m{constructor(){super(...arguments),this.name="create_update",this.type=g.WRITE,this.annotations=Cm({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update in a monday.com board"}getInputSchema(){return f_}async executeInternal(e){let a;if(e.mentionsList)try{a=JSON.parse(e.mentionsList)}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e instanceof Error?e.message:"Unknown error"}`)}const t={itemId:e.itemId.toString(),body:e.body,mentionsList:a},i=await this.mondayApi.request(lw,t);return{content:`Update ${i.create_update?.id} successfully created on item ${e.itemId}`}}},class extends $m{constructor(){super(...arguments),this.name="get_board_schema",this.type=g.READ,this.annotations=Cm({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 $_}async executeInternal(e){const a=this.context?.boardId??e.boardId,t={boardId:a.toString()},i=await this.mondayApi.request(cw,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 $m{constructor(){super(...arguments),this.name="get_board_activity",this.type=g.READ,this.annotations=Cm({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 E_}async executeInternal(e){const a=new Date,t=new Date(a.getTime()-T_.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},s=await this.mondayApi.request(y_,o),r=s.boards?.[0]?.activity_logs;if(!r||0===r.length)return{content:`No activity found for board ${e.boardId} in the specified time range (${i} to ${n}).`};const p=r.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} (${r.length} entries):\n\n${p}`}}},class extends $m{constructor(){super(...arguments),this.name="get_board_info",this.type=g.READ,this.annotations=Cm({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration"}getInputSchema(){return O_}async executeInternal(e){const a={boardId:e.boardId.toString()},t=await this.mondayApi.request(I_,a),i=t.boards?.[0];return i?{content:N_(i)}:{content:`Board with id ${e.boardId} not found or you don't have access to it.`}}},class extends $m{constructor(){super(...arguments),this.name="get_users_by_name",this.type=g.READ,this.annotations=Cm({title:"Get Users",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get users, can be filtered by name or partial name"}getInputSchema(){return U_}async executeInternal(e){const a={name:e.name},t=await this.mondayApi.request(mw,a);return{content:`Relevant users:\n ${t.users?.map((e=>` id: ${e?.id}, name: ${e?.name}, title: ${e?.title}`)).join("\n")}`}}},class extends $m{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=g.READ,this.annotations=Cm({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 sT}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,s=!!e.name;if(e.getMe||!1){if(a||t||i||n||o||s)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(aT);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const r={users:[e.me]};return{content:tT(r)}}if(s){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 s={name:e.name},r=await this.mondayApi.request(eT,s);if(!r.users||0===r.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const p=r.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n");return{content:`Found ${r.users.length} user(s) matching "${e.name}":\n\n${p}`}}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>iT)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>nT)return{content:`LIMIT_EXCEEDED: teamIds array too large (${e.teamIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};let r;if(n||!a&&t&&!i)if(o){const a={teamIds:e.teamIds};r=await this.mondayApi.request(Z_,a)}else{const a={teamIds:e.teamIds};r=await this.mondayApi.request(X_,a)}else if(i){const a={userIds:e.userIds,teamIds:e.teamIds,limit:oT};r=await this.mondayApi.request(Q_,a)}else if(a){const a={userIds:e.userIds,limit:oT};r=await this.mondayApi.request(K_,a)}else{const e={userIds:void 0,limit:oT};r=await this.mondayApi.request(J_,e)}return{content:tT(r)}}},$w,class extends $m{constructor(){super(...arguments),this.name="move_item_to_group",this.type=g.WRITE,this.annotations=Cm({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 rT}async executeInternal(e){const a={itemId:e.itemId.toString(),groupId:e.groupId},t=await this.mondayApi.request(fw,a);return{content:`Item ${t.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends $m{constructor(){super(...arguments),this.name="create_board",this.type=g.WRITE,this.annotations=Cm({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Lw}async executeInternal(e){const a={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId},t=await this.mondayApi.request(hw,a);return{content:`Board ${t.create_board?.id} successfully created`}}},class extends $m{constructor(){super(...arguments),this.name="create_form",this.type=g.WRITE,this.annotations=Cm({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 mx}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(Gw,a);return{content:`Form created successfully. Board ID: ${t.create_form?.boardId}, Token: ${t.create_form?.token}`}}},class extends $m{constructor(){super(...arguments),this.name="update_form",this.type=g.WRITE,this.annotations=Cm({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new a_(this.mondayApi),this.actionHandlers=new Map([[Rx.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Rx.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Rx.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Rx.activate,this.helpers.activateForm.bind(this.helpers)],[Rx.createTag,this.helpers.createTag.bind(this.helpers)],[Rx.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Rx.updateTag,this.helpers.updateTag.bind(this.helpers)],[Rx.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Rx.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Rx.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Rx.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Rx.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return'Update a monday.com form. Handles the following form update actions that can only be done one at a time using the correct "action" input: \n - update form\'s feature settings with the action "updateFeatures",\n - update form\'s appearance settings with the action "updateAppearance",\n - update form\'s accessibility settings with the action "updateAccessibility",\n - update form\'s title with the action "updateFormHeader",\n - update form\'s description with the action "updateFormHeader",\n - update form\'s question order with the action "updateQuestionOrder",\n - create a new form tag with the action "createTag",\n - delete a form tag with the action "deleteTag",\n - update a form tag with the action "updateTag",\n - set or update the form\'s password with the action "setFormPassword"\n - shorten form\'s url with the action "shortenFormUrl"\n - deactivate form with the action "deactivateForm"\n - reactivate form with the action "activateForm"'}getInputSchema(){return e_}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:"Received an invalid action for the update form tool."}}},class extends $m{constructor(){super(...arguments),this.name="get_form",this.type=g.READ,this.annotations=Cm({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 t_}async executeInternal(e){const a={formToken:e.formToken},t=await this.mondayApi.request(Hw,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 $m{constructor(){super(...arguments),this.name="form_questions_editor",this.type=g.WRITE,this.annotations=Cm({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new kx(this.mondayApi),this.actionHandlers=new Map([[Ax.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Ax.Update,this.helpers.updateQuestion.bind(this.helpers)],[Ax.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Ox}async executeInternal(e){const a=this.actionHandlers.get(e.action);return a?await a(e):{content:`Unknown action: ${e.action}`}}},class extends $m{constructor(){super(...arguments),this.name="create_column",this.type=g.WRITE,this.annotations=Cm({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?i_:n_}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(vw,a);return{content:`Column ${t.create_column?.id} successfully created`}}},class extends $m{constructor(){super(...arguments),this.name="create_group",this.type=g.WRITE,this.annotations=Cm({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 p_}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(s_,a);return{content:`Group "${t.create_group?.title}" (ID: ${t.create_group?.id}) successfully created`}}},class extends $m{constructor(){super(...arguments),this.name="delete_column",this.type=g.WRITE,this.annotations=Cm({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?h_:v_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},t=await this.mondayApi.request(gw,a);return{content:`Column ${t.delete_column?.id} successfully deleted`}}},kw,class extends $m{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=g.ALL_API,this.annotations=Cm({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 j_}async executeInternal(e){try{const a=await this.mondayApi.request(bw),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,s=o?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>`- ${e.name} (${e.kind||"unknown"})`)).join("\n")||"No types found";let r="## GraphQL Schema\n";return t&&"read"!==t||(r+=`- Query Type: ${a.__schema?.queryType?.name}\n\n`,r+=`## Query Fields\n${i}\n\n`),t&&"write"!==t||(r+=`- Mutation Type: ${a.__schema?.mutationType?.name}\n\n`,r+=`## Mutation Fields\n${n}\n\n`),r+=`## Available Types\n${s}\n\n`,r+='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:r}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends $m{constructor(){super(...arguments),this.name="get_column_type_info",this.type=g.READ,this.annotations=Cm({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 F_}async executeInternal(e){const a={type:e.columnType},t=await this.mondayApi.request(L_,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 $m{constructor(){super(...arguments),this.name="get_type_details",this.type=g.ALL_API,this.annotations=Cm({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 V_}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,rw`
1250
1250
  query getTypeDetails {
1251
1251
  __type(name: "${a}") {
1252
1252
  name