@mondaydotcomorg/agent-toolkit 5.33.0 → 5.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/index.js +1 -1
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.js +172 -172
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.js +1 -1
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.js +172 -172
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.js +1 -1
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/mcp/index.js
CHANGED
|
@@ -482,7 +482,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
482
482
|
name
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
`,Ym=1e3;var Qm,zm;!function(e){e[e.YEAR=31536e3]="YEAR",e[e.MONTH31Days=2678400]="MONTH31Days",e[e.MONTH30Days=2592e3]="MONTH30Days",e[e.MONTH29Days=2505600]="MONTH29Days",e[e.MONTH28Days=2419200]="MONTH28Days",e[e.WEEK=604800]="WEEK",e[e.DAY=86400]="DAY",e[e.HOUR=3600]="HOUR",e[e.MINUTE=60]="MINUTE"}(Qm||(Qm={})),function(e){e[e.YEAR=31536e6]="YEAR",e[e.MONTH31Days=26784e5]="MONTH31Days",e[e.MONTH30Days=2592e6]="MONTH30Days",e[e.MONTH29Days=25056e5]="MONTH29Days",e[e.MONTH28Days=24192e5]="MONTH28Days",e[e.DAY=864e5]="DAY",e[e.HOUR=36e5]="HOUR",e[e.MINUTE=6e4]="MINUTE",e[e.SECOND=Ym]="SECOND"}(zm||(zm={}));const Km=10*zm.SECOND;function Jm(e,t){const a=e?.response?.errors?.map((e=>{const{code:t,error_data:a}=e.extensions??{},i=Object.fromEntries(Object.entries({code:t,error_data:a}).filter((([,e])=>void 0!==e)));return Object.keys(i).length>0?`${e.message} (details: ${JSON.stringify(i)})`:e.message}))?.join(", ");if(a)
|
|
485
|
+
`,Ym=1e3;var Qm,zm;!function(e){e[e.YEAR=31536e3]="YEAR",e[e.MONTH31Days=2678400]="MONTH31Days",e[e.MONTH30Days=2592e3]="MONTH30Days",e[e.MONTH29Days=2505600]="MONTH29Days",e[e.MONTH28Days=2419200]="MONTH28Days",e[e.WEEK=604800]="WEEK",e[e.DAY=86400]="DAY",e[e.HOUR=3600]="HOUR",e[e.MINUTE=60]="MINUTE"}(Qm||(Qm={})),function(e){e[e.YEAR=31536e6]="YEAR",e[e.MONTH31Days=26784e5]="MONTH31Days",e[e.MONTH30Days=2592e6]="MONTH30Days",e[e.MONTH29Days=25056e5]="MONTH29Days",e[e.MONTH28Days=24192e5]="MONTH28Days",e[e.DAY=864e5]="DAY",e[e.HOUR=36e5]="HOUR",e[e.MINUTE=6e4]="MINUTE",e[e.SECOND=Ym]="SECOND"}(zm||(zm={}));const Km=10*zm.SECOND;function Jm(e,t){const a=e?.response?.errors?.map((e=>{const{code:t,error_data:a}=e.extensions??{},i=Object.fromEntries(Object.entries({code:t,error_data:a}).filter((([,e])=>void 0!==e)));return Object.keys(i).length>0?`${e.message} (details: ${JSON.stringify(i)})`:e.message}))?.join(", ");if(a){const i=new Error(`Failed to ${t}: ${a}`);throw i.response=e.response,i}const i=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to ${t}: ${i}`)}function Xm(e){if(e instanceof Error&&"AbortError"===e.name)throw new Error("Search has timed out, try providing alternative search term")}function Zm(e,t){const a=e instanceof Error?e.message:String(e),i=function(e,t){const a=e?.response,i=e instanceof Error?e.message:String(e);if(a?.errors?.length){const e=Object.keys(a.headers||{}).length>0?a.headers:void 0;return{message:i,tool:t?.toolName,...a.extensions??{},status:a.status,headers:e,...null!=a.data?{partial_success:!0}:{},errors:a.errors.map((e=>({message:e.message,path:e.path,...e.extensions??{}})))}}return{message:i,tool:t?.toolName}}(e,{toolName:t?.toolName});return{structuredContent:i,content:[{type:"text",text:`${t?.errorPrefix??"Error: "}${a}`}],isError:!0}}const eu={query:e.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:e.string().describe("JSON string containing the variables for the GraphQL operation")};class tu extends Er{constructor(e,t){super(e,t),this.name="all_monday_api",this.type=Vi.ALL_API,this.annotations=Tr({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return eu}async loadSchema(e){if(tu.schemaCache[e])return tu.schemaCache[e];try{const t=await this.mondayApi.rawRequest(Mm),{data:a}=t,i=Nd(a);return tu.schemaCache[e]=i,i}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,t){var a;return Dd(await this.loadSchema(t),new wn(e,a).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:t,variables:a}=e;let i={};try{i=JSON.parse(a)}catch(e){throw new Error(`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`)}const r=await this.validateOperation(t,this.context?.apiVersion??Xi);if(r.length>0)throw new Error(r.join(", "));try{return{content:await this.mondayApi.request(t,i)}}catch(e){Jm(e,"execute GraphQL operation")}}}tu.schemaCache={};const au={itemId:e.number().describe("The ID of the item to be updated"),columnValues:e.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),createLabelsIfMissing:e.boolean().optional().describe("If true, create missing Status/Dropdown labels when setting those columns. Requires permission to change board structure. Omit or false to only use existing labels.")},iu={boardId:e.number().describe("The ID of the board that contains the item to be updated"),...au};class ru extends Er{constructor(){super(...arguments),this.name="change_item_column_values",this.type=Vi.WRITE,this.annotations=Tr({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. [REQUIRED PRECONDITION]: For board-relation linking tasks, call link_board_items_workflow before using this tool."}getInputSchema(){return this.context?.boardId?au:iu}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues,...void 0!==e.createLabelsIfMissing&&{createLabelsIfMissing:e.createLabelsIfMissing}};let a;try{a=Object.keys(JSON.parse(e.columnValues))}catch(e){throw new Error(`Invalid columnValues JSON: ${e.message}`)}const i=await this.mondayApi.request($m,{...t,columnIds:a}),r=i.change_multiple_column_values?.column_values?.reduce(((e,t)=>(e[t.id]=t.value??null,e)),{});return{content:{message:`Item ${i.change_multiple_column_values?.id} successfully updated`,item_id:i.change_multiple_column_values?.id,item_name:i.change_multiple_column_values?.name,item_url:i.change_multiple_column_values?.url,column_values:r}}}}const nu=Am`
|
|
486
486
|
query GetObjectSchemas($ids: [ID!], $names: [String!], $limit: Int, $page: Int, $excludeCreatedByMonday: Boolean) {
|
|
487
487
|
get_object_schemas(ids: $ids, names: $names, limit: $limit, page: $page, exclude_created_by_monday: $excludeCreatedByMonday) {
|
|
488
488
|
id
|
|
@@ -494,7 +494,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
494
494
|
connected_boards_count
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
`,
|
|
497
|
+
`,ou={ids:e.array(e.string()).optional().describe("List of object schema IDs to retrieve. Mutually exclusive with names."),names:e.array(e.string()).optional().describe("List of object schema names to retrieve. Mutually exclusive with ids."),limit:e.number().optional().describe("Number of results per page. Default 25, max 100."),page:e.number().optional().describe("1-indexed page number. Default 1."),excludeCreatedByMonday:e.boolean().optional().describe("If true, returns only user-created schemas and excludes default monday.com schemas.")};const su=Am`
|
|
498
498
|
mutation CreateObjectSchema($name: String!, $parentId: ID, $description: String) {
|
|
499
499
|
create_object_schema(name: $name, parent_id: $parentId, description: $description) {
|
|
500
500
|
id
|
|
@@ -504,7 +504,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
504
504
|
revision
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
`,
|
|
507
|
+
`,du={name:e.string().describe("A unique human-readable name for this object schema. Must be 3-15 characters, contain only lowercase letters, numbers, and underscores, and include at least one letter."),parentId:e.string().optional().describe("The ID of the parent object schema."),description:e.string().optional().describe("The description for this object schema.")};const pu=Am`
|
|
508
508
|
mutation UpdateObjectSchema($id: ID!, $revision: Int!, $parentId: ID, $description: String) {
|
|
509
509
|
update_object_schema(id: $id, revision: $revision, parent_id: $parentId, description: $description) {
|
|
510
510
|
id
|
|
@@ -514,14 +514,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
514
514
|
revision
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
`,
|
|
517
|
+
`,lu={id:e.string().describe("The ID of the object schema to update."),revision:e.number().describe("The current revision number for optimistic locking. Retrieve it first via get_object_schemas."),parentId:e.string().optional().describe("The ID of the parent object schema."),description:e.string().optional().describe("The new description for this object schema.")};const cu=Am`
|
|
518
518
|
mutation DeleteObjectSchema($id: ID, $name: String) {
|
|
519
519
|
delete_object_schema(id: $id, name: $name) {
|
|
520
520
|
id
|
|
521
521
|
name
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
`,
|
|
524
|
+
`,mu={id:e.string().optional().describe("The ID of the object schema to delete. Either id or name must be provided."),name:e.string().optional().describe("The name of the object schema to delete. Either id or name must be provided.")};const uu=Am`
|
|
525
525
|
mutation DeleteObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columnIds: [ID!]!) {
|
|
526
526
|
delete_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, column_ids: $columnIds) {
|
|
527
527
|
id
|
|
@@ -531,14 +531,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
531
531
|
revision
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
`,
|
|
534
|
+
`,hu={objectSchemaId:e.string().optional().describe("The ID of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:e.string().optional().describe("The name of the object schema to delete columns from. Either objectSchemaId or objectSchemaName must be provided."),columnIds:e.array(e.string()).describe("IDs of the columns to permanently delete. Only allowed when no boards are connected to the schema.")};const fu=Am`
|
|
535
535
|
mutation ConnectBoardToObjectSchema($boardId: ID!, $objectSchemaId: ID, $objectSchemaName: String) {
|
|
536
536
|
connect_board_to_object_schema(board_id: $boardId, object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName) {
|
|
537
537
|
id
|
|
538
538
|
object_schema_id
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
`,
|
|
541
|
+
`,_u=Am`
|
|
542
542
|
mutation DetachBoardsFromObjectSchema($boardIds: [ID!]!) {
|
|
543
543
|
detach_boards_from_object_schema(board_ids: $boardIds) {
|
|
544
544
|
board_id
|
|
@@ -546,7 +546,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
546
546
|
error
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
`,
|
|
549
|
+
`,gu={action:e.enum(["connect","detach"]).describe("The operation to perform. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."),boardId:e.string().optional().describe("Required for action=connect. The ID of the board to connect."),boardIds:e.array(e.string()).optional().describe("Required for action=detach. The IDs of the boards to detach."),objectSchemaId:e.string().optional().describe("Required for action=connect. The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:e.string().optional().describe("Required for action=connect. The name of the object schema. Either objectSchemaId or objectSchemaName must be provided.")};var vu;!function(e){e.Schema="schema",e.Guidelines="guidelines"}(vu||(vu={}));const bu=Am`
|
|
550
550
|
mutation CreateObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columns: [CreateObjectSchemaColumnInput!]!) {
|
|
551
551
|
create_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, columns: $columns) {
|
|
552
552
|
id
|
|
@@ -556,7 +556,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
556
556
|
revision
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
`,
|
|
559
|
+
`,yu=Am`
|
|
560
560
|
mutation UpdateObjectSchemaColumns($objectSchemaId: ID, $objectSchemaName: String, $columns: [UpdateObjectSchemaColumnInput!]!) {
|
|
561
561
|
update_object_schema_columns(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, columns: $columns) {
|
|
562
562
|
id
|
|
@@ -566,7 +566,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
566
566
|
revision
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
`,
|
|
569
|
+
`,wu=e.object({can_override:e.array(e.enum(["title","description","settings"])).optional().describe("Fields that boards can override. Allowed values: title, description, settings."),cannot_delete:e.boolean().optional().describe("If true, the column cannot be deleted from boards.")}).optional().describe("Controls board-level permissions for this column. If omitted, defaults to: no field overrides allowed, column can be deleted by boards."),Iu=e.object({type:e.string().describe(`Column type (e.g. text, status, numbers, date, dropdown, people). Call get_column_type_info with fetchMode "${vu.Schema}" for a type's settings schema.`),title:e.string().describe("Column title."),description:e.string().optional().describe("Column description."),defaults:e.record(e.unknown()).optional().describe(`Type-specific column settings. Call get_column_type_info with fetchMode "${vu.Schema}" before populating this field to understand the valid structure.`),policy:wu,opt_out_by_default:e.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema.")}),Tu=e.object({column_id:e.string().describe("The ID of the column to update."),title:e.string().optional().describe("New column title."),description:e.string().optional().describe("New column description."),defaults:e.record(e.unknown()).optional().describe(`Type-specific column settings. Call get_column_type_info with fetchMode "${vu.Schema}" before populating this field.`),opt_out_by_default:e.boolean().optional().describe("If true, the column will not be automatically added to boards connected to this schema."),policy:wu}),Eu={action:e.enum(["create","update"]).describe(`The operation to perform on columns. create: adds new columns to the schema. Each column requires type and title. Call get_column_type_info with fetchMode "${vu.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to opt a column out (stop auto-adding to boards), or opt_out_by_default=false to opt in (restore auto-adding).`),objectSchemaId:e.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:e.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columns:e.array(e.union([Iu,Tu])).describe("Array of columns to create or update.")};const Su=Am`
|
|
570
570
|
mutation SetObjectSchemaColumnActiveState($objectSchemaId: ID, $objectSchemaName: String, $columnId: ID!, $action: ColumnActiveStateAction!) {
|
|
571
571
|
set_object_schema_column_active_state(object_schema_id: $objectSchemaId, object_schema_name: $objectSchemaName, column_id: $columnId, action: $action) {
|
|
572
572
|
id
|
|
@@ -576,7 +576,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
576
576
|
revision
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
`,
|
|
579
|
+
`,Au={action:e.enum(["deactivate","reactivate"]).describe("The operation to perform on the column. deactivate: soft-disables the column. It is marked inactive but not deleted. Reversible. reactivate: re-enables a previously deactivated column."),objectSchemaId:e.string().optional().describe("The ID of the object schema. Either objectSchemaId or objectSchemaName must be provided."),objectSchemaName:e.string().optional().describe("The name of the object schema. Either objectSchemaId or objectSchemaName must be provided."),columnId:e.string().describe("The ID of the column to deactivate or reactivate.")};const Du={boardName:e.string().describe("The name of the board to create"),boardKind:e.nativeEnum(zd).default(zd.Public).describe("The kind of board to create"),boardDescription:e.string().optional().describe("The description of the board to create"),workspaceId:e.string().optional().describe("The ID of the workspace to create the board in"),boardOwnerIds:e.array(e.string()).optional().describe("Optional list of user IDs to set as board owners")};const Nu=Am`
|
|
580
580
|
mutation createView(
|
|
581
581
|
$boardId: ID!
|
|
582
582
|
$type: ViewKind!
|
|
@@ -598,7 +598,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
598
598
|
type
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
`,
|
|
601
|
+
`,ku={boardId:e.string().describe("The board ID to create the view on"),type:e.nativeEnum(Zl).default(Zl.Table).describe("The type of board view to create. Use TABLE for standard board views."),name:e.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:e.object({rules:e.array(e.object({column_id:e.string().describe("The column ID to filter by"),compare_value:e.any().default([]).describe("The value(s) to compare against"),operator:e.nativeEnum(el).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:e.nativeEnum(Zp).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:e.array(e.object({column_id:e.string().describe("The column ID to sort by"),direction:e.nativeEnum(Xp).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),settings:e.any().optional().describe("Type-specific view settings as a JSON object (e.g. column visibility, group_by for TABLE). The shape varies by view type — call get_view_schema_by_type with the same ViewKind to discover the supported structure. For TABLE views, prefer the dedicated create_view_table tool which exposes a strongly-typed settings field.")};const Ou=Am`
|
|
602
602
|
mutation updateView(
|
|
603
603
|
$viewId: ID!
|
|
604
604
|
$boardId: ID!
|
|
@@ -622,7 +622,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
622
622
|
type
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
`,
|
|
625
|
+
`,Ru={viewId:e.string().describe("The ID of the view to update"),boardId:e.string().describe("The board ID the view belongs to"),type:e.nativeEnum(Zl).default(Zl.Table).describe("The type of the board view being updated. Use TABLE for standard board views."),name:e.string().optional().describe("New name for the view (omit to leave unchanged)"),filter:e.object({rules:e.array(e.object({column_id:e.string().describe("The column ID to filter by"),compare_value:e.any().default([]).describe("The value(s) to compare against"),operator:e.nativeEnum(el).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:e.nativeEnum(Zp).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration to apply to the view"),sort:e.array(e.object({column_id:e.string().describe("The column ID to sort by"),direction:e.nativeEnum(Xp).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),settings:e.any().optional().describe("Type-specific view settings as a JSON object (e.g. column visibility, group_by for TABLE). The shape varies by view type — call get_view_schema_by_type with the same ViewKind to discover the supported structure. For TABLE views, prefer the dedicated update_view_table tool which exposes a strongly-typed settings field.")};const Cu=Am`
|
|
626
626
|
mutation createViewTable(
|
|
627
627
|
$boardId: ID!
|
|
628
628
|
$name: String
|
|
@@ -644,7 +644,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
644
644
|
type
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
`,
|
|
647
|
+
`,Pu=e.object({column_id:e.string().describe("The ID of the column"),visible:e.boolean().describe("Whether the column is visible")}),$u=e.object({columns:e.object({column_properties:e.array(Pu).optional().describe("Visibility configuration for main board columns"),subitems_column_properties:e.array(Pu).optional().describe("Visibility configuration for subitem columns"),floating_columns_count:e.number().int().optional().describe("Number of floating columns to display"),column_order:e.array(e.string()).optional().describe("Ordered list of column IDs")}).optional().describe("Column visibility and order configuration"),group_by:e.object({conditions:e.array(e.object({columnId:e.string().describe("ID of the column to group by"),config:e.object({sortSettings:e.object({direction:e.nativeEnum(Nl).describe("Sort direction (ASC or DESC)"),type:e.string().optional().describe("Type of sorting to apply")}).optional()}).optional()})).describe("Group-by conditions"),hideEmptyGroups:e.boolean().optional().describe("Whether to hide groups with no items")}).optional().describe("Group-by configuration for the table view")}).optional().describe("Table-specific view settings (column visibility/order, group-by)"),xu={boardId:e.string().describe("The board ID to create the table view on"),name:e.string().optional().describe('The name of the view (e.g. "High Priority Items", "My Tasks")'),filter:e.object({rules:e.array(e.object({column_id:e.string().describe("The column ID to filter by"),compare_value:e.any().default([]).describe("The value(s) to compare against"),operator:e.nativeEnum(el).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:e.nativeEnum(Zp).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration for the view"),sort:e.array(e.object({column_id:e.string().describe("The column ID to sort by"),direction:e.nativeEnum(Xp).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),tags:e.array(e.string()).optional().describe("Tags to apply to the view"),settings:$u};const Lu=Am`
|
|
648
648
|
mutation updateViewTable(
|
|
649
649
|
$viewId: ID!
|
|
650
650
|
$boardId: ID!
|
|
@@ -668,7 +668,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
668
668
|
type
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
|
-
`,
|
|
671
|
+
`,Fu=e.object({column_id:e.string().describe("The ID of the column"),visible:e.boolean().describe("Whether the column is visible")}),Uu=e.object({columns:e.object({column_properties:e.array(Fu).optional().describe("Visibility configuration for main board columns"),subitems_column_properties:e.array(Fu).optional().describe("Visibility configuration for subitem columns"),floating_columns_count:e.number().int().optional().describe("Number of floating columns to display"),column_order:e.array(e.string()).optional().describe("Ordered list of column IDs")}).optional().describe("Column visibility and order configuration"),group_by:e.object({conditions:e.array(e.object({columnId:e.string().describe("ID of the column to group by"),config:e.object({sortSettings:e.object({direction:e.nativeEnum(Nl).describe("Sort direction (ASC or DESC)"),type:e.string().optional().describe("Type of sorting to apply")}).optional()}).optional()})).describe("Group-by conditions"),hideEmptyGroups:e.boolean().optional().describe("Whether to hide groups with no items")}).optional().describe("Group-by configuration for the table view")}).optional().describe("Table-specific view settings (column visibility/order, group-by)"),Vu={viewId:e.string().describe("The ID of the table view to update"),boardId:e.string().describe("The board ID the view belongs to"),name:e.string().optional().describe("New name for the view (omit to leave unchanged)"),filter:e.object({rules:e.array(e.object({column_id:e.string().describe("The column ID to filter by"),compare_value:e.any().default([]).describe("The value(s) to compare against"),operator:e.nativeEnum(el).optional().describe("The comparison operator (defaults to any_of)")})).optional().describe("Filter rules"),operator:e.nativeEnum(Zp).optional().describe("Logical operator between rules (defaults to and)")}).optional().describe("Filter configuration to apply to the view"),sort:e.array(e.object({column_id:e.string().describe("The column ID to sort by"),direction:e.nativeEnum(Xp).optional().describe("Sort direction (defaults to asc)")})).optional().describe("Sort configuration for the view"),tags:e.array(e.string()).optional().describe("Tags to apply to the view"),settings:Uu};const ju=Am`
|
|
672
672
|
fragment QuestionBasic on FormQuestion {
|
|
673
673
|
id
|
|
674
674
|
type
|
|
@@ -678,7 +678,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
678
678
|
required
|
|
679
679
|
page_block_id
|
|
680
680
|
}
|
|
681
|
-
`,
|
|
681
|
+
`,Mu=Am`
|
|
682
682
|
fragment QuestionOptions on FormQuestion {
|
|
683
683
|
options {
|
|
684
684
|
label
|
|
@@ -687,7 +687,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
687
687
|
active
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
`,
|
|
690
|
+
`,Bu=Am`
|
|
691
691
|
fragment QuestionSettings on FormQuestion {
|
|
692
692
|
settings {
|
|
693
693
|
prefill {
|
|
@@ -713,17 +713,17 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
713
713
|
default_answer
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
`,
|
|
716
|
+
`,qu=Am`
|
|
717
717
|
fragment QuestionComplete on FormQuestion {
|
|
718
718
|
...QuestionBasic
|
|
719
719
|
...QuestionOptions
|
|
720
720
|
...QuestionSettings
|
|
721
721
|
showIfRules
|
|
722
722
|
}
|
|
723
|
-
${Vu}
|
|
724
723
|
${ju}
|
|
725
724
|
${Mu}
|
|
726
|
-
|
|
725
|
+
${Bu}
|
|
726
|
+
`,Hu=Am`
|
|
727
727
|
fragment FormFeatures on FormFeatures {
|
|
728
728
|
isInternal
|
|
729
729
|
reCaptchaChallenge
|
|
@@ -779,7 +779,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
779
779
|
enabled
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
`,
|
|
782
|
+
`,Gu=Am`
|
|
783
783
|
fragment FormAppearance on FormAppearance {
|
|
784
784
|
hideBranding
|
|
785
785
|
showProgressBar
|
|
@@ -807,19 +807,19 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
807
807
|
text
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
`,
|
|
810
|
+
`,Wu=Am`
|
|
811
811
|
fragment FormAccessibility on FormAccessibility {
|
|
812
812
|
language
|
|
813
813
|
logoAltText
|
|
814
814
|
}
|
|
815
|
-
`,
|
|
815
|
+
`,Yu=Am`
|
|
816
816
|
fragment FormTag on FormTag {
|
|
817
817
|
id
|
|
818
818
|
name
|
|
819
819
|
value
|
|
820
820
|
columnId
|
|
821
821
|
}
|
|
822
|
-
`,
|
|
822
|
+
`,Qu=Am`
|
|
823
823
|
mutation createForm(
|
|
824
824
|
$destination_workspace_id: ID!
|
|
825
825
|
$destination_folder_id: ID
|
|
@@ -846,7 +846,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
846
846
|
token
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
`,
|
|
849
|
+
`,zu=Am`
|
|
850
850
|
query getForm($formToken: String!) {
|
|
851
851
|
form(formToken: $formToken) {
|
|
852
852
|
id
|
|
@@ -875,16 +875,16 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
${Bu}
|
|
879
878
|
${qu}
|
|
880
879
|
${Hu}
|
|
881
880
|
${Gu}
|
|
882
881
|
${Wu}
|
|
883
|
-
|
|
882
|
+
${Yu}
|
|
883
|
+
`,Ku=Am`
|
|
884
884
|
mutation deleteFormQuestion($formToken: String!, $questionId: String!) {
|
|
885
885
|
delete_question(formToken: $formToken, questionId: $questionId)
|
|
886
886
|
}
|
|
887
|
-
`,
|
|
887
|
+
`,Ju=Am`
|
|
888
888
|
mutation createFormQuestion($formToken: String!, $question: CreateQuestionInput!) {
|
|
889
889
|
create_form_question(formToken: $formToken, question: $question) {
|
|
890
890
|
...QuestionBasic
|
|
@@ -892,10 +892,10 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
892
892
|
...QuestionSettings
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
${Vu}
|
|
896
895
|
${ju}
|
|
897
896
|
${Mu}
|
|
898
|
-
|
|
897
|
+
${Bu}
|
|
898
|
+
`,Xu=Am`
|
|
899
899
|
mutation updateFormQuestion($formToken: String!, $questionId: String!, $question: UpdateQuestionInput!) {
|
|
900
900
|
update_form_question(formToken: $formToken, questionId: $questionId, question: $question) {
|
|
901
901
|
...QuestionBasic
|
|
@@ -903,9 +903,9 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
903
903
|
...QuestionSettings
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
${Vu}
|
|
907
906
|
${ju}
|
|
908
907
|
${Mu}
|
|
908
|
+
${Bu}
|
|
909
909
|
`;Am`
|
|
910
910
|
mutation updateForm($formToken: String!, $input: UpdateFormInput!) {
|
|
911
911
|
update_form(formToken: $formToken, input: $input) {
|
|
@@ -930,46 +930,46 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
${qu}
|
|
934
933
|
${Hu}
|
|
935
934
|
${Gu}
|
|
936
|
-
|
|
935
|
+
${Wu}
|
|
936
|
+
`;const Zu=Am`
|
|
937
937
|
mutation setFormPassword($formToken: String!, $input: SetFormPasswordInput!) {
|
|
938
938
|
set_form_password(formToken: $formToken, input: $input) {
|
|
939
939
|
id
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
`,
|
|
942
|
+
`,eh=Am`
|
|
943
943
|
mutation shortenFormUrl($formToken: String!) {
|
|
944
944
|
shorten_form_url(formToken: $formToken) {
|
|
945
945
|
enabled
|
|
946
946
|
url
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
-
`,
|
|
949
|
+
`,th=Am`
|
|
950
950
|
mutation deactivateForm($formToken: String!) {
|
|
951
951
|
deactivate_form(formToken: $formToken)
|
|
952
952
|
}
|
|
953
|
-
`,
|
|
953
|
+
`,ah=Am`
|
|
954
954
|
mutation activateForm($formToken: String!) {
|
|
955
955
|
activate_form(formToken: $formToken)
|
|
956
956
|
}
|
|
957
|
-
`,
|
|
957
|
+
`,ih=Am`
|
|
958
958
|
mutation deleteFormTag($formToken: String!, $tagId: String!) {
|
|
959
959
|
delete_form_tag(formToken: $formToken, tagId: $tagId)
|
|
960
960
|
}
|
|
961
|
-
`,
|
|
961
|
+
`,rh=Am`
|
|
962
962
|
mutation createFormTag($formToken: String!, $tag: CreateFormTagInput!) {
|
|
963
963
|
create_form_tag(formToken: $formToken, tag: $tag) {
|
|
964
964
|
...FormTag
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
|
-
${
|
|
968
|
-
`,
|
|
967
|
+
${Yu}
|
|
968
|
+
`,nh=Am`
|
|
969
969
|
mutation updateFormTag($formToken: String!, $tagId: String!, $tag: UpdateFormTagInput!) {
|
|
970
970
|
update_form_tag(formToken: $formToken, tagId: $tagId, tag: $tag)
|
|
971
971
|
}
|
|
972
|
-
`,
|
|
972
|
+
`,oh=Am`
|
|
973
973
|
mutation updateFormAppearance($formToken: String!, $appearance: FormAppearanceInput!) {
|
|
974
974
|
update_form_settings(formToken: $formToken, settings: { appearance: $appearance }) {
|
|
975
975
|
appearance {
|
|
@@ -977,8 +977,8 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
${
|
|
981
|
-
`,
|
|
980
|
+
${Gu}
|
|
981
|
+
`,sh=Am`
|
|
982
982
|
mutation updateFormAccessibility($formToken: String!, $accessibility: FormAccessibilityInput!) {
|
|
983
983
|
update_form_settings(formToken: $formToken, settings: { accessibility: $accessibility }) {
|
|
984
984
|
accessibility {
|
|
@@ -986,8 +986,8 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
|
-
${
|
|
990
|
-
`,
|
|
989
|
+
${Wu}
|
|
990
|
+
`,dh=Am`
|
|
991
991
|
mutation updateFormFeatures($formToken: String!, $features: FormFeaturesInput!, $is_anonymous: Boolean) {
|
|
992
992
|
update_form_settings(formToken: $formToken, settings: { features: $features, is_anonymous: $is_anonymous }) {
|
|
993
993
|
features {
|
|
@@ -995,8 +995,8 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
|
-
${
|
|
999
|
-
`,
|
|
998
|
+
${Hu}
|
|
999
|
+
`,ph=Am`
|
|
1000
1000
|
mutation updateFormQuestionOrder($formToken: String!, $questions: [QuestionOrderInput!]!) {
|
|
1001
1001
|
update_form(formToken: $formToken, input: { questions: $questions }) {
|
|
1002
1002
|
questions {
|
|
@@ -1005,14 +1005,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
|
-
`,
|
|
1008
|
+
`,lh=Am`
|
|
1009
1009
|
mutation updateFormHeader($formToken: String!, $title: String, $description: String) {
|
|
1010
1010
|
update_form(formToken: $formToken, input: { title: $title, description: $description }) {
|
|
1011
1011
|
title
|
|
1012
1012
|
description
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
`,lh={questionId:"Question ID. Required for update/delete."},ch={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Hides submitter identity.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"Required for update/delete. Auto-generated.",name:"Required for create. Cannot be updated.",value:"Required for create/update.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/update/delete. Delete: id only. Create: name+value (id/columnId auto-generated). Update: id+new value.",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},mh={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:"Required for setFormPassword action.",shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{passwordEnabled:"Can only be set to false. Use setFormPassword to enable.",closeDateValue:"ISO timestamp.",includeNameQuestion:"Adds name column as a form question.",includeUpdateQuestion:"Adds updates/comments field linked to the board item.",syncQuestionAndColumnsTitles:"Syncs question titles with board column names.",allowCreateItem:"Shows 'Create Item' button on the board to open this form.",backgroundValue:"Hex color or image URL (depends on type).",logoSize:"Logo size for the form header.",language:"Form locale, e.g. 'en', 'es', 'fr'."},inputs:{settings:"Complete form settings object containing all configuration options.",features:"Form features configuration including security, limits, and access controls.",appearance:"Visual styling configuration including colors, layout, and branding.",accessibility:"Accessibility configuration including language and reading direction.",password:"Password configuration for the form. Only setting enabled to false is supported. To enable a form to be password protected, please use the set_form_password mutation instead.",passwordValue:"The password to set for the form. Must be at least 1 character long."}},uh={actions:{type:"Action to perform on the question of a form. create requires question. update requires questionId and question with type always included. delete requires questionId.",question:"The question to create or update. Always include type, then only the fields you want to set or change."},properties:{title:"Question text. Required when creating.",type:"Question type. Always required. Cannot be changed after creation — always send the existing type when updating.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Help text shown under the question.",placeholder:"Optional placeholder text shown in input fields to guide user input.",createdAt:"ISO timestamp when the question was created.",updatedAt:"ISO timestamp when the question was last modified.",selectOptions:"Options for select questions. Always include all options — omitting an existing option will delete it. To update safely, call get_form first to retrieve existing option values, then include all options you want to keep with their original value fields.",selectOptionsValue:"Unique identifier for the option. If this option was used in existing submissions, it must keep its original value to preserve data integrity.",blockType:"The kind of block to create. Includes all question types and content block types.",insertAfterQuestionId:"ID to insert after. Omit to append. Null for first position.",pageBlockId:"Page block ID to group this question within. Set to null to remove from page block. Omit to leave unchanged."},showIfRules:"Conditional visibility. All operators must be OR.",showIfConditionBuildingBlockId:"Question ID to evaluate.",showIfConditionValues:"Answer values that satisfy the condition.",inputs:{question:"Complete question object containing all properties for creation or update.",questionData:"Question configuration including type, title, and type-specific settings.",position:"Integer position where the question should be placed in the form sequence."}},hh={properties:{validation:"Validation rules applied to the question response",prefill:"Auto-populates from account data or URL query params.",prefillLookup:"Field name (e.g. 'email') or URL param name.",prefixAutofilled:"Phone only. Auto-detects country prefix.",prefixPredefined:"Phone only. Sets a default country prefix.",prefixPredefinedPrefix:"Country code, e.g. 'US', 'IL'.",checkedByDefault:"Boolean question type only.",defaultCurrentDate:"Date question type only.",includeTime:"Date only. Adds time picker.",display:"SingleSelect/MultiSelect only.",optionsOrder:"SingleSelect/MultiSelect only.",locationAutofilled:"Location only. Auto-fills current location.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link only. Skips URL format validation.",labelLimitCount:"MultiSelect only. Max selections. Pair with labelLimitCountEnabled.",labelLimitCountEnabled:"MultiSelect only. Enables selection limit.",defaultAnswer:"ShortText/LongText/Name/Link only. Pre-filled default value."},inputs:{settings:"Question-specific configuration object that varies by question type.",validationRules:"Validation constraints and rules",choiceOptions:"List of available choices for selection questions",fileSettings:"File upload constraints and settings"}},fh={destination_workspace_id:e.string(),destination_folder_id:e.string().optional(),destination_folder_name:e.string().optional(),board_kind:e.nativeEnum(zd).optional(),destination_name:e.string().optional().describe(ch.args.destinationName),board_owner_ids:e.array(e.string()).optional(),board_owner_team_ids:e.array(e.string()).optional(),board_subscriber_ids:e.array(e.string()).optional().describe(ch.args.boardSubscriberIds),board_subscriber_teams_ids:e.array(e.string()).optional().describe(ch.args.boardSubscriberTeamsIds)};var _h,gh,vh,bh,yh,wh,Ih,Th,Eh,Sh,Ah,Dh,Nh,kh,Oh,Rh;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(_h||(_h={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(gh||(gh={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(vh||(vh={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(bh||(bh={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(yh||(yh={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(wh||(wh={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Ih||(Ih={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Th||(Th={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(Eh||(Eh={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Sh||(Sh={})),function(e){e.Email="email",e.Name="name",e.Title="title",e.Phone="phone",e.FirstName="first_name",e.LastName="last_name",e.Location="location",e.Timezone="time_zone",e.ManagerName="manager_display_name"}(Ah||(Ah={})),(Dh||(Dh={})).Or="OR",function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(Nh||(Nh={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(kh||(kh={})),function(e){e.MultiSelect="multi-select",e.SingleSelect="single-select",e.People="people",e.Location="location",e.CountryCode="country-code",e.Country="country",e.ConnectedBoards="connected_boards"}(Oh||(Oh={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(Rh||(Rh={}));const Ch=e.object({type:e.nativeEnum(Wp).describe(uh.properties.type),title:e.string().describe(uh.properties.title).optional(),description:e.string().describe(uh.properties.description).optional(),visible:e.boolean().optional(),required:e.boolean().optional(),insert_after_question_id:e.string().nullish().describe(uh.properties.insertAfterQuestionId),page_block_id:e.string().nullish().describe(uh.properties.pageBlockId),show_if_rules:e.object({operator:e.nativeEnum(mp),rules:e.array(e.object({operator:e.nativeEnum(mp),conditions:e.array(e.object({building_block_id:e.string().describe(uh.showIfConditionBuildingBlockId),operator:e.nativeEnum(mp),values:e.array(e.string()).describe(uh.showIfConditionValues)}))}))}).describe(uh.showIfRules).optional(),options:e.array(e.object({label:e.string(),value:e.string().optional().describe(uh.properties.selectOptionsValue),visible:e.boolean().optional()})).describe(uh.properties.selectOptions).optional(),settings:e.object({checkedByDefault:e.boolean().describe(hh.properties.checkedByDefault).optional(),defaultCurrentDate:e.boolean().describe(hh.properties.defaultCurrentDate).optional(),display:e.nativeEnum(Hp).describe(hh.properties.display).optional(),includeTime:e.boolean().describe(hh.properties.includeTime).optional(),locationAutofilled:e.boolean().describe(hh.properties.locationAutofilled).optional(),optionsOrder:e.nativeEnum(Gp).describe(hh.properties.optionsOrder).optional(),prefixAutofilled:e.boolean().describe(hh.properties.prefixAutofilled).optional(),prefixPredefined:e.object({enabled:e.boolean(),prefix:e.string().describe(hh.properties.prefixPredefinedPrefix).optional()}).describe(hh.properties.prefixPredefined).optional(),skipValidation:e.boolean().describe(hh.properties.skipValidation).optional(),labelLimitCount:e.number().int().describe(hh.properties.labelLimitCount).optional(),label_limit_count_enabled:e.boolean().describe(hh.properties.labelLimitCountEnabled).optional(),default_answer:e.string().describe(hh.properties.defaultAnswer).optional(),prefill:e.object({enabled:e.boolean(),lookup:e.string().describe(hh.properties.prefillLookup).optional(),source:e.nativeEnum(qp).optional()}).describe(hh.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),Ph={action:e.nativeEnum(Rh).describe(uh.actions.type),formToken:e.string(),questionId:e.string().describe(lh.questionId).optional(),question:Ch.describe(uh.actions.question).optional()};class $h{constructor(e){this.mondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.mondayApi.request(zu,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.mondayApi.request(Ju,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.mondayApi.request(Ku,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var xh;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateTag="updateTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(xh||(xh={}));const Lh=e.object({id:e.string().describe(ch.properties.tags.id).optional(),name:e.string().describe(ch.properties.tags.name).optional(),value:e.string().describe(ch.properties.tags.value).optional(),columnId:e.string().describe(ch.properties.tags.columnId).optional()}),Fh=e.object({type:e.nativeEnum(bh).optional(),value:e.string().describe(mh.properties.backgroundValue).optional()}),Uh=e.object({format:e.nativeEnum(wh).optional(),alignment:e.nativeEnum(Ih).optional(),direction:e.nativeEnum(yh).optional()}),Vh=e.object({position:e.nativeEnum(vh).optional(),size:e.nativeEnum(gh).describe(mh.properties.logoSize).optional()}),jh=e.object({text:e.string().optional()}),Mh=e.object({font:e.string().optional(),color:e.string().optional(),size:e.nativeEnum(Th).optional()}),Bh=e.object({enabled:e.boolean().optional(),redirectUrl:e.string().optional()}),qh=e.object({allowEditSubmission:e.boolean().optional(),allowResubmit:e.boolean().optional(),allowViewSubmission:e.boolean().optional(),description:e.string().optional(),redirectAfterSubmission:Bh.optional(),showSuccessImage:e.boolean().optional(),title:e.string().optional()}),Hh=e.object({enabled:e.boolean().optional(),date:e.string().describe(mh.properties.closeDateValue).optional()}),Gh=e.object({enabled:e.boolean().optional()}),Wh=e.object({itemGroupId:e.string().optional(),includeNameQuestion:e.boolean().describe(mh.properties.includeNameQuestion).optional(),includeUpdateQuestion:e.boolean().describe(mh.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:e.boolean().describe(mh.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:e.boolean().describe(mh.properties.allowCreateItem).optional()}),Yh=e.object({enabled:e.boolean().describe(mh.properties.passwordEnabled).optional()}),Qh=e.object({text:e.string().optional()}),zh=e.object({enabled:e.boolean().optional(),title:e.string().optional(),description:e.string().optional(),startButton:Qh.optional()}),Kh=e.object({enabled:e.boolean().optional(),redirectToLogin:e.boolean().optional()}),Jh=e.object({enabled:e.boolean().optional(),limit:e.number().optional()}),Xh=e.object({background:Fh.optional(),hideBranding:e.boolean().optional(),layout:Uh.optional(),logo:Vh.optional(),primaryColor:e.string().optional(),showProgressBar:e.boolean().optional(),submitButton:jh.optional(),text:Mh.optional()}),Zh=e.object({language:e.string().describe(mh.properties.language).optional(),logoAltText:e.string().optional()}),ef=e.object({enabled:e.boolean().optional()}),tf=e.object({afterSubmissionView:qh.optional(),ai_translate:ef.optional(),closeDate:Hh.optional(),draftSubmission:Gh.optional(),monday:Wh.optional(),password:Yh.optional(),preSubmissionView:zh.optional(),reCaptchaChallenge:e.boolean().optional(),requireLogin:Kh.optional(),responseLimit:Jh.optional(),is_anonymous:e.boolean().describe(ch.properties.isAnonymous).optional()}),af=e.object({id:e.string().describe(ch.inputs.questionId),page_block_id:e.string().describe(uh.properties.pageBlockId).optional()}),rf=e.object({appearance:Xh.describe(ch.inputs.form.appearance).optional(),accessibility:Zh.describe(ch.inputs.form.accessibility).optional(),features:tf.describe(ch.inputs.form.features).optional(),title:e.string().describe(ch.inputs.title).optional(),description:e.string().describe(ch.inputs.description).optional(),questions:e.array(af).describe(ch.inputs.questions).optional()}),nf={formToken:e.string(),action:e.nativeEnum(xh).describe(ch.operations.updateForm.action),formPassword:e.string().describe(mh.operations.setFormPassword).optional(),tag:Lh.describe(ch.inputs.tag).optional(),form:rf.describe(ch.inputs.form.describe).optional()};class of{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(Xu,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.mondayApi.request(Zu,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(eh,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(th,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const t={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},a=await this.mondayApi.request(ih,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(ah,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(rh,t)).update_form_tag?{content:{message:"Tag updated",form_token:e.formToken,tag_id:e.tag.id,action_name:"updateTag"}}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.mondayApi.request(nh,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.mondayApi.request(oh,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},r=await this.mondayApi.request(sh,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:r.update_form_settings?.features}}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const t={formToken:e.formToken,questions:e.form.questions},a=await this.mondayApi.request(dh,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.mondayApi.request(ph,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const sf={formToken:e.string()};const df=Am`
|
|
1015
|
+
`,ch={questionId:"Question ID. Required for update/delete."},mh={operations:{createForm:"Create a new form with specified configuration. Returns the created form with its unique token.",updateForm:{action:"Action to execute on the form. Each action requires different fields — check field descriptions to know what to include."},activateForm:"Activate a form to make it visible to users and accept new submissions.",deactivateForm:"Deactivate a form to hide it from users and stop accepting submissions. Form data is preserved."},properties:{id:"The unique identifier for the form. Auto-generated upon creation.",token:"The unique token used to access and identify the form. Used in public URLs and API calls.",boardId:"The board ID connected to the form. Used to store form responses as items.",title:"The display title shown to users at the top of the form.",description:"Optional detailed description explaining the form purpose, displayed below the title.",active:"Boolean indicating if the form is currently accepting responses and visible to users.",ownerId:"The ID of the user who created and owns this form. Determines permissions.",createWithAI:"Boolean indicating if this form was initially created using AI assistance.",builtWithAI:"Boolean indicating if this form was built or modified using AI functionality.",questions:"Array of question objects that make up the form content, in display order.",isSuspicious:"Boolean flag indicating if the form has been flagged for review due to suspicious content or activity.",isAnonymous:"Hides submitter identity.",type:"The category or classification of the form for organizational purposes.",features:"Object containing feature toggles and settings like password protection, response limits, etc.",appearance:"Object containing visual styling settings including colors, fonts, layout, and branding.",accessibility:"Object containing accessibility settings such as language, alt text, and reading direction.",tags:{description:"Array of tracking tags for categorization and analytics (e.g., UTM parameters for marketing tracking).",id:"Required for update/delete. Auto-generated.",name:"Required for create. Cannot be updated.",value:"Required for create/update.",columnId:"Auto-generated. Cannot be updated."}},inputs:{title:"Required for updateFormHeader.",description:"Required for updateFormHeader.",input:"Complete form configuration object containing properties to create or update.",questions:"All question IDs in order. Must include every existing ID. Required for updateQuestionOrder.",questionId:"Question ID. Required for update/delete.",tag:"Tag to create/update/delete. Delete: id only. Create: name+value (id/columnId auto-generated). Update: id+new value.",form:{describe:"Form data to update (patch semantics).",appearance:"Patch. Required for updateAppearance.",accessibility:"Patch. Required for updateAccessibility.",features:"Patch. Required for updateFeatures.",questionOrder:"Patch. Required for updateQuestionOrder.",formHeader:"Patch. Required for updateFormHeader."}},args:{destinationName:"Board name (stores form responses).",boardSubscriberIds:"User IDs to notify on board activity.",boardSubscriberTeamsIds:"Team IDs to notify on board activity."}},uh={operations:{updateFormSettings:"Update form configuration including features, appearance, and accessibility options.",setFormPassword:"Required for setFormPassword action.",shortenUrl:"Shorten a URL for a form and store it in the form settings. Returns the shortened link object."},properties:{passwordEnabled:"Can only be set to false. Use setFormPassword to enable.",closeDateValue:"ISO timestamp.",includeNameQuestion:"Adds name column as a form question.",includeUpdateQuestion:"Adds updates/comments field linked to the board item.",syncQuestionAndColumnsTitles:"Syncs question titles with board column names.",allowCreateItem:"Shows 'Create Item' button on the board to open this form.",backgroundValue:"Hex color or image URL (depends on type).",logoSize:"Logo size for the form header.",language:"Form locale, e.g. 'en', 'es', 'fr'."},inputs:{settings:"Complete form settings object containing all configuration options.",features:"Form features configuration including security, limits, and access controls.",appearance:"Visual styling configuration including colors, layout, and branding.",accessibility:"Accessibility configuration including language and reading direction.",password:"Password configuration for the form. Only setting enabled to false is supported. To enable a form to be password protected, please use the set_form_password mutation instead.",passwordValue:"The password to set for the form. Must be at least 1 character long."}},hh={actions:{type:"Action to perform on the question of a form. create requires question. update requires questionId and question with type always included. delete requires questionId.",question:"The question to create or update. Always include type, then only the fields you want to set or change."},properties:{title:"Question text. Required when creating.",type:"Question type. Always required. Cannot be changed after creation — always send the existing type when updating.",position:"Integer specifying the display order of the question within the form (zero-based).",description:"Help text shown under the question.",placeholder:"Optional placeholder text shown in input fields to guide user input.",createdAt:"ISO timestamp when the question was created.",updatedAt:"ISO timestamp when the question was last modified.",selectOptions:"Options for select questions. Always include all options — omitting an existing option will delete it. To update safely, call get_form first to retrieve existing option values, then include all options you want to keep with their original value fields.",selectOptionsValue:"Unique identifier for the option. If this option was used in existing submissions, it must keep its original value to preserve data integrity.",blockType:"The kind of block to create. Includes all question types and content block types.",insertAfterQuestionId:"ID to insert after. Omit to append. Null for first position.",pageBlockId:"Page block ID to group this question within. Set to null to remove from page block. Omit to leave unchanged."},showIfRules:"Conditional visibility. All operators must be OR.",showIfConditionBuildingBlockId:"Question ID to evaluate.",showIfConditionValues:"Answer values that satisfy the condition.",inputs:{question:"Complete question object containing all properties for creation or update.",questionData:"Question configuration including type, title, and type-specific settings.",position:"Integer position where the question should be placed in the form sequence."}},fh={properties:{validation:"Validation rules applied to the question response",prefill:"Auto-populates from account data or URL query params.",prefillLookup:"Field name (e.g. 'email') or URL param name.",prefixAutofilled:"Phone only. Auto-detects country prefix.",prefixPredefined:"Phone only. Sets a default country prefix.",prefixPredefinedPrefix:"Country code, e.g. 'US', 'IL'.",checkedByDefault:"Boolean question type only.",defaultCurrentDate:"Date question type only.",includeTime:"Date only. Adds time picker.",display:"SingleSelect/MultiSelect only.",optionsOrder:"SingleSelect/MultiSelect only.",locationAutofilled:"Location only. Auto-fills current location.",limit:"Rating questions only: Maximum rating value that users can select.",skipValidation:"Link only. Skips URL format validation.",labelLimitCount:"MultiSelect only. Max selections. Pair with labelLimitCountEnabled.",labelLimitCountEnabled:"MultiSelect only. Enables selection limit.",defaultAnswer:"ShortText/LongText/Name/Link only. Pre-filled default value."},inputs:{settings:"Question-specific configuration object that varies by question type.",validationRules:"Validation constraints and rules",choiceOptions:"List of available choices for selection questions",fileSettings:"File upload constraints and settings"}},_h={destination_workspace_id:e.string(),destination_folder_id:e.string().optional(),destination_folder_name:e.string().optional(),board_kind:e.nativeEnum(zd).optional(),destination_name:e.string().optional().describe(mh.args.destinationName),board_owner_ids:e.array(e.string()).optional(),board_owner_team_ids:e.array(e.string()).optional(),board_subscriber_ids:e.array(e.string()).optional().describe(mh.args.boardSubscriberIds),board_subscriber_teams_ids:e.array(e.string()).optional().describe(mh.args.boardSubscriberTeamsIds)};var gh,vh,bh,yh,wh,Ih,Th,Eh,Sh,Ah,Dh,Nh,kh,Oh,Rh,Ch;!function(e){e.Internal="internal",e.InlineInternal="inline_internal",e.Preview="preview",e.Standard="standard",e.EnforcedItemCreationForm="enforced_item_creation_form"}(gh||(gh={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.ExtraLarge="ExtraLarge"}(vh||(vh={})),function(e){e.Auto="Auto",e.Left="Left",e.Center="Center",e.Right="Right"}(bh||(bh={})),function(e){e.Image="Image",e.Color="Color",e.None="None"}(yh||(yh={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(wh||(wh={})),function(e){e.OneByOne="OneByOne",e.Classic="Classic"}(Ih||(Ih={})),function(e){e.FullLeft="FullLeft",e.Left="Left",e.Center="Center",e.Right="Right",e.FullRight="FullRight"}(Th||(Th={})),function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"}(Eh||(Eh={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(Sh||(Sh={})),function(e){e.Account="account",e.QueryParam="queryParam"}(Ah||(Ah={})),function(e){e.Email="email",e.Name="name",e.Title="title",e.Phone="phone",e.FirstName="first_name",e.LastName="last_name",e.Location="location",e.Timezone="time_zone",e.ManagerName="manager_display_name"}(Dh||(Dh={})),(Nh||(Nh={})).Or="OR",function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Dropdown="dropdown"}(kh||(kh={})),function(e){e.Alphabetical="alphabetical",e.Random="random",e.Custom="custom"}(Oh||(Oh={})),function(e){e.MultiSelect="multi-select",e.SingleSelect="single-select",e.People="people",e.Location="location",e.CountryCode="country-code",e.Country="country",e.ConnectedBoards="connected_boards"}(Rh||(Rh={})),function(e){e.Delete="delete",e.Update="update",e.Create="create"}(Ch||(Ch={}));const Ph=e.object({type:e.nativeEnum(Wp).describe(hh.properties.type),title:e.string().describe(hh.properties.title).optional(),description:e.string().describe(hh.properties.description).optional(),visible:e.boolean().optional(),required:e.boolean().optional(),insert_after_question_id:e.string().nullish().describe(hh.properties.insertAfterQuestionId),page_block_id:e.string().nullish().describe(hh.properties.pageBlockId),show_if_rules:e.object({operator:e.nativeEnum(mp),rules:e.array(e.object({operator:e.nativeEnum(mp),conditions:e.array(e.object({building_block_id:e.string().describe(hh.showIfConditionBuildingBlockId),operator:e.nativeEnum(mp),values:e.array(e.string()).describe(hh.showIfConditionValues)}))}))}).describe(hh.showIfRules).optional(),options:e.array(e.object({label:e.string(),value:e.string().optional().describe(hh.properties.selectOptionsValue),visible:e.boolean().optional()})).describe(hh.properties.selectOptions).optional(),settings:e.object({checkedByDefault:e.boolean().describe(fh.properties.checkedByDefault).optional(),defaultCurrentDate:e.boolean().describe(fh.properties.defaultCurrentDate).optional(),display:e.nativeEnum(Hp).describe(fh.properties.display).optional(),includeTime:e.boolean().describe(fh.properties.includeTime).optional(),locationAutofilled:e.boolean().describe(fh.properties.locationAutofilled).optional(),optionsOrder:e.nativeEnum(Gp).describe(fh.properties.optionsOrder).optional(),prefixAutofilled:e.boolean().describe(fh.properties.prefixAutofilled).optional(),prefixPredefined:e.object({enabled:e.boolean(),prefix:e.string().describe(fh.properties.prefixPredefinedPrefix).optional()}).describe(fh.properties.prefixPredefined).optional(),skipValidation:e.boolean().describe(fh.properties.skipValidation).optional(),labelLimitCount:e.number().int().describe(fh.properties.labelLimitCount).optional(),label_limit_count_enabled:e.boolean().describe(fh.properties.labelLimitCountEnabled).optional(),default_answer:e.string().describe(fh.properties.defaultAnswer).optional(),prefill:e.object({enabled:e.boolean(),lookup:e.string().describe(fh.properties.prefillLookup).optional(),source:e.nativeEnum(qp).optional()}).describe(fh.properties.prefill).optional()}).describe("Type-specific question settings. Check each field description to see which question type it applies to.").optional()}),$h={action:e.nativeEnum(Ch).describe(hh.actions.type),formToken:e.string(),questionId:e.string().describe(ch.questionId).optional(),question:Ph.describe(hh.actions.question).optional()};class xh{constructor(e){this.mondayApi=e}async deleteQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when deleting a question."};const a={formToken:e.formToken,questionId:t};return await this.mondayApi.request(Ku,a),{content:{message:"Question deleted",question_id:t,action_name:"delete"}}}async updateQuestion(e){const t=e.questionId;if(!t)return{content:"Question ID is required when updating a question."};const a=e.question;if(!a)return{content:"Must provide updated patch props for the question when updating."};const i={formToken:e.formToken,questionId:t,question:a};return await this.mondayApi.request(Xu,i),{content:{message:"Question updated",question_id:t,action_name:"update"}}}async createQuestion(e){const t=e.question;if(!t)return{content:"Must provide a full question payload when creating a question."};if(!t.title)return{content:"Must provide a title for the question when creating a question."};const a={formToken:e.formToken,question:{...t,title:t.title}},i=await this.mondayApi.request(Ju,a);return{content:{message:"Question created",question_id:i.create_form_question?.id,action_name:"create"}}}}var Lh;!function(e){e.activate="activate",e.deactivate="deactivate",e.shortenFormUrl="shortenFormUrl",e.setFormPassword="setFormPassword",e.createTag="createTag",e.deleteTag="deleteTag",e.updateTag="updateTag",e.updateAppearance="updateAppearance",e.updateAccessibility="updateAccessibility",e.updateFeatures="updateFeatures",e.updateQuestionOrder="updateQuestionOrder",e.updateFormHeader="updateFormHeader"}(Lh||(Lh={}));const Fh=e.object({id:e.string().describe(mh.properties.tags.id).optional(),name:e.string().describe(mh.properties.tags.name).optional(),value:e.string().describe(mh.properties.tags.value).optional(),columnId:e.string().describe(mh.properties.tags.columnId).optional()}),Uh=e.object({type:e.nativeEnum(yh).optional(),value:e.string().describe(uh.properties.backgroundValue).optional()}),Vh=e.object({format:e.nativeEnum(Ih).optional(),alignment:e.nativeEnum(Th).optional(),direction:e.nativeEnum(wh).optional()}),jh=e.object({position:e.nativeEnum(bh).optional(),size:e.nativeEnum(vh).describe(uh.properties.logoSize).optional()}),Mh=e.object({text:e.string().optional()}),Bh=e.object({font:e.string().optional(),color:e.string().optional(),size:e.nativeEnum(Eh).optional()}),qh=e.object({enabled:e.boolean().optional(),redirectUrl:e.string().optional()}),Hh=e.object({allowEditSubmission:e.boolean().optional(),allowResubmit:e.boolean().optional(),allowViewSubmission:e.boolean().optional(),description:e.string().optional(),redirectAfterSubmission:qh.optional(),showSuccessImage:e.boolean().optional(),title:e.string().optional()}),Gh=e.object({enabled:e.boolean().optional(),date:e.string().describe(uh.properties.closeDateValue).optional()}),Wh=e.object({enabled:e.boolean().optional()}),Yh=e.object({itemGroupId:e.string().optional(),includeNameQuestion:e.boolean().describe(uh.properties.includeNameQuestion).optional(),includeUpdateQuestion:e.boolean().describe(uh.properties.includeUpdateQuestion).optional(),syncQuestionAndColumnsTitles:e.boolean().describe(uh.properties.syncQuestionAndColumnsTitles).optional(),allow_create_item:e.boolean().describe(uh.properties.allowCreateItem).optional()}),Qh=e.object({enabled:e.boolean().describe(uh.properties.passwordEnabled).optional()}),zh=e.object({text:e.string().optional()}),Kh=e.object({enabled:e.boolean().optional(),title:e.string().optional(),description:e.string().optional(),startButton:zh.optional()}),Jh=e.object({enabled:e.boolean().optional(),redirectToLogin:e.boolean().optional()}),Xh=e.object({enabled:e.boolean().optional(),limit:e.number().optional()}),Zh=e.object({background:Uh.optional(),hideBranding:e.boolean().optional(),layout:Vh.optional(),logo:jh.optional(),primaryColor:e.string().optional(),showProgressBar:e.boolean().optional(),submitButton:Mh.optional(),text:Bh.optional()}),ef=e.object({language:e.string().describe(uh.properties.language).optional(),logoAltText:e.string().optional()}),tf=e.object({enabled:e.boolean().optional()}),af=e.object({afterSubmissionView:Hh.optional(),ai_translate:tf.optional(),closeDate:Gh.optional(),draftSubmission:Wh.optional(),monday:Yh.optional(),password:Qh.optional(),preSubmissionView:Kh.optional(),reCaptchaChallenge:e.boolean().optional(),requireLogin:Jh.optional(),responseLimit:Xh.optional(),is_anonymous:e.boolean().describe(mh.properties.isAnonymous).optional()}),rf=e.object({id:e.string().describe(mh.inputs.questionId),page_block_id:e.string().describe(hh.properties.pageBlockId).optional()}),nf=e.object({appearance:Zh.describe(mh.inputs.form.appearance).optional(),accessibility:ef.describe(mh.inputs.form.accessibility).optional(),features:af.describe(mh.inputs.form.features).optional(),title:e.string().describe(mh.inputs.title).optional(),description:e.string().describe(mh.inputs.description).optional(),questions:e.array(rf).describe(mh.inputs.questions).optional()}),of={formToken:e.string(),action:e.nativeEnum(Lh).describe(mh.operations.updateForm.action),formPassword:e.string().describe(uh.operations.setFormPassword).optional(),tag:Fh.describe(mh.inputs.tag).optional(),form:nf.describe(mh.inputs.form.describe).optional()};class sf{constructor(e){this.mondayApi=e}async setFormPassword(e){if(!e.formPassword)return{content:'formPassword is required for the action "setFormPassword" in the update form tool.'};const t={formToken:e.formToken,input:{password:e.formPassword}};return await this.mondayApi.request(Zu,t),{content:{message:"Form password successfully set",form_token:e.formToken,action_name:"setFormPassword"}}}async shortenFormUrl(e){const t={formToken:e.formToken};return await this.mondayApi.request(eh,t),{content:{message:"Form URL successfully shortened",form_token:e.formToken,action_name:"shortenFormUrl"}}}async deactivateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(th,t),{content:{message:"Form successfully deactivated",form_token:e.formToken,action_name:"deactivateForm"}}}async activateForm(e){const t={formToken:e.formToken};return await this.mondayApi.request(ah,t),{content:{message:"Form successfully activated",form_token:e.formToken,action_name:"activateForm"}}}async createTag(e){if(!e.tag)return{content:'Tag is required for the action "createTag" in the update form tool.'};if(!e.tag.name)return{content:'Tag name is required for the action "createTag" in the update form tool.'};const t={formToken:e.formToken,tag:{name:e.tag.name,value:e.tag.value}},a=await this.mondayApi.request(rh,t);return{content:{message:"Tag successfully added",form_token:e.formToken,action_name:"createTag",data:a.create_form_tag}}}async deleteTag(e){if(!e.tag)return{content:'Tag is required for the action "deleteTag" in the update form tool.'};if(!e.tag.id)return{content:'Tag id is required for the action "deleteTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id};return await this.mondayApi.request(ih,t),{content:{message:"Tag deleted",form_token:e.formToken,tag_id:e.tag.id,action_name:"deleteTag"}}}async updateTag(e){if(!e.tag)return{content:'Tag is required for the action "updateTag" in the update form tool.'};if(!e.tag.id||!e.tag.value)return{content:'Tag id and value are required for the action "updateTag" in the update form tool.'};const t={formToken:e.formToken,tagId:e.tag.id,tag:{value:e.tag.value}};return(await this.mondayApi.request(nh,t)).update_form_tag?{content:{message:"Tag updated",form_token:e.formToken,tag_id:e.tag.id,action_name:"updateTag"}}:{content:`Unable to update tag with id: ${e.tag.id}.`}}async updateAppearance(e){if(!e.form?.appearance)return{content:'Appearance is required for the action "updateAppearance" in the update form tool.'};const t={formToken:e.formToken,appearance:e.form.appearance},a=await this.mondayApi.request(oh,t);return{content:{message:"Appearance successfully updated",form_token:e.formToken,action_name:"updateAppearance",data:a.update_form_settings?.appearance}}}async updateAccessibility(e){if(!e.form?.accessibility)return{content:'Accessibility is required for the action "updateAccessibility" in the update form tool.'};const t={formToken:e.formToken,accessibility:e.form.accessibility},a=await this.mondayApi.request(sh,t);return{content:{message:"Accessibility successfully updated",form_token:e.formToken,action_name:"updateAccessibility",data:a.update_form_settings?.accessibility}}}async updateFeatures(e){if(!e.form?.features)return{content:'Features is required for the action "updateFeatures" in the update form tool.'};const{is_anonymous:t,...a}=e.form.features,i={formToken:e.formToken,features:a,is_anonymous:t},r=await this.mondayApi.request(dh,i);return{content:{message:"Features successfully updated",form_token:e.formToken,action_name:"updateFeatures",data:r.update_form_settings?.features}}}async updateQuestionOrder(e){if(!e.form?.questions)return{content:'List of dehydrated questions is required for the action "updateQuestionOrder" in the update form tool.'};const t={formToken:e.formToken,questions:e.form.questions},a=await this.mondayApi.request(ph,t);return{content:{message:"Question order successfully updated",form_token:e.formToken,action_name:"updateQuestionOrder",data:a.update_form?.questions}}}async updateFormHeader(e){if(!e.form?.title&&!e.form?.description)return{content:'Title or description is required for the action "updateFormHeader" in the update form tool.'};const t={formToken:e.formToken,title:e.form.title,description:e.form.description},a=await this.mondayApi.request(lh,t);return{content:{message:"Form header updated",form_token:e.formToken,action_name:"updateFormHeader",data:a.update_form}}}}const df={formToken:e.string()};const pf=Am`
|
|
1016
1016
|
mutation CreateFormSubmission(
|
|
1017
1017
|
$form_token: String!
|
|
1018
1018
|
$answers: [FormAnswerInput!]!
|
|
@@ -1030,13 +1030,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1030
1030
|
id
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
|
-
`,
|
|
1033
|
+
`,lf=e.object({phone:e.string().describe("The phone number."),country_short_name:e.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),cf=e.object({country_name:e.string().describe('The full country name (e.g. "United States").'),country_code:e.string().describe('The ISO 3166-1 alpha-2 country code (e.g. "US").')}),mf=e.object({date:e.string().describe("The date in YYYY-MM-DD format."),zone_diff:e.number().int().optional().describe("UTC offset in minutes.")}),uf=e.object({from:e.string().describe("Start date in YYYY-MM-DD format."),to:e.string().describe("End date in YYYY-MM-DD format.")}),hf=e.object({lat:e.number().describe("Latitude."),lng:e.number().describe("Longitude."),place_id:e.string().describe("Google Maps place ID."),address:e.string().describe("Full formatted address."),country:e.object({long_name:e.string().describe("Full country name."),short_name:e.string().describe("ISO 3166-1 alpha-2 country code.")}),city:e.object({long_name:e.string().describe("Full city name."),short_name:e.string().describe("Abbreviated city name.")}),street:e.object({long_name:e.string().describe("Full street name."),short_name:e.string().describe("Abbreviated street name.")}),street_number:e.object({long_name:e.string().describe("Full street number."),short_name:e.string().describe("Abbreviated street number.")})}),ff=e.object({id:e.string().describe("The file ID returned by the workforms upload endpoint."),name:e.string().describe('Original file name (e.g. "image.png").'),extension:e.string().optional().describe('File extension (e.g. "pdf", "png").'),is_image:e.boolean().optional().describe("Whether the file is an image.")}),_f=e.object({question_id:e.string().describe("The ID of the question being answered."),name:e.string().optional().describe("Answer for name questions."),email:e.string().optional().describe("Answer for email questions."),short_text:e.string().optional().describe("Answer for short text questions."),long_text:e.string().optional().describe("Answer for long text questions."),link:e.string().optional().describe("Answer for link questions."),updates:e.string().optional().describe("Answer for updates questions."),boolean:e.boolean().optional().describe("Answer for boolean questions."),number:e.number().optional().describe("Answer for number questions."),rating:e.number().min(1).optional().describe("Answer for rating questions. Must be a positive number within the question's configured limit."),single_select:e.string().optional().describe("Answer for single-select questions — the selected option ID."),multi_select:e.array(e.number()).optional().describe("Answer for multi-select questions — list of selected option IDs."),people:e.array(e.string()).optional().describe("Answer for people questions — list of user IDs. Obtain user IDs via the list_users_and_teams tool."),connected_boards:e.array(e.string()).optional().describe("Answer for connected boards questions — list of connected item IDs."),phone:lf.optional().describe("Answer for phone questions."),country:cf.optional().describe("Answer for country questions."),date:mf.optional().describe("Answer for date questions."),date_range:uf.optional().describe("Answer for date range questions."),location:hf.optional().describe("Answer for location questions. Requires a Google Maps place ID and structured address components."),file:e.array(ff).optional().describe("Answer for file questions. Each file must be uploaded first to obtain a file ID. Up to the question's configured limit."),signature:ff.optional().describe("Answer for signature questions. The file must be uploaded first to obtain a file ID.")}).describe("An answer for a single form question. Set question_id and exactly one answer field matching the question type. Subitems questions are not supported."),gf={form_token:e.string().describe("The unique token identifying the WorkForm. Can be a bare token, a full WorkForm URL (e.g. https://forms.monday.com/forms/abc123?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t). Shortened URLs are automatically resolved by following the redirect."),answers:e.array(_f).describe("Array of answers to submit. Each answer specifies a question_id and the value for that question type."),form_timezone_offset:e.number().int().min(-840).max(840).describe("The timezone offset of the submitter in minutes (e.g. -120 for UTC-2, 0 for UTC)."),password:e.string().optional().describe("The password for the WorkForm. Only required if the WorkForm has password protection enabled (check features.password.enabled from get_form). If required, ask the user for the password before submitting."),tags:e.array(e.object({column_id:e.string().describe("The column ID this tag maps to."),value:e.string().describe("The tag value to submit.")})).optional().describe("Tags to attach to the submission — each tag maps a value to a specific board column.")};const vf=Object.fromEntries(Object.entries(cp).filter((([e])=>"Person"!==e))),bf={columnType:e.nativeEnum(vf).describe("The type of the column to be created"),columnTitle:e.string().describe("The title of the column to be created"),columnDescription:e.string().optional().describe("The description of the column to be created"),columnSettings:e.string().optional().describe(`Column-specific configuration settings as a JSON string. Use get_column_type_info with fetchMode "${vu.Schema}" for the JSON schema for the given column type.`)},yf={boardId:e.number().describe("The id of the board to which the new column will be added"),...bf};const wf={columnId:e.string().describe("The id of the column to update"),columnType:e.nativeEnum(vf).describe("The type of the column being updated. Must match the existing column type."),revision:e.string().describe("The current revision of the column, obtained from get_board_schema. Used for optimistic concurrency control: if the column changed since you read it, the request will fail and you should re-fetch the latest revision before retrying."),columnTitle:e.string().optional().describe("The new title of the column. If omitted, the title is unchanged."),columnDescription:e.string().optional().describe("The new description of the column. If omitted, the description is unchanged."),columnSettings:e.string().optional().describe(`Type-specific configuration as a JSON string. Use get_column_type_info with fetchMode "${vu.Schema}" for the JSON schema for the given column type. If omitted, settings are unchanged.`)},If={boardId:e.number().describe("The id of the board containing the column"),...wf};const Tf={color:e.nativeEnum(up).describe("The color of the custom activity"),icon_id:e.nativeEnum(hp).describe("The icon ID of the custom activity"),name:e.string().describe("The name of the custom activity")};const Ef=Am`
|
|
1034
1034
|
mutation createNotification($user_id: ID!, $target_id: ID!, $text: String!, $target_type: NotificationTargetType!) {
|
|
1035
1035
|
create_notification(user_id: $user_id, target_id: $target_id, text: $text, target_type: $target_type) {
|
|
1036
1036
|
text
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
`,
|
|
1039
|
+
`,Sf={user_id:e.string().describe("The user ID to send the notification to"),target_id:e.string().describe("The target ID (update/reply ID for Post type, item/board ID for Project type)"),text:e.string().describe("The notification text"),target_type:e.nativeEnum(ll).describe("The target type (Post for update/reply, Project for item/board)")};const Af=Am`
|
|
1040
1040
|
mutation createGroup(
|
|
1041
1041
|
$boardId: ID!
|
|
1042
1042
|
$groupName: String!
|
|
@@ -1055,7 +1055,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1055
1055
|
title
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
`,
|
|
1058
|
+
`,Df=["#037f4c","#00c875","#9cd326","#cab641","#ffcb00","#784bd1","#9d50dd","#007eb5","#579bfc","#66ccff","#bb3354","#df2f4a","#ff007f","#ff5ac4","#ff642e","#fdab3d","#7f5347","#c4c4c4","#757575"],Nf={boardId:e.string().describe("The ID of the board to create the group in"),groupName:e.string().max(255).describe("The name of the new group (maximum 255 characters)"),groupColor:e.enum(Df).optional().describe(`The color for the group. Must be one of the predefined Monday.com group colors: ${Df.join(", ")}`),relativeTo:e.string().optional().describe("The ID of the group to position this new group relative to"),positionRelativeMethod:e.nativeEnum(gl).optional().describe("Whether to position the new group before or after the relativeTo group")};const kf=Am`
|
|
1059
1059
|
mutation duplicateItem($boardId: ID!, $itemId: ID!, $withUpdates: Boolean) {
|
|
1060
1060
|
duplicate_item(board_id: $boardId, item_id: $itemId, with_updates: $withUpdates) {
|
|
1061
1061
|
id
|
|
@@ -1063,7 +1063,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1063
1063
|
url
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
`,
|
|
1066
|
+
`,Of=Am`
|
|
1067
1067
|
mutation createSubitem($parentItemId: ID!, $itemName: String!, $columnValues: JSON) {
|
|
1068
1068
|
create_subitem(parent_item_id: $parentItemId, item_name: $itemName, column_values: $columnValues) {
|
|
1069
1069
|
id
|
|
@@ -1074,7 +1074,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
`,
|
|
1077
|
+
`,Rf={name:e.string().describe("The name of the new item to be created, must be relevant to the user's request"),groupId:e.string().optional().describe("The id of the group id to which the new item will be added, if its not clearly specified, leave empty"),columnValues:e.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"},\\"dropdown_id\\":\\"value\\", \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"'),parentItemId:e.number().optional().describe("The id of the parent item under which the new subitem will be created"),duplicateFromItemId:e.number().optional().describe("The id of existing item to duplicate and update with new values (only provide when duplicating)")},Cf={boardId:e.number().describe("The id of the board to which the new item will be added"),...Rf};const Pf={item_id:e.number().describe("The ID of the item to create the new timeline item on"),custom_activity_id:e.string().describe("The ID of the custom activity for the timeline item"),title:e.string().describe("The title of the new timeline item"),summary:e.string().optional().describe("The summary of the new timeline item (max 255 characters)"),content:e.string().optional().describe("The content of the new timeline item"),timestamp:e.string().describe("The creation time of the new timeline item in ISO8601 format (e.g., 2024-06-06T18:00:30Z)"),start_timestamp:e.string().optional().describe("The start time of the timeline item in ISO8601 format"),end_timestamp:e.string().optional().describe("The end time of the timeline item in ISO8601 format"),location:e.string().optional().describe("The location to add to the new timeline item"),phone:e.string().optional().describe("The phone number to add to the new timeline item"),url:e.string().optional().describe("The URL to add to the new timeline item")};const $f=Am`
|
|
1078
1078
|
mutation createUpdate($itemId: ID!, $body: String!, $mentionsList: [UpdateMention], $parentId: ID) {
|
|
1079
1079
|
create_update(body: $body, item_id: $itemId, mentions_list: $mentionsList, parent_id: $parentId) {
|
|
1080
1080
|
id
|
|
@@ -1085,7 +1085,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
|
|
1088
|
+
`,xf=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(dl).describe("The type of mention: User, Team, Board, or Project")}),Lf=e.array(xf),Ff={itemId:e.number().describe("The id of the item to which the update will be added"),body:e.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead. use html tags to format the text, dont use markdown."),mentionsList:e.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project'),parentId:e.number().optional().describe("The ID of the update to reply to. Use this parameter when you want to reply on an existing update leave it empty if you want to create a new update")};const Uf=Am`
|
|
1089
1089
|
query GetItemUpdates($itemId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!) {
|
|
1090
1090
|
items(ids: [$itemId]) {
|
|
1091
1091
|
id
|
|
@@ -1121,7 +1121,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
`,
|
|
1124
|
+
`,Vf=Am`
|
|
1125
1125
|
query GetBoardUpdates($boardId: ID!, $limit: Int, $page: Int, $includeReplies: Boolean!, $includeAssets: Boolean!, $fromDate: ISO8601DateTime, $toDate: ISO8601DateTime, $boardUpdatesOnly: Boolean) {
|
|
1126
1126
|
boards(ids: [$boardId]) {
|
|
1127
1127
|
id
|
|
@@ -1157,7 +1157,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
`;var
|
|
1160
|
+
`;var jf;!function(e){e.Item="Item",e.Board="Board"}(jf||(jf={}));const Mf={objectId:e.string().describe("The ID of the item or board to get updates from"),objectType:e.enum([jf.Item,jf.Board]).describe("Type of object for which objectId was provided"),limit:e.number().min(1).max(100).optional().default(25).describe("Number of updates per page (default: 25, max: 100)"),page:e.number().min(1).optional().default(1).describe("Page number for pagination (default: 1)"),includeReplies:e.boolean().optional().default(!1).describe("Include update replies in the response"),includeAssets:e.boolean().optional().default(!1).describe("Include file attachments in the response"),fromDate:e.string().optional().describe('Start of date range filter (e.g. "2025-01-01" or "2025-01-01T00:00:00Z"). Must be used together with toDate. Only supported for Board objectType.'),toDate:e.string().optional().describe('End of date range filter (e.g. "2025-06-01" or "2025-06-01T23:59:59Z"). Must be used together with fromDate. Only supported for Board objectType.'),includeItemUpdates:e.boolean().optional().default(!1).describe("When objectType is Board, also include updates on individual items. Defaults to false, returning only board discussion. Set to true to retrieve all updates on a board, including updates on individual items.")};function Bf(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e}const qf={columnId:e.string().describe("The id of the column to be deleted")},Hf={boardId:e.number().describe("The id of the board to which the new column will be added"),...qf};const Gf={itemId:e.number()};const Wf={};const Yf=Am`
|
|
1161
1161
|
query getBoardData($boardId: ID!, $itemsLimit: Int!, $queryParams: ItemsQuery) {
|
|
1162
1162
|
boards(ids: [$boardId]) {
|
|
1163
1163
|
id
|
|
@@ -1200,7 +1200,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
`,
|
|
1203
|
+
`,Qf=Am`
|
|
1204
1204
|
query getUsersByIds($userIds: [ID!]!) {
|
|
1205
1205
|
users(ids: $userIds) {
|
|
1206
1206
|
id
|
|
@@ -1208,7 +1208,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1208
1208
|
photo_tiny
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
`,
|
|
1211
|
+
`,zf=e.array(e.object({columnId:e.string().describe("The id of the column to filter by"),compareAttribute:e.string().optional().describe("The attribute to compare the value to. This is OPTIONAL property."),compareValue:e.union([e.string(),e.number(),e.boolean(),e.array(e.union([e.string(),e.number()]))]).describe("The value to compare the attribute to. This can be a string or index value depending on the column type."),operator:e.nativeEnum(el).optional().default(el.AnyOf).describe("The operator to use for the filter")})).optional().describe(`The configuration of filters to apply on the items. Use get_board_info for column ids and types on the board. Before sending the filters, use get_column_type_info with fetchMode "${vu.Guidelines}" and use data.guidelines.filter (null if that type has no documented rules).`),Kf=e.nativeEnum(Zp).optional().default(Zp.And).describe("The operator to use for the filters"),Jf={boardId:e.string().describe("The ID of the board to fetch complete data for"),filters:zf,filtersOperator:Kf};const Xf=Am`
|
|
1212
1212
|
query GetBoardActivity(
|
|
1213
1213
|
$boardId: ID!
|
|
1214
1214
|
$itemIds: [ID!]
|
|
@@ -1231,7 +1231,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
`,
|
|
1234
|
+
`,Zf={boardId:e.number().describe("The id of the board to get activity for"),itemIds:e.array(e.number()).optional().describe("Filter activity to specific item ids. Omit to get activity for the whole board."),userIds:e.array(e.number()).optional().describe("Filter activity to actions performed by specific user ids."),fromDate:e.string().optional().describe("Start date for activity range (ISO8601DateTime format). Defaults to 30 days ago"),toDate:e.string().optional().describe("End date for activity range (ISO8601DateTime format). Defaults to now"),includeData:e.boolean().optional().default(!1).describe("Whether to include the raw data payload for each activity entry. The data field contains the full before/after state of changes and can be very large. Only set to true when you need the detailed change data.")};const e_=Am`
|
|
1235
1235
|
query GetBoardInfo($boardId: ID!) {
|
|
1236
1236
|
boards(ids: [$boardId]) {
|
|
1237
1237
|
# Basic Board Metadata
|
|
@@ -1319,7 +1319,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
|
-
`,
|
|
1322
|
+
`,t_=Am`
|
|
1323
1323
|
query GetBoardInfoJustColumns($boardId: ID!) {
|
|
1324
1324
|
boards(ids: [$boardId]) {
|
|
1325
1325
|
columns {
|
|
@@ -1332,7 +1332,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
`,
|
|
1335
|
+
`,a_=(e,t)=>({board:{...e,subItemColumns:t?.columns??void 0}}),i_={boardId:e.number().describe("The id of the board to get information for")};const r_=Am`
|
|
1336
1336
|
fragment ItemDataFragment on Item {
|
|
1337
1337
|
id
|
|
1338
1338
|
name
|
|
@@ -1395,7 +1395,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
`,
|
|
1398
|
+
`,n_=Am`
|
|
1399
1399
|
query SearchItemsDev($query: String!, $limit: Int, $boardIds: [ID!]) {
|
|
1400
1400
|
search {
|
|
1401
1401
|
items(query: $query, limit: $limit, board_ids: $boardIds) {
|
|
@@ -1405,11 +1405,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
`,
|
|
1408
|
+
`,o_={boardId:e.number().describe("The id of the board to get items from"),itemIds:e.array(e.number()).optional().describe("The ids of the items to get. The count of items should be less than 100."),searchTerm:e.string().optional().describe('\n The search term to use for the search.\n - Use this when: the user provides a vague, incomplete, or approximate search term (e.g., “marketing campaign”, “John’s task”, “budget-related”), and there isn’t a clear exact compare value for a specific field.\n - Do not use this when: the user specifies an exact value that maps directly to a column comparison (e.g., name contains "marketing campaign", status = "Done", priority = "High", owner = "Daniel"). In these cases, prefer structured compare filters.\n '),limit:e.number().min(1).max(500).optional().default(25).describe("The number of items to get"),cursor:e.string().optional().describe("The cursor to get the next page of items, use the nextCursor from the previous response. If the nextCursor was null, it means there are no more items to get"),includeColumns:e.boolean().optional().default(!1).describe("Whether to include column values in the response.\nPERFORMANCE OPTIMIZATION: Only set this to true when you actually need the column data. Excluding columns significantly reduces token usage and improves response latency. If you only need to count items, get item IDs/names, or check if items exist, keep this false."),includeItemDescription:e.boolean().optional().default(!1).describe("Whether to include the item's description in the response. The item description is the rich-text body content that appears inside a monday.com item (similar to a task description or issue body). Set this to true when the user asks about an item's description, details, body, or notes. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the item description content."),includeSubItems:e.boolean().optional().default(!1).describe("Whether to include sub items in the response. PERFORMANCE OPTIMIZATION: Only set this to true when you actually need the sub items data."),subItemLimit:e.number().min(1).max(100).optional().default(25).describe("The number of sub items to get per item. This is only used when includeSubItems is true."),filters:zf,filtersOperator:Kf,columnIds:e.array(e.string()).optional().describe("The ids of the item columns and subitem columns to get, can be used to reduce the response size when user asks for specific columns. Works only when includeColumns is true. If not provided, all columns will be returned"),orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(Xp).optional().default(Xp.Asc).describe("The direction to order by")})).optional().describe("The columns to order by, will control the order of the items in the response")};const s_={boardId:e.number().describe("The id of the board to get the schema of")};const d_=Am`
|
|
1409
1409
|
query GetColumnTypeSchema($type: ColumnType!) {
|
|
1410
1410
|
get_column_type_schema(type: $type)
|
|
1411
1411
|
}
|
|
1412
|
-
`,
|
|
1412
|
+
`,p_="https://developer.monday.com/api-reference",l_={last_updated:'Supported operators: any_of, not_any_of. CompareValue should be either:\n - "TODAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "YESTERDAY" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_WEEK" - requires to also specify compareAttribute: "UPDATED_AT"\n - "THIS_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\n - "LAST_MONTH" - requires to also specify compareAttribute: "UPDATED_AT"\nEXAMPLES:\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of", "compareAttribute": "UPDATED_AT"} // using TODAY with correct compareAttribute\n ✅ Correct: {"columnId": "last_updated", "compareValue": ["THIS_WEEK"], "operator": "not_any_of", "compareAttribute": "UPDATED_AT"} // using THIS_WEEK with not_any_of\n ❌ Wrong: {"columnId": "last_updated", "compareValue": ["TODAY"], "operator": "any_of"} // missing required compareAttribute\n ❌ Wrong: {"columnId": "last_updated", "compareValue": "TODAY", "operator": "any_of", "compareAttribute": "UPDATED_AT"} // not using array for any_of operator',date:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue should be either:\n - Date in "YYYY-MM-DD" format with "EXACT" e.g. compareValue:["EXACT", "2025-01-01"]\n - "TODAY" - Item with today\'s date\n - "TOMORROW" - Item with tomorrow\'s date\n - "THIS_WEEK" - Item with this week\'s date\n - "ONE_WEEK_AGO" - Item with one week ago\'s date\nEXAMPLES:\n ✅ Correct: {"columnId": "date", "compareValue": ["EXACT", "2025-01-01"], "operator": "any_of"} // using exact date format with EXACT\n ✅ Correct: {"columnId": "date", "compareValue": "TODAY", "operator": "greater_than"} // using TODAY with greater_than\n ❌ Wrong: {"columnId": "date", "compareValue": "2025-01-01", "operator": "any_of"} // missing EXACT string for exact date\n ❌ Wrong: {"columnId": "date", "compareValue": ["TODAY"], "operator": "greater_than"} // using array with single value operator',email:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be:\n - empty string "" when searching for blank values\n - whole email address when searching for specific email\n - partial email when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "email", "compareValue": ["john@example.com"], "operator": "any_of"} // using array with any_of for specific email\n ✅ Correct: {"columnId": "email", "compareValue": "gmail", "operator": "contains_text"} // using partial email with contains_text\n ❌ Wrong: {"columnId": "email", "compareValue": "john@example.com", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "email", "compareValue": ["gmail"], "operator": "contains_text"} // using array with single value operator',long_text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "long_text", "compareValue": ["Complete project description"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "long_text", "compareValue": "urgent", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "long_text", "compareValue": "Complete project description", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "long_text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',text:'Supported operators: any_of, not_any_of, is_empty, is_not_empty, contains_text, not_contains_text. CompareValue can be either full text or partial text when using contains_text, not_contains_text operators\nEXAMPLES:\n ✅ Correct: {"columnId": "text", "compareValue": ["Task Name"], "operator": "any_of"} // using array with any_of for full text\n ✅ Correct: {"columnId": "text", "compareValue": "bug", "operator": "contains_text"} // using partial text with contains_text\n ❌ Wrong: {"columnId": "text", "compareValue": "Task Name", "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "text", "compareValue": [], "operator": "contains_text"} // using empty array with contains_text operator',numbers:'Supported operators: any_of, not_any_of, greater_than, lower_than. CompareValue is a number or "$$$blank$$$" when searching for blank values\nEXAMPLES:\n ✅ Correct: {"columnId": "numbers", "compareValue": [100, 200], "operator": "any_of"} // using array with any_of for multiple numbers\n ✅ Correct: {"columnId": "numbers", "compareValue": 50, "operator": "greater_than"} // using single number with greater_than\n ❌ Wrong: {"columnId": "numbers", "compareValue": 100, "operator": "any_of"} // not using array with any_of operator\n ❌ Wrong: {"columnId": "numbers", "compareValue": ["50"], "operator": "greater_than"} // using array with single value operator',name:'Supported operators: "contains_text", "not_contains_text". CompareValue can be full or partial text\nEXAMPLES:\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "contains_text"} // using string with contains_text\n ✅ Correct: {"columnId": "name", "compareValue": "marketing campaign", "operator": "not_contains_text"} // using string with not_contains_text',status:'Supported operators: any_of, not_any_of, contains_terms. CompareValue should be either:\n - id of label from column settings - when used with any_of, not_any_of operators\n - label\'s text - when use with contains_terms\nEXAMPLES:\n ✅ Correct: {"columnId": "status", "compareValue": [0, 1], "operator": "any_of"} // Using id values\n ✅ Correct: {"columnId": "status", "compareValue": "Done", "operator": "contains_terms"} // Using label text\n ❌ Wrong: {"columnId": "status", "compareValue": "Done", "operator": "any_of"} // Using label text with wrong operator\n ❌ Wrong: {"columnId": "status", "compareValue": [0, 1], "operator": "contains_terms"} // Using id with wrong operator',checkbox:'Supported operators: is_empty, is_not_empty. Compare value must be an empty array\nEXAMPLES:\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": null, "operator": "is_empty"} // not using empty array with is_empty operator',people:'Supported operators: any_of, not_any_of, is_empty, is_not_empty. **CRITICAL**: CompareValue MUST be in one of following:\n - "assigned_to_me" - when searching for current user\n - "person-123" - when searching for specific person with id 123\n - "team-456" - when searching for specific team with id 456\n - empty array when using is_empty, is_not_empty operators\nEXAMPLES: \n ❌ Wrong: {"columnId": "column_id", "compareValue": ["person—123"], "operator": "any_of"} // Using long hyphen \'—\' instead of short hyphen \'-\'\n ✅ Correct: {"columnId": "column_id", "compareValue": [], "operator": "is_empty"} // using empty array with is_empty operator\n ✅ Correct: {"columnId": "column_id", "compareValue": ["person-80120403"], "operator": "any_of"} // using person prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["team-9000"], "operator": "any_of"} // using team prefix\n ✅ Correct: {"columnId": "column_id", "compareValue": ["assigned_to_me"], "operator": "any_of"} // using assigned_to_me value\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "is_empty"} // using id with is_empty operator\n ❌ Wrong: {"columnId": "column_id", "compareValue": ["80120403"], "operator": "any_of"} // not using person or team prefix'};function c_(e){const t=l_[e];return t?`# Filtering Guidelines\n\n## [IMPORTANT] Operator Guidelines\nSpecific operators expect specific compareValue types:\n- CompareValue MUST BE SENT AS AN ARRAY WHEN USED WITH any_of, not_any_of, between operators\n- CompareValue MUST BE SENT AS AN EMPTY ARRAY WHEN USED WITH is_empty, is_not_empty\n- CompareValue MUST BE SENT AS EITHER SINGLE STRING OR SINGLE NUMBER WHEN USED WITH greater_than, greater_than_or_equals, lower_than, lower_than_or_equal\n- CompareValue MUST BE SENT AS SINGLE STRING WHEN USED WITH contains_terms, not_contains_text, contains_text, starts_with, ends_with operators\n\n## [IMPORTANT] Column type: ${e}\n${t}\n\n## [IMPORTANT] Sub Items Columns MUST NOT BE USED FOR FILTERING.\n`:null}const m_={columnType:e.nativeEnum(vf).describe('The column type to retrieve information for (e.g., "text", "status", "date", "numbers")'),fetchMode:e.nativeEnum(vu).optional().default(vu.Schema).describe(`fetchMode "${vu.Schema}": JSON settings schema only (GraphQL). fetchMode "${vu.Guidelines}": guidelines.filter and guidelines.aggregation only — no GraphQL round-trip.`)};const u_={random_string:e.string().describe("Dummy parameter for no-parameter tools").optional(),operationType:e.enum(["read","write"]).describe('Type of operation: "read" for queries, "write" for mutations').optional()};const h_={typeName:e.string().describe("The name of the GraphQL type to get details for")};const f_=Am`
|
|
1413
1413
|
fragment UserDetails on User {
|
|
1414
1414
|
# Basic User Information
|
|
1415
1415
|
id
|
|
@@ -1441,31 +1441,31 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1441
1441
|
time_zone_identifier
|
|
1442
1442
|
utc_hours_diff
|
|
1443
1443
|
}
|
|
1444
|
-
`,
|
|
1444
|
+
`,__=Am`
|
|
1445
1445
|
fragment UserTeamMembership on Team {
|
|
1446
1446
|
id
|
|
1447
1447
|
name
|
|
1448
1448
|
is_guest
|
|
1449
1449
|
picture_url
|
|
1450
1450
|
}
|
|
1451
|
-
`,
|
|
1451
|
+
`,g_=Am`
|
|
1452
1452
|
fragment TeamBasicInfo on Team {
|
|
1453
1453
|
id
|
|
1454
1454
|
name
|
|
1455
1455
|
}
|
|
1456
|
-
`,
|
|
1456
|
+
`,v_=Am`
|
|
1457
1457
|
fragment TeamExtendedInfo on Team {
|
|
1458
1458
|
...TeamBasicInfo
|
|
1459
1459
|
is_guest
|
|
1460
1460
|
picture_url
|
|
1461
1461
|
}
|
|
1462
|
-
`,
|
|
1462
|
+
`,b_=Am`
|
|
1463
1463
|
fragment TeamOwner on User {
|
|
1464
1464
|
id
|
|
1465
1465
|
name
|
|
1466
1466
|
email
|
|
1467
1467
|
}
|
|
1468
|
-
`,
|
|
1468
|
+
`,y_=Am`
|
|
1469
1469
|
fragment TeamMember on User {
|
|
1470
1470
|
id
|
|
1471
1471
|
name
|
|
@@ -1485,7 +1485,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1485
1485
|
time_zone_identifier
|
|
1486
1486
|
utc_hours_diff
|
|
1487
1487
|
}
|
|
1488
|
-
`,
|
|
1488
|
+
`,w_=Am`
|
|
1489
1489
|
fragment TeamMemberSimplified on User {
|
|
1490
1490
|
id
|
|
1491
1491
|
name
|
|
@@ -1494,15 +1494,15 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1494
1494
|
is_admin
|
|
1495
1495
|
is_guest
|
|
1496
1496
|
}
|
|
1497
|
-
`,
|
|
1497
|
+
`,I_=Am`
|
|
1498
1498
|
fragment UserTeamMembershipSimplified on Team {
|
|
1499
1499
|
id
|
|
1500
1500
|
name
|
|
1501
1501
|
is_guest
|
|
1502
1502
|
}
|
|
1503
|
-
`,
|
|
1504
|
-
${h_}
|
|
1503
|
+
`,T_=Am`
|
|
1505
1504
|
${f_}
|
|
1505
|
+
${__}
|
|
1506
1506
|
|
|
1507
1507
|
query listUsersWithTeams($userIds: [ID!], $limit: Int = 1000) {
|
|
1508
1508
|
users(ids: $userIds, limit: $limit) {
|
|
@@ -1514,21 +1514,21 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
|
-
`,
|
|
1518
|
-
${
|
|
1517
|
+
`,E_=Am`
|
|
1518
|
+
${f_}
|
|
1519
1519
|
|
|
1520
1520
|
query listUsersOnly($userIds: [ID!], $limit: Int = 1000) {
|
|
1521
1521
|
users(ids: $userIds, limit: $limit) {
|
|
1522
1522
|
...UserDetails
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
|
-
`,
|
|
1526
|
-
${
|
|
1527
|
-
${
|
|
1528
|
-
${g_}
|
|
1529
|
-
${__}
|
|
1525
|
+
`,S_=Am`
|
|
1526
|
+
${f_}
|
|
1527
|
+
${I_}
|
|
1530
1528
|
${v_}
|
|
1531
|
-
${
|
|
1529
|
+
${g_}
|
|
1530
|
+
${b_}
|
|
1531
|
+
${w_}
|
|
1532
1532
|
|
|
1533
1533
|
query listUsersAndTeams($userIds: [ID!], $teamIds: [ID!], $limit: Int = 1000) {
|
|
1534
1534
|
users(ids: $userIds, limit: $limit) {
|
|
@@ -1554,19 +1554,19 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
`,
|
|
1558
|
-
${
|
|
1557
|
+
`,A_=Am`
|
|
1558
|
+
${g_}
|
|
1559
1559
|
|
|
1560
1560
|
query listTeamsOnly($teamIds: [ID!]) {
|
|
1561
1561
|
teams(ids: $teamIds) {
|
|
1562
1562
|
...TeamBasicInfo
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
|
-
`,
|
|
1566
|
-
${g_}
|
|
1567
|
-
${__}
|
|
1565
|
+
`,D_=Am`
|
|
1568
1566
|
${v_}
|
|
1567
|
+
${g_}
|
|
1569
1568
|
${b_}
|
|
1569
|
+
${y_}
|
|
1570
1570
|
|
|
1571
1571
|
query listTeamsWithMembers($teamIds: [ID!]) {
|
|
1572
1572
|
teams(ids: $teamIds) {
|
|
@@ -1583,9 +1583,9 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
`,
|
|
1587
|
-
${h_}
|
|
1586
|
+
`,N_=Am`
|
|
1588
1587
|
${f_}
|
|
1588
|
+
${__}
|
|
1589
1589
|
|
|
1590
1590
|
query getUserByName($name: String) {
|
|
1591
1591
|
users(name: $name) {
|
|
@@ -1597,7 +1597,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
`,
|
|
1600
|
+
`,k_=Am`
|
|
1601
1601
|
query getCurrentUser {
|
|
1602
1602
|
me {
|
|
1603
1603
|
id
|
|
@@ -1609,7 +1609,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1609
1609
|
photo_thumb
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
|
-
`;const
|
|
1612
|
+
`;const O_=[["is_pending","Pending"],["is_verified","Verified"],["is_view_only","View Only"],["join_date","Join Date"],["last_activity","Last Activity"],["location","Location"],["mobile_phone","Mobile Phone"],["phone","Phone"],["photo_thumb","Photo Thumb"],["time_zone_identifier","Timezone"],["utc_hours_diff","UTC Hours Diff"]];function R_(e,t=""){return O_.filter((([t])=>{const a=e[t];return null!=a})).map((([a,i])=>`${t}${i}: ${e[a]}`))}const C_=e=>{const t=[];return"users"in e&&e.users&&e.users.length>0&&(t.push("Users:"),e.users.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),t.push(` Email: ${e.email}`),t.push(` Title: ${e.title||"N/A"}`),t.push(` Enabled: ${e.enabled}`),t.push(` Admin: ${e.is_admin||!1}`),t.push(` Guest: ${e.is_guest||!1}`),t.push(...R_(e," ")),e.teams&&e.teams.length>0&&(t.push(" Teams:"),e.teams.forEach((e=>{e&&t.push(` - ID: ${e.id}, Name: ${e.name}, Guest Team: ${e.is_guest||!1}, Picture URL: ${e.picture_url||"N/A"}`)}))),t.push(""))}))),"teams"in e&&e.teams&&e.teams.length>0&&(t.push("Teams:"),e.teams.forEach((e=>{e&&(t.push(` ID: ${e.id}`),t.push(` Name: ${e.name}`),function(e){return"owners"in e}(e)&&(t.push(` Guest Team: ${e.is_guest||!1}`),t.push(` Picture URL: ${e.picture_url||"N/A"}`),e.owners&&e.owners.length>0&&(t.push(" Owners:"),e.owners.forEach((e=>{t.push(` - ID: ${e.id}, Name: ${e.name}, Email: ${e.email}`)}))),e.users&&e.users.length>0&&(t.push(" Members:"),e.users.forEach((e=>{if(e){const a=[`ID: ${e.id}`,`Name: ${e.name}`,`Email: ${e.email}`,`Title: ${e.title||"N/A"}`,`Admin: ${e.is_admin||!1}`,`Guest: ${e.is_guest||!1}`,...R_(e)];t.push(` - ${a.join(", ")}`)}})))),t.push(""))}))),0===t.length?"No users or teams found with the specified filters.":t.join("\n").trim()},P_=500,$_=500,x_=1e3,L_=Am`
|
|
1613
1613
|
query getAccountSlug {
|
|
1614
1614
|
me {
|
|
1615
1615
|
account {
|
|
@@ -1617,11 +1617,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
`;async function
|
|
1620
|
+
`;async function F_(e){const t=await e.request(L_);return t.me?.account?.slug??null}function U_(e,t){return`https://${e}.monday.com/workspaces/${t}`}const V_={userIds:e.array(e.string()).max(P_).optional().describe("Specific user IDs to fetch.[IMPORTANT] ALWAYS use when you have user IDs in context. PREFER over general search. RETURNS: user profiles including team memberships"),teamIds:e.array(e.string()).max($_).optional().describe("Specific team IDs to fetch.[IMPORTANT] ALWAYS use when you have team IDs in context, NEVER fetch all teams if specific IDs are available.\n RETURNS: Team details with owners and optional member data."),name:e.string().optional().describe("Name-based USER search ONLY. STANDALONE parameter - cannot be combined with others. PREFERRED method for finding users when you know names. Performs fuzzy matching.\n CRITICAL: This parameter searches for USERS ONLY, NOT teams. To search for teams, use teamIds parameter instead."),getMe:e.boolean().optional().describe('[TOP PRIORITY] Use ALWAYS when requesting current user information. Examples of when it should be used: ["get my user" or "get my teams"].\n This parameter CONFLICTS with all others. '),includeTeams:e.boolean().optional().describe("[AVOID] This fetches all teams in the account. To fetch a specific user's teams just fetch that user by id and you will get their team memberships."),teamsOnly:e.boolean().optional().describe("Fetch only teams, no users returned. Combine with includeTeamMembers for member details."),includeTeamMembers:e.boolean().optional().describe("Set to true only when you need additional member details for teams other than names and ids.")};const j_={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 M_=Am`
|
|
1621
1621
|
mutation updateDocName($docId: ID!, $name: String!) {
|
|
1622
1622
|
update_doc_name(docId: $docId, name: $name)
|
|
1623
1623
|
}
|
|
1624
|
-
`,
|
|
1624
|
+
`,B_=Am`
|
|
1625
1625
|
mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
|
|
1626
1626
|
add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
|
|
1627
1627
|
success
|
|
@@ -1629,13 +1629,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1629
1629
|
error
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
|
-
`,
|
|
1632
|
+
`,q_=Am`
|
|
1633
1633
|
query getDocIdByObjectId($objectId: [ID!]) {
|
|
1634
1634
|
docs(object_ids: $objectId) {
|
|
1635
1635
|
id
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
|
-
`,
|
|
1638
|
+
`,H_=Am`
|
|
1639
1639
|
mutation updateDocBlock($blockId: String!, $content: JSON!) {
|
|
1640
1640
|
update_doc_block(block_id: $blockId, content: $content) {
|
|
1641
1641
|
id
|
|
@@ -1643,20 +1643,20 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1643
1643
|
created_at
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
`,
|
|
1646
|
+
`,G_=Am`
|
|
1647
1647
|
mutation deleteDocBlock($blockId: String!) {
|
|
1648
1648
|
delete_doc_block(block_id: $blockId) {
|
|
1649
1649
|
id
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
`,
|
|
1652
|
+
`,W_=Am`
|
|
1653
1653
|
query getDocObjectIdByDocId($docId: [ID!]) {
|
|
1654
1654
|
docs(ids: $docId) {
|
|
1655
1655
|
id
|
|
1656
1656
|
object_id
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
`,
|
|
1659
|
+
`,Y_=Am`
|
|
1660
1660
|
query getDocBoardItem($boardId: ID!) {
|
|
1661
1661
|
boards(ids: [$boardId]) {
|
|
1662
1662
|
items_page(limit: 1) {
|
|
@@ -1666,7 +1666,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
`,
|
|
1669
|
+
`,Q_=Am`
|
|
1670
1670
|
query getDocBlockContent($docId: [ID!]) {
|
|
1671
1671
|
docs(ids: $docId) {
|
|
1672
1672
|
blocks {
|
|
@@ -1676,7 +1676,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
|
-
`,
|
|
1679
|
+
`,z_=Am`
|
|
1680
1680
|
mutation createDocComment($itemId: ID!, $body: String!, $parentId: ID, $mentionsList: [UpdateMention]) {
|
|
1681
1681
|
create_update(body: $body, item_id: $itemId, parent_id: $parentId, mentions_list: $mentionsList) {
|
|
1682
1682
|
id
|
|
@@ -1684,7 +1684,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1684
1684
|
created_at
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
|
-
`,
|
|
1687
|
+
`,K_=Am`
|
|
1688
1688
|
mutation createDocBlocks($docId: ID!, $afterBlockId: String, $blocksInput: [CreateBlockInput!]!) {
|
|
1689
1689
|
create_doc_blocks(docId: $docId, afterBlockId: $afterBlockId, blocksInput: $blocksInput) {
|
|
1690
1690
|
id
|
|
@@ -1752,7 +1752,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
`,
|
|
1755
|
+
`,J_="content",X_="version_history",Z_=e.enum(["ids","object_ids","workspace_ids"]),eg={mode:e.enum([J_,X_]).optional().default(J_).describe('The operation mode. "content" (default) fetches documents with their markdown content. "version_history" fetches the edit history of a single document.'),type:Z_.optional().describe('Query type for content mode: "ids", "object_ids", or "workspace_ids". Required when mode is "content".'),ids:e.array(e.string()).optional().describe('Array of ID values. In content mode: matches the query type (ids/object_ids/workspace_ids). In version_history mode: provide the single document object_id here (e.g., ids: ["5001466606"]).'),limit:e.number().optional().describe("Number of docs per page (default: 25). Only used in content mode."),order_by:e.nativeEnum(Sp).optional().describe("Order in which to retrieve docs. Only used in content mode."),page:e.number().optional().describe("Page number to return (starts at 1). Only used in content mode."),include_blocks:e.boolean().optional().default(!1).describe("If true, includes the blocks array (block IDs, types, positions, content) in the response. Required when you plan to call update_doc. Defaults to false to reduce response size. Only used in content mode."),blocks_limit:e.number().optional().describe("Maximum number of blocks to return per document (default: 25). Only used in content mode when include_blocks is true."),blocks_page:e.number().optional().describe("Page number for block pagination, starting at 1. Omit to use the API default. Use with blocks_limit to page through documents with more than 25 blocks. Only used in content mode when include_blocks is true."),include_comments:e.boolean().optional().default(!1).describe("If true, fetches all comments and replies on the document. Comments are stored at the item level within the doc backing board. Defaults to false. Only used in content mode."),comments_limit:e.number().optional().default(50).describe("Maximum number of comments (updates) to fetch per item when include_comments is true. Defaults to 50. Only used in content mode."),version_history_limit:e.number().optional().describe('Maximum number of restoring points to return. Use this when the user asks for "last N changes". Only used in version_history mode.'),since:e.string().optional().describe('ISO 8601 date string to filter version history from (e.g., "2026-03-15T00:00:00Z"). If omitted, returns the full history. Only used in version_history mode.'),until:e.string().optional().describe('ISO 8601 date string to filter version history until (e.g., "2026-03-16T23:59:59Z"). Defaults to now. Only used in version_history mode.'),include_diff:e.boolean().optional().default(!1).describe("If true, fetches content diffs between consecutive restoring points. May be slower due to additional API calls. Only used in version_history mode.")};const tg={workspace_id:e.number().describe("The ID of the workspace to get information for")};const ag=Am`
|
|
1756
1756
|
query listWorkspaces($limit: Int!, $page: Int!, $membershipKind: WorkspaceMembershipKind!) {
|
|
1757
1757
|
workspaces(limit: $limit, page: $page, membership_kind: $membershipKind) {
|
|
1758
1758
|
id
|
|
@@ -1760,7 +1760,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1760
1760
|
description
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
|
-
`,
|
|
1763
|
+
`,ig=100,rg=e=>e.toLocaleLowerCase().replace(/[^\p{L}\d]/gu,"");function ng(e){const t=e.workspaces?.filter((e=>null!==e));return t||[]}function og(e){return Array.isArray(e)&&e.length>0}const sg={searchTerm:e.string().optional().describe("Optional search term used to filter workspaces. [IMPORTANT] Only alphanumeric characters are supported."),limit:e.number().min(1).max(ig).default(ig).describe("Number of workspaces to return. Default is (100), lower for a smaller response size"),page:e.number().min(1).default(1).describe("Page number to return. Default is 1.")};const dg=Am`
|
|
1764
1764
|
query getItemBoard($itemId: ID!) {
|
|
1765
1765
|
items(ids: [$itemId]) {
|
|
1766
1766
|
id
|
|
@@ -1773,7 +1773,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
`,
|
|
1776
|
+
`,pg=Am`
|
|
1777
1777
|
mutation createDoc($location: CreateDocInput!, $docOwnerIds: [ID!]) {
|
|
1778
1778
|
create_doc(location: $location, doc_owner_ids: $docOwnerIds) {
|
|
1779
1779
|
id
|
|
@@ -1782,7 +1782,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1782
1782
|
name
|
|
1783
1783
|
}
|
|
1784
1784
|
}
|
|
1785
|
-
`,
|
|
1785
|
+
`,lg=Am`
|
|
1786
1786
|
mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
|
|
1787
1787
|
add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
|
|
1788
1788
|
success
|
|
@@ -1790,11 +1790,11 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1790
1790
|
error
|
|
1791
1791
|
}
|
|
1792
1792
|
}
|
|
1793
|
-
`,
|
|
1793
|
+
`,cg=Am`
|
|
1794
1794
|
mutation updateDocName($docId: ID!, $name: String!) {
|
|
1795
1795
|
update_doc_name(docId: $docId, name: $name)
|
|
1796
1796
|
}
|
|
1797
|
-
`,
|
|
1797
|
+
`,mg=e.enum(["workspace","item"]),ug=e.discriminatedUnion("type",[e.object({type:e.literal(mg.enum.workspace).describe("Create document in workspace"),workspace_id:e.number().describe("Workspace ID under which to create the new document"),doc_kind:e.nativeEnum(zd).optional().describe("Document kind (public/private/share). Defaults to public."),folder_id:e.number().optional().describe("Optional folder ID to place the document inside a specific folder")}),e.object({type:e.literal(mg.enum.item).describe("Create document attached to item"),item_id:e.number().describe("Item ID to attach the new document to"),column_id:e.string().optional().describe("ID of an existing 'doc' column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.")})]),hg={doc_name:e.string().describe("Name for the new document."),markdown:e.string().describe("Markdown content that will be imported into the newly created document as blocks."),location:e.enum(["workspace","item"]).describe("Location where the document should be created - either in a workspace or attached to an item"),docOwnerIds:e.array(e.string()).min(1).optional().describe("Optional list of user IDs to set as document owners at creation time. Use this to add the agent owner so they retain access to the document. Ownership is set inside the creation mutation itself, bypassing the permission checks that would block a subsequent add_subscribers_to_object call."),workspace_id:e.number().optional().describe('[REQUIRED - use only when location="workspace"] Workspace ID under which to create the new document'),doc_kind:e.nativeEnum(zd).optional().describe('[OPTIONAL - use only when location="workspace"] Document kind (public/private/share). Defaults to public.'),folder_id:e.number().optional().describe('[OPTIONAL - use only when location="workspace"] Optional folder ID to place the document inside a specific folder'),item_id:e.number().optional().describe('[REQUIRED - use only when location="item"] Item ID to attach the new document to'),column_id:e.string().optional().describe('[OPTIONAL - use only when location="item"] ID of an existing "doc" column on the board which contains the item. If not provided, the tool will create a new doc column automatically when creating a doc on an item.')};const fg=Am`
|
|
1798
1798
|
mutation addContentToDocFromMarkdown($docId: ID!, $markdown: String!, $afterBlockId: String) {
|
|
1799
1799
|
add_content_to_doc_from_markdown(docId: $docId, markdown: $markdown, afterBlockId: $afterBlockId) {
|
|
1800
1800
|
success
|
|
@@ -1802,7 +1802,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1802
1802
|
error
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
`,
|
|
1805
|
+
`,_g=Am`
|
|
1806
1806
|
query getDocByObjectId($objectId: [ID!]) {
|
|
1807
1807
|
docs(object_ids: $objectId) {
|
|
1808
1808
|
id
|
|
@@ -1810,7 +1810,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1810
1810
|
url
|
|
1811
1811
|
}
|
|
1812
1812
|
}
|
|
1813
|
-
`,
|
|
1813
|
+
`,gg=Am`
|
|
1814
1814
|
query getDocById($docId: [ID!]) {
|
|
1815
1815
|
docs(ids: $docId) {
|
|
1816
1816
|
id
|
|
@@ -1818,7 +1818,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1818
1818
|
url
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
|
-
`,gg={doc_id:e.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:e.string().describe("Markdown content to add to the document."),after_block_id:e.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};function vg(e){if(e)return e}function bg(e){if(e)return e}function yg(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function wg(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:yg(e.attributes)}}))}function Ig(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:o(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:yg(e.attributes)}}))}function Tg(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function Eg(e,t,a,i){const r=a+i;let n=0;const o=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${n}: op has no 'insert' field. Block content may be from an unsupported block type.`);const s=n,d=s+("string"==typeof e?e.length:1),p=Math.max(s,a),l=Math.min(d,r);p>=l?o.push(i):"string"!=typeof e?o.push(Tg(i,t)):(p>s&&o.push({...i,insert:e.slice(0,p-s)}),o.push(Tg({...i,insert:e.slice(p-s,l-s)},t)),l<d&&o.push({...i,insert:e.slice(l-s)})),n=d}return o}const Sg=e.object({bold:e.boolean().optional(),italic:e.boolean().optional(),underline:e.boolean().optional(),strike:e.boolean().optional(),code:e.boolean().optional(),link:e.string().optional(),color:e.string().optional(),background:e.string().optional()}).optional(),Ag=e.object({mention:e.object({id:e.union([e.string(),e.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:e.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),Dg=e.object({column_value:e.object({item_id:e.union([e.string(),e.number()]).describe("The board item ID."),column_id:e.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),Ng=e.object({insert:e.union([e.string().transform((e=>({text:e}))),e.object({text:e.string()}),Ag,Dg]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:Sg.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),kg=e.object({block_content_type:e.literal("text"),delta_format:e.array(Ng).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),Og=e.object({block_content_type:e.literal("code"),delta_format:e.array(Ng).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Rg=e.object({block_content_type:e.literal("list_item"),delta_format:e.array(Ng).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:e.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),Cg=e.discriminatedUnion("block_content_type",[kg,Og,Rg]),Pg=e.object({block_type:e.literal("text"),text_block_type:e.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:e.array(Ng).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),$g=e.object({block_type:e.literal("list_item"),list_block_type:e.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:e.array(Ng).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),xg=e.object({block_type:e.literal("code"),delta_format:e.array(Ng).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Lg=e.object({block_type:e.literal("divider")}),Fg=e.object({block_type:e.literal("page_break")}),Ug=e.object({block_type:e.literal("image"),public_url:e.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:e.union([e.number().int(),e.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),Vg=e.object({block_type:e.literal("video"),raw_url:e.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),jg=e.object({block_type:e.literal("notice_box"),theme:e.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),Mg=e.object({block_type:e.literal("table"),row_count:e.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:e.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:e.number().int().optional().describe("Table width in pixels."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),Bg=e.object({block_type:e.literal("layout"),column_count:e.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),qg=e.discriminatedUnion("block_type",[Pg,$g,xg,Lg,Fg,Ug,Vg,jg,Mg,Bg]),Hg=e.object({operation_type:e.literal("set_name"),name:e.string().min(1).describe("New document name.")}),Gg=e.object({operation_type:e.literal("add_markdown_content"),markdown:e.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Wg=e.object({operation_type:e.literal("update_block"),block_id:e.string().describe("ID of the block to update. Get block IDs from read_docs."),content:Cg.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),Yg=e.object({operation_type:e.literal("create_block"),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:e.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:qg.describe("The block to create. Use block_type to select the block type.")}),Qg=e.object({operation_type:e.literal("delete_block"),block_id:e.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),zg=e.object({operation_type:e.literal("replace_block"),block_id:e.string().describe("ID of the block to delete."),after_block_id:e.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:e.string().optional().describe("Parent block ID for the replacement block."),block:qg.describe("The new block to create in place of the deleted one.")}),Kg=e.object({operation_type:e.literal("add_comment"),body:e.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:e.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:e.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:e.union([e.string(),e.array(e.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:e.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:e.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),Jg=e.discriminatedUnion("operation_type",[Hg,Gg,Wg,Yg,Qg,zg,Kg]),Xg={doc_id:e.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:e.array(Jg).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const Zg=Am`
|
|
1821
|
+
`,vg={doc_id:e.string().min(1).optional().describe("The document ID (the id field returned by read_docs). Provide this OR object_id. Takes priority if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id. Provide this OR doc_id."),markdown:e.string().describe("Markdown content to add to the document."),after_block_id:e.string().optional().describe("Block ID after which to insert the new content. If omitted, content is appended at the end. To insert at the beginning, pass the first block ID from read_docs. Block IDs can be obtained from read_docs or from a previous add_content_to_doc response.")};function bg(e){if(e)return e}function yg(e){if(e)return e}function wg(e){if(e)return{bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,code:e.code,link:e.link,color:e.color,background:e.background}}function Ig(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{blot:{mention:{id:String(t),type:e.insert.mention.type}}}}}return"column_value"in e.insert?{insert:{blot:{column_value:{item_id:String(e.insert.column_value.item_id),column_id:e.insert.column_value.column_id}}}}:{insert:{text:e.insert.text},attributes:wg(e.attributes)}}))}function Tg(e){return e.map((e=>{if("mention"in e.insert){const t=Number(e.insert.mention.id);if(Number.isNaN(t))throw new Error(`Invalid mention id: "${e.insert.mention.id}" is not a valid numeric ID`);return{insert:{mention:{id:t,type:e.insert.mention.type}}}}return"column_value"in e.insert?{insert:{macro:{type:"COLUMN_VALUE",macroId:o(),macroData:{itemId:Number(e.insert.column_value.item_id),columnId:e.insert.column_value.column_id}}}}:{insert:e.insert.text,attributes:wg(e.attributes)}}))}function Eg(e,t){const a=e.attributes||{},i=a.comments||[];return{...e,attributes:{...a,comments:[...i,t]}}}function Sg(e,t,a,i){const r=a+i;let n=0;const o=[];for(const i of e){const e=i.insert;if(null==e)throw new Error(`Unexpected delta op at position ${n}: op has no 'insert' field. Block content may be from an unsupported block type.`);const s=n,d=s+("string"==typeof e?e.length:1),p=Math.max(s,a),l=Math.min(d,r);p>=l?o.push(i):"string"!=typeof e?o.push(Eg(i,t)):(p>s&&o.push({...i,insert:e.slice(0,p-s)}),o.push(Eg({...i,insert:e.slice(p-s,l-s)},t)),l<d&&o.push({...i,insert:e.slice(l-s)})),n=d}return o}const Ag=e.object({bold:e.boolean().optional(),italic:e.boolean().optional(),underline:e.boolean().optional(),strike:e.boolean().optional(),code:e.boolean().optional(),link:e.string().optional(),color:e.string().optional(),background:e.string().optional()}).optional(),Dg=e.object({mention:e.object({id:e.union([e.string(),e.number()]).describe("User, doc, or board ID. Get user IDs from list_users_and_teams."),type:e.enum(["USER","DOC","BOARD"]).default("USER").describe("Mention type. USER is most common.")}).describe("Mention blot — tags a user, doc, or board inline. Do not set attributes on mention ops.")}),Ng=e.object({column_value:e.object({item_id:e.union([e.string(),e.number()]).describe("The board item ID."),column_id:e.string().describe('The column ID (e.g. "status", "date4"). Get column IDs from get_board_schema.')}).describe("Column value blot — embeds a live board column value inline in the doc.")}),kg=e.object({insert:e.union([e.string().transform((e=>({text:e}))),e.object({text:e.string()}),Dg,Ng]).describe('Content to insert. Use {text: "..."} for plain text, {mention: {id, type}} to tag a user/doc/board, or {column_value: {item_id, column_id}} to embed a live column value. The last operation in the array must be {text: "\\n"}.'),attributes:Ag.describe("Optional formatting: bold, italic, underline, strike, code, link, color, background. Not applicable to mention or column_value ops.")}),Og=e.object({block_content_type:e.literal("text"),delta_format:e.array(kg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),Rg=e.object({block_content_type:e.literal("code"),delta_format:e.array(kg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Cg=e.object({block_content_type:e.literal("list_item"),delta_format:e.array(kg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),checked:e.boolean().optional().describe("Check state for CHECK_LIST items."),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),Pg=e.discriminatedUnion("block_content_type",[Og,Rg,Cg]),$g=e.object({block_type:e.literal("text"),text_block_type:e.enum(["NORMAL_TEXT","LARGE_TITLE","MEDIUM_TITLE","SMALL_TITLE","QUOTE"]).optional().describe("Block subtype. LARGE_TITLE=H1, MEDIUM_TITLE=H2, SMALL_TITLE=H3."),delta_format:e.array(kg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),alignment:e.enum(["LEFT","RIGHT","CENTER"]).optional(),direction:e.enum(["LTR","RTL"]).optional()}),xg=e.object({block_type:e.literal("list_item"),list_block_type:e.enum(["BULLETED_LIST","NUMBERED_LIST","CHECK_LIST"]).optional().describe("List type. Defaults to BULLETED_LIST."),delta_format:e.array(kg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),indentation:e.number().int().min(0).optional().describe("Nesting level (0 = no indent).")}),Lg=e.object({block_type:e.literal("code"),delta_format:e.array(kg).min(1).describe('Array of delta operations. Last op must be {insert: {text: "\\n"}}.'),language:e.string().optional().describe('Programming language (e.g. "javascript", "python").')}),Fg=e.object({block_type:e.literal("divider")}),Ug=e.object({block_type:e.literal("page_break")}),Vg=e.object({block_type:e.literal("image"),public_url:e.string().url().optional().describe("Publicly accessible image URL. Provide either public_url or asset_id."),asset_id:e.union([e.number().int(),e.string().regex(/^\d+$/).transform(Number)]).optional().describe("monday.com asset ID for the image. The image block will reference the asset directly. Provide either public_url or asset_id."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),jg=e.object({block_type:e.literal("video"),raw_url:e.string().url().describe("Video URL (YouTube, Vimeo, or direct video URL)."),width:e.number().int().min(1).optional().describe("Width in pixels.")}),Mg=e.object({block_type:e.literal("notice_box"),theme:e.enum(["INFO","TIPS","WARNING","GENERAL"]).describe("Visual style of the notice box.")}),Bg=e.object({block_type:e.literal("table"),row_count:e.number().int().min(1).max(25).describe("Number of rows (1–25)."),column_count:e.number().int().min(1).max(10).describe("Number of columns (1–10)."),width:e.number().int().optional().describe("Table width in pixels."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),qg=e.object({block_type:e.literal("layout"),column_count:e.number().int().min(2).max(6).describe("Number of columns (2–6)."),column_style:e.array(e.object({width:e.number().int()})).optional().describe("Column widths. Array length must match column_count. Widths must sum to 100.")}),Hg=e.discriminatedUnion("block_type",[$g,xg,Lg,Fg,Ug,Vg,jg,Mg,Bg,qg]),Gg=e.object({operation_type:e.literal("set_name"),name:e.string().min(1).describe("New document name.")}),Wg=e.object({operation_type:e.literal("add_markdown_content"),markdown:e.string().describe("Markdown content to convert and append (or insert) as blocks."),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs.")}),Yg=e.object({operation_type:e.literal("update_block"),block_id:e.string().describe("ID of the block to update. Get block IDs from read_docs."),content:Pg.describe("New content for the block. Use block_content_type to select: text (updates text/heading/quote content), code (updates code content), list_item (updates bullets/numbered/todo content). Cannot change block subtype — use replace_block for that.")}),Qg=e.object({operation_type:e.literal("create_block"),after_block_id:e.string().optional().describe("Insert after this block ID. Omit to append at end. Block IDs come from read_docs."),parent_block_id:e.string().optional().describe("Parent block ID for nested blocks. Only works for notice_box containers — use the notice_box block ID directly. Table/layout cell nesting is NOT supported by the API. IMPORTANT: A notice_box created in the same call cannot be referenced — use a separate call first to create it, then a second call to nest content inside it."),block:Hg.describe("The block to create. Use block_type to select the block type.")}),zg=e.object({operation_type:e.literal("delete_block"),block_id:e.string().describe("ID of the block to permanently delete. Works for all block types including BOARD, WIDGET, DOC embed, GIPHY.")}),Kg=e.object({operation_type:e.literal("replace_block"),block_id:e.string().describe("ID of the block to delete."),after_block_id:e.string().optional().describe("Insert replacement after this block ID. Provide the ID of the block that precedes the deleted block."),parent_block_id:e.string().optional().describe("Parent block ID for the replacement block."),block:Hg.describe("The new block to create in place of the deleted one.")}),Jg=e.object({operation_type:e.literal("add_comment"),body:e.string().min(1).describe("The comment text. Use HTML tags for formatting (not markdown). Do not use @ to mention users — use mentions_list instead."),parent_update_id:e.number().optional().describe("The ID of an existing comment (update) to reply to. Omit to create a new top-level comment. Get comment IDs from read_docs with include_comments: true."),mentions_list:e.string().optional().describe('Optional JSON array of mentions: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types: User, Team, Board, Project.'),block_id:e.union([e.string(),e.array(e.string()).min(1)]).optional().describe("Block ID (string) or array of block IDs to anchor the comment to. When an array is provided, the same comment highlights all specified blocks. Only works on text-content blocks (text, code, list_item, title, quote) — not on divider, table, layout, notice_box, image, video, or giphy. Get block IDs from read_docs with include_blocks: true. Omit to create a general doc-level comment. Pair with selection_from + selection_length (single block_id only) to comment on a specific text range."),selection_from:e.number().int().min(0).optional().describe("Start character offset (0-indexed) of the selected text within the block. Requires block_id. Omit to comment on the entire block."),selection_length:e.number().int().min(1).optional().describe("Number of characters in the text selection. Requires block_id and selection_from. Only works for text, code, and list_item blocks that have a delta format.")}),Xg=e.discriminatedUnion("operation_type",[Gg,Wg,Yg,Qg,zg,Kg,Jg]),Zg={doc_id:e.string().min(1).optional().describe("The document ID (the id field from read_docs). Takes priority over object_id if both are provided."),object_id:e.string().min(1).optional().describe("The document object ID (the object_id field from read_docs, visible in the document URL). Resolved to doc_id."),operations:e.array(Xg).min(1).max(25).describe('Ordered list of operations to perform. Executed sequentially. Stops at first failure.\n\nOperation types:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (simplest for text/lists/tables).\n- update_block: Change content of an existing text/code/list/divider block.\n- create_block: Create a new block at a specific position (supports text, list_item, code, divider, page_break, image, video, notice_box, table, layout).\n- delete_block: Permanently remove a block. Works for ALL block types including BOARD, WIDGET, DOC embed, GIPHY.\n- replace_block: Delete a block and create a new one in its place. Use for: changing image/video source, table restructure, notice_box theme change.\n- add_comment: Create a new comment or reply on the document. Use parent_update_id to reply to an existing comment. Format text with HTML. Uses the doc\'s backing board item.\n\nWHEN TO USE WHICH:\n- Adding new text sections → add_markdown_content\n- Adding asset-based images → create_block with block_type "image" and asset_id (add_markdown_content does NOT support asset images)\n- Mixed content with asset images → alternate add_markdown_content (for text) and create_block (for each image) in sequence\n- Editing existing text block → update_block\n- Changing an image URL → replace_block (image URL is immutable after creation)\n- Changing video URL → replace_block\n- Restructuring a table → replace_block\n- BOARD/WIDGET/DOC/GIPHY blocks → delete_block only (no public API to create these)\n\nNESTING CONTENT IN CONTAINERS:\n- notice_box: Fully supported. Create the notice_box first, then in a separate call create child blocks with parent_block_id set to the notice_box ID. You cannot reference a block ID created in the same call.\n- table: Cell-level API nesting is NOT supported. To create a table with content, use add_markdown_content with a markdown table (e.g. "| H1 | H2 |\\n| --- | --- |\\n| A | B |"). This creates a pre-populated table in one shot. Empty tables created via create_block cannot have their cells populated through the API.\n- layout: Cell-level API nesting is NOT supported and there is no markdown equivalent. Layouts can only be created empty via create_block. No workaround exists to populate layout columns through the API.\nDeleting a container does NOT delete its children — delete children first for clean removal.\n\nBlock IDs are available in the blocks array returned by read_docs.')};const ev=Am`
|
|
1822
1822
|
mutation CreateDashboard(
|
|
1823
1823
|
$name: String!
|
|
1824
1824
|
$workspace_id: ID!
|
|
@@ -1840,14 +1840,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1840
1840
|
board_folder_id
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
`,
|
|
1843
|
+
`,tv=Am`
|
|
1844
1844
|
query GetAllWidgetsSchema {
|
|
1845
1845
|
all_widgets_schema {
|
|
1846
1846
|
widget_type
|
|
1847
1847
|
schema
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
|
-
`,
|
|
1850
|
+
`,av=Am`
|
|
1851
1851
|
mutation CreateWidget($parent: WidgetParentInput!, $kind: ExternalWidget!, $name: String!, $settings: JSON!) {
|
|
1852
1852
|
create_widget(parent: $parent, kind: $kind, name: $name, settings: $settings) {
|
|
1853
1853
|
id
|
|
@@ -1859,14 +1859,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
`,
|
|
1862
|
+
`,iv={name:e.string().min(1,"Dashboard name is required").describe("Human-readable dashboard title (UTF-8 chars)"),workspace_id:e.string().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(_p).default(_p.Public).describe("Visibility level: PUBLIC or PRIVATE"),board_folder_id:e.string().optional().describe("Optional folder ID within workspace to place this dashboard (if not provided, dashboard will be placed in workspace root)")};const rv={parent_container_id:e.string().describe("ID of the parent container (dashboard ID or board view ID)"),parent_container_type:e.nativeEnum(ac).describe("Type of parent container: DASHBOARD or BOARD_VIEW"),widget_kind:e.nativeEnum(Np).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()).optional().describe("Widget-specific settings as JSON object conforming to widget schema. Use all_widgets_schema tool to get the required schema for each widget type.")};const nv=Am`
|
|
1863
1863
|
mutation updateWorkspace($id: ID!, $attributes: UpdateWorkspaceAttributesInput!) {
|
|
1864
1864
|
update_workspace(id: $id, attributes: $attributes) {
|
|
1865
1865
|
id
|
|
1866
1866
|
name
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
`,
|
|
1869
|
+
`,ov={id:e.string().describe("The ID of the workspace to update"),attributeAccountProductId:e.number().optional().describe("The target account product's ID to move the workspace to"),attributeDescription:e.string().optional().describe("The description of the workspace to update"),attributeKind:e.nativeEnum(ic).optional().describe("The kind of the workspace to update (open / closed / template)"),attributeName:e.string().optional().describe("The name of the workspace to update")};const sv=Am`
|
|
1870
1870
|
mutation updateFolder(
|
|
1871
1871
|
$folderId: ID!
|
|
1872
1872
|
$name: String
|
|
@@ -1893,7 +1893,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1893
1893
|
name
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
1896
|
-
`,
|
|
1896
|
+
`,dv={folderId:e.string().describe("The ID of the folder to update"),name:e.string().optional().describe("The new name of the folder"),color:e.nativeEnum(Cp).optional().describe("The new color of the folder"),fontWeight:e.nativeEnum($p).optional().describe("The new font weight of the folder"),customIcon:e.nativeEnum(Pp).optional().describe("The new custom icon of the folder"),parentFolderId:e.string().optional().describe("The ID of the new parent folder"),workspaceId:e.string().optional().describe("The ID of the workspace containing the folder"),accountProductId:e.string().optional().describe("The account product ID associated with the folder"),position_object_id:e.string().optional().describe("The ID of the object to position the folder relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:e.nativeEnum(hl).optional().describe("The type of object to position the folder relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:e.boolean().optional().describe("Whether to position the folder after the object")};const pv=Am`
|
|
1897
1897
|
mutation createWorkspace(
|
|
1898
1898
|
$name: String!
|
|
1899
1899
|
$workspaceKind: WorkspaceKind!
|
|
@@ -1910,7 +1910,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1910
1910
|
name
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
`,
|
|
1913
|
+
`,lv={name:e.string().describe("The name of the new workspace to be created"),workspaceKind:e.nativeEnum(ic).describe("The kind of workspace to create"),description:e.string().optional().describe("The description of the new workspace"),accountProductId:e.string().optional().describe("The account product ID associated with the workspace")};const cv=Am`
|
|
1914
1914
|
mutation createFolder(
|
|
1915
1915
|
$workspaceId: ID!
|
|
1916
1916
|
$name: String!
|
|
@@ -1931,7 +1931,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1931
1931
|
name
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
|
-
`,
|
|
1934
|
+
`,mv={workspaceId:e.string().describe("The ID of the workspace where the folder will be created"),name:e.string().describe("The name of the folder to be created"),color:e.nativeEnum(Cp).optional().describe("The color of the folder"),fontWeight:e.nativeEnum($p).optional().describe("The font weight of the folder"),customIcon:e.nativeEnum(Pp).optional().describe("The custom icon of the folder"),parentFolderId:e.string().optional().describe("The ID of the parent folder")};const uv=Am`
|
|
1935
1935
|
mutation updateBoardHierarchy($boardId: ID!, $attributes: UpdateBoardHierarchyAttributesInput!) {
|
|
1936
1936
|
update_board_hierarchy(board_id: $boardId, attributes: $attributes) {
|
|
1937
1937
|
success
|
|
@@ -1941,7 +1941,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
|
-
`,
|
|
1944
|
+
`,hv=Am`
|
|
1945
1945
|
mutation updateOverviewHierarchy($overviewId: ID!, $attributes: UpdateOverviewHierarchyAttributesInput!) {
|
|
1946
1946
|
update_overview_hierarchy(overview_id: $overviewId, attributes: $attributes) {
|
|
1947
1947
|
success
|
|
@@ -1951,7 +1951,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
|
-
`,
|
|
1954
|
+
`,fv={objectType:e.nativeEnum(hl).describe("The type of object to move"),id:e.string().describe("The ID of the object to move"),position_object_id:e.string().optional().describe("The ID of the object to position the object relative to. If this parameter is provided, position_object_type must be also provided."),position_object_type:e.nativeEnum(hl).optional().describe("The type of object to position the object relative to. If this parameter is provided, position_object_id must be also provided."),position_is_after:e.boolean().optional().describe("Whether to position the object after the 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.")};const _v=Am`
|
|
1955
1955
|
query aggregateBoardInsights($query: AggregateQueryInput!, $boardId: ID!) {
|
|
1956
1956
|
boards(ids: [$boardId]) {
|
|
1957
1957
|
name
|
|
@@ -1973,7 +1973,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1973
1973
|
}
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
|
-
`,
|
|
1976
|
+
`,gv=new Set([Cd.Case,Cd.Between,Cd.Left,Cd.Raw,Cd.None,Cd.CountKeys]),vv=Object.values(Cd).filter((e=>!gv.has(e))),bv=new Set([Cd.Left,Cd.Trim,Cd.Upper,Cd.Lower,Cd.DateTruncDay,Cd.DateTruncWeek,Cd.DateTruncMonth,Cd.DateTruncQuarter,Cd.DateTruncYear,Cd.Color,Cd.Label,Cd.EndDate,Cd.StartDate,Cd.Hour,Cd.PhoneCountryShortName,Cd.Person,Cd.Upper,Cd.Lower,Cd.Order,Cd.Length,Cd.Flatten,Cd.IsDone]);function yv(e){return{column_id:e}}new Set([Cd.Count,Cd.CountDistinct,Cd.CountSubitems,Cd.CountItems,Cd.First,Cd.Sum,Cd.Average,Cd.Median,Cd.Min,Cd.Max,Cd.MinMax]);const wv={boardId:e.number().describe("The id of the board to get insights for"),aggregations:e.array(e.object({function:e.enum(vv).describe("The function of the aggregation. For simple column value leave undefined").optional(),columnId:e.string().describe("The id of the column to aggregate")})).describe(`The aggregations to get. Before sending the aggregations, read guidelines.aggregation from get_column_type_info with fetchMode "${vu.Guidelines}" for a relevant column type on this board. Transformative functions and plain columns (no function) must be in group by.`).optional(),groupBy:e.array(e.string()).describe("The columns to group by. All columns in the group by must be in the aggregations as well without a function.").optional(),limit:e.number().describe("The limit of the results").max(1e3).optional().default(1e3),filters:zf,filtersOperator:Kf,orderBy:e.array(e.object({columnId:e.string().describe("The id of the column to order by"),direction:e.nativeEnum(Xp).optional().default(Xp.Asc).describe("The direction to order by")})).optional().describe("The columns to order by, will control the order of the items in the response")};const Iv=Am`
|
|
1977
1977
|
query GetBoards($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1978
1978
|
boards(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1979
1979
|
id
|
|
@@ -1981,7 +1981,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1981
1981
|
url
|
|
1982
1982
|
}
|
|
1983
1983
|
}
|
|
1984
|
-
`,
|
|
1984
|
+
`,Tv=Am`
|
|
1985
1985
|
query GetDocs($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1986
1986
|
docs(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1987
1987
|
id
|
|
@@ -1989,14 +1989,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
1989
1989
|
url
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
`,
|
|
1992
|
+
`,Ev=Am`
|
|
1993
1993
|
query GetFolders($page: Int!, $limit: Int!, $workspace_ids: [ID]) {
|
|
1994
1994
|
folders(page: $page, limit: $limit, workspace_ids: $workspace_ids) {
|
|
1995
1995
|
id
|
|
1996
1996
|
name
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
|
-
`,
|
|
1999
|
+
`,Sv=Am`
|
|
2000
2000
|
query SearchItems($query: String!, $limit: Int, $workspaceIds: [ID!]) {
|
|
2001
2001
|
search {
|
|
2002
2002
|
items(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
|
|
@@ -2011,7 +2011,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
|
-
`,
|
|
2014
|
+
`,Av=Am`
|
|
2015
2015
|
query SearchBoardsDev($query: String!, $limit: Int, $workspaceIds: [ID!]) {
|
|
2016
2016
|
search {
|
|
2017
2017
|
boards(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
|
|
@@ -2026,7 +2026,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
`,
|
|
2029
|
+
`,Dv=Am`
|
|
2030
2030
|
query SearchDocsDev($query: String!, $limit: Int, $workspaceIds: [ID!]) {
|
|
2031
2031
|
search {
|
|
2032
2032
|
docs(query: $query, limit: $limit, workspace_ids: $workspaceIds) {
|
|
@@ -2040,14 +2040,14 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
2042
|
}
|
|
2043
|
-
`;var
|
|
2043
|
+
`;var Nv,kv;!function(e){e.BOARD="board-",e.DOCUMENT="doc-",e.FOLDER="folder-",e.ITEM="item-"}(Nv||(Nv={})),function(e){e.BOARD="BOARD",e.DOCUMENTS="DOCUMENTS",e.FOLDERS="FOLDERS",e.ITEMS="ITEMS"}(kv||(kv={}));const Ov={searchTerm:e.string().optional().describe("The search term to use for the search."),searchType:e.nativeEnum(kv).describe("The type of search to perform."),limit:e.number().max(20).optional().default(20).describe("The number of items to get. The max and default value is 20."),page:e.number().optional().default(1).describe("The page number to get. The default value is 1."),workspaceIds:e.array(e.number()).optional().describe("The ids of the workspaces to search in. [IMPORTANT] Only pass this param if user explicitly asked to search within specific workspaces.")};const Rv=e.object({id:e.string().describe("The ID of the entity to mention"),type:e.nativeEnum(dl).describe("The type of mention: User, Team, Board, or Project")}),Cv=e.array(Rv),Pv={itemId:e.number().describe("The id of the item to which the update will be added"),body:e.string().describe("The update text to be created. Do not use @ to mention users, use the mentionsList field instead."),mentionsList:e.string().optional().describe('Optional JSON array of mentions in the format: [{"id": "123", "type": "User"}, {"id": "456", "type": "Team"}]. Valid types are: User, Team, Board, Project')};const $v=Am`
|
|
2044
2044
|
mutation updateAssetsOnItem($boardId: ID!, $itemId: ID!, $columnId: String!, $files: [FileInput!]!) {
|
|
2045
2045
|
update_assets_on_item(board_id: $boardId, item_id: $itemId, column_id: $columnId, files: $files) {
|
|
2046
2046
|
id
|
|
2047
2047
|
name
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
|
-
|
|
2050
|
+
`,xv=e.object({fileType:e.enum(["google_drive","dropbox","box","onedrive","link","asset","doc"]).describe('The type of file: "asset" for uploaded files (requires assetId), "doc" for monday docs (requires objectId), "link" for generic links, "google_drive", "dropbox", "box", "onedrive" for cloud storage links (all link types require linkToFile)'),name:e.string().describe("File display name"),linkToFile:e.string().optional().describe("File link URL. Required for link, google_drive, dropbox, box, and onedrive file types"),assetId:e.number().optional().describe("The asset's ID. Required when fileType is 'asset'"),objectId:e.number().optional().describe("The doc's ID. Required when fileType is 'doc'")}),Lv={boardId:e.string().describe("The board's unique identifier"),itemId:e.string().describe("The item's unique identifier"),columnId:e.string().describe("The file or doc column's unique identifier"),files:e.array(xv).describe("Array of file values to set on the column")};const Fv=Am`
|
|
2051
2051
|
query getAssets($ids: [ID!]!) {
|
|
2052
2052
|
assets(ids: $ids) {
|
|
2053
2053
|
id
|
|
@@ -2065,7 +2065,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
|
-
`,
|
|
2068
|
+
`,Uv={ids:e.array(e.string()).min(1).describe("Array of asset IDs to fetch")};const Vv=Am`
|
|
2069
2069
|
query getUserContext {
|
|
2070
2070
|
me {
|
|
2071
2071
|
id
|
|
@@ -2102,7 +2102,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
|
-
`,
|
|
2105
|
+
`,jv=Am`
|
|
2106
2106
|
query getFavoriteDetails(
|
|
2107
2107
|
$boardIds: [ID!]
|
|
2108
2108
|
$folderIds: [ID!]
|
|
@@ -2126,7 +2126,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2126
2126
|
name
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
`,
|
|
2129
|
+
`,Mv={[Yp.Board]:"boardIds",[Yp.Folder]:"folderIds",[Yp.Workspace]:"workspaceIds",[Yp.Dashboard]:"dashboardIds"},Bv={[Yp.Board]:"boards",[Yp.Folder]:"folders",[Yp.Workspace]:"workspaces",[Yp.Dashboard]:"dashboards"};const qv=Am`
|
|
2130
2130
|
query GetNotetakerMeetings(
|
|
2131
2131
|
$limit: Int
|
|
2132
2132
|
$cursor: String
|
|
@@ -2179,13 +2179,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2179
2179
|
}
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
|
-
`,
|
|
2182
|
+
`,Hv={ids:e.array(e.string()).optional().describe("Filter by specific meeting IDs. Use this to fetch one or more specific meetings in a single call."),access:e.enum(["OWN","SHARED_WITH_ME","SHARED_WITH_ACCOUNT","ALL"]).optional().default("OWN").describe("Filter meetings by access level. OWN: meetings the user participated in or invited the bot to. SHARED_WITH_ME: meetings shared with the user or their team. SHARED_WITH_ACCOUNT: meetings shared with the entire account. ALL: all meetings the user has access to."),limit:e.number().min(1).max(100).optional().default(25).describe("Maximum number of notetaker meetings to return per page (1-100)."),cursor:e.string().optional().describe("Cursor for pagination. Use cursor from the previous page_info to fetch the next page."),search:e.string().optional().describe("Search notetaker meetings by title, participant name, or email."),include_summary:e.boolean().optional().default(!1).describe("Whether to include the AI-generated summary for each meeting."),include_topics:e.boolean().optional().default(!1).describe("Whether to include discussion topics and talking points for each meeting."),include_action_items:e.boolean().optional().default(!1).describe("Whether to include action items for each meeting."),include_transcript:e.boolean().optional().default(!1).describe("Whether to include the full transcript for each meeting. Transcripts can be very large.")};const Gv=Am`
|
|
2183
2183
|
mutation BatchUndo($boardId: ID!, $undoRecordId: ID!) {
|
|
2184
2184
|
batch_undo(board_id: $boardId, undo_record_id: $undoRecordId) {
|
|
2185
2185
|
success
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
|
-
`,
|
|
2188
|
+
`,Wv={boardId:e.number().describe("The id of the board where the action was performed"),undoRecordId:e.string().describe("The undo record ID (action_record_uuid) from the activity log data field. Use get_board_activity with includeData=true to find this value.")};const Yv=Am`
|
|
2189
2189
|
mutation CreateUpload($input: CreateUploadInput!) {
|
|
2190
2190
|
create_upload(input: $input) {
|
|
2191
2191
|
upload_id
|
|
@@ -2199,7 +2199,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2199
2199
|
expires_at
|
|
2200
2200
|
}
|
|
2201
2201
|
}
|
|
2202
|
-
`,
|
|
2202
|
+
`,Qv={fileName:e.string().describe('The name of the file to upload, including extension (e.g. "report.pdf")'),contentType:e.string().describe('The MIME type of the file (e.g. "application/pdf", "image/png", "text/plain")'),fileSize:e.number().int().positive().max(524288e3).describe("The file size in bytes. Maximum 500MB (524288000 bytes)")};const zv=Am`
|
|
2203
2203
|
mutation CompleteUpload($input: CompleteUploadInput!) {
|
|
2204
2204
|
complete_upload(input: $input) {
|
|
2205
2205
|
id
|
|
@@ -2211,13 +2211,13 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2211
2211
|
filelink
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
|
-
`,
|
|
2214
|
+
`,Kv=Am`
|
|
2215
2215
|
mutation ChangeColumnValue($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {
|
|
2216
2216
|
change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {
|
|
2217
2217
|
id
|
|
2218
2218
|
}
|
|
2219
2219
|
}
|
|
2220
|
-
`,
|
|
2220
|
+
`,Jv={uploadId:e.string().describe("The upload_id returned by get_asset_upload_url"),etag:e.string().describe("The ETag header value from the PUT response when uploading to the presigned URL"),boardId:e.string().describe("The board's unique identifier"),itemId:e.string().describe("The item's unique identifier"),columnId:e.string().describe("The file or doc column's unique identifier to attach the uploaded asset to")};const Xv="\n**Board-relation linking — do in order**\n\n1. **Fetch (target board, one query)**\n- **has_more: true** (and under **~500** items / **~5** pages for this pass) → your **only** next action is\n **get_board_items_page** with **cursor=nextCursor**; same **boardId** and the same **searchTerm** / **filters**\n / **itemIds** — **do not** change **filters** on a cursor call. **No** user turn until **has_more** is false\n or you stop at the cap. The first page alone is never “the whole board” while **has_more** is still true.\n- **Shrink the query first** when you can: **columnIds**;\n **filters**; **searchTerm**; or **itemIds** (max **100** per call, split big lists). Search **timeout** or\n error → **narrower** **searchTerm** or smaller **limit** / columns, then continue with **nextCursor** as\n in the first bullet.\n\n2. **Match (after the fetch for that pass is done)**\n- Apply a **clear** rule to names/values you already loaded (e.g. same name as source, or value user gave).\n- One unambiguous match → link without asking. **No** vague “best” pick without a rule.\n\n3. **If the user must be involved (only after step 1 is done for that query)**\n- If step 1 is incomplete, **no** questions (see step 1’s first bullet).\n- **True tie** (2+ items match the rule equally) → show **only those tied rows** (or a tiny shortlist),\n not the full result set and never all ~500.\n- **No way to name a target yet** (not a tie) → ask **once** for a **name** or **search phrase** to use in\n **searchTerm** / **filters**, not a menu of the board.\n\n4. **Write** — On the owning board’s board-relation column using change_item_column_values\n".trim(),Zv={};const eb=Am`
|
|
2221
2221
|
query GetItemAssets($itemId: [ID!]!, $columnId: [String!]!) {
|
|
2222
2222
|
items(ids: $itemId) {
|
|
2223
2223
|
assets(column_ids: $columnId) {
|
|
@@ -2227,7 +2227,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2227
2227
|
}
|
|
2228
2228
|
}
|
|
2229
2229
|
}
|
|
2230
|
-
`,eb=10485760,tb=5e4,ab=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),ib=new Set([".pdf"]),rb=new Set([".docx"]),nb=new Set([".xlsx"]),ob=new Set([".xls"]),sb=new Set([".txt",".md",".csv",".json"]),db={item_id:e.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:e.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:e.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:e.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function pb(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function lb(e){if(null==e)return"";if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return String(e);if(e instanceof Date)return e.toISOString();if("object"==typeof e){if("result"in e)return lb(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function cb(e,t,a){const i=function(e,t){if(t){const e=pb(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:pb(e.name)}(e,a);try{if(ab.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(ob.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>eb)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),r=[];let n=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(n+=t.byteLength,n>eb)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");r.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(r)}(e.public_url);let r,n;ib.has(i)?(r=await async function(e){const t=await g(new Uint8Array(e)),{text:a}=await v(t,{mergePages:!0});return a}(a),n="pdf"):rb.has(i)?(r=await async function(e){return(await f.extractRawText({buffer:e})).value}(a),n="word"):nb.has(i)?(r=await async function(e){const t=new _.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(lb).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),n="excel"):sb.has(i)?(r=a.toString("utf-8"),n="text"):(r=a.toString("utf-8"),n="unknown");const o=r.slice(t,t+tb),s=r.length>t+tb;return{file_name:e.name,file_extension:i,content_type:n,text:o,total_length:r.length,...ib.has(i)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+tb}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var mb,ub,hb,fb,_b,gb,vb,bb,yb,wb,Ib,Tb,Eb,Sb,Ab,Db,Nb,kb,Ob,Rb,Cb,Pb,$b,xb,Lb,Fb,Ub,Vb,jb,Mb,Bb,qb,Hb,Gb,Wb,Yb,Qb,zb,Kb,Jb,Xb,Zb,ey,ty,ay,iy,ry,ny,oy,sy,dy,py,ly,cy,my,uy,hy,fy,_y,gy,vy,by,yy,wy,Iy,Ty,Ey,Sy,Ay,Dy,Ny,ky,Oy,Ry,Cy,Py,$y,xy,Ly,Fy,Uy,Vy,jy,My,By,qy,Hy,Gy,Wy,Yy,Qy,zy,Ky,Jy,Xy,Zy,ew,tw,aw,iw,rw,nw,ow,sw,dw,pw,lw,cw,mw,uw,hw,fw,_w,gw,vw,bw,yw,ww,Iw,Tw,Ew,Sw,Aw,Dw,Nw,kw,Ow,Rw,Cw,Pw,$w,xw,Lw,Fw,Uw,Vw,jw,Mw,Bw,qw,Hw,Gw,Ww,Yw,Qw,zw,Kw,Jw,Xw,Zw,eI,tI,aI,iI,rI,nI,oI,sI,dI,pI,lI,cI,mI,uI,hI,fI,_I,gI,vI,bI,yI,wI,II,TI,EI,SI,AI,DI,NI,kI,OI,RI,CI,PI,$I,xI,LI,FI,UI,VI,jI,MI,BI,qI,HI,GI,WI,YI,QI,zI,KI,JI,XI,ZI;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(mb||(mb={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(ub||(ub={})),function(e){e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(hb||(hb={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(fb||(fb={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(_b||(_b={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(gb||(gb={})),function(e){e.Table="TABLE"}(vb||(vb={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(bb||(bb={})),function(e){e.And="AND",e.Or="OR"}(yb||(yb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(wb||(wb={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Ib||(Ib={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Tb||(Tb={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(Eb||(Eb={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(Sb||(Sb={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(Ab||(Ab={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Skill="SKILL",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(Db||(Db={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Nb||(Nb={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(kb||(kb={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(Ob||(Ob={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(Rb||(Rb={})),function(e){e.Account="ACCOUNT",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(Cb||(Cb={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(Pb||(Pb={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}($b||($b={})),function(e){e.Agent="AGENT"}(xb||(xb={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Lb||(Lb={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(Fb||(Fb={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Ub||(Ub={})),function(e){e.Edit="edit",e.View="view"}(Vb||(Vb={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(jb||(jb={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(Mb||(Mb={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(Bb||(Bb={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(qb||(qb={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Hb||(Hb={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(Gb||(Gb={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Wb||(Wb={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Yb||(Yb={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(Qb||(Qb={})),function(e){e.Edit="edit",e.View="view"}(zb||(zb={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Kb||(Kb={})),function(e){e.AccountCapacityExceeded="ACCOUNT_CAPACITY_EXCEEDED",e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.FileTooLarge="FILE_TOO_LARGE",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(Jb||(Jb={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(Xb||(Xb={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(Zb||(Zb={})),function(e){e.EmailBounced="EMAIL_BOUNCED",e.EmailClicked="EMAIL_CLICKED",e.EmailDelivered="EMAIL_DELIVERED",e.EmailDropped="EMAIL_DROPPED",e.EmailOpened="EMAIL_OPENED",e.EmailRecipientComplaint="EMAIL_RECIPIENT_COMPLAINT",e.EmailRecipientUnsubscribed="EMAIL_RECIPIENT_UNSUBSCRIBED",e.EmailSent="EMAIL_SENT"}(ey||(ey={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(ty||(ty={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(ay||(ay={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(iy||(iy={})),function(e){e.CompetitorMove="COMPETITOR_MOVE",e.CrisisEvent="CRISIS_EVENT",e.CustomerBehavior="CUSTOMER_BEHAVIOR",e.EmergingTechnology="EMERGING_TECHNOLOGY",e.MarketTrend="MARKET_TREND",e.Other="OTHER",e.ProductLaunch="PRODUCT_LAUNCH",e.RegulatoryChange="REGULATORY_CHANGE"}(ry||(ry={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(ny||(ny={})),function(e){e.Later="LATER",e.Now="NOW"}(oy||(oy={})),function(e){e.Blocked="BLOCKED",e.Draft="DRAFT",e.Failed="FAILED",e.Generating="GENERATING",e.Ongoing="ONGOING",e.OnHold="ON_HOLD",e.Processing="PROCESSING",e.ReadyToSend="READY_TO_SEND",e.Scheduled="SCHEDULED",e.Sending="SENDING",e.Sent="SENT"}(sy||(sy={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(dy||(dy={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(py||(py={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(ly||(ly={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(cy||(cy={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(my||(my={})),function(e){e.Description="description",e.Title="title"}(uy||(uy={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(hy||(hy={})),function(e){e.Or="OR"}(fy||(fy={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(_y||(_y={})),function(e){e.Account="ACCOUNT",e.User="USER"}(gy||(gy={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(vy||(vy={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(by||(by={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(yy||(yy={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(wy||(wy={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Iy||(Iy={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(Ty||(Ty={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(Ey||(Ey={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(Sy||(Sy={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(Ay||(Ay={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(Dy||(Dy={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Ny||(Ny={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(ky||(ky={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Oy||(Oy={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Ry||(Ry={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Cy||(Cy={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}(Py||(Py={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}($y||($y={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(xy||(xy={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT"}(Ly||(Ly={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(Fy||(Fy={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(Uy||(Uy={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(Vy||(Vy={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(jy||(jy={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(My||(My={})),function(e){e.Monday="monday",e.Sunday="sunday"}(By||(By={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(qy||(qy={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(Hy||(Hy={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(Gy||(Gy={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(Wy||(Wy={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(Yy||(Yy={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(Qy||(Qy={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(zy||(zy={})),function(e){e.Card="CARD",e.Flat="FLAT"}(Ky||(Ky={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(Jy||(Jy={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(Xy||(Xy={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(Zy||(Zy={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(ew||(ew={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(tw||(tw={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.DisplayText="DISPLAY_TEXT",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Hour="HOUR",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.PageBlock="PAGE_BLOCK",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(aw||(aw={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(iw||(iw={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(rw||(rw={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(nw||(nw={})),function(e){e.And="AND",e.Or="OR"}(ow||(ow={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(sw||(sw={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(dw||(dw={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(pw||(pw={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.AuthDomain="AUTH_DOMAIN",e.Consolidation="CONSOLIDATION",e.FirstUser="FIRST_USER",e.InternalCreation="INTERNAL_CREATION",e.Scim="SCIM",e.ServicePortalAuthDomain="SERVICE_PORTAL_AUTH_DOMAIN",e.ServicePortalUserInvitation="SERVICE_PORTAL_USER_INVITATION",e.Sso="SSO",e.SystemCreation="SYSTEM_CREATION",e.Unknown="UNKNOWN",e.User="USER"}(lw||(lw={})),function(e){e.Error="ERROR"}(cw||(cw={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(mw||(mw={})),function(e){e.Table="TABLE"}(uw||(uw={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(hw||(hw={})),function(e){e.And="AND",e.Or="OR"}(fw||(fw={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(_w||(_w={})),function(e){e.Asc="ASC",e.Desc="DESC"}(gw||(gw={})),function(e){e.Asc="asc",e.Desc="desc"}(vw||(vw={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(bw||(bw={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Hour="hour",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Numbers="numbers",e.People="people",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(yw||(yw={})),function(e){e.And="and",e.Or="or"}(ww||(ww={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(Iw||(Iw={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(Tw||(Tw={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(Ew||(Ew={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(Sw||(Sw={})),function(e){e.Board="BOARD",e.Doc="DOC"}(Aw||(Aw={})),function(e){e.File="FILE"}(Dw||(Dw={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(Nw||(Nw={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(kw||(kw={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(Ow||(Ow={})),function(e){e.Dropdown="dropdown",e.Status="status"}(Rw||(Rw={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(Cw||(Cw={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(Pw||(Pw={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}($w||($w={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(xw||(xw={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(Lw||(Lw={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(Fw||(Fw={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(Uw||(Uw={})),function(e){e.Post="Post",e.Project="Project"}(Vw||(Vw={})),function(e){e.Left="left",e.Right="right"}(jw||(jw={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(Mw||(Mw={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(Bw||(Bw={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(qw||(qw={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(Hw||(Hw={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(Gw||(Gw={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(Ww||(Ww={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(Yw||(Yw={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(Qw||(Qw={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(zw||(zw={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(Kw||(Kw={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(Jw||(Jw={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(Xw||(Xw={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(Zw||(Zw={})),function(e){e.BaseRole="BASE_ROLE",e.Email="EMAIL",e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Name="NAME",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Status="STATUS",e.Teams="TEAMS"}(eI||(eI={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(tI||(tI={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsText="CONTAINS_TEXT",e.Equals="EQUALS",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.NotEquals="NOT_EQUALS",e.StartsWithText="STARTS_WITH_TEXT"}(aI||(aI={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(iI||(iI={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(rI||(rI={})),function(e){e.Board="BOARD"}(nI||(nI={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(oI||(oI={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(sI||(sI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(dI||(dI={})),function(e){e.Complete="COMPLETE",e.Start="START"}(pI||(pI={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(lI||(lI={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(cI||(cI={})),function(e){e.CountKeys="COUNT_KEYS"}(mI||(mI={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(uI||(uI={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(hI||(hI={})),function(e){e.Nominal="nominal",e.Percent="percent"}(fI||(fI={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(_I||(_I={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(gI||(gI={})),function(e){e.Active="active",e.Inactive="inactive"}(vI||(vI={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(bI||(bI={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(yI||(yI={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(wI||(wI={})),function(e){e.Done="DONE",e.InProgress="IN_PROGRESS",e.NotATask="NOT_A_TASK",e.NotNow="NOT_NOW",e.NoLongerRelevant="NO_LONGER_RELEVANT",e.Pending="PENDING",e.Todo="TODO"}(II||(II={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(TI||(TI={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(EI||(EI={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(SI||(SI={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(AI||(AI={})),function(e){e.InvalidField="INVALID_FIELD"}(DI||(DI={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(NI||(NI={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(kI||(kI={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.ViewOnly="VIEW_ONLY"}(OI||(OI={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(RI||(RI={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(CI||(CI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(PI||(PI={})),function(e){e.CreatedAt="CREATED_AT"}($I||($I={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(xI||(xI={})),function(e){e.Board="board"}(LI||(LI={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(FI||(FI={})),function(e){e.Board="BOARD",e.Item="ITEM"}(UI||(UI={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(VI||(VI={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(jI||(jI={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(MI||(MI={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(BI||(BI={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(qI||(qI={})),function(e){e.Error="ERROR",e.Ok="OK"}(HI||(HI={})),function(e){e.Wait="WAIT"}(GI||(GI={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(WI||(WI={})),function(e){e.LiteBuilder="LITE_BUILDER"}(YI||(YI={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(QI||(QI={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(zI||(zI={})),function(e){e.All="all",e.Member="member"}(KI||(KI={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(JI||(JI={})),function(e){e.CreatedAt="created_at"}(XI||(XI={})),function(e){e.Core="core",e.Crm="crm",e.Forms="forms",e.Marketing="marketing",e.ProjectManagement="project_management",e.Service="service",e.Software="software",e.Whiteboard="whiteboard"}(ZI||(ZI={}));const eT=Am`
|
|
2230
|
+
`,tb=10485760,ab=5e4,ib=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico"]),rb=new Set([".pdf"]),nb=new Set([".docx"]),ob=new Set([".xlsx"]),sb=new Set([".xls"]),db=new Set([".txt",".md",".csv",".json"]),pb={item_id:e.string().describe("The ID of the item that contains the file. Obtained from get_board_items_page results."),column_id:e.string().describe("The ID of the files column containing the file. Obtained from the board schema."),file_name:e.string().optional().describe('Optional file name hint used to determine the file type when the asset name is ambiguous. Include the extension (e.g. "report.pdf").'),offset:e.number().int().min(0).optional().describe("Character offset to start reading from. Use when a previous response indicated the content was truncated (has_more: true). Defaults to 0.")};function lb(e){const t=e.lastIndexOf(".");return-1===t?"":e.slice(t).toLowerCase()}function cb(e){if(null==e)return"";if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return String(e);if(e instanceof Date)return e.toISOString();if("object"==typeof e){if("result"in e)return cb(e.result);if("richText"in e)return e.richText.map((e=>e.text)).join("");if("hyperlink"in e)return e.text??""}return""}async function mb(e,t,a){const i=function(e,t){if(t){const e=lb(t);if(e)return e}return e.file_extension?e.file_extension.startsWith(".")?e.file_extension.toLowerCase():`.${e.file_extension.toLowerCase()}`:lb(e.name)}(e,a);try{if(ib.has(i))return{file_name:e.name,file_extension:i,content_type:"image",public_url:e.public_url,message:"Image file — use the public_url to view or analyze its content."};if(sb.has(i))return{file_name:e.name,file_extension:i,message:"Legacy .xls format is not supported. Please convert the file to .xlsx and re-upload."};const a=await async function(e){const t=await fetch(e,{signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`Failed to download file: HTTP ${t.status}`);const a=t.headers.get("content-length");if(a&&parseInt(a,10)>tb)throw new Error(`File exceeds the 10 MB size limit (Content-Length: ${a} bytes)`);if(!t.body)throw new Error("Response body is empty");const i=t.body.getReader(),r=[];let n=0;try{let e=await i.read();for(;!e.done;){const{value:t}=e;if(n+=t.byteLength,n>tb)throw await i.cancel().catch((()=>{})),new Error("File exceeds the 10 MB size limit");r.push(t),e=await i.read()}}catch(e){throw await i.cancel().catch((()=>{})),e}return Buffer.concat(r)}(e.public_url);let r,n;rb.has(i)?(r=await async function(e){const t=await g(new Uint8Array(e)),{text:a}=await v(t,{mergePages:!0});return a}(a),n="pdf"):nb.has(i)?(r=await async function(e){return(await f.extractRawText({buffer:e})).value}(a),n="word"):ob.has(i)?(r=await async function(e){const t=new _.Workbook;await t.xlsx.load(e);const a=[];return t.eachSheet((e=>{const t=[];e.eachRow((e=>{const a=e.values.slice(1);t.push(a.map(cb).join(","))})),a.push(`=== Sheet: ${e.name} ===\n${t.join("\n")}`)})),a.join("\n\n")}(a),n="excel"):db.has(i)?(r=a.toString("utf-8"),n="text"):(r=a.toString("utf-8"),n="unknown");const o=r.slice(t,t+ab),s=r.length>t+ab;return{file_name:e.name,file_extension:i,content_type:n,text:o,total_length:r.length,...rb.has(i)&&{public_url:e.public_url},...s&&{has_more:!0,next_offset:t+ab}}}catch(t){return{message:`Failed to fetch file content: ${t instanceof Error?t.message:String(t)}`,file_name:e.name,file_extension:i}}}var ub,hb,fb,_b,gb,vb,bb,yb,wb,Ib,Tb,Eb,Sb,Ab,Db,Nb,kb,Ob,Rb,Cb,Pb,$b,xb,Lb,Fb,Ub,Vb,jb,Mb,Bb,qb,Hb,Gb,Wb,Yb,Qb,zb,Kb,Jb,Xb,Zb,ey,ty,ay,iy,ry,ny,oy,sy,dy,py,ly,cy,my,uy,hy,fy,_y,gy,vy,by,yy,wy,Iy,Ty,Ey,Sy,Ay,Dy,Ny,ky,Oy,Ry,Cy,Py,$y,xy,Ly,Fy,Uy,Vy,jy,My,By,qy,Hy,Gy,Wy,Yy,Qy,zy,Ky,Jy,Xy,Zy,ew,tw,aw,iw,rw,nw,ow,sw,dw,pw,lw,cw,mw,uw,hw,fw,_w,gw,vw,bw,yw,ww,Iw,Tw,Ew,Sw,Aw,Dw,Nw,kw,Ow,Rw,Cw,Pw,$w,xw,Lw,Fw,Uw,Vw,jw,Mw,Bw,qw,Hw,Gw,Ww,Yw,Qw,zw,Kw,Jw,Xw,Zw,eI,tI,aI,iI,rI,nI,oI,sI,dI,pI,lI,cI,mI,uI,hI,fI,_I,gI,vI,bI,yI,wI,II,TI,EI,SI,AI,DI,NI,kI,OI,RI,CI,PI,$I,xI,LI,FI,UI,VI,jI,MI,BI,qI,HI,GI,WI,YI,QI,zI,KI,JI,XI,ZI,eT;!function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(ub||(ub={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.External="EXTERNAL",e.Personal="PERSONAL"}(hb||(hb={})),function(e){e.ClaudeOpus_4_7="CLAUDE_OPUS_4_7",e.ClaudeSonnet_4_6="CLAUDE_SONNET_4_6",e.Gemini_2_5Flash="GEMINI_2_5_FLASH",e.Gpt_5_2="GPT_5_2"}(fb||(fb={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED",e.Failed="FAILED",e.Inactive="INACTIVE"}(_b||(_b={})),function(e){e.DataView="DATA_VIEW",e.Table="TABLE"}(gb||(gb={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(vb||(vb={})),function(e){e.Table="TABLE"}(bb||(bb={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(yb||(yb={})),function(e){e.And="AND",e.Or="OR"}(wb||(wb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Ib||(Ib={})),function(e){e.Asc="ASC",e.Desc="DESC"}(Tb||(Tb={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(Eb||(Eb={})),function(e){e.Average="AVERAGE",e.Between="BETWEEN",e.Case="CASE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.CountKeys="COUNT_KEYS",e.CountSubitems="COUNT_SUBITEMS",e.Date="DATE",e.DateTruncDay="DATE_TRUNC_DAY",e.DateTruncMonth="DATE_TRUNC_MONTH",e.DateTruncQuarter="DATE_TRUNC_QUARTER",e.DateTruncWeek="DATE_TRUNC_WEEK",e.DateTruncYear="DATE_TRUNC_YEAR",e.DurationRunning="DURATION_RUNNING",e.EndDate="END_DATE",e.Equals="EQUALS",e.First="FIRST",e.Flatten="FLATTEN",e.Hour="HOUR",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Left="LEFT",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Order="ORDER",e.Person="PERSON",e.PhoneCountryShortName="PHONE_COUNTRY_SHORT_NAME",e.Raw="RAW",e.StartDate="START_DATE",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(Sb||(Sb={})),function(e){e.ApplicationPdf="APPLICATION_PDF",e.ImageGif="IMAGE_GIF",e.ImageJpeg="IMAGE_JPEG",e.ImagePng="IMAGE_PNG",e.ImageWebp="IMAGE_WEBP"}(Ab||(Ab={})),function(e){e.ClientSideCode="CLIENT_SIDE_CODE",e.ExternalHosting="EXTERNAL_HOSTING",e.ServerSideCode="SERVER_SIDE_CODE"}(Db||(Db={})),function(e){e.AccountSettingsView="ACCOUNT_SETTINGS_VIEW",e.AdminView="ADMIN_VIEW",e.Ai="AI",e.AiAgent="AI_AGENT",e.AiAgentSkill="AI_AGENT_SKILL",e.AiBoardMainMenuHeader="AI_BOARD_MAIN_MENU_HEADER",e.AiDocContextualMenu="AI_DOC_CONTEXTUAL_MENU",e.AiDocQuickStart="AI_DOC_QUICK_START",e.AiDocSlashCommand="AI_DOC_SLASH_COMMAND",e.AiDocTopBar="AI_DOC_TOP_BAR",e.AiEmailsAndActivitiesHeaderActions="AI_EMAILS_AND_ACTIVITIES_HEADER_ACTIONS",e.AiFormula="AI_FORMULA",e.AiIcAssistantHelpCenter="AI_IC_ASSISTANT_HELP_CENTER",e.AiItemEmailsAndActivitiesActions="AI_ITEM_EMAILS_AND_ACTIVITIES_ACTIONS",e.AiItemUpdateActions="AI_ITEM_UPDATE_ACTIONS",e.AiPlatformAgent="AI_PLATFORM_AGENT",e.AppWizard="APP_WIZARD",e.Block="BLOCK",e.BoardColumnAction="BOARD_COLUMN_ACTION",e.BoardColumnExtension="BOARD_COLUMN_EXTENSION",e.BoardHeaderAction="BOARD_HEADER_ACTION",e.BoardView="BOARD_VIEW",e.Column="COLUMN",e.ColumnTemplate="COLUMN_TEMPLATE",e.Credentials="CREDENTIALS",e.DashboardWidget="DASHBOARD_WIDGET",e.DataEntity="DATA_ENTITY",e.Dialog="DIALOG",e.DigitalWorker="DIGITAL_WORKER",e.DocActions="DOC_ACTIONS",e.FieldType="FIELD_TYPE",e.GroupMenuAction="GROUP_MENU_ACTION",e.GrowthConfig="GROWTH_CONFIG",e.Integration="INTEGRATION",e.ItemBatchAction="ITEM_BATCH_ACTION",e.ItemMenuAction="ITEM_MENU_ACTION",e.ItemView="ITEM_VIEW",e.Modal="MODAL",e.NotificationKind="NOTIFICATION_KIND",e.NotificationSettingKind="NOTIFICATION_SETTING_KIND",e.Oauth="OAUTH",e.Object="OBJECT",e.PackagedBlock="PACKAGED_BLOCK",e.Product="PRODUCT",e.ProductView="PRODUCT_VIEW",e.Skill="SKILL",e.Solution="SOLUTION",e.SubWorkflow="SUB_WORKFLOW",e.SurfaceView="SURFACE_VIEW",e.SyncableResource="SYNCABLE_RESOURCE",e.Topbar="TOPBAR",e.VibeItemView="VIBE_ITEM_VIEW",e.VibeObject="VIBE_OBJECT",e.WorkflowTemplate="WORKFLOW_TEMPLATE",e.WorkspaceView="WORKSPACE_VIEW"}(Nb||(Nb={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(kb||(kb={})),function(e){e.AccountRead="ACCOUNT_READ",e.AssetsRead="ASSETS_READ",e.BoardsRead="BOARDS_READ",e.BoardsWrite="BOARDS_WRITE",e.DepartmentsRead="DEPARTMENTS_READ",e.DepartmentsWrite="DEPARTMENTS_WRITE",e.DocsRead="DOCS_READ",e.DocsWrite="DOCS_WRITE",e.MeRead="ME_READ",e.NotificationsWrite="NOTIFICATIONS_WRITE",e.TagsRead="TAGS_READ",e.TeamsRead="TEAMS_READ",e.TeamsWrite="TEAMS_WRITE",e.UpdatesRead="UPDATES_READ",e.UpdatesWrite="UPDATES_WRITE",e.UsersRead="USERS_READ",e.UsersWrite="USERS_WRITE",e.WebhooksRead="WEBHOOKS_READ",e.WebhooksWrite="WEBHOOKS_WRITE",e.WorkspacesRead="WORKSPACES_READ",e.WorkspacesWrite="WORKSPACES_WRITE"}(Ob||(Ob={})),function(e){e.Draft="DRAFT",e.Live="LIVE"}(Rb||(Rb={})),function(e){e.Deprecated="DEPRECATED",e.Draft="DRAFT",e.Live="LIVE",e.Promoting="PROMOTING"}(Cb||(Cb={})),function(e){e.Account="ACCOUNT",e.Item="ITEM",e.Post="POST",e.VibeApp="VIBE_APP",e.Workspace="WORKSPACE"}(Pb||(Pb={})),function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}($b||($b={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(xb||(xb={})),function(e){e.Agent="AGENT"}(Lb||(Lb={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(Fb||(Fb={})),function(e){e.Center="CENTER",e.Left="LEFT",e.Right="RIGHT"}(Ub||(Ub={})),function(e){e.Ltr="LTR",e.Rtl="RTL"}(Vb||(Vb={})),function(e){e.Edit="edit",e.View="view"}(jb||(jb={})),function(e){e.Communication="communication",e.Description="description",e.ItemNickname="item_nickname",e.Name="name"}(Mb||(Mb={})),function(e){e.AssignedContributor="assigned_contributor",e.Contributor="contributor",e.Editor="editor",e.Viewer="viewer"}(Bb||(Bb={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(qb||(qb={})),function(e){e.Classic="classic",e.MultiLevel="multi_level"}(Hb||(Hb={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(Gb||(Gb={})),function(e){e.CurrentUserMuteAll="CURRENT_USER_MUTE_ALL",e.CustomSettings="CUSTOM_SETTINGS",e.MentionsAndAssignsOnly="MENTIONS_AND_ASSIGNS_ONLY",e.MuteAll="MUTE_ALL",e.NotMuted="NOT_MUTED"}(Wb||(Wb={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(Yb||(Yb={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(Qb||(Qb={})),function(e){e.ConnectToPortfolio="CONNECT_TO_PORTFOLIO",e.ConvertToProject="CONVERT_TO_PROJECT"}(zb||(zb={})),function(e){e.Edit="edit",e.View="view"}(Kb||(Kb={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Jb||(Jb={})),function(e){e.AccountCapacityExceeded="ACCOUNT_CAPACITY_EXCEEDED",e.AuthorizationFailed="AUTHORIZATION_FAILED",e.BoardCapacityExceeded="BOARD_CAPACITY_EXCEEDED",e.FileTooLarge="FILE_TOO_LARGE",e.InternalError="INTERNAL_ERROR",e.InvalidUpload="INVALID_UPLOAD",e.PermissionDenied="PERMISSION_DENIED"}(Xb||(Xb={})),function(e){e.Completed="COMPLETED",e.Failed="FAILED",e.Processing="PROCESSING",e.Rejected="REJECTED",e.UploadPending="UPLOAD_PENDING"}(Zb||(Zb={})),function(e){e.CountKeys="COUNT_KEYS",e.Max="MAX",e.Min="MIN",e.MinMax="MIN_MAX",e.None="NONE",e.Sum="SUM"}(ey||(ey={})),function(e){e.EmailBounced="EMAIL_BOUNCED",e.EmailClicked="EMAIL_CLICKED",e.EmailDelivered="EMAIL_DELIVERED",e.EmailDropped="EMAIL_DROPPED",e.EmailOpened="EMAIL_OPENED",e.EmailRecipientComplaint="EMAIL_RECIPIENT_COMPLAINT",e.EmailRecipientUnsubscribed="EMAIL_RECIPIENT_UNSUBSCRIBED",e.EmailSent="EMAIL_SENT"}(ty||(ty={})),function(e){e.Accent="ACCENT",e.Other="OTHER",e.Primary="PRIMARY",e.Secondary="SECONDARY",e.Text="TEXT"}(ay||(ay={})),function(e){e.Attachment="ATTACHMENT",e.PrimaryLogo="PRIMARY_LOGO",e.SecondaryLogo="SECONDARY_LOGO"}(iy||(iy={})),function(e){e.Confirmed="CONFIRMED",e.Pending="PENDING"}(ry||(ry={})),function(e){e.CompetitorMove="COMPETITOR_MOVE",e.CrisisEvent="CRISIS_EVENT",e.CustomerBehavior="CUSTOMER_BEHAVIOR",e.EmergingTechnology="EMERGING_TECHNOLOGY",e.MarketTrend="MARKET_TREND",e.Other="OTHER",e.ProductLaunch="PRODUCT_LAUNCH",e.RegulatoryChange="REGULATORY_CHANGE"}(ny||(ny={})),function(e){e.Active="ACTIVE",e.Consumed="CONSUMED",e.Dismissed="DISMISSED"}(oy||(oy={})),function(e){e.Later="LATER",e.Now="NOW"}(sy||(sy={})),function(e){e.Blocked="BLOCKED",e.Draft="DRAFT",e.Failed="FAILED",e.Generating="GENERATING",e.Ongoing="ONGOING",e.OnHold="ON_HOLD",e.Processing="PROCESSING",e.ReadyToSend="READY_TO_SEND",e.Scheduled="SCHEDULED",e.Sending="SENDING",e.Sent="SENT"}(dy||(dy={})),function(e){e.Description="description",e.Settings="settings",e.Title="title"}(py||(py={})),function(e){e.AllRelatedNotificationsDontHaveChannel="AllRelatedNotificationsDontHaveChannel",e.AlwaysEnabled="AlwaysEnabled",e.Editable="Editable"}(ly||(ly={})),function(e){e.Email="Email",e.Monday="Monday",e.Slack="Slack"}(cy||(cy={})),function(e){e.Deactivate="DEACTIVATE",e.Reactivate="REACTIVATE"}(my||(my={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(uy||(uy={})),function(e){e.Description="description",e.Title="title"}(hy||(hy={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(fy||(fy={})),function(e){e.Or="OR"}(_y||(_y={})),function(e){e.InProgress="IN_PROGRESS",e.NotNow="NOT_NOW",e.Pending="PENDING",e.Todo="TODO"}(gy||(gy={})),function(e){e.Account="ACCOUNT",e.User="USER"}(vy||(vy={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(by||(by={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(yy||(yy={})),function(e){e.AutomationNotify="AUTOMATION_NOTIFY",e.ImAssigned="IM_ASSIGNED",e.ImMentioned="IM_MENTIONED"}(wy||(wy={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Iy||(Iy={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(Ty||(Ty={})),function(e){e.Ff="FF",e.Fs="FS",e.Sf="SF",e.Ss="SS"}(Ey||(Ey={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Skills="SKILLS"}(Sy||(Sy={})),function(e){e.Guest="GUEST",e.User="USER",e.Viewer="VIEWER"}(Ay||(Ay={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(Dy||(Dy={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.PageBreak="page_break",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(Ny||(Ny={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(ky||(ky={})),function(e){e.Board="BOARD",e.Doc="DOC",e.User="USER"}(Oy||(Oy={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(Ry||(Ry={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(Cy||(Cy={})),function(e){e.DuplicateDocWithContent="duplicate_doc_with_content",e.DuplicateDocWithContentAndUpdates="duplicate_doc_with_content_and_updates"}(Py||(Py={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Planned="PLANNED",e.Spent="SPENT"}($y||($y={})),function(e){e.Daily="DAILY",e.Fte="FTE",e.Monthly="MONTHLY",e.Total="TOTAL",e.Weekly="WEEKLY"}(xy||(xy={})),function(e){e.Csv="CSV",e.Xlsx="XLSX"}(Ly||(Ly={})),function(e){e.ClaudeManagedAgent="CLAUDE_MANAGED_AGENT",e.CustomAgent="CUSTOM_AGENT"}(Fy||(Fy={})),function(e){e.AppFeature="APP_FEATURE",e.Battery="BATTERY",e.Calendar="CALENDAR",e.Chart="CHART",e.EmbeddedSite="EMBEDDED_SITE",e.Gantt="GANTT",e.Listview="LISTVIEW",e.Map="MAP",e.Number="NUMBER",e.Table="TABLE"}(Uy||(Uy={})),function(e){e.Custom="CUSTOM",e.Interface="INTERFACE",e.Primitive="PRIMITIVE"}(Vy||(Vy={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED"}(jy||(jy={})),function(e){e.Asset="asset",e.Box="box",e.Doc="doc",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(My||(My={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(By||(By={})),function(e){e.Monday="monday",e.Sunday="sunday"}(qy||(qy={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(Hy||(Hy={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(Gy||(Gy={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(Wy||(Wy={})),function(e){e.Center="Center",e.FullLeft="FullLeft",e.FullRight="FullRight",e.Left="Left",e.Right="Right"}(Yy||(Yy={})),function(e){e.Color="Color",e.Image="Image",e.None="None"}(Qy||(Qy={})),function(e){e.LtR="LtR",e.Rtl="Rtl"}(zy||(zy={})),function(e){e.Large="Large",e.Medium="Medium",e.Small="Small"}(Ky||(Ky={})),function(e){e.Card="CARD",e.Flat="FLAT"}(Jy||(Jy={})),function(e){e.Auto="Auto",e.Center="Center",e.Left="Left",e.Right="Right"}(Xy||(Xy={})),function(e){e.ExtraLarge="ExtraLarge",e.Large="Large",e.Medium="Medium",e.Small="Small"}(Zy||(Zy={})),function(e){e.Account="Account",e.QueryParam="QueryParam"}(ew||(ew={})),function(e){e.Dropdown="Dropdown",e.Horizontal="Horizontal",e.Vertical="Vertical"}(tw||(tw={})),function(e){e.Alphabetical="Alphabetical",e.Custom="Custom",e.Random="Random"}(aw||(aw={})),function(e){e.Boolean="Boolean",e.ConnectedBoards="ConnectedBoards",e.Country="Country",e.DisplayText="DISPLAY_TEXT",e.Date="Date",e.DateRange="DateRange",e.Email="Email",e.File="File",e.Hour="HOUR",e.Link="Link",e.Location="Location",e.LongText="LongText",e.MultiSelect="MultiSelect",e.Name="Name",e.Number="Number",e.PageBlock="PAGE_BLOCK",e.People="People",e.Phone="Phone",e.Rating="Rating",e.ShortText="ShortText",e.Signature="Signature",e.SingleSelect="SingleSelect",e.Subitems="Subitems",e.Updates="Updates"}(iw||(iw={})),function(e){e.Board="Board",e.Dashboard="Dashboard",e.Folder="Folder",e.Workspace="Workspace"}(rw||(rw={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(nw||(nw={})),function(e){e.JobRole="JOB_ROLE",e.Location="LOCATION",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Teams="TEAMS"}(ow||(ow={})),function(e){e.And="AND",e.Or="OR"}(sw||(sw={})),function(e){e.ColumnId="COLUMN_ID",e.Title="TITLE"}(dw||(dw={})),function(e){e.AccountLevel="ACCOUNT_LEVEL",e.AppFeatureObject="APP_FEATURE_OBJECT",e.Board="BOARD"}(pw||(pw={})),function(e){e.AccountLevelBlocking="ACCOUNT_LEVEL_BLOCKING",e.DeactivatedByUser="DEACTIVATED_BY_USER",e.RunsRateLimitExceeded="RUNS_RATE_LIMIT_EXCEEDED"}(lw||(lw={})),function(e){e.AgentUserCreation="AGENT_USER_CREATION",e.ApiUserCreation="API_USER_CREATION",e.AuthDomain="AUTH_DOMAIN",e.Consolidation="CONSOLIDATION",e.FirstUser="FIRST_USER",e.InternalCreation="INTERNAL_CREATION",e.Scim="SCIM",e.ServicePortalAuthDomain="SERVICE_PORTAL_AUTH_DOMAIN",e.ServicePortalUserInvitation="SERVICE_PORTAL_USER_INVITATION",e.Sso="SSO",e.SystemCreation="SYSTEM_CREATION",e.Unknown="UNKNOWN",e.User="USER"}(cw||(cw={})),function(e){e.Error="ERROR"}(mw||(mw={})),function(e){e.AnyOf="ANY_OF",e.EndsWith="ENDS_WITH",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.StartsWith="STARTS_WITH"}(uw||(uw={})),function(e){e.Table="TABLE"}(hw||(hw={})),function(e){e.Average="AVERAGE",e.Color="COLOR",e.Count="COUNT",e.CountDistinct="COUNT_DISTINCT",e.CountItems="COUNT_ITEMS",e.First="FIRST",e.Id="ID",e.IsDone="IS_DONE",e.Label="LABEL",e.Length="LENGTH",e.Lower="LOWER",e.Max="MAX",e.Median="MEDIAN",e.Min="MIN",e.Sum="SUM",e.Trim="TRIM",e.Upper="UPPER"}(fw||(fw={})),function(e){e.And="AND",e.Or="OR"}(_w||(_w={})),function(e){e.Column="COLUMN",e.Function="FUNCTION"}(gw||(gw={})),function(e){e.Asc="ASC",e.Desc="DESC"}(vw||(vw={})),function(e){e.Asc="asc",e.Desc="desc"}(bw||(bw={})),function(e){e.Calculated="CALCULATED",e.Visibility="VISIBILITY"}(yw||(yw={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.DirectDoc="direct_doc",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Hour="hour",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Numbers="numbers",e.People="people",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(ww||(ww={})),function(e){e.And="and",e.Or="or"}(Iw||(Iw={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(Tw||(Tw={})),function(e){e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e.Failed="FAILED",e.Pending="PENDING",e.Running="RUNNING"}(Ew||(Ew={})),function(e){e.Agent="agent",e.Person="person",e.Team="team"}(Sw||(Sw={})),function(e){e.Read="READ",e.ReadWrite="READ_WRITE"}(Aw||(Aw={})),function(e){e.Board="BOARD",e.Doc="DOC"}(Dw||(Dw={})),function(e){e.File="FILE"}(Nw||(Nw={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Pending="PENDING"}(kw||(kw={})),function(e){e.BulletedList="BULLETED_LIST",e.CheckList="CHECK_LIST",e.NumberedList="NUMBERED_LIST"}(Ow||(Ow={})),function(e){e.Active="active",e.Deleted="deleted",e.Inactive="inactive"}(Rw||(Rw={})),function(e){e.Dropdown="dropdown",e.Status="status"}(Cw||(Cw={})),function(e){e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}(Pw||(Pw={})),function(e){e.All="ALL",e.Own="OWN",e.SharedWithAccount="SHARED_WITH_ACCOUNT",e.SharedWithMe="SHARED_WITH_ME"}($w||($w={})),function(e){e.Agent="Agent",e.Board="Board",e.Project="Project",e.Team="Team",e.User="User"}(xw||(xw={})),function(e){e.Earliest="EARLIEST",e.EarliestToLatest="EARLIEST_TO_LATEST",e.Latest="LATEST"}(Lw||(Lw={})),function(e){e.AllStatuses="ALL_STATUSES",e.DoneOnly="DONE_ONLY"}(Fw||(Fw={})),function(e){e.Error="ERROR",e.Include="INCLUDE",e.Skip="SKIP"}(Uw||(Uw={})),function(e){e.General="GENERAL",e.Info="INFO",e.Tips="TIPS",e.Warning="WARNING"}(Vw||(Vw={})),function(e){e.Post="Post",e.Project="Project"}(jw||(jw={})),function(e){e.Left="left",e.Right="right"}(Mw||(Mw={})),function(e){e.CreateObjectSchemaColumns="CREATE_OBJECT_SCHEMA_COLUMNS",e.DeleteObjectSchemaColumns="DELETE_OBJECT_SCHEMA_COLUMNS",e.UpdateObjectSchemaColumns="UPDATE_OBJECT_SCHEMA_COLUMNS"}(Bw||(Bw={})),function(e){e.Active="ACTIVE",e.Archived="ARCHIVED",e.Deleted="DELETED"}(qw||(qw={})),function(e){e.Board="Board",e.Folder="Folder",e.Overview="Overview"}(Hw||(Hw={})),function(e){e.Skip="SKIP",e.Upsert="UPSERT"}(Gw||(Gw={})),function(e){e.CreatedAt="CREATED_AT",e.UsedAt="USED_AT"}(Ww||(Ww={})),function(e){e.Placeholder="PLACEHOLDER",e.User="USER"}(Yw||(Yw={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(Qw||(Qw={})),function(e){e.Boolean="BOOLEAN",e.Date="DATE",e.Float="FLOAT",e.Hour="HOUR",e.Number="NUMBER",e.String="STRING"}(zw||(zw={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(Kw||(Kw={})),function(e){e.Crm="crm",e.Dev="dev",e.Forms="forms",e.Knowledge="knowledge",e.Service="service",e.Whiteboard="whiteboard",e.WorkManagement="work_management",e.Workflows="workflows"}(Jw||(Jw={})),function(e){e.Incoming="INCOMING",e.Outgoing="OUTGOING"}(Xw||(Xw={})),function(e){e.Alias="ALIAS",e.Dependency="DEPENDENCY"}(Zw||(Zw={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND",e.UserNotMemberOfTeam="USER_NOT_MEMBER_OF_TEAM",e.ViewersOrGuests="VIEWERS_OR_GUESTS"}(eI||(eI={})),function(e){e.BaseRole="BASE_ROLE",e.Email="EMAIL",e.JobRole="JOB_ROLE",e.Location="LOCATION",e.Name="NAME",e.ResourceManager="RESOURCE_MANAGER",e.Skills="SKILLS",e.Status="STATUS",e.Teams="TEAMS"}(tI||(tI={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(aI||(aI={})),function(e){e.AnyOf="ANY_OF",e.Between="BETWEEN",e.ContainsText="CONTAINS_TEXT",e.Equals="EQUALS",e.GreaterThan="GREATER_THAN",e.GreaterThanOrEquals="GREATER_THAN_OR_EQUALS",e.IsEmpty="IS_EMPTY",e.IsNotEmpty="IS_NOT_EMPTY",e.LowerThan="LOWER_THAN",e.LowerThanOrEqual="LOWER_THAN_OR_EQUAL",e.NotAnyOf="NOT_ANY_OF",e.NotContainsText="NOT_CONTAINS_TEXT",e.NotEquals="NOT_EQUALS",e.StartsWithText="STARTS_WITH_TEXT"}(iI||(iI={})),function(e){e.AccountNewUserDefaults="AccountNewUserDefaults",e.User="User"}(rI||(rI={})),function(e){e.Balanced="BALANCED",e.Quality="QUALITY",e.Speed="SPEED"}(nI||(nI={})),function(e){e.Board="BOARD"}(oI||(oI={})),function(e){e.Active="ACTIVE",e.Deleted="DELETED",e.Inactive="INACTIVE",e.MissingConfig="MISSING_CONFIG"}(sI||(sI={})),function(e){e.Failed="failed",e.Pending="pending",e.Processing="processing",e.Rollback="rollback",e.Success="success"}(dI||(dI={})),function(e){e.Asc="ASC",e.Desc="DESC"}(pI||(pI={})),function(e){e.Complete="COMPLETE",e.Start="START"}(lI||(lI={})),function(e){e.Active="ACTIVE",e.Completed="COMPLETED",e.Planned="PLANNED"}(cI||(cI={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(mI||(mI={})),function(e){e.CountKeys="COUNT_KEYS"}(uI||(uI={})),function(e){e.AmericanGray="american_gray",e.Aquamarine="aquamarine",e.Berry="berry",e.Blackish="blackish",e.BrightBlue="bright_blue",e.BrightGreen="bright_green",e.Brown="brown",e.Bubble="bubble",e.ChiliBlue="chili_blue",e.Coffee="coffee",e.DarkBlue="dark_blue",e.DarkIndigo="dark_indigo",e.DarkOrange="dark_orange",e.DarkPurple="dark_purple",e.DarkRed="dark_red",e.DoneGreen="done_green",e.EggYolk="egg_yolk",e.Explosive="explosive",e.GrassGreen="grass_green",e.Indigo="indigo",e.Lavender="lavender",e.Lilac="lilac",e.Lipstick="lipstick",e.Navy="navy",e.Orchid="orchid",e.Peach="peach",e.Pecan="pecan",e.Purple="purple",e.River="river",e.Royal="royal",e.Saladish="saladish",e.Sky="sky",e.SofiaPink="sofia_pink",e.Steel="steel",e.StuckRed="stuck_red",e.Sunset="sunset",e.Tan="tan",e.Teal="teal",e.Winter="winter",e.WorkingOrange="working_orange"}(hI||(hI={})),function(e){e.Owner="OWNER",e.Subscriber="SUBSCRIBER"}(fI||(fI={})),function(e){e.Nominal="nominal",e.Percent="percent"}(_I||(_I={})),function(e){e.OneTime="one_time",e.Recurring="recurring"}(gI||(gI={})),function(e){e.Monthly="monthly",e.Yearly="yearly"}(vI||(vI={})),function(e){e.Active="active",e.Inactive="inactive"}(bI||(bI={})),function(e){e.Board="BOARD",e.Dashboard="DASHBOARD"}(yI||(yI={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(wI||(wI={})),function(e){e.UpdateMention="UPDATE_MENTION",e.UserAssigned="USER_ASSIGNED"}(II||(II={})),function(e){e.Done="DONE",e.InProgress="IN_PROGRESS",e.NotATask="NOT_A_TASK",e.NotNow="NOT_NOW",e.NoLongerRelevant="NO_LONGER_RELEVANT",e.Pending="PENDING",e.Todo="TODO"}(TI||(TI={})),function(e){e.Code="CODE",e.LargeTitle="LARGE_TITLE",e.MediumTitle="MEDIUM_TITLE",e.NormalText="NORMAL_TEXT",e.Quote="QUOTE",e.SmallTitle="SMALL_TITLE"}(EI||(EI={})),function(e){e.Days="DAYS",e.Months="MONTHS",e.Quarters="QUARTERS",e.Weeks="WEEKS",e.Years="YEARS"}(SI||(SI={})),function(e){e.Exhausted="exhausted",e.Failure="failure",e.Success="success"}(AI||(AI={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UpdateEmailDomainError="UPDATE_EMAIL_DOMAIN_ERROR",e.UserNotFound="USER_NOT_FOUND"}(DI||(DI={})),function(e){e.InvalidField="INVALID_FIELD"}(NI||(NI={})),function(e){e.CannotUpdateSelf="CANNOT_UPDATE_SELF",e.ExceedsBatchLimit="EXCEEDS_BATCH_LIMIT",e.Failed="FAILED",e.InvalidInput="INVALID_INPUT",e.UserNotFound="USER_NOT_FOUND"}(kI||(kI={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(OI||(OI={})),function(e){e.Admin="ADMIN",e.AgentMember="AGENT_MEMBER",e.AgentSignupUser="AGENT_SIGNUP_USER",e.AiPlatformAgentApiUser="AI_PLATFORM_AGENT_API_USER",e.Basic="BASIC",e.CampaignsApiUser="CAMPAIGNS_API_USER",e.CrmCommerceApiUser="CRM_COMMERCE_API_USER",e.DataRetentionApiUser="DATA_RETENTION_API_USER",e.DependenciesApiUser="DEPENDENCIES_API_USER",e.GoalsApiUser="GOALS_API_USER",e.Guest="GUEST",e.HistoricalTrackingBackfillApiUser="HISTORICAL_TRACKING_BACKFILL_API_USER",e.Member="MEMBER",e.MondayServiceApiUser="MONDAY_SERVICE_API_USER",e.NexusApiUser="NEXUS_API_USER",e.OmnichannelApiUser="OMNICHANNEL_API_USER",e.PersonalAgentMember="PERSONAL_AGENT_MEMBER",e.Portal="PORTAL",e.PortfolioApiUser="PORTFOLIO_API_USER",e.ProjectsApiUser="PROJECTS_API_USER",e.ResourceDirectoryApiUser="RESOURCE_DIRECTORY_API_USER",e.ServiceUser="SERVICE_USER",e.SprintManagementApiUser="SPRINT_MANAGEMENT_API_USER",e.ViewOnly="VIEW_ONLY"}(RI||(RI={})),function(e){e.Admin="ADMIN",e.Guest="GUEST",e.Member="MEMBER",e.ViewOnly="VIEW_ONLY"}(CI||(CI={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE",e.Pending="PENDING"}(PI||(PI={})),function(e){e.Asc="ASC",e.Desc="DESC"}($I||($I={})),function(e){e.CreatedAt="CREATED_AT"}(xI||(xI={})),function(e){e.Allocated="ALLOCATED",e.Available="AVAILABLE",e.Spent="SPENT"}(LI||(LI={})),function(e){e.Board="board"}(FI||(FI={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(UI||(UI={})),function(e){e.Board="BOARD",e.Item="ITEM"}(VI||(VI={})),function(e){e.App="APP",e.Dashboard="DASHBOARD",e.Form="FORM",e.Table="TABLE"}(jI||(jI={})),function(e){e.Create="CREATE",e.Update="UPDATE"}(MI||(MI={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(BI||(BI={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(qI||(qI={})),function(e){e.BoardView="BOARD_VIEW",e.Dashboard="DASHBOARD"}(HI||(HI={})),function(e){e.Error="ERROR",e.Ok="OK"}(GI||(GI={})),function(e){e.Wait="WAIT"}(WI||(WI={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC",e.Shareable="SHAREABLE"}(YI||(YI={})),function(e){e.LiteBuilder="LITE_BUILDER"}(QI||(QI={})),function(e){e.ExternalContextProvider="external_context_provider",e.HostMetadata="host_metadata",e.NodeResults="node_results",e.Reference="reference",e.UserConfig="user_config"}(zI||(zI={})),function(e){e.Closed="closed",e.Open="open",e.Template="template"}(KI||(KI={})),function(e){e.All="all",e.Member="member"}(JI||(JI={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(XI||(XI={})),function(e){e.CreatedAt="created_at"}(ZI||(ZI={})),function(e){e.Core="core",e.Crm="crm",e.Forms="forms",e.Marketing="marketing",e.ProjectManagement="project_management",e.Service="service",e.Software="software",e.Whiteboard="whiteboard"}(eT||(eT={}));const tT=Am`
|
|
2231
2231
|
fragment AgentFields on Agent {
|
|
2232
2232
|
id
|
|
2233
2233
|
kind
|
|
@@ -2246,65 +2246,65 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2246
2246
|
created_at
|
|
2247
2247
|
updated_at
|
|
2248
2248
|
}
|
|
2249
|
-
`,
|
|
2250
|
-
${
|
|
2249
|
+
`,aT=Am`
|
|
2250
|
+
${tT}
|
|
2251
2251
|
|
|
2252
2252
|
query getAgents($ids: [ID!], $limit: Int) {
|
|
2253
2253
|
agents(ids: $ids, limit: $limit) {
|
|
2254
2254
|
...AgentFields
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
|
-
`,
|
|
2258
|
-
${
|
|
2257
|
+
`,iT=Am`
|
|
2258
|
+
${tT}
|
|
2259
2259
|
|
|
2260
2260
|
mutation createAgent($input: CreateAgentInput!) {
|
|
2261
2261
|
create_agent(input: $input) {
|
|
2262
2262
|
...AgentFields
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
2265
|
-
`,
|
|
2266
|
-
${
|
|
2265
|
+
`,rT=Am`
|
|
2266
|
+
${tT}
|
|
2267
2267
|
|
|
2268
2268
|
mutation createBlankAgent($input: CreateBlankAgentInput) {
|
|
2269
2269
|
create_blank_agent(input: $input) {
|
|
2270
2270
|
...AgentFields
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
|
-
`,
|
|
2274
|
-
${
|
|
2273
|
+
`,nT=Am`
|
|
2274
|
+
${tT}
|
|
2275
2275
|
|
|
2276
2276
|
mutation updateAgent($id: ID!, $input: UpdateAgentInput!) {
|
|
2277
2277
|
update_agent(id: $id, input: $input) {
|
|
2278
2278
|
...AgentFields
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
`,
|
|
2282
|
-
${
|
|
2281
|
+
`,oT=Am`
|
|
2282
|
+
${tT}
|
|
2283
2283
|
|
|
2284
2284
|
mutation deleteAgent($id: ID!) {
|
|
2285
2285
|
delete_agent(id: $id) {
|
|
2286
2286
|
...AgentFields
|
|
2287
2287
|
}
|
|
2288
2288
|
}
|
|
2289
|
-
`,
|
|
2289
|
+
`,sT=Am`
|
|
2290
2290
|
mutation activateAgent($id: ID!) {
|
|
2291
2291
|
activate_agent(id: $id) {
|
|
2292
2292
|
success
|
|
2293
2293
|
}
|
|
2294
2294
|
}
|
|
2295
|
-
`,
|
|
2295
|
+
`,dT=Am`
|
|
2296
2296
|
mutation deactivateAgent($id: ID!, $inactive_reason: InactiveReason) {
|
|
2297
2297
|
deactivate_agent(id: $id, inactive_reason: $inactive_reason) {
|
|
2298
2298
|
success
|
|
2299
2299
|
}
|
|
2300
2300
|
}
|
|
2301
|
-
`,
|
|
2301
|
+
`,pT=Am`
|
|
2302
2302
|
mutation runAgent($id: ID!) {
|
|
2303
2303
|
run_agent(id: $id) {
|
|
2304
2304
|
trigger_uuid
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
`,
|
|
2307
|
+
`,lT=Am`
|
|
2308
2308
|
query getAgentActiveTriggers($agent_id: ID!) {
|
|
2309
2309
|
agent_active_triggers(agent_id: $agent_id) {
|
|
2310
2310
|
node_id
|
|
@@ -2314,31 +2314,31 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2314
2314
|
field_summary
|
|
2315
2315
|
}
|
|
2316
2316
|
}
|
|
2317
|
-
`,
|
|
2317
|
+
`,cT=Am`
|
|
2318
2318
|
mutation addTriggerToAgent($agent_id: ID!, $block_reference_id: ID!, $field_values: JSON) {
|
|
2319
2319
|
add_trigger_to_agent(agent_id: $agent_id, block_reference_id: $block_reference_id, field_values: $field_values) {
|
|
2320
2320
|
success
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
2323
|
-
`,
|
|
2323
|
+
`,mT=Am`
|
|
2324
2324
|
mutation removeTriggerFromAgent($agent_id: ID!, $node_id: ID!) {
|
|
2325
2325
|
remove_trigger_from_agent(agent_id: $agent_id, node_id: $node_id) {
|
|
2326
2326
|
success
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
|
-
`,
|
|
2329
|
+
`,uT=Am`
|
|
2330
2330
|
mutation addSkillToAgent($agent_id: ID!, $skill_id: ID!) {
|
|
2331
2331
|
add_skill_to_agent(agent_id: $agent_id, skill_id: $skill_id) {
|
|
2332
2332
|
success
|
|
2333
2333
|
}
|
|
2334
2334
|
}
|
|
2335
|
-
`,
|
|
2335
|
+
`,hT=Am`
|
|
2336
2336
|
mutation removeSkillFromAgent($agent_id: ID!, $skill_id: ID!) {
|
|
2337
2337
|
remove_skill_from_agent(agent_id: $agent_id, skill_id: $skill_id) {
|
|
2338
2338
|
success
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
|
-
`,
|
|
2341
|
+
`,fT=Am`
|
|
2342
2342
|
query getAgentTriggersCatalog($block_reference_ids: [ID!]) {
|
|
2343
2343
|
agent_triggers_catalog(block_reference_ids: $block_reference_ids) {
|
|
2344
2344
|
block_reference_id
|
|
@@ -2355,7 +2355,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
2357
|
}
|
|
2358
|
-
`,
|
|
2358
|
+
`,_T=Am`
|
|
2359
2359
|
query getAgentSkillsCatalog {
|
|
2360
2360
|
agent_skills_catalog {
|
|
2361
2361
|
id
|
|
@@ -2363,7 +2363,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2363
2363
|
description
|
|
2364
2364
|
}
|
|
2365
2365
|
}
|
|
2366
|
-
`,
|
|
2366
|
+
`,gT=Am`
|
|
2367
2367
|
mutation createAgentSkill($name: String!, $content: String!, $description: String) {
|
|
2368
2368
|
create_agent_skill(name: $name, content: $content, description: $description) {
|
|
2369
2369
|
id
|
|
@@ -2371,7 +2371,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2371
2371
|
description
|
|
2372
2372
|
}
|
|
2373
2373
|
}
|
|
2374
|
-
`,
|
|
2374
|
+
`,vT={action:e.enum(["create","create_blank","get","update","delete","activate","deactivate","run"]).describe('"create" — create a new agent via AI (pass prompt). "create_blank" — create a new agent manually (pass name/role/etc). "get" — fetch one agent by agent_id or list owned agents. "update" — modify mutable fields on an existing agent. "delete" — permanently delete an agent (irreversible). "activate" — transition agent to ACTIVE. "deactivate" — transition agent to INACTIVE. "run" — manually enqueue an agent run (fire-and-forget).'),agent_id:e.string().trim().min(1,"agent_id must be a non-empty string").optional().describe('Used with action:"get" to fetch a specific agent. Required for action:"update", "delete", "activate", "deactivate", "run". Omit for action:"create", "create_blank", or action:"get" (to list owned agents).'),prompt:e.string().trim().min(1).optional().describe('Required for action:"create". Plain-language description of what the agent should do. Platform generates profile, goal, and plan via AI.'),agent_model:e.nativeEnum(fb).optional().describe('Used with action:"create" or action:"update". Omit unless the user explicitly names a valid monday-supported model.'),name:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Display name of the agent.'),role:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Short role title (e.g. "Customer Success Bot").'),role_description:e.string().trim().min(1).optional().describe('Used with action:"create_blank" or action:"update". Detailed description of the agent role.'),avatar_url:e.string().trim().min(1).optional().describe('Used with action:"create_blank". HTTPS URL of the avatar. Prefer dapulse-res.cloudinary.com or cdn.monday.com.'),gender:e.enum(["male","female"]).optional().describe('Used with action:"create_blank". Hint for generated avatar/name when profile fields are omitted.'),background_color:e.string().trim().min(1).optional().describe('Used with action:"create_blank". Lowercase hex, e.g. "#9450fd".'),user_prompt:e.string().trim().min(1).optional().describe('Used with action:"create_blank". Stored as metadata. Not used for AI generation.'),plan:e.string().trim().min(1).optional().describe('Used with action:"update". New step-by-step execution plan in markdown.')};const bT={action:e.enum(["list","add","remove"]).describe('"list" — returns all triggers currently attached to this agent (includes node_id needed for remove). "add" — attaches a new trigger by block_reference_id. "remove" — detaches a trigger instance by node_id.'),agent_id:e.string().trim().min(1,"agent_id must be a non-empty string").describe("Unique identifier of the agent."),block_reference_id:e.string().trim().min(1).optional().describe('Required for action:"add". The block_reference_id from agent_catalog action:"list_triggers" identifying the trigger type to attach. Never guess this value — look it up in the catalog first.'),field_values:e.record(e.union([e.string(),e.number(),e.boolean(),e.object({value:e.string(),label:e.string()}).passthrough()])).optional().describe('Used with action:"add" when the trigger type has required_fields. Key/value object whose shape is described by field_schemas in the agent_catalog response. Scalar fields use string/number/boolean values. Selection fields use { "value": "<id>", "label": "<name>" }.'),node_id:e.string().trim().min(1).optional().describe('Required for action:"remove". The node_id of the trigger instance — get it from action:"list". Each instance has a unique node_id even if the same trigger type is attached multiple times. Do NOT pass block_reference_id here.')};const yT={action:e.enum(["create","add","remove"]).describe('"create" — author a new custom skill in the account-wide catalog (no agent_id needed). "add" — attach an existing skill to this agent by skill_id. "remove" — detach a skill from this agent.'),agent_id:e.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". Not used for action:"create" (account-level operation).'),name:e.string().trim().min(1).optional().describe('Required for action:"create". Display name of the new skill.'),content:e.string().trim().min(1).optional().describe('Required for action:"create". Markdown instructions defining what the skill does and how to execute it. Be specific and thorough — this is the skill\'s runtime behavior.'),description:e.string().trim().min(1).optional().describe('Used with action:"create". Short description shown in the catalog.'),skill_id:e.string().trim().min(1).optional().describe('Required for action:"add" and action:"remove". The skill id from agent_catalog action:"list_skills", or the id returned by action:"create" in this tool. Never guess or invent a skill id.')};const wT=Am`
|
|
2375
2375
|
query getAgentKnowledge($id: ID!) {
|
|
2376
2376
|
agent_knowledge(id: $id) {
|
|
2377
2377
|
resources {
|
|
@@ -2386,25 +2386,25 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
|
-
`,
|
|
2389
|
+
`,IT=Am`
|
|
2390
2390
|
mutation addAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
|
|
2391
2391
|
add_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
|
|
2392
2392
|
success
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
|
-
`,
|
|
2395
|
+
`,TT=Am`
|
|
2396
2396
|
mutation removeAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!) {
|
|
2397
2397
|
remove_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type) {
|
|
2398
2398
|
success
|
|
2399
2399
|
}
|
|
2400
2400
|
}
|
|
2401
|
-
`,
|
|
2401
|
+
`,ET=Am`
|
|
2402
2402
|
mutation updateAgentResourceAccess($id: ID!, $resource_id: ID!, $scope_type: KnowledgeScope!, $permission_type: KnowledgePermission!) {
|
|
2403
2403
|
update_agent_resource_access(id: $id, resource_id: $resource_id, scope_type: $scope_type, permission_type: $permission_type) {
|
|
2404
2404
|
success
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
|
-
`,
|
|
2407
|
+
`,ST={action:e.enum(["list","add","update","remove"]).describe('"list" — returns all resources the agent currently has access to. "add" — grants access to a board or doc. "update" — changes the permission level on an existing resource. "remove" — revokes the agent\'s access to a board or doc.'),agent_id:e.string().trim().min(1).describe("Unique identifier of the agent."),resource_id:e.string().trim().min(1).optional().describe("Required for action:add, action:update, action:remove. The ID of the board or doc to grant/update/revoke access to."),scope_type:e.enum(["BOARD","DOC"]).optional().describe('Required for action:add, action:update, action:remove. The type of resource: "BOARD" or "DOC".'),permission_type:e.enum(["READ","READ_WRITE"]).optional().describe('Required for action:add and action:update. The permission level: "READ" (agent can read the resource) or "READ_WRITE" (agent can read and write the resource).')};const AT={action:e.enum(["list_triggers","list_skills"]).describe('"list_triggers" — fetch available trigger types with block_reference_id, field_schemas, and required_fields. Call before using manage_agent_triggers action:"add". "list_skills" — fetch available skills with id, name, description. Call before using manage_agent_skills action:"add".'),block_reference_ids:e.array(e.string()).min(1).optional().describe('Used with action:"list_triggers". Fetch specific trigger types by block_reference_id. Omit to return all trigger types.')};const DT=Am`
|
|
2408
2408
|
query getBoardAutomations($boardIds: [ID!], $limit: Int, $cursor: String) {
|
|
2409
2409
|
board_automations(board_ids: $boardIds, limit: $limit, cursor: $cursor) {
|
|
2410
2410
|
cursor
|
|
@@ -2425,25 +2425,25 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2425
2425
|
}
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
`;function
|
|
2428
|
+
`;function NT(e){if("string"!=typeof e)return e;const t=Number(e);return Number.isNaN(t)?e:t}function kT(e){const{active:t,user_id:a,...i}=e;return{...i,user_id:NT(a),is_active:t??!1}}const OT={boardId:e.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string."),limit:e.number().int().min(1).max(100).optional().describe("Maximum number of automations to return. Default: 100."),cursor:e.string().optional().describe("Pagination cursor from a previous response. Pass to retrieve the next page of automations.")};const RT=Am`
|
|
2429
2429
|
mutation activateLiveWorkflow($id: ID!) {
|
|
2430
2430
|
activate_live_workflow(id: $id) {
|
|
2431
2431
|
is_success
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
`,
|
|
2434
|
+
`,CT=Am`
|
|
2435
2435
|
mutation deactivateLiveWorkflow($id: ID!) {
|
|
2436
2436
|
deactivate_live_workflow(id: $id) {
|
|
2437
2437
|
is_success
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
|
-
`,
|
|
2440
|
+
`,PT=Am`
|
|
2441
2441
|
mutation deleteLiveWorkflow($id: ID!) {
|
|
2442
2442
|
delete_live_workflow(id: $id) {
|
|
2443
2443
|
is_success
|
|
2444
2444
|
}
|
|
2445
2445
|
}
|
|
2446
|
-
|
|
2446
|
+
`,$T={action:e.enum(["activate","deactivate","delete"]).describe("The operation to perform. activate: enables a paused automation so it responds to its trigger. deactivate: pauses an automation without deleting it. delete: permanently removes an automation (irreversible)."),workflowId:e.string().trim().min(1,"workflowId must be a non-empty string").describe("The automation ID to operate on. Obtain from list_automations.")};const xT={userPrompt:e.string().trim().min(1,"userPrompt must be a non-empty string").describe("Structured description of the automation to create."),boardId:e.string().trim().min(1,"boardId must be a non-empty string").describe("The numeric board ID as a string.")};const LT=Am`
|
|
2447
2447
|
mutation createWorkflow(
|
|
2448
2448
|
$workspace_id: ID!
|
|
2449
2449
|
$title: String
|
|
@@ -2464,7 +2464,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2464
2464
|
workflow_draft_id
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
|
-
`,
|
|
2467
|
+
`,FT={workspaceId:e.string().trim().min(1,"workspaceId must be a non-empty string").describe("The ID of the workspace to create the workflow in."),title:e.string().optional().describe('Workflow title. Defaults to "New Workflow" if not provided.'),privacyKind:e.enum(["PUBLIC","PRIVATE","SHAREABLE"]).optional().describe("Workflow visibility: PUBLIC (default), PRIVATE, or SHAREABLE (accessible to guests outside the account)."),description:e.string().optional().describe("Optional workflow description."),folderId:e.string().optional().describe("Optional folder ID to place the workflow in."),ownerIds:e.array(e.string()).optional().describe("Optional list of user IDs to set as workflow owners.")};const UT={workflowObjectId:e.number().describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and published versions. Does not change across publishes."),workflowDraftId:e.number().describe("The draft version ID to update. Use the workflowDraftId from the previous create_workflow or update_workflow response — the agent may return a new draft ID, so always read it from the latest response rather than reusing an earlier value."),prompt:e.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the changes to make. Describe what steps to add, remove, or modify in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). The agent interprets this and applies the right structural changes. Maximum 2000 characters.')};const VT={prompt:e.string().trim().min(1,"prompt must be a non-empty string").max(2e3,"prompt must not exceed 2000 characters").describe('Natural-language description of the process to plan. Describe the full end-to-end process in plain English (e.g. "When a deal is marked Won, create a task in the onboarding board and notify the account manager"). The agent will decompose this into one or more monday.com workflows, identify all required boards and columns, and return a structured implementation plan. Maximum 2000 characters.')};const jT=Am`
|
|
2468
2468
|
mutation publishWorkflow($workflow_object_id: ID!, $workflow_draft_id: ID!, $should_activate: Boolean) {
|
|
2469
2469
|
publish_workflow(
|
|
2470
2470
|
workflow_object_id: $workflow_object_id
|
|
@@ -2475,7 +2475,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2475
2475
|
workflow_live_id
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
|
-
`,
|
|
2478
|
+
`,MT={workflowObjectId:e.string().trim().min(1,"workflowObjectId must be a non-empty string").describe("The workflow object ID returned by create_workflow. Identifies the workflow across all its drafts and live versions."),workflowDraftId:e.string().trim().min(1,"workflowDraftId must be a non-empty string").describe("The draft version ID returned by create_workflow. Both workflowObjectId and workflowDraftId are required — together they identify the exact draft to publish."),shouldActivate:e.boolean().optional().describe("Whether to activate the workflow immediately after publishing so it starts running. Defaults to true — the workflow is activated immediately after publish.")};const BT={action: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'),toolName:e.string().optional().describe("Name of the tool to manage (required for enable/disable/status/reset)")};class qT{constructor(){this.name="manage_tools",this.type=Vi.READ,this.enabledByDefault=!0,this.annotations={title:"Discover & Manage monday.com Tools",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1}}setToolkitManager(e){this.toolkitManager=e}getDescription(){return"Discover and manage available monday.com tools. Use this tool first to see what tools are available, check which ones are active/inactive, and enable any tools you need for your tasks. When enabling a tool, you will be asked for confirmation first. Essential for understanding your monday.com toolkit capabilities."}getInputSchema(){return BT}async execute(e){if(!this.toolkitManager)throw new Error("Toolkit manager not initialized");if(!e)throw new Error("Input parameters are required");const{action:t,toolName:a}=e;switch(t){case"enable":{if(!a)throw new Error("Tool name is required for enable action");if(this.toolkitManager.isToolEnabled(a))return{content:{action:"enable",tool_name:a,success:!0,message:`Tool '${a}' is already enabled`,enabled:!0}};const e=this.toolkitManager.enableTool(a);return{content:{action:"enable",tool_name:a,success:e,message:e?`Tool '${a}' has been enabled and is now available for use`:`Failed to enable tool '${a}' (tool not found)`,enabled:e}}}case"disable":{if(!a)throw new Error("Tool name is required for disable action");const e=this.toolkitManager.disableTool(a);return{content:{action:"disable",tool_name:a,success:e,message:e?`Tool '${a}' has been disabled`:`Failed to disable tool '${a}' (tool not found)`,enabled:!e}}}case"status":if(a){return{content:{action:"status",tool_name:a,enabled:this.toolkitManager.isToolEnabled(a)}}}return{content:{action:"status",tools:this.toolkitManager.getToolsStatus()}};case"detailed":{const e=this.toolkitManager.getDetailedToolsStatus();return{content:{action:"detailed",active_tools:Object.entries(e).filter((([,e])=>e.enabled)).map((([e,t])=>({name:e,enabled_by_default:t.enabledByDefault}))),inactive_tools:Object.entries(e).filter((([,e])=>!e.enabled)).map((([e,t])=>({name:e,enabled_by_default:t.enabledByDefault,activate_hint:`{"action": "enable", "toolName": "${e}"}`})))}}}case"reset":{if(!a)throw new Error("Tool name is required for reset action");const e=this.toolkitManager.resetToolToDefault(a);return{content:{action:"reset",tool_name:a,success:e,message:e?`Tool '${a}' has been reset to its default state`:`Failed to reset tool '${a}' (tool not found)`,default_state:this.toolkitManager.isToolEnabledByDefault(a)}}}case"list":return{content:{action:"list",tools:this.toolkitManager.getToolsStatus()}};default:throw new Error("Invalid action. Use: enable, disable, status, list, detailed, or reset")}}}const HT=Am`
|
|
2479
2479
|
query getSprintsByIds($ids: [ID!]) {
|
|
2480
2480
|
items(ids: $ids) {
|
|
2481
2481
|
id
|
|
@@ -2510,7 +2510,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
`,
|
|
2513
|
+
`,GT={SPRINT_TASKS:"sprint_tasks",SPRINT_TIMELINE:"sprint_timeline",SPRINT_COMPLETION:"sprint_completion",SPRINT_START_DATE:"sprint_start_date",SPRINT_END_DATE:"sprint_end_date",SPRINT_ACTIVATION:"sprint_activation"},WT={...GT,SPRINT_SUMMARY:"sprint_summary",SPRINT_CAPACITY:"sprint_capacity"},YT="BOARD_NOT_FOUND:",QT="SPRINT_NOT_FOUND:",zT="DOCUMENT_NOT_FOUND:",KT="DOCUMENT_INVALID:",JT="DOCUMENT_EMPTY:",XT="EXPORT_FAILED:",ZT="INTERNAL_ERROR:",eE="VALIDATION_ERROR:",tE="task_sprint",aE={[WT.SPRINT_TASKS]:"Sprint Tasks",[WT.SPRINT_TIMELINE]:"Sprint Timeline",[WT.SPRINT_COMPLETION]:"Sprint Completion",[WT.SPRINT_START_DATE]:"Sprint Start Date",[WT.SPRINT_END_DATE]:"Sprint End Date",[WT.SPRINT_ACTIVATION]:"Sprint Activation",[WT.SPRINT_SUMMARY]:"Sprint Summary",[WT.SPRINT_CAPACITY]:"Sprint Capacity"},iE=Ol,rE={TASK_SPRINT:"task_sprint",TASK_STATUS:"task_status"},nE=(e,t)=>e.column_values?.find((e=>e.id===t)),oE=(e,t)=>{const a=nE(e,t);return"CheckboxValue"===a?.__typename?a.checked??!1:null},sE=(e,t)=>{const a=nE(e,t);return"DateValue"===a?.__typename?a.date??null:null},dE=(e,t)=>{const a=nE(e,t);return"DocValue"===a?.__typename&&a.file?.doc?.object_id?a.file.doc.object_id:null},pE=(e,t)=>{const a=t.filter((t=>!e.has(t)));return{isValid:0===a.length,missingColumns:a}},lE=(e,t)=>{if(!e.columns)return!1;const a=new Set(e.columns.filter((e=>null!==e)).map((e=>e.id)));return t.every((e=>a.has(e)))},cE=e=>lE(e,Object.values(GT)),mE=e=>lE(e,Object.values(rE)),uE=e=>{if(!e?.settings)return null;const t=e.settings;return t.boardIds&&Array.isArray(t.boardIds)&&t.boardIds[0]?.toString()||t.boardId?.toString()||null},hE=(e,t)=>e.columns&&e.columns.filter((e=>null!==e)).find((e=>e.id===t&&e.type===vf.BoardRelation))||null,fE={sprintId:e.number().describe('The ID of the sprint to get the summary for (e.g., "9123456789")')};const _E=Am`
|
|
2514
2514
|
query GetSprintsBoardItemsWithColumns($boardId: ID!, $limit: Int) {
|
|
2515
2515
|
boards(ids: [$boardId]) {
|
|
2516
2516
|
items_page(limit: $limit) {
|
|
@@ -2546,7 +2546,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
2548
|
}
|
|
2549
|
-
`,
|
|
2549
|
+
`,gE={sprintsBoardId:e.number().describe("The ID of the monday-dev board containing the sprints"),limit:e.number().min(1).max(100).optional().default(25).describe("The number of sprints to retrieve (default: 25, max: 100)")};const vE=Am`
|
|
2550
2550
|
query GetRecentBoards($limit: Int) {
|
|
2551
2551
|
boards(limit: $limit, order_by: used_at, state: active) {
|
|
2552
2552
|
id
|
|
@@ -2562,7 +2562,7 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
2564
|
}
|
|
2565
|
-
`,vE={};const bE=[class extends Er{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=Vi.READ,this.annotations=Tr({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return vE}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(gE,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${WT} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);return 0===a.length?{content:{message:"No monday-dev sprints board pairs found. ### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`;",boards_checked:t.length,pairs:[]}}:{content:{message:`Found ${a.length} matched pair(s)`,...a.length>1?{warning:"Multiple board pairs detected. Confirm with user which pair and workspace to use before any operation."}:{},pairs:a.map((e=>({sprints_board:{id:e.sprintsBoard.id,name:e.sprintsBoard.name,workspace_id:e.sprintsBoard.workspaceId,workspace_name:e.sprintsBoard.workspaceName},tasks_board:{id:e.tasksBoard.id,name:e.tasksBoard.name,workspace_id:e.tasksBoard.workspaceId,workspace_name:e.tasksBoard.workspaceName}}))),technical_reference:"Sprint Operations (all require correct board pair): Add to Sprint: Update `task_sprint` column with sprint item ID. Remove from Sprint: Clear `task_sprint` column (set to null). Search in Sprint: Filter where `task_sprint` equals sprint item ID. Move Between Sprints: Update `task_sprint` with new sprint item ID. Backlog Tasks: `task_sprint` is empty/null. Critical: `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}}}catch(e){return{content:`${XT} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=uE(e,HT.SPRINT_TASKS);if(!i)return;const r=mE(i);if(!r)return;const n=`${e.id}:${r}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(r,o,`Tasks Board ${r}`)})}processTasksBoard(e,t,a){const i=uE(e,eE);if(!i)return;const r=mE(i);if(!r)return;const n=`${r}:${e.id}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(r,o,`Sprints Board ${r}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(lE(i)&&this.processSprintsBoard(i,a,t),cE(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Er{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=Vi.READ,this.annotations=Tr({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return _E}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(fE,a),r=i.boards?.[0],n=r?.items_page?.items||[],o=this.buildSprintsMetadata(n);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:n.length,data:o}}}catch(e){return{content:`${XT} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(Pm,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${WT} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const r=i.columns||[],n=this.validateSprintsBoardSchemaFromColumns(r);return n.isValid?{success:!0}:{success:!1,error:`${ZT} ${n.errorMessage}`}}catch(e){return{success:!1,error:`${XT} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(HT),i=dE(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>tE[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=nE(e,GT.SPRINT_ACTIVATION),a=nE(e,GT.SPRINT_COMPLETION),i=oE(e,GT.SPRINT_START_DATE),r=oE(e,GT.SPRINT_END_DATE),n=((e,t)=>{const a=rE(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,GT.SPRINT_TIMELINE),o=sE(e,GT.SPRINT_SUMMARY);let s=aE.Planned;return a?s=aE.Completed:(t||i)&&(s=aE.Active),{id:e.id,name:e.name||"Unknown",status:s,timeline:n?{from:n.from,to:n.to}:null,start_date:i||null,end_date:r||null,is_completed:a,document_object_id:o||null}}))}},class extends Er{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=Vi.READ,this.annotations=Tr({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return hE}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${XT} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:{message:"Sprint summary retrieved",sprint_id:e.sprintId,sprint_name:t.sprintName,markdown:a.content}}:{content:a.error||`${XT} Unknown error occurred while reading document content`}}catch(e){return{content:`${XT} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(qT,t)).items||[];if(0===a.length)return{success:!1,error:`${YT} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${YT} Sprint with ID ${e} not found.`};const r=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(HT),...t];return dE(a,i)})(i,[GT.SPRINT_SUMMARY]);if(!r.isValid)return{success:!1,error:`${ZT} Sprint item is missing required columns: ${r.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const n=sE(i,GT.SPRINT_SUMMARY);return n?{success:!0,documentObjectId:n,sprintName:i.name}:{success:!1,error:`${QT} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${XT} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(Dm,t)).docs||[];if(0===a.length)return{success:!1,error:`${QT} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${zT} Document data is invalid for object ID ${e}.`};const r={docId:i.id,blockIds:[]},n=await this.mondayApi.request(Gm,r);if(!n.export_markdown_from_doc?.success)return{success:!1,error:`${JT} Failed to export markdown from document: ${n.export_markdown_from_doc?.error||"Unknown error"}`};const o=n.export_markdown_from_doc.markdown;return o?{success:!0,content:o}:{success:!1,error:`${KT} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${XT} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],yE=[class extends Er{constructor(){super(...arguments),this.name="delete_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Hf}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(Rm,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends Er{constructor(){super(...arguments),this.name="get_board_items_page",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the nextCursor parameter from the response to get the next page of results when has_more is true. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return n_}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){Xm(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(i_,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:el.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,r=i?.items||[];return{board:{id:a?.id,name:a?.name},items:r.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:r.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case gf.BoardRelation:return e.linked_items;case gf.Formula:return e.display_value;case gf.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(r_,t,{versionOverride:"dev",timeout:Km})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const r=new Set(i);return a.filter((e=>r.has(e)))}},class extends Er{constructor(){super(...arguments),this.name="create_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?Of:Rf}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(Nf,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let r;try{r=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const n={...r,name:e.name},o=new iu(this.mondayApi,{boardId:t});return await o.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(n)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){Jm(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(kf,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){Jm(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(Cm,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){Jm(e,"create item")}}},class extends Er{constructor(){super(...arguments),this.name="create_update",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return Lf}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=xf.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request(Pf,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){Jm(e,"create update")}}},class extends Er{constructor(){super(...arguments),this.name="get_updates",this.type=Vi.READ,this.annotations=Tr({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. For Board queries, you can filter by date range using fromDate and toDate (both required together, ISO8601 format). By default, Board queries return only board discussion. Set includeItemUpdates to true to also include updates on individual items. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return jf}async executeInternal(e){try{const t=void 0!==e.fromDate,a=void 0!==e.toDate;if(t!==a)throw new Error("Both fromDate and toDate must be provided together for date range filtering");if((t||a)&&e.objectType===Vf.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let r;r=e.objectType===Vf.Item?await this.mondayApi.request(Ff,{...i,itemId:e.objectId}):await this.mondayApi.request(Uf,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:Mf(e.fromDate),toDate:Mf(e.toDate)}:{}});const n=e.objectType===Vf.Item?r.items?.[0]?.updates:r.boards?.[0]?.updates;if(!n||0===n.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const o=n.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),s=e.objectType===Vf.Item?r.items?.[0]?.url:r.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:s,updates:o,pagination:{page:e.page??1,limit:e.limit??25,count:o.length}}}}catch(e){Jm(e,"get updates")}}},class extends Er{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return Cv}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=Rv.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request(Pf,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received."}}}catch(e){Jm(e,"create update")}}},class extends Er{constructor(){super(...arguments),this.name="get_board_schema",this.type=Vi.READ,this.annotations=Tr({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 o_}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(Pm,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends Er{constructor(){super(...arguments),this.name="get_board_activity",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return Xf}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-zm.MONTH30Days),i=e?.fromDate||a.toISOString(),r=e?.toDate||t.toISOString(),n={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:r,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},o=await this.mondayApi.request(Jf,n),s=o.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 ${r}).`};const d=o.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:d?.name,board_url:d?.url,data:s.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends Er{constructor(){super(...arguments),this.name="get_board_info",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return a_}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(Zf,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const r=await this.getSubItemsBoardAsync(i);return{content:t_(i,r)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===gf.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(e_,{boardId:a});return i.boards?.[0]??null}},class extends Er{constructor(){super(...arguments),this.name="get_full_board_data",this.type=Vi.READ,this.annotations=Tr({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return Kf}async executeInternal(e){try{const t={boardId:e.boardId,itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(Wf,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],r=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&r.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&r.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&r.add(e.id)}))}}))}));const n=Array.from(r).filter((e=>!(Number(e)<0)));let o=[];if(n.length>0){const e={userIds:n},t=await this.mondayApi.request(Yf,e);o=t.users?.filter((e=>null!==e))||[]}const s=new Map(o.map((e=>[e.id,e])));return{content:{board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:o.length}}}}catch(e){Jm(e,"get full board data")}}},class extends Er{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=Vi.READ,this.annotations=Tr({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return U_}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,r=e.teamsOnly||!1,n=e.includeTeamMembers||!1,o=!!e.name;if(e.getMe||!1){if(t||a||i||r||n||o)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(N_);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=R_(s),p=await L_(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}if(o){if(t||a||i||r||n)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const o={name:e.name},s=await this.mondayApi.request(D_,o);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const d=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${s.users.length} user(s) matching "${e.name}":\n\n${d}`,l=await L_(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(r&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>C_)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>P_)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(r||!t&&a&&!i)if(n){const t={teamIds:e.teamIds};s=await this.mondayApi.request(A_,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(S_,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:$_};s=await this.mondayApi.request(E_,t)}else if(t){const t={userIds:e.userIds,limit:$_};s=await this.mondayApi.request(I_,t)}else{const e={userIds:void 0,limit:$_};s=await this.mondayApi.request(T_,e)}const d=R_(s),p=await L_(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},iu,class extends Er{constructor(){super(...arguments),this.name="move_item_to_group",this.type=Vi.WRITE,this.annotations=Tr({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 V_}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(xm,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Er{constructor(){super(...arguments),this.name="create_board",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Au}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(Lm,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends Er{constructor(){super(...arguments),this.name="create_form",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. Also creates a backing board to store responses. Returns the formToken for future mutations."}getInputSchema(){return fh}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(Yu,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends Er{constructor(){super(...arguments),this.name="update_form",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new of(this.mondayApi),this.actionHandlers=new Map([[xh.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[xh.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[xh.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[xh.activate,this.helpers.activateForm.bind(this.helpers)],[xh.createTag,this.helpers.createTag.bind(this.helpers)],[xh.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[xh.updateTag,this.helpers.updateTag.bind(this.helpers)],[xh.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[xh.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[xh.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[xh.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[xh.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return nf}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends Er{constructor(){super(...arguments),this.name="get_form",this.type=Vi.READ,this.annotations=Tr({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form's url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return sf}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(Qu,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Er{constructor(){super(...arguments),this.name="form_questions_editor",this.type=Vi.WRITE,this.annotations=Tr({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new $h(this.mondayApi),this.actionHandlers=new Map([[Rh.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Rh.Update,this.helpers.updateQuestion.bind(this.helpers)],[Rh.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return Ph}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends Er{constructor(){super(...arguments),this.name="create_form_submission",this.type=Vi.WRITE,this.annotations=Tr({title:"Create WorkForm Submission",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Submit a response to a monday.com WorkForm. Use get_form first to retrieve the WorkForm, then:\n- Inspect each question's showIfRules to determine which questions are conditionally shown based on previous answers.\n- Inspect each question's settings for any answer constraints (e.g. rating limits, select options, label limits).\n- Take note of any titles, descriptions, and content blocks to present the form naturally as you walk the user through it.\n- Take note of pages and question order to present questions in the correct sequence.\nGather all answers upfront before calling this tool — do not submit one question at a time. Accepts a bare form token, a full WorkForm URL (e.g. https://forms.monday.com/forms/{form_token}?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t) — shortened URLs are automatically resolved by following the redirect. Returns the submission ID."}getInputSchema(){return _f}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await r.head(e,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return t?this.extractTokenFromUrl(t):null}return e.startsWith("http://")||e.startsWith("https://")?this.extractTokenFromUrl(e):e}async executeInternal(e){const t=await this.resolveFormToken(e.form_token);if(!t)return{content:`Could not resolve a WorkForm token from "${e.form_token}". Please provide a valid WorkForm token or full WorkForm URL (e.g. https://forms.monday.com/forms/abc123).`};const a={form_token:t,answers:e.answers,form_timezone_offset:e.form_timezone_offset,password:e.password,tags:e.tags};try{const e=await this.mondayApi.request(df,a,{versionOverride:"dev"});return e.create_form_submission?{content:{message:"WorkForm submitted successfully",submission_id:e.create_form_submission.id}}:{content:`WorkForm with token ${t} was not found or is not accepting submissions. Verify the WorkForm token is correct, the WorkForm is active, and any required password was provided.`}}catch(e){Jm(e,"submit form")}}},class extends Er{constructor(){super(...arguments),this.name="create_column",this.type=Vi.WRITE,this.annotations=Tr({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?vf:bf}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Fm,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends Er{constructor(){super(...arguments),this.name="update_column",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?yf:wf}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Vm,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="create_group",this.type=Vi.WRITE,this.annotations=Tr({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 Df}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(Sf,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends Er{constructor(){super(...arguments),this.name="delete_column",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?Bf:qf}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(Um,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},eu,class extends Er{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=Vi.ALL_API,this.annotations=Tr({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 m_}async executeInternal(e){try{const t=await this.mondayApi.request(jm),a=e?.operationType,i=t.__schema,r="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,n="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==r&&{query_fields:r},...void 0!==n&&{mutation_fields:n},types:o}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Er{constructor(){super(...arguments),this.name="get_column_type_info",this.type=Vi.READ,this.annotations=Tr({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${gu.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${gu.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return c_}async executeInternal(e){if(e.fetchMode===gu.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:l_(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Cd.CountItems} function. Do not use ${Cd.Count} function for that purpose.\n `}},url:d_}};const t={type:e.columnType},a=await this.mondayApi.request(s_,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:d_}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends Er{constructor(){super(...arguments),this.name="get_type_details",this.type=Vi.ALL_API,this.annotations=Tr({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 u_}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,Am`
|
|
2565
|
+
`,bE={};const yE=[class extends Er{constructor(){super(...arguments),this.name="get_monday_dev_sprints_boards",this.type=Vi.READ,this.annotations=Tr({title:"monday-dev: Get Sprints Boards",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Discover monday-dev sprints boards and their associated tasks boards in your account.\n\n## Purpose:\nIdentifies and returns monday-dev sprints board IDs and tasks board IDs that you need to use with other monday-dev tools. \nThis tool scans your recently used boards (up to 100) to find valid monday-dev sprint management boards.\n\n## What it Returns:\n- Pairs of sprints boards and their corresponding tasks boards\n- Board IDs, names, and workspace information for each pair\n- The bidirectional relationship between each sprints board and its tasks board\n\n## Note:\nSearches recently used boards (up to 100). If none found, ask user to provide board IDs manually."}getInputSchema(){return bE}async executeInternal(e){try{const e={limit:100},t=((await this.mondayApi.request(vE,e)).boards||[]).filter((e=>null!==e));if(0===t.length)return{content:`${YT} No boards found in your account. Please verify you have access to monday.com boards.`};const a=this.extractBoardPairs(t);return 0===a.length?{content:{message:"No monday-dev sprints board pairs found. ### Possible Reasons:\n1. Boards exist but not accessed recently by your account\n2. Missing access permissions to sprint/task boards\n3. Monday-dev product was not set up in account\n### Next Steps:\n1. Ask user to access monday-dev boards in UI to refresh recent boards list\n2. Ask user to verify permissions to view sprint and task boards\n3. Ask user to provide board IDs manually if known`;",boards_checked:t.length,pairs:[]}}:{content:{message:`Found ${a.length} matched pair(s)`,...a.length>1?{warning:"Multiple board pairs detected. Confirm with user which pair and workspace to use before any operation."}:{},pairs:a.map((e=>({sprints_board:{id:e.sprintsBoard.id,name:e.sprintsBoard.name,workspace_id:e.sprintsBoard.workspaceId,workspace_name:e.sprintsBoard.workspaceName},tasks_board:{id:e.tasksBoard.id,name:e.tasksBoard.name,workspace_id:e.tasksBoard.workspaceId,workspace_name:e.tasksBoard.workspaceName}}))),technical_reference:"Sprint Operations (all require correct board pair): Add to Sprint: Update `task_sprint` column with sprint item ID. Remove from Sprint: Clear `task_sprint` column (set to null). Search in Sprint: Filter where `task_sprint` equals sprint item ID. Move Between Sprints: Update `task_sprint` with new sprint item ID. Backlog Tasks: `task_sprint` is empty/null. Critical: `task_sprint` column references ONLY its paired sprints board. Cross-pair operations WILL FAIL."}}}catch(e){return{content:`${ZT} Error retrieving sprints boards: ${e instanceof Error?e.message:"Unknown error"}`}}}createBoardInfo(e,t,a){return{id:e,name:t?.name||a,workspaceId:t?.workspace?.id||"unknown",workspaceName:t?.workspace?.name||"Unknown"}}processSprintsBoard(e,t,a){const i=hE(e,GT.SPRINT_TASKS);if(!i)return;const r=uE(i);if(!r)return;const n=`${e.id}:${r}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(e.id,e,`Sprints Board ${e.id}`),tasksBoard:this.createBoardInfo(r,o,`Tasks Board ${r}`)})}processTasksBoard(e,t,a){const i=hE(e,tE);if(!i)return;const r=uE(i);if(!r)return;const n=`${r}:${e.id}`;if(a.has(n))return;const o=t.get(r);a.set(n,{sprintsBoard:this.createBoardInfo(r,o,`Sprints Board ${r}`),tasksBoard:this.createBoardInfo(e.id,e,`Tasks Board ${e.id}`)})}extractBoardPairs(e){const t=new Map,a=new Map(e.map((e=>[e.id,e])));for(const i of e)i.columns&&(cE(i)&&this.processSprintsBoard(i,a,t),mE(i)&&this.processTasksBoard(i,a,t));return Array.from(t.values())}},class extends Er{constructor(){super(...arguments),this.name="get_sprints_metadata",this.type=Vi.READ,this.annotations=Tr({title:"monday-dev: Get Sprints Metadata",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive sprint metadata from a monday-dev sprints board including:\n\n## Data Retrieved:\nA table of sprints with the following information:\n- Sprint ID\n- Sprint Name\n- Sprint timeline (planned from/to dates)\n- Sprint completion status (completed/in-progress/planned)\n- Sprint start date (actual)\n- Sprint end date (actual)\n- Sprint activation status\n- Sprint summary document object ID\n\n## Parameters:\n- **limit**: Number of sprints to retrieve (default: 25, max: 100)\n\nRequires the Main Sprints board ID of the monday-dev containing your sprints."}getInputSchema(){return gE}async executeInternal(e){try{const t=await this.validateBoardSchema(e.sprintsBoardId.toString());if(!t.success)return{content:t.error||"Board schema validation failed"};const a={boardId:e.sprintsBoardId.toString(),limit:e.limit},i=await this.mondayApi.request(_E,a),r=i.boards?.[0],n=r?.items_page?.items||[],o=this.buildSprintsMetadata(n);return{content:{message:"Sprints metadata retrieved",board_id:e.sprintsBoardId,total:n.length,data:o}}}catch(e){return{content:`${ZT} Error retrieving sprints metadata: ${e instanceof Error?e.message:"Unknown error"}`}}}async validateBoardSchema(e){try{const t={boardId:e.toString()},a=await this.mondayApi.request(Pm,t),i=a.boards?.[0];if(!i)return{success:!1,error:`${YT} Board with ID ${e} not found. Please verify the board ID is correct and you have access to it.`};const r=i.columns||[],n=this.validateSprintsBoardSchemaFromColumns(r);return n.isValid?{success:!0}:{success:!1,error:`${eE} ${n.errorMessage}`}}catch(e){return{success:!1,error:`${ZT} Error validating board schema: ${e instanceof Error?e.message:"Unknown error"}`}}}validateSprintsBoardSchemaFromColumns(e){const t=new Set(e.filter((e=>null!==e)).map((e=>e.id))),a=Object.values(GT),i=pE(t,a);if(!i.isValid){let e="BoardID provided is not a valid sprints board. Missing required columns:\n\n";return i.missingColumns.forEach((t=>{const a=(e=>aE[e]||e)(t);e+=`- ${a}\n`})),{isValid:!1,errorMessage:e}}return{isValid:!0,errorMessage:""}}buildSprintsMetadata(e){return e.map((e=>{const t=oE(e,WT.SPRINT_ACTIVATION),a=oE(e,WT.SPRINT_COMPLETION),i=sE(e,WT.SPRINT_START_DATE),r=sE(e,WT.SPRINT_END_DATE),n=((e,t)=>{const a=nE(e,t);if("TimelineValue"===a?.__typename&&a.from&&a.to)return{from:a.from.split("T")[0],to:a.to.split("T")[0]};return null})(e,WT.SPRINT_TIMELINE),o=dE(e,WT.SPRINT_SUMMARY);let s=iE.Planned;return a?s=iE.Completed:(t||i)&&(s=iE.Active),{id:e.id,name:e.name||"Unknown",status:s,timeline:n?{from:n.from,to:n.to}:null,start_date:i||null,end_date:r||null,is_completed:a,document_object_id:o||null}}))}},class extends Er{constructor(){super(...arguments),this.name="get_sprint_summary",this.type=Vi.READ,this.annotations=Tr({title:"monday-dev: Get Sprint Summary",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get the complete summary and analysis of a sprint.\n\n## Purpose:\nUnlock deep insights into completed sprint performance. \n\nThe sprint summary content including:\n- **Scope Management**: Analysis of planned vs. unplanned tasks, scope creep\n- **Velocity & Performance**: Individual velocity, task completion rates, workload distribution per team member\n- **Task Distribution**: Breakdown of completed tasks by type (Feature, Bug, Tech Debt, Infrastructure, etc.)\n- **AI Recommendations**: Action items, process improvements, retrospective focus areas\n\n## Requirements:\n- Sprint must be completed and must be created after 1/1/2025 \n\n## Important Note:\nWhen viewing the section "Completed by Assignee", you\'ll see user IDs in the format "@user-12345678". the 8 digits after the @is the user ID. To retrieve the actual owner names, use the list_users_and_teams tool with the user ID and set includeTeams=false for optimal performance.\n\n'}getInputSchema(){return fE}async executeInternal(e){try{const t=await this.getSprintMetadata(e.sprintId);if(!t.success)return{content:t.error||`${ZT} Unknown error occurred while getting sprint metadata`};const a=await this.readSprintSummaryDocument(t.documentObjectId);return a.success?{content:{message:"Sprint summary retrieved",sprint_id:e.sprintId,sprint_name:t.sprintName,markdown:a.content}}:{content:a.error||`${ZT} Unknown error occurred while reading document content`}}catch(e){return{content:`${ZT} Error retrieving sprint summary: ${e instanceof Error?e.message:"Unknown error"}`}}}async getSprintMetadata(e){try{const t={ids:[String(e)]},a=(await this.mondayApi.request(HT,t)).items||[];if(0===a.length)return{success:!1,error:`${QT} Sprint with ID ${e} not found. Please verify the sprint ID is correct.`};const i=a[0];if(!i)return{success:!1,error:`${QT} Sprint with ID ${e} not found.`};const r=((e,t=[])=>{const a=new Set((e.column_values||[]).map((e=>e.id))),i=[...Object.values(GT),...t];return pE(a,i)})(i,[WT.SPRINT_SUMMARY]);if(!r.isValid)return{success:!1,error:`${eE} Sprint item is missing required columns: ${r.missingColumns.join(", ")}. This may not be a valid sprint board item.`};const n=dE(i,WT.SPRINT_SUMMARY);return n?{success:!0,documentObjectId:n,sprintName:i.name}:{success:!1,error:`${zT} No sprint summary document found for sprint "${i.name}" (ID: ${e}). Sprint summary is only available for completed sprints that have analysis documents.`}}catch(e){return{success:!1,error:`${ZT} Error getting sprint item: ${e instanceof Error?e.message:"Unknown error"}`}}}async readSprintSummaryDocument(e){try{const t={object_ids:[e],limit:1},a=(await this.mondayApi.request(Dm,t)).docs||[];if(0===a.length)return{success:!1,error:`${zT} Document with object ID ${e} not found or not accessible.`};const i=a[0];if(!i||!i.id)return{success:!1,error:`${KT} Document data is invalid for object ID ${e}.`};const r={docId:i.id,blockIds:[]},n=await this.mondayApi.request(Gm,r);if(!n.export_markdown_from_doc?.success)return{success:!1,error:`${XT} Failed to export markdown from document: ${n.export_markdown_from_doc?.error||"Unknown error"}`};const o=n.export_markdown_from_doc.markdown;return o?{success:!0,content:o}:{success:!1,error:`${JT} Document content is empty or could not be retrieved.`}}catch(e){return{success:!1,error:`${ZT} Error reading document: ${e instanceof Error?e.message:"Unknown error"}`}}}}],wE=[class extends Er{constructor(){super(...arguments),this.name="delete_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an item"}getInputSchema(){return Gf}async executeInternal(e){const t={id:e.itemId.toString()},a=await this.mondayApi.request(Rm,t);return{content:{message:`Item ${a.delete_item?.id} successfully deleted`,item_id:a.delete_item?.id}}}},class extends Er{constructor(){super(...arguments),this.name="get_board_items_page",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Items Page",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get all items from a monday.com board with pagination support and optional column values and item descriptions. Returns structured JSON with item details, creation/update timestamps, and pagination info. Use the nextCursor parameter from the response to get the next page of results when has_more is true. To retrieve an item description (the rich-text body/details of a monday.com item), set includeItemDescription to true — the response will include the item description document blocks with their content, type, and id. Use this whenever the user asks about an item description, body, details, or notes. [REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available. [REQUIRED PRECONDITION]: For board-relation / cross-board linking tasks, call link_board_items_workflow before using this tool. VIEW-BASED FILTERING: If the user refers to a board view by name (e.g. "show me items in the Overdue view"), first call get_board_info to get the board views, find the matching view by name, then extract its filter field and pass it as the filters argument here.'}getInputSchema(){return o_}async executeInternal(e){const t=!e.cursor;if(t&&e.searchTerm)try{if(e.itemIds=await this.getItemIdsFromSmartSearchAsync(e),0===e.itemIds.length)return{content:"No items found matching the specified searchTerm"}}catch(t){Xm(t),e.filters=this.rebuildFiltersWithManualSearch(e.searchTerm,e.filters)}const a={boardId:e.boardId.toString(),limit:e.limit,cursor:e.cursor||void 0,includeColumns:e.includeColumns,columnIds:e.columnIds,includeSubItems:e.includeSubItems,includeDescription:e.includeItemDescription};t&&(e.itemIds||e.filters||e.orderBy)&&(a.queryParams={ids:e.itemIds?.map((e=>e.toString())),operator:e.filtersOperator,rules:e.filters?.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),order_by:e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))});const i=await this.mondayApi.request(r_,a);return{content:this.mapResult(i,e)}}rebuildFiltersWithManualSearch(e,t){return(t=(t=t??[]).filter((e=>"name"!==e.columnId))).push({columnId:"name",operator:el.ContainsText,compareValue:e}),t}mapResult(e,t){const a=e.boards?.[0],i=a?.items_page,r=i?.items||[];return{board:{id:a?.id,name:a?.name},items:r.map((e=>this.mapItem(e,t))),pagination:{has_more:!!i?.cursor,nextCursor:i?.cursor||null,count:r.length}}}mapItem(e,t){const a={id:e.id,name:e.name,url:e.url,created_at:e.created_at,updated_at:e.updated_at};if(t.includeColumns&&e.column_values){a.column_values={};for(const t of e.column_values)a.column_values[t.id]=this.getColumnValueData(t)}if(t.includeItemDescription&&"description"in e&&e.description){const t=(e.description.blocks??[]).filter((e=>!!e)).map((e=>({id:e.id,type:e.type,content:e.content})));a.item_description={id:e.description.id,blocks:t}}return t.includeSubItems&&"subitems"in e&&e.subitems&&(a.subitems=e.subitems.slice(0,t.subItemLimit).map((e=>this.mapItem(e,t)))),a}getColumnValueData(e){switch(e.type){case vf.BoardRelation:return e.linked_items;case vf.Formula:return e.display_value;case vf.Mirror:return"Column value type is not supported"}if(e.text)return e.text;try{return JSON.parse(e.value)}catch{return e.value||null}}async getItemIdsFromSmartSearchAsync(e){const t={query:e.searchTerm,limit:20,boardIds:[e.boardId.toString()]},a=(await this.mondayApi.request(n_,t,{versionOverride:"dev",timeout:Km})).search.items.results.map((e=>Number(e.id)));if(0===a.length)throw new Error("No items found for search term or new search is not enabled for this account");const i=e.itemIds??[];if(0===i.length)return a;const r=new Set(i);return a.filter((e=>r.has(e)))}},class extends Er{constructor(){super(...arguments),this.name="create_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new item with provided values, create a subitem under a parent item, or duplicate an existing item and update it with new values. Use parentItemId when creating a subitem under an existing item. Use duplicateFromItemId when copying an existing item with modifications.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper column values and knowing which columns are available."}getInputSchema(){return this.context?.boardId?Rf:Cf}async executeInternal(e){const t=this.context?.boardId??e.boardId;if(e.duplicateFromItemId&&e.parentItemId)throw new Error("Cannot specify both parentItemId and duplicateFromItemId. Please provide only one of these parameters.");return e.duplicateFromItemId?await this.duplicateAndUpdateItem(e,t):e.parentItemId?await this.createSubitem(e):await this.createNewItem(e,t)}async duplicateAndUpdateItem(e,t){try{const a={boardId:t.toString(),itemId:e.duplicateFromItemId.toString()},i=await this.mondayApi.request(kf,a);if(!i.duplicate_item?.id)throw new Error("Failed to duplicate item: no item duplicated");let r;try{r=JSON.parse(e.columnValues)}catch(e){throw new Error("Invalid JSON in columnValues")}const n={...r,name:e.name},o=new ru(this.mondayApi,{boardId:t});return await o.execute({itemId:parseInt(i.duplicate_item.id),columnValues:JSON.stringify(n)}),{content:{message:`Item ${i.duplicate_item.id} duplicated from ${e.duplicateFromItemId}`,item_id:i.duplicate_item.id,item_name:i.duplicate_item.name,item_url:i.duplicate_item.url,board_id:t}}}catch(e){Jm(e,"duplicate item")}}async createSubitem(e){const t={parentItemId:e.parentItemId.toString(),itemName:e.name,columnValues:e.columnValues};try{const a=await this.mondayApi.request(Of,t);if(!a.create_subitem?.id)throw new Error("Failed to create subitem: no subitem created");return{content:{message:`Subitem ${a.create_subitem.id} created under ${e.parentItemId}`,item_id:a.create_subitem.id,item_name:a.create_subitem.name,item_url:a.create_subitem.url}}}catch(e){Jm(e,"create subitem")}}async createNewItem(e,t){try{const a={boardId:t.toString(),itemName:e.name,groupId:e.groupId,columnValues:e.columnValues},i=await this.mondayApi.request(Cm,a);return{content:{message:`Item ${i.create_item?.id} successfully created`,item_id:i.create_item?.id,item_name:i.create_item?.name,item_url:i.create_item?.url,board_id:t}}}catch(e){Jm(e,"create item")}}},class extends Er{constructor(){super(...arguments),this.name="create_update",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Update",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. You can also reply to an existing update by using the parentId parameter."}getInputSchema(){return Ff}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=Lf.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t,parentId:e.parentId?.toString()},i=await this.mondayApi.request($f,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,item_name:i.create_update.item?.name,item_url:i.create_update.item?.url}}}catch(e){Jm(e,"create update")}}},class extends Er{constructor(){super(...arguments),this.name="get_updates",this.type=Vi.READ,this.annotations=Tr({title:"Get Updates",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get updates (comments/posts) from a monday.com item or board. Specify objectId and objectType (Item or Board) to retrieve updates. For Board queries, you can filter by date range using fromDate and toDate (both required together, ISO8601 format). By default, Board queries return only board discussion. Set includeItemUpdates to true to also include updates on individual items. Returns update text, creator info, timestamps, and optionally replies and assets."}getInputSchema(){return Mf}async executeInternal(e){try{const t=void 0!==e.fromDate,a=void 0!==e.toDate;if(t!==a)throw new Error("Both fromDate and toDate must be provided together for date range filtering");if((t||a)&&e.objectType===jf.Item)throw new Error("Date range filtering (fromDate/toDate) is only supported for Board objectType");const i={limit:e.limit??25,page:e.page??1,includeReplies:e.includeReplies??!1,includeAssets:e.includeAssets??!1};let r;r=e.objectType===jf.Item?await this.mondayApi.request(Uf,{...i,itemId:e.objectId}):await this.mondayApi.request(Vf,{...i,boardId:e.objectId,boardUpdatesOnly:!e.includeItemUpdates,...e.fromDate&&e.toDate?{fromDate:Bf(e.fromDate),toDate:Bf(e.toDate)}:{}});const n=e.objectType===jf.Item?r.items?.[0]?.updates:r.boards?.[0]?.updates;if(!n||0===n.length)return{content:`No updates found for ${e.objectType.toLowerCase()} with id ${e.objectId}`};const o=n.map((t=>{const a={id:t.id,text_body:t.text_body,created_at:t.created_at,updated_at:t.updated_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:t.item_id};return e.includeReplies&&t.replies&&(a.replies=t.replies.map((e=>({id:e.id,text_body:e.text_body,created_at:e.created_at,updated_at:e.updated_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))),e.includeAssets&&t.assets&&(a.assets=t.assets.filter((e=>!!e)).map((e=>({id:e.id,name:e.name,url:e.url,file_extension:e.file_extension,file_size:e.file_size,created_at:e.created_at})))),a})),s=e.objectType===jf.Item?r.items?.[0]?.url:r.boards?.[0]?.url;return{content:{message:"Updates retrieved",[`${e.objectType.toLowerCase()}_id`]:e.objectId,url:s,updates:o,pagination:{page:e.page??1,limit:e.limit??25,count:o.length}}}}catch(e){Jm(e,"get updates")}}},class extends Er{constructor(){super(...arguments),this.name="create_update_in_monday",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Update in Monday, after calling this tool you should",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new update (comment/post) on a monday.com item. Updates can be used to add comments, notes, or discussions to items. You can optionally mention users, teams, or boards in the update. After calling this tool you should call the full board data tool to get data, and immediately after that call the show table tool to show the data from that tool. IMPORTANT: You MUST use the COMPLETE data from the full board data tool - do NOT cut, truncate, or omit any data. Pass the entire dataset to the show table tool."}getInputSchema(){return Pv}async executeInternal(e){let t;if(e.mentionsList)try{const a=JSON.parse(e.mentionsList),i=Cv.safeParse(a);if(!i.success)throw new Error(`Invalid mentionsList format: ${i.error.message}`);t=i.data}catch(e){throw new Error(`Invalid mentionsList JSON format: ${e.message}`)}try{const a={itemId:e.itemId.toString(),body:e.body,mentionsList:t},i=await this.mondayApi.request($f,a);if(!i.create_update?.id)throw new Error("Failed to create update: no update created");return{content:{message:`Update ${i.create_update.id} successfully created on item ${e.itemId}`,update_id:i.create_update.id,item_id:e.itemId,next_steps:"Now call the full board data tool to get data, then immediately call the show table tool to show that data. CRITICAL: You MUST pass the COMPLETE and FULL data from the full board data tool to the show table tool - do NOT cut, summarize, truncate, or omit ANY data. Use the entire dataset exactly as received."}}}catch(e){Jm(e,"create update")}}},class extends Er{constructor(){super(...arguments),this.name="get_board_schema",this.type=Vi.READ,this.annotations=Tr({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 s_}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t.toString()},i=await this.mondayApi.request(Pm,a);return{content:{message:"Board schema retrieved",board_id:t,columns:i.boards?.[0]?.columns?.map((e=>({id:e?.id,title:e?.title,type:e?.type,revision:e?.revision})))??[],groups:i.boards?.[0]?.groups?.map((e=>({id:e?.id,title:e?.title})))??[]}}}},class extends Er{constructor(){super(...arguments),this.name="get_board_activity",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Activity",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0}),this.defaultLimit=1e3}getDescription(){return"Get board activity logs for a specified time range (defaults to last 30 days). Optionally filter by item ids or user ids to avoid fetching activity for the entire board."}getInputSchema(){return Zf}async executeInternal(e){const t=new Date,a=new Date(t.getTime()-zm.MONTH30Days),i=e?.fromDate||a.toISOString(),r=e?.toDate||t.toISOString(),n={boardId:e.boardId.toString(),itemIds:e.itemIds?.map(String),userIds:e.userIds?.map(String),fromDate:i,toDate:r,limit:this.defaultLimit,page:1,includeData:e.includeData??!1},o=await this.mondayApi.request(Xf,n),s=o.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 ${r}).`};const d=o.boards?.[0],p=e.includeData??!1;return{content:{message:"Board activity retrieved",board_id:e.boardId,board_name:d?.name,board_url:d?.url,data:s.filter((e=>null!=e)).map((e=>({created_at:e.created_at,event:e.event,entity:e.entity,user_id:e.user_id,...p&&e.data?{data:e.data}:{}})))}}}},class extends Er{constructor(){super(...arguments),this.name="get_board_info",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get comprehensive board information including metadata, structure, owners, and configuration. Also returns the board's views (e.g. table views, filter views) — each view includes its id, name, type, and a structured filter object. "}getInputSchema(){return i_}async executeInternal(e){const t={boardId:e.boardId.toString()},a=await this.mondayApi.request(e_,t),i=a.boards?.[0];if(!i)return{content:`Board with id ${e.boardId} not found or you don't have access to it.`};const r=await this.getSubItemsBoardAsync(i);return{content:a_(i,r)}}async getSubItemsBoardAsync(e){const t=e.columns?.find((e=>e?.type===vf.Subtasks));if(!t)return null;const a=t.settings.boardIds[0],i=await this.mondayApi.request(t_,{boardId:a});return i.boards?.[0]??null}},class extends Er{constructor(){super(...arguments),this.name="get_full_board_data",this.type=Vi.READ,this.annotations=Tr({title:"Get Full Board Data",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"INTERNAL USE ONLY - DO NOT CALL THIS TOOL DIRECTLY. This tool is exclusively triggered by UI components and should never be invoked directly by the agent."}getInputSchema(){return Jf}async executeInternal(e){try{const t={boardId:e.boardId,itemsLimit:7};e.filters&&(t.queryParams={operator:e.filtersOperator,rules:e.filters.map((e=>({column_id:e.columnId.toString(),compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute})))});const a=await this.mondayApi.request(Yf,t);if(!a.boards||0===a.boards.length||!a.boards[0])throw new Error(`Board with ID ${e.boardId} not found`);const i=a.boards[0],r=new Set;i.items_page.items.forEach((e=>{e.updates?.forEach((e=>{e.creator_id&&r.add(e.creator_id),e.replies?.forEach((e=>{e.creator_id&&r.add(e.creator_id)}))})),e.column_values.forEach((e=>{if("persons_and_teams"in e){const t=e;t.persons_and_teams?.forEach((e=>{"person"===e.kind&&e.id&&r.add(e.id)}))}}))}));const n=Array.from(r).filter((e=>!(Number(e)<0)));let o=[];if(n.length>0){const e={userIds:n},t=await this.mondayApi.request(Qf,e);o=t.users?.filter((e=>null!==e))||[]}const s=new Map(o.map((e=>[e.id,e])));return{content:{board:{id:i.id,name:i.name,columns:i.columns,items:i.items_page.items.map((e=>({id:e.id,name:e.name,column_values:e.column_values,updates:e.updates?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at,replies:e.replies?.map((e=>({id:e.id,creator_id:e.creator_id||"",creator:e.creator_id&&s.get(e.creator_id)||null,text_body:e.text_body,created_at:e.created_at})))||[]})))||[]})))},users:o,stats:{total_items:i.items_page.items.length,total_updates:i.items_page.items.reduce(((e,t)=>e+(t.updates?.length||0)),0),total_unique_creators:o.length}}}}catch(e){Jm(e,"get full board data")}}},class extends Er{constructor(){super(...arguments),this.name="list_users_and_teams",this.type=Vi.READ,this.annotations=Tr({title:"List Users and Teams",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Tool to fetch users and/or teams data. \n\n MANDATORY BEST PRACTICES:\n 1. ALWAYS use specific IDs or names when available\n 2. If no ids available, use name search if possible (USERS ONLY)\n 3. Use 'getMe: true' to get current user information\n 4. AVOID broad queries (no parameters) - use only as last resort\n\n REQUIRED PARAMETER PRIORITY (use in this order):\n 1. getMe - STANDALONE\n 2. userIds\n 3. name - STANDALONE (USERS ONLY, NOT for teams)\n 4. teamIds + teamsOnly\n 5. No parameters - LAST RESORT\n\n CRITICAL USAGE RULES:\n • userIds + teamIds requires explicit includeTeams: true flag\n • includeTeams: true fetches both users and teams, do not use this to fetch a specific user's teams rather fetch that user by id and you will get their team memberships.\n • name parameter is for USER search ONLY - it cannot be used to search for teams. Use teamIds to fetch specific teams."}getInputSchema(){return V_}async executeInternal(e){const t=e.userIds&&e.userIds.length>0,a=e.teamIds&&e.teamIds.length>0,i=e.includeTeams||!1,r=e.teamsOnly||!1,n=e.includeTeamMembers||!1,o=!!e.name;if(e.getMe||!1){if(t||a||i||r||n||o)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(k_);if(!e.me)return{content:"AUTHENTICATION_ERROR: Current user fetch failed. Verify API token and user permissions."};const s={users:[e.me]},d=C_(s),p=await F_(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}if(o){if(t||a||i||r||n)return{content:"PARAMETER_CONFLICT: name is STANDALONE only. Remove userIds, teamIds, includeTeams, teamsOnly, and includeTeamMembers when using name search."};const o={name:e.name},s=await this.mondayApi.request(N_,o);if(!s.users||0===s.users.length)return{content:`NAME_SEARCH_EMPTY: No users found matching "${e.name}". Try broader search terms or verify user exists in account.`};const d=s.users.filter((e=>null!==e)).map((e=>`• **${e.name}** (ID: ${e.id})${e.title?` - ${e.title}`:""}`)).join("\n"),p=`Found ${s.users.length} user(s) matching "${e.name}":\n\n${d}`,l=await F_(this.mondayApi);return{content:{data:p,action_name:"Users and teams",url:l?`https://${l}.monday.com/teams/all`:void 0}}}if(r&&i)return{content:"PARAMETER_CONFLICT: Cannot use teamsOnly: true with includeTeams: true. Use teamsOnly for teams-only queries or includeTeams for combined data."};if(t&&e.userIds&&e.userIds.length>P_)return{content:`LIMIT_EXCEEDED: userIds array too large (${e.userIds.length}/500). Split into batches of max 500 IDs and make multiple calls.`};if(a&&e.teamIds&&e.teamIds.length>$_)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(r||!t&&a&&!i)if(n){const t={teamIds:e.teamIds};s=await this.mondayApi.request(D_,t)}else{const t={teamIds:e.teamIds};s=await this.mondayApi.request(A_,t)}else if(i){const t={userIds:e.userIds,teamIds:e.teamIds,limit:x_};s=await this.mondayApi.request(S_,t)}else if(t){const t={userIds:e.userIds,limit:x_};s=await this.mondayApi.request(T_,t)}else{const e={userIds:void 0,limit:x_};s=await this.mondayApi.request(E_,e)}const d=C_(s),p=await F_(this.mondayApi);return{content:{data:d,action_name:"Users and teams",url:p?`https://${p}.monday.com/teams/all`:void 0}}}},ru,class extends Er{constructor(){super(...arguments),this.name="move_item_to_group",this.type=Vi.WRITE,this.annotations=Tr({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 j_}async executeInternal(e){const t={itemId:e.itemId.toString(),groupId:e.groupId},a=await this.mondayApi.request(xm,t);return{content:`Item ${a.move_item_to_group?.id} successfully moved to group ${e.groupId}`}}},class extends Er{constructor(){super(...arguments),this.name="create_board",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Board",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com board"}getInputSchema(){return Du}async executeInternal(e){const t={boardName:e.boardName,boardKind:e.boardKind,boardDescription:e.boardDescription,workspaceId:e.workspaceId,...void 0!==e.boardOwnerIds?{boardOwnerIds:e.boardOwnerIds}:{}},a=await this.mondayApi.request(Lm,t);return{content:{message:`Board ${a.create_board?.id} successfully created`,board_id:a.create_board?.id,board_name:a.create_board?.name,board_url:a.create_board?.url}}}},class extends Er{constructor(){super(...arguments),this.name="create_form",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a monday.com form. Also creates a backing board to store responses. Returns the formToken for future mutations."}getInputSchema(){return _h}async executeInternal(e){const t={destination_workspace_id:e.destination_workspace_id,destination_folder_id:e.destination_folder_id,destination_folder_name:e.destination_folder_name,board_kind:e.board_kind,destination_name:e.destination_name,board_owner_ids:e.board_owner_ids,board_owner_team_ids:e.board_owner_team_ids,board_subscriber_ids:e.board_subscriber_ids,board_subscriber_teams_ids:e.board_subscriber_teams_ids},a=await this.mondayApi.request(Qu,t);return{content:{message:"Form created successfully",board_id:a.create_form?.boardId,form_token:a.create_form?.token}}}},class extends Er{constructor(){super(...arguments),this.name="update_form",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Form",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}),this.helpers=new sf(this.mondayApi),this.actionHandlers=new Map([[Lh.setFormPassword,this.helpers.setFormPassword.bind(this.helpers)],[Lh.shortenFormUrl,this.helpers.shortenFormUrl.bind(this.helpers)],[Lh.deactivate,this.helpers.deactivateForm.bind(this.helpers)],[Lh.activate,this.helpers.activateForm.bind(this.helpers)],[Lh.createTag,this.helpers.createTag.bind(this.helpers)],[Lh.deleteTag,this.helpers.deleteTag.bind(this.helpers)],[Lh.updateTag,this.helpers.updateTag.bind(this.helpers)],[Lh.updateAppearance,this.helpers.updateAppearance.bind(this.helpers)],[Lh.updateAccessibility,this.helpers.updateAccessibility.bind(this.helpers)],[Lh.updateFeatures,this.helpers.updateFeatures.bind(this.helpers)],[Lh.updateQuestionOrder,this.helpers.updateQuestionOrder.bind(this.helpers)],[Lh.updateFormHeader,this.helpers.updateFormHeader.bind(this.helpers)]])}getDescription(){return"Update a monday.com form. Use the action field to specify the operation."}getInputSchema(){return of}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:"Received an invalid action for the update form tool."}}},class extends Er{constructor(){super(...arguments),this.name="get_form",this.type=Vi.READ,this.annotations=Tr({title:"Get Form",readOnlyHint:!0,destructiveHint:!1})}getDescription(){return"Get a monday.com form by its form token. Form tokens can be extracted from the form's url. Given a form url, such as https://forms.monday.com/forms/abc123def456ghi789?r=use1, the formToken is the alphanumeric string that appears right after /forms/ and before the ?. In the example, the formToken is abc123def456ghi789."}getInputSchema(){return df}async executeInternal(e){const t={formToken:e.formToken},a=await this.mondayApi.request(zu,t);return a.form?{content:{message:"Form retrieved",form_token:e.formToken,data:a.form}}:{content:`Form with token ${e.formToken} not found or you don't have access to it.`}}},class extends Er{constructor(){super(...arguments),this.name="form_questions_editor",this.type=Vi.WRITE,this.annotations=Tr({title:"Form Questions Editor",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1}),this.helpers=new xh(this.mondayApi),this.actionHandlers=new Map([[Ch.Delete,this.helpers.deleteQuestion.bind(this.helpers)],[Ch.Update,this.helpers.updateQuestion.bind(this.helpers)],[Ch.Create,this.helpers.createQuestion.bind(this.helpers)]])}getDescription(){return"Create, update, or delete a question in a monday.com form"}getInputSchema(){return $h}async executeInternal(e){const t=this.actionHandlers.get(e.action);return t?await t(e):{content:`Unknown action: ${e.action}`}}},class extends Er{constructor(){super(...arguments),this.name="create_form_submission",this.type=Vi.WRITE,this.annotations=Tr({title:"Create WorkForm Submission",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Submit a response to a monday.com WorkForm. Use get_form first to retrieve the WorkForm, then:\n- Inspect each question's showIfRules to determine which questions are conditionally shown based on previous answers.\n- Inspect each question's settings for any answer constraints (e.g. rating limits, select options, label limits).\n- Take note of any titles, descriptions, and content blocks to present the form naturally as you walk the user through it.\n- Take note of pages and question order to present questions in the correct sequence.\nGather all answers upfront before calling this tool — do not submit one question at a time. Accepts a bare form token, a full WorkForm URL (e.g. https://forms.monday.com/forms/{form_token}?r=use1), or a shortened wkf.ms URL (e.g. https://wkf.ms/4tqP28t) — shortened URLs are automatically resolved by following the redirect. Returns the submission ID."}getInputSchema(){return gf}extractTokenFromUrl(e){const t=e.match(/\/forms\/([^/?]+)/);return t?t[1]:null}async resolveFormToken(e){if(e.includes("wkf.ms")){const t=(await r.head(e,{maxRedirects:0,validateStatus:e=>e<400})).headers.location;return t?this.extractTokenFromUrl(t):null}return e.startsWith("http://")||e.startsWith("https://")?this.extractTokenFromUrl(e):e}async executeInternal(e){const t=await this.resolveFormToken(e.form_token);if(!t)return{content:`Could not resolve a WorkForm token from "${e.form_token}". Please provide a valid WorkForm token or full WorkForm URL (e.g. https://forms.monday.com/forms/abc123).`};const a={form_token:t,answers:e.answers,form_timezone_offset:e.form_timezone_offset,password:e.password,tags:e.tags};try{const e=await this.mondayApi.request(pf,a,{versionOverride:"dev"});return e.create_form_submission?{content:{message:"WorkForm submitted successfully",submission_id:e.create_form_submission.id}}:{content:`WorkForm with token ${t} was not found or is not accepting submissions. Verify the WorkForm token is correct, the WorkForm is active, and any required password was provided.`}}catch(e){Jm(e,"submit form")}}},class extends Er{constructor(){super(...arguments),this.name="create_column",this.type=Vi.WRITE,this.annotations=Tr({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?bf:yf}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnType:e.columnType,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Fm,a);return{content:{message:"Column successfully created",column_id:i.create_column?.id,column_title:i.create_column?.title}}}},class extends Er{constructor(){super(...arguments),this.name="update_column",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Column",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update properties of an existing monday.com column (title, description, settings). Uses optimistic concurrency control via the revision field — fetch the current revision via get_board_schema first, then call this tool. If the update fails because the revision is stale, re-fetch and try again."}getInputSchema(){return this.context?.boardId?wf:If}async executeInternal(e){const t=this.context?.boardId??e.boardId,a={boardId:t?.toString()??"",columnId:e.columnId,columnType:e.columnType,revision:e.revision,columnTitle:e.columnTitle,columnDescription:e.columnDescription,columnSettings:"string"==typeof e.columnSettings?JSON.parse(e.columnSettings):e.columnSettings},i=await this.mondayApi.request(Vm,a);return{content:{message:"Column successfully updated. Use the new revision below for any subsequent update to this column.",column_id:i.update_column?.id,column_title:i.update_column?.title,revision:i.update_column?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="create_group",this.type=Vi.WRITE,this.annotations=Tr({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 Nf}async executeInternal(e){const t={boardId:e.boardId,groupName:e.groupName,groupColor:e.groupColor,relativeTo:e.relativeTo,positionRelativeMethod:e.positionRelativeMethod},a=await this.mondayApi.request(Af,t);return{content:{message:"Group created successfully",group_id:a.create_group?.id,group_title:a.create_group?.title,board_id:e.boardId,group_name:e.groupName}}}},class extends Er{constructor(){super(...arguments),this.name="delete_column",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Column",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete a column from a monday.com board"}getInputSchema(){return this.context?.boardId?qf:Hf}async executeInternal(e){const t={boardId:(this.context?.boardId??e.boardId).toString(),columnId:e.columnId},a=await this.mondayApi.request(Um,t);return{content:{message:`Column ${a.delete_column?.id} successfully deleted`,column_id:a.delete_column?.id}}}},tu,class extends Er{constructor(){super(...arguments),this.name="get_graphql_schema",this.type=Vi.ALL_API,this.annotations=Tr({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 u_}async executeInternal(e){try{const t=await this.mondayApi.request(jm),a=e?.operationType,i=t.__schema,r="write"!==a?t.queryType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,n="read"!==a?t.mutationType?.fields?.map((e=>({name:e.name,description:e.description??null})))??[]:void 0,o=i?.types?.filter((e=>e.name&&!e.name.startsWith("__"))).map((e=>({name:e.name,kind:e.kind??"unknown"})))??[];return{content:{message:"GraphQL schema retrieved",...void 0!==r&&{query_fields:r},...void 0!==n&&{mutation_fields:n},types:o}}}catch(e){return{content:`Error fetching GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Er{constructor(){super(...arguments),this.name="get_column_type_info",this.type=Vi.READ,this.annotations=Tr({title:"Get Column Type Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return`Retrieves comprehensive information about a specific column type. Use fetchMode "${vu.Schema}" (default) to get the JSON schema definition from the API — use this before creating or updating columns (e.g. create_column) to understand structure, validation rules, and available properties for column settings. Use fetchMode "${vu.Guidelines}" to get only guidelines.filter and guidelines.aggregation for building items_page filters and board insights counts (no schema, no GraphQL round-trip). `}getInputSchema(){return m_}async executeInternal(e){if(e.fetchMode===vu.Guidelines)return{content:{message:`Column type guidelines for ${e.columnType}`,data:{guidelines:{filter:c_(e.columnType),aggregation:`\n## [IMPORTANT] Best Practices\n- When asked to get count of items you MUST USE ${Cd.CountItems} function. Do not use ${Cd.Count} function for that purpose.\n `}},url:p_}};const t={type:e.columnType},a=await this.mondayApi.request(d_,t);return a?.get_column_type_schema?{content:{message:`Column type schema for ${e.columnType}`,data:{schema:a.get_column_type_schema},url:p_}}:{content:`Information for column type "${e.columnType}" not found or not available.`}}},class extends Er{constructor(){super(...arguments),this.name="get_type_details",this.type=Vi.ALL_API,this.annotations=Tr({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 h_}async executeInternal(e){try{if(!e.typeName)return{content:"Error: typeName is required. Please provide a valid GraphQL type name."};const a=(t=e.typeName,Am`
|
|
2566
2566
|
query getTypeDetails {
|
|
2567
2567
|
__type(name: "${t}") {
|
|
2568
2568
|
name
|
|
@@ -2650,5 +2650,5 @@ import{z as e,ZodType as t}from"zod";import{zodToJsonSchema as a}from"zod-to-jso
|
|
|
2650
2650
|
}
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
|
-
`),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends Er{constructor(){super(...arguments),this.name="create_custom_activity",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return If}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Bm,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends Er{constructor(){super(...arguments),this.name="create_notification",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Ef}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Tf,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Er{constructor(){super(...arguments),this.name="create_timeline_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return Cf}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(qm,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends Er{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=Vi.READ,this.annotations=Tr({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Gf}async executeInternal(e){const t=await this.mondayApi.request(Hm);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:{message:`Found ${a.length} custom activities`,data:a}}}},class extends Er{constructor(){super(...arguments),this.name="read_docs",this.type=Vi.READ,this.annotations=Tr({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get information about monday.com documents. Supports two modes:\n\nMODE: "content" (default) — Fetch documents with their full markdown content.\n- Requires: type ("ids" | "object_ids" | "workspace_ids") and ids array\n- Supports pagination via page/limit. Check has_more_pages in response.\n- If type "ids" returns no results, automatically retries with object_ids.\n- Set include_blocks: true to include block IDs, types, and positions in the response — required before calling update_doc.\n- Blocks default to 25 per page. Use blocks_limit and blocks_page to paginate through long documents.\n- Set include_comments: true to fetch all comments and replies on the document. Each comment is enriched with anchor info (block_id, selection_from, selection_length) indicating which block and text range it\'s attached to. Use comments_limit to control how many comments per item (default 50).\n\nMODE: "version_history" — Fetch the edit history of a single document.\n- Requires: ids with the document\'s object_id (use the object_id field from content mode results, NOT the id field).\n- The object_id is the numeric ID visible in the document URL.\n- Returns restoring points sorted newest-first. Use version_history_limit to cap results (e.g., "last 3 changes" → version_history_limit: 3).\n- Use since/until to filter by time range. If omitted, returns full history.\n- Set include_diff: true to see what content changed between versions (fetches up to 10 diffs, may be slower).\n- Examples:\n - { mode: "version_history", ids: ["5001466606"], version_history_limit: 3 }\n - { mode: "version_history", ids: ["5001466606"], since: "2026-03-11T00:00:00Z", include_diff: true }'}getInputSchema(){return Z_}async executeInternal(e){return e.mode===J_?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??K_,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const r=e.include_blocks??!1,n=r?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},o={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:r,...n};let s=await this.mondayApi.request(Dm,o);if((!s.docs||0===s.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:r,...n};s=await this.mondayApi.request(Dm,a)}if(!s.docs||0===s.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const d=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:s.docs.flatMap((e=>e?[e.id]:[])),object_ids:s.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(s.docs,o,r,d,p,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:r}=e,n=e.ids?.[0];if(!n)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:J_,object_ids:[n]};try{const e={docId:n,since:a,until:i},o=await this.mondayApi.request(Nm,e);let s=o?.doc_version_history?.restoring_points;if(!s||0===s.length)return{content:`No version history found for document ${n}${a?` from ${a}`:""}.`};if(!t)return r&&(s=s.slice(0,r)),{content:{doc_id:n,since:a,until:i,restoring_points:s}};const d=Math.min(r??10,10),p=s.slice(0,d+1),l=s.length>d,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:n,date:e.date,prevDate:a.date},r=await this.mondayApi.request(Om,i);return{...e,diff:r?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,d);return{content:{doc_id:n,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:s.length}}}}catch(e){return{content:`Error fetching version history for document ${n}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const r of e){const e=r.insert,n="string"==typeof e?e.length:1,o=r.attributes,s=o?.comments;if(s&&Array.isArray(s))for(const e of s){const r=String(e),o=t.get(r);if(o&&o.block_id===a.id){const e=Math.max(o.selection_from+o.selection_length,i+n);o.selection_length=e-o.selection_from}else o||t.set(r,{block_id:a.id,selection_from:i,selection_length:n})}i+=n}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[r,n]=await Promise.all([this.mondayApi.request(km,i),this.mondayApi.request(Y_,{docId:[t]}).catch((()=>null))]),o=r.boards?.[0]?.items_page?.items;if(!o)return[];let s=new Map;if(n){const e=(n.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((e=>{let t;if("string"==typeof e.content)try{t=JSON.parse(e.content)}catch{t={}}else t=e.content??{};return{id:e.id??"",type:e.type??"",content:t}}));s=this.buildCommentAnchorMap(e)}const d=[];for(const e of o)if(e.updates&&0!==e.updates.length)for(const t of e.updates)d.push({id:t.id,text_body:t.text_body,body:t.body,created_at:t.created_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:e.id,item_name:e.name,anchor:s.get(t.id)??null,replies:(t.replies??[]).map((e=>({id:e.id,text_body:e.text_body,body:e.body,created_at:e.created_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))});return d}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,r=50,n,o){const s=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,s="";try{const t={docId:e.id},a=await this.mondayApi.request(Gm,t);s=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){s=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,r)),{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==n||void 0!==o?{blocks_pagination:{current_page:o??1,limit:n??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(n??25)}}:{}},blocks_as_markdown:s,...i&&{comments:t}}}))),d=t.page||1,p=t.limit||25,l=s.length,c=l===p;return{content:{message:`Documents retrieved (${s.length})`,pagination:{current_page:d,limit:p,count:l,has_more_pages:c},data:s}}}},class extends Er{constructor(){super(...arguments),this.name="workspace_info",this.type=Vi.READ,this.annotations=Tr({title:"Get Workspace Information",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool returns the boards, docs and folders in a workspace and which folder they are in. It returns up to 100 of each object type, if you receive 100 assume there are additional objects of that type in the workspace."}getInputSchema(){return eg}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(Wm,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:r,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),d=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(t):d.push(t)}));const p=[];return(r||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,url:t?F_(t,o.id):void 0,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(s.values()),root_items:{boards:d,docs:p}}}(a,await L_(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends Er{constructor(){super(...arguments),this.name="list_workspaces",this.type=Vi.READ,this.annotations=Tr({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return og}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=ig(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const r=e=>({limit:t,page:a,membershipKind:e}),n=rg(await this.mondayApi.request(tg,r(rc.Member))),o=!ng(n)||i&&!function(e,t){return t.some((t=>ig(t.name).includes(e)))}(i,n);let s=n;if(o){s=rg(await this.mondayApi.request(tg,r(rc.All)))}if(!ng(s))return{content:{message:"No workspaces found.",data:[]}};const d=i&&s?.length<=ag,p=function(e,t,a,i){if(!e||t.length<=ag)return t;const r=(a-1)*i,n=r+i;return t.filter((t=>ig(t.name).includes(e))).slice(r,n)}(i,s,e.page,e.limit);if(!ng(p))return{content:{message:"No workspaces found matching the search term. Try using the tool without a search term",data:[]}};const l=p.length===e.limit,c=await L_(this.mondayApi),m=p.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:c&&e.id?F_(c,e.id):void 0})));return{content:{message:"Workspaces retrieved",...d?{disclaimer:"Search term not applied - returning all workspaces. Perform the filtering manually."}:{},...l?{next_page:e.page+1}:{},data:m}}}},class extends Er{constructor(){super(...arguments),this.name="create_doc",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id, optional docOwnerIds)\n- item: Creates a document attached to an item (requires item_id, optional column_id, optional docOwnerIds)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_name: "My Doc", doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, doc_name: "My Doc", folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, doc_name: "My Doc", column_id: "doc_col_1" , markdown: "..." }\n- Workspace doc with agent owner: { location: "workspace", workspace_id: 123, doc_name: "My Doc", markdown: "...", docOwnerIds: ["<agent_owner_user_id>"] }'}getInputSchema(){return ug}async executeInternal(e){const t=mg.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,r;if(a.type===cg.enum.workspace){const n={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||zd.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},o=await this.mondayApi.request(dg,n);t=o?.create_doc?.id??void 0,i=o?.create_doc?.object_id??void 0,r=o?.create_doc?.url??void 0}else if(a.type===cg.enum.item){const n={itemId:a.item_id.toString()},o=await this.mondayApi.request(sg,n),s=o.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const d=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===gf.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:gf.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(Fm,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},m=await this.mondayApi.request(dg,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,r=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(lg,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const n={docId:t,markdown:e.markdown},o=await this.mondayApi.request(pg,n),s=o?.add_content_to_doc_from_markdown?.success,d=o?.add_content_to_doc_from_markdown?.error;return s?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:r,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${d||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Er{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=Vi.WRITE,this.annotations=Tr({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return gg}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=null;if(e.doc_id){const a=await this.mondayApi.request(_g,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(fg,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(hg,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:r,block_ids:n,error:o}=i.add_content_to_doc_from_markdown;if(!r)return{content:`Error adding content to document: ${o||"Unknown error"}`};const s=n?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${s} block${1===s?"":"s"} created.`,doc_id:t.id,block_ids:n,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Er{constructor(){super(...arguments),this.name="update_doc",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Xg}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};this.sessionContext.metadata={...this.sessionContext.metadata,operation_types:e.operations?.map((e=>e.operation_type)),operation_count:e.operations?.length??0,...e.object_id&&{object_id:e.object_id}};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(B_,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let r=0;r<e.operations.length;r++){const n=e.operations[r];try{const i=await this.executeOperation(t,n,e.object_id);a.push(`- [OK] ${n.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${n.operation_type}: ${t}`),i=r;break}}const r=null!==i?i:e.operations.length,n=e.operations.length,o=`Completed ${r}/${n} operation${1===n?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${o}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(j_,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},r=await this.mondayApi.request(M_,i),n=r?.add_content_to_doc_from_markdown;if(!n?.success)throw new Error(n?.error||"Failed to add markdown content");const o=n.block_ids?.length??0;return`${o} block${1===o?"":"s"} added${n.block_ids?.length?`. Block IDs: ${n.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Ig(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Ig(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Ig(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},r=await this.mondayApi.request(q_,i);if(!r?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const r=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:wg(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:vg(e.alignment),direction:bg(e.direction)}};case"list_item":return{list_block:{delta_format:wg(e.delta_format),list_block_type:e.list_block_type?e.list_block_type:void 0,indentation:e.indentation}};case"code":return{text_block:{delta_format:wg(e.delta_format),text_block_type:jl.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(r);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=r[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const n={docId:e,afterBlockId:a,blocksInput:[r]},o=await this.mondayApi.request(z_,n),s=o?.create_doc_blocks;if(!s||0===s.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${s.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(H_,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(G_,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(W_,{boardId:e}),a=t.boards?.[0]?.items_page?.items?.[0]?.id;if(!a)throw new Error(`No item found on the document backing board (object_id: ${e})`);return a}async fetchAllBlockContent(e){const t=await this.mondayApi.request(Y_,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,r,n,o,s){if((null!=o||null!=s)&&!n)throw new Error("selection_from and selection_length require block_id");if(null!=o!=(null!=s))throw new Error("selection_from and selection_length must both be provided together");const d=n?Array.isArray(n)?n:[n]:[];if((null!=o||null!=s)&&d.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(r){const e=JSON.parse(r),t=xf.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(Q_,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(d.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of d){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const r=i.content.deltaFormat;if(!r)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let n=0;for(const e of r)n+="string"==typeof e.insert?e.insert.length:1;if(0===n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const d=o??0,p=s??n;if(d+p>n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${d}, ${d+p}) is out of range for block ${a} (total length ${n})`);let l;try{l=Eg(r,f,d,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...i.content,deltaFormat:l},m=await this.mondayApi.request(q_,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,r){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,r)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends Er{constructor(){super(...arguments),this.name="update_workspace",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return nv}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(rv,t),i=await L_(this.mondayApi),r=i?F_(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:r}}}},class extends Er{constructor(){super(...arguments),this.name="update_folder",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return sv}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const r={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},n=await this.mondayApi.request(ov,r);return{content:{message:`Folder ${n.update_folder?.id} updated`,folder_id:n.update_folder?.id,folder_name:n.update_folder?.name}}}},class extends Er{constructor(){super(...arguments),this.name="create_workspace",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return pv}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(dv,t),i=await L_(this.mondayApi),r=i&&a.create_workspace?.id?F_(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:r}}}},class extends Er{constructor(){super(...arguments),this.name="create_folder",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return cv}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(lv,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends Er{constructor(){super(...arguments),this.name="move_object",this.type=Vi.WRITE,this.annotations=Tr({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use position for relative placement based on another object, parentFolderId for folder changes, workspaceId for workspace moves, and accountProductId for account product changes."}getInputSchema(){return hv}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,parentFolderId:n,workspaceId:o,accountProductId:s},p=await this.mondayApi.request(ov,d);return{content:{message:"Object moved",object_id:p.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(mv,d);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(uv,d);return p.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:p.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${p.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case hl.Folder:return this.executeUpdateFolder(e);case hl.Board:return this.executeUpdateBoardHierarchy(e);case hl.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Er{constructor(){super(...arguments),this.name="create_dashboard",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Dashboard",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Use this tool to create a new monday.com dashboard that aggregates data from one or more boards. \n Dashboards provide visual representations of board data through widgets and charts.\n \n Use this tool when users want to:\n - Create a dashboard to visualize board data\n - Aggregate information from multiple boards\n - Set up a data visualization container for widgets"}getInputSchema(){return av}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(Zg,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Er{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=Vi.READ,this.annotations=Tr({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(ev,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,r=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:r,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:d_}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Er{constructor(){super(...arguments),this.name="create_widget",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return iv}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(tv,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===ac.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Er{constructor(){super(...arguments),this.name="board_insights",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return yv}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===Cd.Label)).map((e=>e.columnId))),r=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Cd.Label,columnId:e})))??[],n=e.aggregations.concat(r).map((e=>{if(e.function){const n=`${e.function}_${e.columnId}`,o=t[n]||0;t[n]=o+1;const s=`${n}_${o}`;return vv.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Rd.Function,function:(i=e.function,r=e.columnId,{function:i,params:i===Cd.CountItems?[]:[{type:Rd.Column,column:bv(r),as:r}]}),as:s}}var i,r;const n={type:Rd.Column,column:bv(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),n}));return a.forEach((e=>{n.some((t=>t.as===e.column_id))||n.push({type:Rd.Column,column:bv(e.column_id),as:e.column_id})})),{selectElements:n,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),r=function(e){return{id:e.boardId.toString(),type:Od.Table}}(e),n={query:{from:r,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},o=await this.mondayApi.request(fv,n),s=(o.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const r=i.result??i.value??null;t[a]=r})),t}));return s.length?{content:{message:"Board insights retrieved",board_name:o.boards?.[0]?.name,board_url:o.boards?.[0]?.url,data:s}}:{content:"No board insights found for the given query."}}},class extends Er{constructor(){super(...arguments),this.name="search",this.type=Vi.READ,this.annotations=Tr({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, items, folders.\nFor searching/listing specific users and teams, use list_users_and_teams tool.\nFor account-level info (plan, member count, products), use get_user_context tool.\nFor workspaces, use list_workspaces tool.\nFor groups, use get_board_info tool.\nITEMS search requires a searchTerm and only returns id, title, and url.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789, item-321). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return kv}async executeInternal(e){if(e.searchType!==Nv.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.runSmartSearchAsync(e)).items}}}catch(t){if(Xm(t),e.searchType===Nv.ITEMS)throw t}const t={[Nv.BOARD]:this.searchBoardsAsync.bind(this),[Nv.DOCUMENTS]:this.searchDocsAsync.bind(this),[Nv.FOLDERS]:this.searchFoldersAsync.bind(this),[Nv.ITEMS]:()=>{throw new Error("Items search requires a searchTerm")}},a=await t[e.searchType](e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async runSmartSearchAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===Nv.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===Nv.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===Nv.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);throw new Error(`Unsupported search type for smart search: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Sv,i,{versionOverride:"dev",timeout:Km})).search.boards.results.map((e=>({id:Dv.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Av,i,{versionOverride:"dev",timeout:Km})).search.docs.results.map((e=>({id:Dv.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Ev,i,{timeout:Km})).search.items.results.map((e=>({id:Dv.ITEM+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&Jm(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Tv,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:Dv.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Iv,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:Dv.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(wv,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:Dv.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=ig(e.searchTerm??""),r=(e.page-1)*e.limit,n=r+e.limit;return{items:t.filter((e=>ig(a(e)).includes(i))).slice(r,n),wasFiltered:!0}}},class extends Er{constructor(){super(...arguments),this.name="get_user_context",this.type=Vi.READ,this.annotations=Tr({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(Uv,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),r=this.extractRelevantBoards(a),n=this.extractRelevantPeople(a),{account:o,...s}=e;return{content:{message:"User context",...{user:s,account:o?{tier:o.tier,active_members_count:o.active_members_count,is_during_trial:o.is_during_trial,products:o.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:r,relevantPeople:n}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[jv[e]]=t[e];const r=await this.mondayApi.request(Vv,i),n=[];for(const e of a){const t=Mv[e];for(const a of r[t]??[])a?.id&&n.push({id:a.id,name:a.name,type:e})}return n}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends Er{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return xv}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request(Pv,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends Er{constructor(){super(...arguments),this.name="get_assets",this.type=Vi.READ,this.annotations=Tr({title:"Get Assets",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get assets (files) by their IDs. Returns file metadata including name, extension, size, public URL (valid for 1 hour), thumbnail URL, upload date, and who uploaded it."}getInputSchema(){return Fv}async executeInternal(e){const t=await this.mondayApi.request(Lv,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends Er{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=Vi.READ,this.annotations=Tr({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return qv}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(Bv,a,{versionOverride:"2026-04"}),r=i.notetaker?.meetings;if(!r?.meetings||0===r.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:r.meetings,pagination:{has_next_page:r.page_info?.has_next_page??!1,cursor:r.page_info?.cursor??null,count:r.meetings.length}}}}}},class extends Er{constructor(){super(...arguments),this.name="create_view",this.type=Vi.WRITE,this.annotations=Tr({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return Nu}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Du,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="update_view",this.type=Vi.WRITE,this.annotations=Tr({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return Ou}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(ku,t);return a.update_view?{content:`View "${a.update_view.name}" (ID: ${a.update_view.id}, type: ${a.update_view.type}) successfully updated`}:{content:"Failed to update view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="create_view_table",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return $u}async executeInternal(e){const t={boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(Ru,t);return a.create_view_table?{content:`Table view "${a.create_view_table.name}" (ID: ${a.create_view_table.id}, type: ${a.create_view_table.type}) successfully created`}:{content:"Failed to create table view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="update_view_table",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return Uu}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(xu,t);return a.update_view_table?{content:`Table view "${a.update_view_table.name}" (ID: ${a.update_view_table.id}, type: ${a.update_view_table.type}) successfully updated`}:{content:"Failed to update table view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="undo_action",this.type=Vi.WRITE,this.annotations=Tr({title:"Undo Action",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Undo a previous action on a board using its action_record_uuid. Supports undoing column changes, deletes, archives, moves, duplicates, and more. Use get_board_activity with includeData=true to find the action_record_uuid."}getInputSchema(){return Gv}async executeInternal(e){return await this.mondayApi.request(Hv,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends Er{constructor(){super(...arguments),this.name="get_object_schemas",this.type=Vi.READ,this.annotations=Tr({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return nu}async executeInternal(e){const t={ids:e.ids,names:e.names,limit:e.limit,page:e.page,excludeCreatedByMonday:e.excludeCreatedByMonday},a=(await this.mondayApi.request(ru,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends Er{constructor(){super(...arguments),this.name="create_object_schema",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return su}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(ou,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="update_object_schema",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update an account-level object schema. Requires the current revision number for optimistic locking — retrieve it first via get_object_schemas."}getInputSchema(){return pu}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(du,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="delete_object_schema",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Object Schema",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an account-level object schema. Only allowed when no boards are connected to the schema. Provide either id or name."}getInputSchema(){return cu}async executeInternal(e){if(!e.id&&!e.name)throw new Error("Either id or name must be provided");const t={id:e.id,name:e.name},a=await this.mondayApi.request(lu,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends Er{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return uu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnIds:e.columnIds},a=await this.mondayApi.request(mu,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage Object Schema Board Connection",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Connect or detach a board from an account-level object schema. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."}getInputSchema(){return _u}async executeInternal(e){if("connect"===e.action){if(!e.boardId)throw new Error("boardId is required for action=connect");if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided for action=connect");const t={boardId:e.boardId,objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName},a=await this.mondayApi.request(hu,t);return{content:{message:"Board successfully connected to object schema",connection_id:a.connect_board_to_object_schema?.id,schema_id:a.connect_board_to_object_schema?.object_schema_id}}}{if(!e.boardIds?.length)throw new Error("boardIds is required for action=detach");const t={boardIds:e.boardIds},a=(await this.mondayApi.request(fu,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,r=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...r.length>0&&{failures:r}}}}}},class extends Er{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage Object Schema Columns",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Create or update columns on an account-level object schema. Column changes are propagated to all boards connected to the schema. create: adds new columns. Each column requires type and title. Call get_column_type_info with fetchMode "${gu.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in).`}getInputSchema(){return Tu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(vu,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(bu,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends Er{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=Vi.WRITE,this.annotations=Tr({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return Su}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:dp.Deactivate,reactivate:dp.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(Eu,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=Vi.WRITE,this.annotations=Tr({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Yv}async executeInternal(e){const t=(await this.mondayApi.request(Wv,{input:{file_name:e.fileName,content_type:e.contentType,file_size:e.fileSize,source:"mcp",multipart:!1}},{versionOverride:"dev"})).create_upload,a=t.parts[0]?.url;if(!a)throw new Error("create_upload returned no upload URL — parts array was empty");return{content:{upload_id:t.upload_id,upload_url:a,url_expires_at:t.expires_at}}}},class extends Er{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=Vi.WRITE,this.annotations=Tr({title:"Finalize Asset Upload",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Finalize a file upload and create the asset on monday.com. Call this after uploading the file to the presigned URL from get_asset_upload_url. Requires the etag value from the PUT response headers. Automatically attaches the uploaded asset to the specified file column on the item. Returns the created asset_id."}getInputSchema(){return Kv}async executeInternal(e){const t=(await this.mondayApi.request(Qv,{input:{upload_id:e.uploadId,holder:{type:"ITEM",id:e.itemId},board_id:e.boardId,parts:[{part_number:1,etag:e.etag}]}},{versionOverride:"dev"})).complete_upload,a=JSON.stringify({added_file:{fileType:"ASSET",name:t.filename,assetId:String(t.id)}});return await this.mondayApi.request(zv,{boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,value:a}),{content:{asset_id:t.id,filename:t.filename,content_type:t.content_type,file_size:t.file_size,url:t.url,filelink:t.filelink}}}},class extends Er{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=Vi.READ,this.annotations=Tr({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Xv}async executeInternal(e){return{content:Jv}}},class extends Er{constructor(){super(...arguments),this.name="fetch_file_content",this.type=Vi.READ,this.annotations=Tr({title:"Fetch File Content",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch and extract the text content from a file stored in a monday.com files column.\n\nUse this tool when you need to read, summarize, or analyze the content of files attached to board items. Provide the item ID and column ID from the get_board_items_page response — the column value will be a URL like \"https://monday.com/protected_static/...\" indicating a file is present (null means no file).\n\nPROACTIVE USE: If you retrieve board items and notice a files column with a non-null value (a URL), consider fetching its content if it could help answer the user's question — don't wait to be explicitly asked.\n\nSupported file types and what is returned:\n- Text files (.txt, .md, .csv, .json): raw text content\n- Word documents (.docx): extracted text content\n- PDF files (.pdf): extracted text content\n- Excel files (.xlsx, .xls): extracted text content per sheet\n- Images (.png, .jpg, .gif, .webp, .svg, .bmp, .ico): returns the public URL so you can view or analyze the image directly\n\nText responses include a total_length field. If has_more is true, the content was truncated — you can call this tool again with next_offset if you need the remaining content.\n\nWhen to use:\n- User asks to summarize, read, or analyze the content of a file in a files column\n- User asks questions about what is inside a file (e.g., \"what does the PDF say?\")\n- User wants to extract data from a CSV or Excel file attached to a board item\n- A board item has a files column with a non-null value and the user's question may be answered by its content — even if the user didn't explicitly ask to read the file\n\nWhen NOT to use:\n- The files column value is null (no file uploaded for that item)"}getInputSchema(){return db}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:r=0}=e,n=await this.mondayApi.request(Zv,{itemId:[t],columnId:[a]}),o=n?.items?.[0]?.assets;if(!o||0===o.length)return{content:{message:`No file found for item ${t} in column ${a}. The column may be empty or the column ID may be incorrect.`}};return{content:{files:await Promise.all(o.map((e=>cb(e,r,i))))}}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Full lifecycle management for monday platform agents — create, read, update, delete, change state, and run.\n\nmonday platform agents are user-built work orchestrators on monday.com — each has a profile (name, role, avatar), a goal, and a markdown execution plan. Agents in state ACTIVE can be triggered automatically. They are NOT local LangChain or MCP agents.\n\nACTIONS (only pass fields that apply to the chosen action):\n- create: { action:"create", prompt, agent_model? } — AI-generated agent. Platform creates profile, goal, and plan from the prompt.\n- create_blank: { action:"create_blank", name?, role?, role_description?, avatar_url?, gender?, background_color?, user_prompt? } — manually defined agent.\n- get one: { action:"get", agent_id }\n- list owned: { action:"get" }\n- update: { action:"update", agent_id, name?, role?, role_description?, plan?, agent_model? }\n- delete: { action:"delete", agent_id }\n- activate: { action:"activate", agent_id }\n- deactivate: { action:"deactivate", agent_id }\n- run: { action:"run", agent_id }\n\nRULES:\n- "create_blank" with no fields creates a nameless blank agent — only do this intentionally.\n- "update" requires at least one of name/role/role_description/plan/agent_model.\n- "update", "delete", "activate", "deactivate", "run" all require "agent_id".\n- Created agents start INACTIVE. Follow with action:"activate" using the returned agent_id before they can be triggered.\n- ⚠️ DESTRUCTIVE — "delete" is permanent and irreversible. When the user refers to an agent by name, ALWAYS call action:"get" first to confirm the correct agent_id before deleting.\n- "run" is fire-and-forget. Returns trigger_uuid — no run-status query exists, treat successful enqueue as the only signal.\n- Agent state is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED only appears as the return value of action:"delete".\n\nUSAGE EXAMPLES:\n- AI create: { "action": "create", "prompt": "Run my daily standup every weekday at 9am." }\n- Manual create:{ "action": "create_blank", "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Fetch one: { "action": "get", "agent_id": "42" }\n- List mine: { "action": "get" }\n- Rename: { "action": "update", "agent_id": "7", "name": "New Name" }\n- Activate: { "action": "activate", "agent_id": "7" }\n- Deactivate: { "action": "deactivate", "agent_id": "7" }\n- Run: { "action": "run", "agent_id": "7" }\n- Delete: { "action": "delete", "agent_id": "7" }\n\nRELATED TOOLS:\n- agent_catalog — browse available trigger types and skills before wiring them to an agent\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent_knowledge — manage which boards/docs this agent has access to'}getInputSchema(){return gT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"create_blank":return this.handleCreateBlank(e);case"get":return this.handleGet(e);case"update":return this.handleUpdate(e);case"delete":return this.handleDelete(e);case"activate":return this.handleActivate(e);case"deactivate":return this.handleDeactivate(e);case"run":return this.handleRun(e)}}async handleCreate(e){if(!e.prompt)throw new Error('manage_agent action:"create" requires "prompt". For a manually configured agent, use action:"create_blank".');try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(aT,t,{versionOverride:"dev"});if(!a.create_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${a.create_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${a.create_agent.id}" to activate it`,agent:a.create_agent}}}catch(e){Jm(e,"create monday platform agent")}}async handleCreateBlank(e){try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(iT,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){Jm(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{agents:t}=await this.mondayApi.request(tT,{ids:[e.agent_id]},{versionOverride:"dev"}),a=t?.[0];return a?{content:{message:"monday platform agent",agent:a}}:{content:`monday platform agent ${e.agent_id} not found, or the authenticated user does not have access to it.`}}catch(e){Jm(e,"get monday platform agent")}try{const{agents:e}=await this.mondayApi.request(tT,{limit:100},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user (limited to 100 — ask the user if they need more)",count:t.length,agents:t}}}catch(e){Jm(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(rT,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){Jm(e,"update monday platform agent")}}async handleDelete(e){if(!e.agent_id)throw new Error('manage_agent action:"delete" requires "agent_id".');try{const t={id:e.agent_id},a=await this.mondayApi.request(nT,t,{versionOverride:"dev"});if(!a.delete_agent?.id)throw new Error("monday platform agent delete returned no id");return{content:{message:`monday platform agent ${a.delete_agent.id} deleted`,agent:a.delete_agent}}}catch(e){Jm(e,"delete monday platform agent")}}async handleActivate(e){if(!e.agent_id)throw new Error('manage_agent action:"activate" requires "agent_id".');try{const t=await this.mondayApi.request(oT,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){Jm(e,"activate monday platform agent")}}async handleDeactivate(e){if(!e.agent_id)throw new Error('manage_agent action:"deactivate" requires "agent_id".');try{const t={id:e.agent_id,inactive_reason:pw.DeactivatedByUser},a=await this.mondayApi.request(sT,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){Jm(e,"deactivate monday platform agent")}}async handleRun(e){if(!e.agent_id)throw new Error('manage_agent action:"run" requires "agent_id".');try{const t=await this.mondayApi.request(dT,{id:e.agent_id},{versionOverride:"dev"});if(!t.run_agent)throw new Error("run_agent returned no data — the agent run may not have been enqueued");return{content:{message:"Agent run enqueued.",trigger_uuid:t.run_agent.trigger_uuid}}}catch(e){Jm(e,"run monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent Triggers",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the triggers attached to a monday platform agent — triggers define WHEN the agent runs automatically.\n\nACTIONS:\n- list: { agent_id } — returns active triggers with node_id, block_reference_id, name, field_summary.\n- add: { agent_id, block_reference_id, field_values? } — attaches a trigger type to the agent.\n- remove: { agent_id, node_id } — detaches a trigger instance by node_id (NOT block_reference_id).\n\nWORKFLOW — add a trigger:\n1. Call agent_catalog action:"list_triggers" — note block_reference_id, field_schemas, and required_fields.\n2. Collect required field values from the user (e.g. board_id, column_id).\n3. Call this tool action:"add" with block_reference_id and field_values.\nNote: add returns only { success } — no node_id for the new instance. Call action:"list" afterward if you need the node_id.\n\nWORKFLOW — remove a trigger:\n1. Call action:"list" to see active triggers and note the node_id of the instance to remove.\n2. Call action:"remove" with that node_id.\n\nNOTE: Only triggers that can be added programmatically appear in the catalog. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\nrequire user setup in the monday.com UI — they will not appear in agent_catalog and cannot be managed here.\n\nUSAGE EXAMPLES:\n- List triggers: { "action": "list", "agent_id": "7" }\n- Add trigger: { "action": "add", "agent_id": "7", "block_reference_id": "status-change-ref", "field_values": { "board_id": "42" } }\n- Remove trigger: { "action": "remove", "agent_id": "7", "node_id": "node-abc" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_triggers" — discover available trigger types and their required field_values before calling action:"add" here\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return vT}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t={agent_id:e.agent_id},a=(await this.mondayApi.request(pT,t,{versionOverride:"dev"})).agent_active_triggers??[];return{content:{message:'Active triggers on this agent. Use node_id with action:"remove" to detach a trigger.',count:a.length,triggers:a}}}catch(e){Jm(e,"list active triggers for monday platform agent")}}async handleAdd(e){if(!e.block_reference_id)throw new Error('block_reference_id is required for action:"add". Call agent_catalog action:"list_triggers" first to find the block_reference_id.');try{const t={agent_id:e.agent_id,block_reference_id:e.block_reference_id,field_values:e.field_values},a=await this.mondayApi.request(lT,t,{versionOverride:"dev"});return{content:{message:'Trigger added to agent. Call action:"list" to verify and retrieve the node_id.',success:a.add_trigger_to_agent?.success??!1}}}catch(e){Jm(e,"add trigger to monday platform agent")}}async handleRemove(e){if(!e.node_id)throw new Error('node_id is required for action:"remove". Call action:"list" first to get node_id values.');try{const t={agent_id:e.agent_id,node_id:e.node_id},a=await this.mondayApi.request(cT,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){Jm(e,"remove trigger from monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent Skills",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the full skill lifecycle for monday platform agents — create new skills in the catalog, attach skills to an agent, or detach them.\n\nSkills extend what an agent can do (e.g. sending emails, querying databases, posting to Slack).\n\nACTIONS:\n- create: { name, content, description? } — creates a new custom skill in the account-wide catalog.\n The skill becomes available to all agents in the account.\n- add: { agent_id, skill_id } — attaches a skill to this agent.\n- remove: { agent_id, skill_id } — detaches a skill from this agent.\n\nWORKFLOW — attach an existing skill:\n1. Call agent_catalog action:"list_skills" — find the skill_id of the skill to attach.\n2. Call this tool action:"add" with agent_id and that skill_id.\n\nWORKFLOW — create a new skill and attach it:\n1. Call this tool action:"create" with name and content — note the returned id.\n2. Call this tool action:"add" with agent_id and that id directly (no catalog lookup needed).\n\nNOTE: There is no action to list which skills are currently attached to a specific agent — the platform does not yet expose that query.\nTo browse all skills available in the account catalog, use agent_catalog action:"list_skills".\n\nUSAGE EXAMPLES:\n- Create a skill: { "action": "create", "name": "Send Slack Message", "content": "## Instructions\\nPost a message to a Slack channel.", "description": "Sends a message to Slack" }\n- Add a skill: { "action": "add", "agent_id": "7", "skill_id": "skill-abc-123" }\n- Remove a skill: { "action": "remove", "agent_id": "7", "skill_id": "skill-abc-123" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_skills" — browse existing skills to find a skill_id before calling action:"add"\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return bT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleCreate(e){if(!e.name||!e.content)throw new Error('action:"create" requires both "name" and "content".');try{const t={name:e.name,content:e.content,description:e.description},a=await this.mondayApi.request(_T,t,{versionOverride:"dev"});if(!a.create_agent_skill)throw new Error("create_agent_skill returned no data");return{content:{message:'Skill created and added to the account catalog. Use the returned id with action:"add" to attach it to an agent.',skill:a.create_agent_skill}}}catch(e){Jm(e,"create monday platform agent skill")}}async handleAdd(e){if(!e.agent_id)throw new Error('agent_id is required for action:"add".');if(!e.skill_id)throw new Error('skill_id is required for action:"add". Get it from agent_catalog action:"list_skills" or from action:"create" in this tool.');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(mT,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){Jm(e,"add skill to monday platform agent")}}async handleRemove(e){if(!e.agent_id)throw new Error('agent_id is required for action:"remove".');if(!e.skill_id)throw new Error('skill_id is required for action:"remove".');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(uT,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){Jm(e,"remove skill from monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent Knowledge",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'List, grant, update, or revoke a monday platform agent\'s access to boards and docs.\n\nAn agent\'s "knowledge" is the set of monday.com boards and docs it can read from or write to during a run.\n\n- list: Returns all resources the agent currently has access to, including permission level and resource type.\n- add: Grants the agent access to a board or doc with the specified permission level.\n- update: Changes the permission level on a resource the agent already has access to. Call action:"list" first to confirm the resource_id exists.\n- remove: Revokes the agent\'s access to a board or doc entirely. Call action:"list" first to confirm the resource_id exists.\n\nPermission types:\n- READ: Agent can read data from the resource.\n- READ_WRITE: Agent can read and write data to the resource.\n\nUSAGE EXAMPLES:\n- List: { "action": "list", "agent_id": "7" }\n- Add board access: { "action": "add", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ" }\n- Update to read-write: { "action": "update", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ_WRITE" }\n- Remove access: { "action": "remove", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD" }\n\nRELATED TOOLS:\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform'}getInputSchema(){return ET}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"update":return this.handleUpdate(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t=(await this.mondayApi.request(yT,{id:e.agent_id},{versionOverride:"dev"})).agent_knowledge??{resources:[],files:[]};return{content:{message:"Current agent resource access.",count:t.resources?.length??0,knowledge:t}}}catch(e){Jm(e,"list agent knowledge for monday platform agent")}}async handleAdd(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:add");try{const t=await this.mondayApi.request(wT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access granted to agent.",success:t.add_agent_resource_access?.success??!1}}}catch(e){Jm(e,"add agent resource access for monday platform agent")}}async handleUpdate(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:update");try{const t=await this.mondayApi.request(TT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access updated.",success:t.update_agent_resource_access?.success??!1}}}catch(e){Jm(e,"update agent resource access for monday platform agent")}}async handleRemove(e){if(!e.resource_id||!e.scope_type)throw new Error("resource_id and scope_type are required for action:remove");try{const t=await this.mondayApi.request(IT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type},{versionOverride:"dev"});return{content:{message:"Resource access removed from agent.",success:t.remove_agent_resource_access?.success??!1}}}catch(e){Jm(e,"remove agent resource access for monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="agent_catalog",this.type=Vi.READ,this.annotations=Tr({title:"monday Platform Agent Catalog",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Browse the account-wide catalog of available trigger types and skills for monday platform agents. READ-ONLY — no agent_id required.\n\nUse this tool to discover what\'s available BEFORE wiring anything to a specific agent.\n\nACTIONS:\n- list_triggers: { block_reference_ids? } — returns available trigger types.\n Each entry has block_reference_id (required for manage_agent_triggers action:"add"), name, description,\n field_schemas (describes field_values shape), and required_fields (fields to collect from the user).\n Note: only triggers that can be added programmatically appear here. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\n require user setup in the monday.com UI and will not appear here.\n\n- list_skills: {} — returns available skills with id, name, description.\n Never guess or invent a skill id — always look it up here before calling manage_agent_skills action:"add".\n\nUSAGE EXAMPLES:\n- List all trigger types: { "action": "list_triggers" }\n- Fetch specific trigger: { "action": "list_triggers", "block_reference_ids": ["some-block-ref-id"] }\n- List all skills: { "action": "list_skills" }\n\nRELATED TOOLS:\n- manage_agent_triggers — use block_reference_id from list_triggers to attach a trigger to a specific agent\n- manage_agent_skills — use skill id from list_skills, or action:"create" to author a new skill, then attach to an agent\n- manage_agent — manage the agent entity itself (create, update, delete, activate, etc.)'}getInputSchema(){return ST}async executeInternal(e){switch(e.action){case"list_triggers":return this.handleListTriggers(e);case"list_skills":return this.handleListSkills()}}async handleListTriggers(e){try{const t={block_reference_ids:e.block_reference_ids},a=(await this.mondayApi.request(hT,t,{versionOverride:"dev"})).agent_triggers_catalog??[];return{content:{message:'Available trigger types. Use block_reference_id and inspect field_schemas/required_fields before calling manage_agent_triggers action:"add".',count:a.length,triggers:a}}}catch(e){Jm(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(fT,{},{versionOverride:"dev"})).agent_skills_catalog??[];return{content:{message:'Available skills. Use id when calling manage_agent_skills action:"add".',count:e.length,skills:e}}}catch(e){Jm(e,"fetch monday platform agent skills catalog")}}},class extends Er{constructor(){super(...arguments),this.name="list_automations",this.type=Vi.READ,this.annotations=Tr({title:"List Board Automations",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all automations on a specific monday.com board, including their ids, titles, active state, and configuration.\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\nNote: Some legacy automations may not appear — mention this if users ask about missing automations.\n"}getInputSchema(){return kT}async executeInternal(e){try{const t={boardIds:[e.boardId],limit:e.limit??100,...e.cursor?{cursor:e.cursor}:{}},a=await this.mondayApi.request(AT,t,{versionOverride:"2026-10"}),i=(a.board_automations?.items??[]).map(NT),r=a.board_automations?.cursor??null;return{content:{message:`Found ${i.length} live workflow(s) on board ${e.boardId}`,workflows:i,pagination:{nextCursor:r,hasMore:null!==r}}}}catch(e){Jm(e,"list live workflows")}}},class extends Er{constructor(){super(...arguments),this.name="manage_automations",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage Automations",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Activate, deactivate, or delete an existing monday.com automation.\n\nRequires an automation id. When the user refers to an automation by name, always call list_automations first to resolve the id — never guess or infer ids.\n\nActions:\n- activate: enables a paused automation so it starts responding to its trigger.\n- deactivate: pauses an automation while preserving its definition.\n- delete: permanently removes an automation — irreversible.\n\nWhen intent is ambiguous ("stop", "turn off", "pause"), prefer deactivate over delete.'}getInputSchema(){return PT}async executeInternal(e){const t=e;switch(t.action){case"activate":return this.activateWorkflow(t);case"deactivate":return this.deactivateWorkflow(t);case"delete":return this.deleteWorkflow(t)}}async activateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(OT,t,{versionOverride:"dev"});if(!a.activate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} activation did not report success`);return{content:{message:`Workflow ${e.workflowId} activated`,workflowId:e.workflowId,isActive:!0}}}catch(e){Jm(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(RT,t,{versionOverride:"dev"});if(!a.deactivate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deactivation did not report success`);return{content:{message:`Workflow ${e.workflowId} deactivated`,workflowId:e.workflowId,isActive:!1}}}catch(e){Jm(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(CT,t,{versionOverride:"dev"});if(!a.delete_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deletion did not report success`);return{content:{message:`Workflow ${e.workflowId} deleted`,workflowId:e.workflowId}}}catch(e){Jm(e,"delete workflow")}}},class extends Er{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Automation",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'\n Creates an automation on a monday board from a structured natural-language description.\n\nUse this tool only when you know:\n- boardId\n- the user\'s intended trigger\n- at least one intended action\n- any details the user provided that are relevant to the trigger, conditions, or actions\n\nThe caller does not need to know the exact available automation blocks or their required fields. Describe the user\'s intent clearly — the tool will translate that intent into supported blocks and values.\n\nIf a required detail is missing from the user\'s request, ask for clarification before calling the tool.\n\nIf the tool returns status: "needs_clarification", present the unresolved fields to the user, gather answers, then call the tool again.\n\nDescribe the automation in this format:\n\nTrigger:\n When <the event that should start the automation>\n Details:\n <relevant detail>: <value>\n\nConditions:\n - Only if <condition that should be true>\n Details:\n <relevant detail>: <value>\n\nActions:\n - <action the automation should perform>:\n <relevant detail>: <value>\n\nRules:\n- Use one trigger.\n- Conditions are optional.\n- Multiple conditions mean AND.\n- Use one or more actions.\n- Do not use branching.\n- Use natural language, not block IDs or internal field names.\n- Actions may reference values from the trigger context, such as "{{item name}}", "{{creator}}", "{{status}}", "{{group}}", or "{{board}}".\n\nTerminology:\n- Trigger: the event that starts the automation, such as "when a new item is created".\n- Conditions: optional requirements that must be true before actions run.\n- Actions: what the automation does when it runs.\n\nExample:\n\nTrigger:\n When a new item is created\n\nActions:\n - Send a notification:\n Recipient: John Snow\n Title: Important Update\n Message: The item "{{item name}}" was created.\n\n - Move the item to a group:\n Group: Top group\n'}getInputSchema(){return $T}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/lite-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`lite-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Jm(e,"create automation")}}},class extends Er{constructor(){super(...arguments),this.name="create_workflow",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n"}getInputSchema(){return LT}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(xT,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:r}=a.create_workflow;if(!i||!r)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:r}}}catch(e){Jm(e,"create Workflow Builder workflow")}}},class extends Er{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return FT}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Jm(e,"update workflow")}}},class extends Er{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=Vi.READ,this.annotations=Tr({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return UT}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-planner",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Jm(e,"plan workflow")}}},class extends Er{constructor(){super(...arguments),this.name="publish_workflow",this.type=Vi.WRITE,this.annotations=Tr({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nUse this after create_workflow (and optionally update_workflow) to make the workflow active. Before publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\n"}getInputSchema(){return jT}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(VT,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:r}=a.publish_workflow;if(!i||!r)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:r}}}catch(e){Jm(e,"publish workflow")}}}];var wE;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(wE||(wE={}));const IE=(e,t)=>{let a=[];t?.mode===wE.APPS?a=[...Ir]:t?.mode!==wE.API&&t?.mode||(a=[...yE,...bE]);const i=a.map((t=>((e,t)=>e.prototype instanceof Er?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof er?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==Vi.ALL_API;if(t.mode===wE.API&&"only"===t.enableDynamicApiTools)return e.type===Vi.ALL_API;let a=!1;return t.mode===wE.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===Vi.ALL_API),t.readOnlyMode&&(a=a||e.type!==Vi.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))};class TE{constructor(){this.dynamicTools=new Map}registerTool(e,t){const a=e.enabledByDefault??!0,i=a;this.dynamicTools.set(e.name,{instance:e,mcpTool:t,enabled:i,enabledByDefault:a}),a||t.disable()}enableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled||(t.mcpTool.enable(),t.enabled=!0),!0)}disableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled&&(t.mcpTool.disable(),t.enabled=!1),!0)}isToolEnabled(e){const t=this.dynamicTools.get(e);return!!t&&t.enabled}isToolEnabledByDefault(e){const t=this.dynamicTools.get(e);return!t||t.enabledByDefault}getToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]=t.enabled})),e}getDynamicToolNames(){return Array.from(this.dynamicTools.keys())}getDetailedToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]={enabled:t.enabled,enabledByDefault:t.enabledByDefault}})),e}resetToolToDefault(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabledByDefault&&!t.enabled?(t.mcpTool.enable(),t.enabled=!0,!0):!(!t.enabledByDefault&&t.enabled)||(t.mcpTool.disable(),t.enabled=!1,!0))}getAllDynamicTools(){return this.dynamicTools}clear(){this.dynamicTools.clear()}}class EE extends Pi{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new TE,this.toolInstances=[],this.managementTool=null,this.mondayApiToken=e.mondayApiToken,this.toolkitConfig=e;const t="function"==typeof e.mondayApiToken?e.mondayApiToken():e.mondayApiToken;this.mondayApiClient=this.createApiClient(t,e),this.context={...e.context,apiVersion:e.mondayApiVersion??Xi},this.registerTools(e)}createApiClientFromToken(){return this.createApiClient(this.mondayApiToken(),this.toolkitConfig)}createApiClient(e,t){return new i({token:e,apiVersion:t.mondayApiVersion??Xi,endpoint:t.mondayApiEndpoint,requestConfig:{...t.mondayApiRequestConfig,headers:{...t.mondayApiRequestConfig?.headers||{},"user-agent":"monday-api-mcp"}}})}registerTools(e){try{this.toolInstances=this.initializeTools(e),this.toolInstances.forEach((e=>this.registerSingleTool(e))),!0===e.toolsConfiguration?.enableToolManager&&this.registerManagementTool()}catch(e){throw new Error(`Failed to initialize Monday Agent Toolkit: ${e instanceof Error?e.message:String(e)}`)}}registerManagementTool(){const e=new BT;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:"function"==typeof this.mondayApiToken?()=>this.createApiClientFromToken():this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return IE(t,e.toolsConfiguration)}registerSingleTool(t){const a=t.getInputSchema(),i=this.registerTool(t.name,{...t,title:t.annotations?.title,description:t.getDescription(),inputSchema:a,annotations:t.annotations},(async(i,r)=>{try{let r;if(a){const n=e.object(a).safeParse(i);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);r=await t.execute(n.data)}else r=await t.execute();return this.formatToolResult(r.content)}catch(e){return this.handleToolError(e,t.name)}}));this.dynamicToolManager.registerTool(t,i)}enableTool(e){return this.dynamicToolManager.enableTool(e)}disableTool(e){return this.dynamicToolManager.disableTool(e)}isToolEnabled(e){return this.dynamicToolManager.isToolEnabled(e)}getToolsStatus(){return this.dynamicToolManager.getToolsStatus()}getDynamicToolNames(){return this.dynamicToolManager.getDynamicToolNames()}getServer(){return this}getTools(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createToolHandler(t)})))}getToolsForMcp(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createMcpToolHandler(t)})))}createToolHandler(t){return async a=>{const i=t.getInputSchema();if(i){const r=e.object(i).safeParse(a);if(!r.success)throw new Error(`Invalid arguments: ${r.error.message}`);return(await t.execute(r.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const r=t.getInputSchema();if(r){const n=e.object(r).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data,i);return this.formatToolResult(o.content)}{const e=await t.execute(void 0,i);return this.formatToolResult(e.content)}}catch(e){return{content:[{type:"text",text:`Error: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}}getSchemaForTool(t,i){const r=t.getInputSchema();if(r)return"json"===i?.schemaFormat?a(e.object(r)):r}formatToolResult(e){return"string"==typeof e?{content:[{type:"text",text:e}]}:{structuredContent:e,content:[{type:"text",text:JSON.stringify(e)}]}}handleToolError(e,t){return{content:[{type:"text",text:`Failed to execute tool ${t}: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}}export{TE as DynamicToolManager,EE as MondayAgentToolkit};
|
|
2653
|
+
`),i=await this.mondayApi.request(a);return i.__type?{content:{message:"Type details retrieved",data:{name:i.__type.name,kind:i.__type.kind,description:i.__type.description??null,fields:i.__type.fields??[],inputFields:i.__type.inputFields??[],interfaces:i.__type.interfaces??[],enumValues:i.__type.enumValues??[],possibleTypes:i.__type.possibleTypes??[]}}}:{content:`Type '${e.typeName}' not found in the GraphQL schema. Please check the type name and try again.`}}catch(e){const t=e instanceof Error?e.message:"Unknown error",a=t.includes("JSON");return{content:`Error fetching type details: ${t}${a?"\n\nThis could be because the type name is incorrect or the GraphQL query format is invalid. Please check the type name and try again.":""}`}}var t}},class extends Er{constructor(){super(...arguments),this.name="create_custom_activity",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Custom Activity",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new custom activity in the E&A app"}getInputSchema(){return Tf}async executeInternal(e){const t={color:e.color,icon_id:e.icon_id,name:e.name};return await this.mondayApi.request(Bm,t),{content:{message:`Custom activity '${e.name}' with color ${e.color} and icon ${e.icon_id} successfully created`,name:e.name,color:e.color,icon_id:e.icon_id}}}},class extends Er{constructor(){super(...arguments),this.name="create_notification",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Notification",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Send a notification to a user via the bell icon and optionally by email. Use target_type "Post" for updates/replies or "Project" for items/boards.'}getInputSchema(){return Sf}async executeInternal(e){const t={user_id:e.user_id,target_id:e.target_id,text:e.text,target_type:e.target_type};try{await this.mondayApi.request(Ef,t);return{content:{message:"Notification sent",user_id:e.user_id,text:e.text}}}catch(t){return{content:`Failed to send notification to user ${e.user_id}`}}}},class extends Er{constructor(){super(...arguments),this.name="create_timeline_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Timeline Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new timeline item in the E&A app"}getInputSchema(){return Pf}async executeInternal(e){const t={item_id:e.item_id.toString(),custom_activity_id:e.custom_activity_id,title:e.title,timestamp:e.timestamp,summary:e.summary,content:e.content,location:e.location,phone:e.phone,url:e.url};e.start_timestamp&&e.end_timestamp&&(t.time_range={start_timestamp:e.start_timestamp,end_timestamp:e.end_timestamp});const a=await this.mondayApi.request(qm,t);return{content:{message:`Timeline item '${e.title}' with ID ${a.create_timeline_item?.id} successfully created on item ${e.item_id}`,timeline_item_id:a.create_timeline_item?.id,item_id:e.item_id,title:e.title}}}},class extends Er{constructor(){super(...arguments),this.name="fetch_custom_activity",this.type=Vi.READ,this.annotations=Tr({title:"Fetch Custom Activities",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get custom activities from the E&A app"}getInputSchema(){return Wf}async executeInternal(e){const t=await this.mondayApi.request(Hm);if(!t.custom_activity||0===t.custom_activity.length)return{content:{message:"No custom activities found",data:[]}};const a=t.custom_activity.map((e=>({id:e.id,name:e.name,color:e.color,icon_id:e.icon_id,type:e.type})));return{content:{message:`Found ${a.length} custom activities`,data:a}}}},class extends Er{constructor(){super(...arguments),this.name="read_docs",this.type=Vi.READ,this.annotations=Tr({title:"Read Documents",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Get information about monday.com documents. Supports two modes:\n\nMODE: "content" (default) — Fetch documents with their full markdown content.\n- Requires: type ("ids" | "object_ids" | "workspace_ids") and ids array\n- Supports pagination via page/limit. Check has_more_pages in response.\n- If type "ids" returns no results, automatically retries with object_ids.\n- Set include_blocks: true to include block IDs, types, and positions in the response — required before calling update_doc.\n- Blocks default to 25 per page. Use blocks_limit and blocks_page to paginate through long documents.\n- Set include_comments: true to fetch all comments and replies on the document. Each comment is enriched with anchor info (block_id, selection_from, selection_length) indicating which block and text range it\'s attached to. Use comments_limit to control how many comments per item (default 50).\n\nMODE: "version_history" — Fetch the edit history of a single document.\n- Requires: ids with the document\'s object_id (use the object_id field from content mode results, NOT the id field).\n- The object_id is the numeric ID visible in the document URL.\n- Returns restoring points sorted newest-first. Use version_history_limit to cap results (e.g., "last 3 changes" → version_history_limit: 3).\n- Use since/until to filter by time range. If omitted, returns full history.\n- Set include_diff: true to see what content changed between versions (fetches up to 10 diffs, may be slower).\n- Examples:\n - { mode: "version_history", ids: ["5001466606"], version_history_limit: 3 }\n - { mode: "version_history", ids: ["5001466606"], since: "2026-03-11T00:00:00Z", include_diff: true }'}getInputSchema(){return eg}async executeInternal(e){return e.mode===X_?this.executeVersionHistory(e):this.executeContent(e)}async executeContent(e){try{if(!e.type||!e.ids||0===e.ids.length)return{content:'Error: type and ids are required when mode is "content".'};let t,a,i;switch(this.sessionContext.metadata={...this.sessionContext.metadata,mode:e.mode??J_,include_comments:e.include_comments??!1,include_blocks:e.include_blocks??!1},e.type){case"ids":t=e.ids;break;case"object_ids":a=e.ids;break;case"workspace_ids":i=e.ids}const r=e.include_blocks??!1,n=r?{blocksLimit:e.blocks_limit,blocksPage:e.blocks_page}:{},o={ids:t,object_ids:a,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:r,...n};let s=await this.mondayApi.request(Dm,o);if((!s.docs||0===s.docs.length)&&t){const a={ids:void 0,object_ids:t,limit:e.limit||25,order_by:e.order_by,page:e.page,workspace_ids:i,includeBlocks:r,...n};s=await this.mondayApi.request(Dm,a)}if(!s.docs||0===s.docs.length){return{content:`No documents found matching the specified criteria${e.page?` (page ${e.page})`:""}.`}}const d=e.include_comments??!1,p=e.comments_limit??50;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_ids:s.docs.flatMap((e=>e?[e.id]:[])),object_ids:s.docs.flatMap((e=>e?.object_id?[e.object_id]:[]))},this.enrichDocsWithMarkdown(s.docs,o,r,d,p,e.blocks_limit,e.blocks_page)}catch(e){return{content:`Error reading documents: ${e instanceof Error?e.message:"Unknown error occurred"}`}}}async executeVersionHistory(e){const{include_diff:t,since:a,until:i,version_history_limit:r}=e,n=e.ids?.[0];if(!n)return{content:'Error: ids is required when mode is "version_history". Provide the document object_id.'};this.sessionContext.metadata={...this.sessionContext.metadata,mode:X_,object_ids:[n]};try{const e={docId:n,since:a,until:i},o=await this.mondayApi.request(Nm,e);let s=o?.doc_version_history?.restoring_points;if(!s||0===s.length)return{content:`No version history found for document ${n}${a?` from ${a}`:""}.`};if(!t)return r&&(s=s.slice(0,r)),{content:{doc_id:n,since:a,until:i,restoring_points:s}};const d=Math.min(r??10,10),p=s.slice(0,d+1),l=s.length>d,c=(await Promise.allSettled(p.map((async(e,t)=>{if(t===p.length-1||!e.date)return e;const a=p[t+1];if(!a?.date)return e;const i={docId:n,date:e.date,prevDate:a.date},r=await this.mondayApi.request(Om,i);return{...e,diff:r?.doc_version_diff?.blocks??[]}}))).then((e=>e.map(((e,t)=>"fulfilled"===e.status?e.value:p[t]))))).slice(0,d);return{content:{doc_id:n,since:a,until:i,restoring_points:c,...l&&{truncated:!0,total_count:s.length}}}}catch(e){return{content:`Error fetching version history for document ${n}: ${e instanceof Error?e.message:"Unknown error"}`}}}buildCommentAnchorMap(e){const t=new Map;for(const a of e){const e=a.content?.deltaFormat;if(!e||!Array.isArray(e))continue;let i=0;for(const r of e){const e=r.insert,n="string"==typeof e?e.length:1,o=r.attributes,s=o?.comments;if(s&&Array.isArray(s))for(const e of s){const r=String(e),o=t.get(r);if(o&&o.block_id===a.id){const e=Math.max(o.selection_from+o.selection_length,i+n);o.selection_length=e-o.selection_from}else o||t.set(r,{block_id:a.id,selection_from:i,selection_length:n})}i+=n}}return t}async fetchDocComments(e,t,a){try{const i={boardId:e,itemsLimit:100,updatesLimit:a},[r,n]=await Promise.all([this.mondayApi.request(km,i),this.mondayApi.request(Q_,{docId:[t]}).catch((()=>null))]),o=r.boards?.[0]?.items_page?.items;if(!o)return[];let s=new Map;if(n){const e=(n.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((e=>{let t;if("string"==typeof e.content)try{t=JSON.parse(e.content)}catch{t={}}else t=e.content??{};return{id:e.id??"",type:e.type??"",content:t}}));s=this.buildCommentAnchorMap(e)}const d=[];for(const e of o)if(e.updates&&0!==e.updates.length)for(const t of e.updates)d.push({id:t.id,text_body:t.text_body,body:t.body,created_at:t.created_at,creator:t.creator?{id:t.creator.id,name:t.creator.name}:null,item_id:e.id,item_name:e.name,anchor:s.get(t.id)??null,replies:(t.replies??[]).map((e=>({id:e.id,text_body:e.text_body,body:e.body,created_at:e.created_at,creator:e.creator?{id:e.creator.id,name:e.creator.name}:null})))});return d}catch(e){return`Error fetching comments: ${e instanceof Error?e.message:"Unknown error"}`}}async enrichDocsWithMarkdown(e,t,a,i=!1,r=50,n,o){const s=await Promise.all(e.filter((e=>null!==e)).map((async e=>{let t,s="";try{const t={docId:e.id},a=await this.mondayApi.request(Gm,t);s=a.export_markdown_from_doc.success&&a.export_markdown_from_doc.markdown?a.export_markdown_from_doc.markdown:`Error getting markdown: ${a.export_markdown_from_doc.error||"Unknown error"}`}catch(e){s=`Error getting markdown: ${e instanceof Error?e.message:"Unknown error"}`}return i&&e.object_id&&(t=await this.fetchDocComments(e.object_id,e.id,r)),{id:e.id,object_id:e.object_id,name:e.name,doc_kind:e.doc_kind,created_at:e.created_at,created_by:e.created_by?.name||"Unknown",url:e.url,relative_url:e.relative_url,workspace:e.workspace?.name||"Unknown",workspace_id:e.workspace_id,doc_folder_id:e.doc_folder_id,settings:e.settings,...a&&{blocks:(e.blocks??[]).filter((e=>null!=e)).map((e=>({id:e.id,type:e.type,parent_block_id:e.parent_block_id,position:e.position,content:e.content}))),...void 0!==n||void 0!==o?{blocks_pagination:{current_page:o??1,limit:n??25,count:(e.blocks??[]).filter((e=>null!=e)).length,has_more_pages:(e.blocks??[]).length===(n??25)}}:{}},blocks_as_markdown:s,...i&&{comments:t}}}))),d=t.page||1,p=t.limit||25,l=s.length,c=l===p;return{content:{message:`Documents retrieved (${s.length})`,pagination:{current_page:d,limit:p,count:l,has_more_pages:c},data:s}}}},class extends Er{constructor(){super(...arguments),this.name="workspace_info",this.type=Vi.READ,this.annotations=Tr({title:"Get Workspace Information",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool returns the boards, docs and folders in a workspace and which folder they are in. It returns up to 100 of each object type, if you receive 100 assume there are additional objects of that type in the workspace."}getInputSchema(){return tg}async executeInternal(e){const t={workspace_id:e.workspace_id},a=await this.mondayApi.request(Wm,t);if(!a.workspaces||0===a.workspaces.length)return{content:`No workspace found with ID ${e.workspace_id}`};const i=function(e,t){const{workspaces:a,boards:i,docs:r,folders:n}=e,o=a?.[0];if(!o)throw new Error("No workspace found");const s=new Map((n||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).map((e=>[e.id,{id:e.id,name:e.name,boards:[],docs:[]}]))),d=[];(i||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.board_folder_id&&s.has(e.board_folder_id)?s.get(e.board_folder_id).boards.push(t):d.push(t)}));const p=[];return(r||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name)).forEach((e=>{const t={id:e.id,name:e.name};e.doc_folder_id&&s.has(e.doc_folder_id)?s.get(e.doc_folder_id).docs.push(t):p.push(t)})),{workspace:{id:o.id,name:o.name,url:t?U_(t,o.id):void 0,description:o.description||"",kind:o.kind||"",created_at:o.created_at||"",state:o.state||"",is_default_workspace:o.is_default_workspace||!1,owners_subscribers:(o.owners_subscribers||[]).filter((e=>null!=e&&null!=e.id&&null!=e.name&&null!=e.email)).map((e=>({id:e.id,name:e.name,email:e.email})))},folders:Array.from(s.values()),root_items:{boards:d,docs:p}}}(a,await F_(this.mondayApi));return{content:{message:"Workspace info retrieved",data:i}}}},class extends Er{constructor(){super(...arguments),this.name="list_workspaces",this.type=Vi.READ,this.annotations=Tr({title:"List Workspaces",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all workspaces available to the user. Returns up to 500 workspaces with their ID, name, and description."}getInputSchema(){return sg}async executeInternal(e){const t=e.searchTerm?1e4:e.limit,a=e.searchTerm?1:e.page;let i=null;if(e.searchTerm&&(i=rg(e.searchTerm),0===i.length))throw new Error("Search term did not include any alphanumeric characters. Please provide a valid search term.");const r=e=>({limit:t,page:a,membershipKind:e}),n=ng(await this.mondayApi.request(ag,r(rc.Member))),o=!og(n)||i&&!function(e,t){return t.some((t=>rg(t.name).includes(e)))}(i,n);let s=n;if(o){s=ng(await this.mondayApi.request(ag,r(rc.All)))}if(!og(s))return{content:{message:"No workspaces found.",data:[]}};const d=i&&s?.length<=ig,p=function(e,t,a,i){if(!e||t.length<=ig)return t;const r=(a-1)*i,n=r+i;return t.filter((t=>rg(t.name).includes(e))).slice(r,n)}(i,s,e.page,e.limit);if(!og(p))return{content:{message:"No workspaces found matching the search term. Try using the tool without a search term",data:[]}};const l=p.length===e.limit,c=await F_(this.mondayApi),m=p.map((e=>({id:e.id,name:e.name,description:e.description||void 0,url:c&&e.id?U_(c,e.id):void 0})));return{content:{message:"Workspaces retrieved",...d?{disclaimer:"Search term not applied - returning all workspaces. Perform the filtering manually."}:{},...l?{next_page:e.page+1}:{},data:m}}}},class extends Er{constructor(){super(...arguments),this.name="create_doc",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new monday.com doc either inside a workspace or attached to an item (via a doc column). After creation, the provided markdown will be appended to the document.\n\nLOCATION TYPES:\n- workspace: Creates a document in a workspace (requires workspace_id, optional doc_kind, optional folder_id, optional docOwnerIds)\n- item: Creates a document attached to an item (requires item_id, optional column_id, optional docOwnerIds)\n\nUSAGE EXAMPLES:\n- Workspace doc: { location: "workspace", workspace_id: 123, doc_name: "My Doc", doc_kind: "private" , markdown: "..." }\n- Workspace doc in folder: { location: "workspace", workspace_id: 123, doc_name: "My Doc", folder_id: 17264196 , markdown: "..." }\n- Item doc: { location: "item", item_id: 456, doc_name: "My Doc", column_id: "doc_col_1" , markdown: "..." }\n- Workspace doc with agent owner: { location: "workspace", workspace_id: 123, doc_name: "My Doc", markdown: "...", docOwnerIds: ["<agent_owner_user_id>"] }'}getInputSchema(){return hg}async executeInternal(e){const t=ug.safeParse({...e,type:e.location});if(!t.success)return{content:`Required parameters were not provided for location parameter of ${e.location}`};const a=t.data;try{let t,i,r;if(a.type===mg.enum.workspace){const n={location:{workspace:{workspace_id:a.workspace_id.toString(),name:e.doc_name,kind:a.doc_kind||zd.Public,folder_id:a.folder_id?.toString()}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},o=await this.mondayApi.request(pg,n);t=o?.create_doc?.id??void 0,i=o?.create_doc?.object_id??void 0,r=o?.create_doc?.url??void 0}else if(a.type===mg.enum.item){const n={itemId:a.item_id.toString()},o=await this.mondayApi.request(dg,n),s=o.items?.[0];if(!s)return{content:`Error: Item with id ${a.item_id} not found.`};const d=s.board?.id,p=s.board?.columns?.find((e=>e&&e.type===vf.Doc));let l=a.column_id;if(!l)if(p)l=p.id;else{const e={boardId:d.toString(),columnType:vf.Doc,columnTitle:"Doc"},t=await this.mondayApi.request(Fm,e);if(l=t?.create_column?.id,!l)return{content:"Error: Failed to create doc column."}}const c={location:{board:{item_id:a.item_id.toString(),column_id:l}},...void 0!==e.docOwnerIds?{docOwnerIds:e.docOwnerIds}:{}},m=await this.mondayApi.request(pg,c);if(t=m.create_doc?.id??void 0,i=m.create_doc?.object_id??void 0,r=m.create_doc?.url??void 0,e.doc_name&&t)try{const a={docId:t,name:e.doc_name};await this.mondayApi.request(cg,a)}catch(e){console.warn("Failed to update doc name:",e)}}if(!t)return{content:"Error: Failed to create document."};const n={docId:t,markdown:e.markdown},o=await this.mondayApi.request(lg,n),s=o?.add_content_to_doc_from_markdown?.success,d=o?.add_content_to_doc_from_markdown?.error;return s?(this.sessionContext.metadata={...this.sessionContext.metadata,location:e.location,...t&&{doc_id:t},...i&&{object_id:i}},{content:{message:"Document successfully created",doc_id:t,object_id:i,doc_url:r,doc_name:e.doc_name}}):{content:`Document ${t} created, but failed to add markdown content: ${d||"Unknown error"}`}}catch(e){return{content:`Error creating document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Er{constructor(){super(...arguments),this.name="add_content_to_doc",this.type=Vi.WRITE,this.annotations=Tr({title:"Add Content to Document",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Add markdown content to an existing monday.com document.\n\nIDENTIFICATION: Provide either doc_id or object_id to identify the document:\n- doc_id: The document ID (the id field returned by read_docs). Takes priority if both provided.\n- object_id: The document object ID (the object_id field from read_docs, also visible in the document URL). Will be resolved to a doc_id.\n\nUSAGE EXAMPLES:\n- By doc_id: { doc_id: "123", markdown: "# New Section\\nContent here" }\n- By object_id: { object_id: "456", markdown: "# New Section\\nContent here" }\n- Insert after block: { doc_id: "123", markdown: "Inserted content", after_block_id: "block_789" }'}getInputSchema(){return vg}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};try{let t=null;if(e.doc_id){const a=await this.mondayApi.request(gg,{docId:[e.doc_id]});t=a.docs?.[0]??null}else{const a=await this.mondayApi.request(_g,{objectId:[e.object_id]});t=a.docs?.[0]??null}if(!t){return{content:`Error: No document found for ${e.doc_id?`doc_id ${e.doc_id}`:`object_id ${e.object_id}`}.`}}this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t.id,...e.object_id&&{object_id:e.object_id}};const a={docId:t.id,markdown:e.markdown,afterBlockId:e.after_block_id},i=await this.mondayApi.request(fg,a);if(!i?.add_content_to_doc_from_markdown)return{content:"Error: Failed to add content to document — no response from API."};const{success:r,block_ids:n,error:o}=i.add_content_to_doc_from_markdown;if(!r)return{content:`Error adding content to document: ${o||"Unknown error"}`};const s=n?.length??0;return{content:{message:`Successfully added content to document ${t.id}. ${s} block${1===s?"":"s"} created.`,doc_id:t.id,block_ids:n,doc_name:t.name,doc_url:t.url}}}catch(e){return{content:`Error adding content to document: ${e instanceof Error?e.message:"Unknown error"}`}}}},class extends Er{constructor(){super(...arguments),this.name="update_doc",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Document",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Update an existing monday.com document. Provide doc_id (preferred) or object_id, plus an ordered operations array (executed sequentially, stops on first failure).\n\nOPERATIONS:\n- set_name: Rename the document.\n- add_markdown_content: Append markdown as blocks (or insert after a block). Best for text, headings, lists, simple tables — no block IDs needed.\n- update_block: Update content of an existing text, code, or list_item block in-place.\n- create_block: Create a new block at a precise position. Use parent_block_id to nest inside notice_box, table cell, or layout cell.\n- delete_block: Remove any block. The ONLY option for BOARD, WIDGET, DOC embed, and GIPHY blocks.\n- replace_block: Delete a block and create a new one in its place (use when update_block is not supported).\n- add_comment: Create a new comment or reply on the document (doc-level, block-level, or text-selection).\n\nWHEN TO USE EACH OPERATION:\n- text / code / list_item → update_block. Use replace_block to change subtype (e.g. NORMAL_TEXT→LARGE_TITLE)\n- divider / table / image / video / notice_box / layout → replace_block (properties immutable after creation)\n- BOARD / WIDGET / DOC / GIPHY → delete_block only\n\nGETTING BLOCK IDs: Call read_docs with include_blocks: true — returns id, type, position, and content per block.\n\nBLOCK CONTENT (delta_format): Array of insert ops. Last op MUST be {insert: {text: "\\n"}}.\n- Plain: [{insert: {text: "Hello"}}, {insert: {text: "\\n"}}]\n- Bold: [{insert: {text: "Hi"}, attributes: {bold: true}}, {insert: {text: "\\n"}}]\n- Mention user/doc/board: [{insert: {text: "Hey "}}, {insert: {mention: {id: 12345, type: "USER"}}}, {insert: {text: "\\n"}}] — type is USER, DOC, or BOARD. id is numeric (user IDs from list_users_and_teams)\n- Inline column value: [{insert: {column_value: {item_id: 111, column_id: "status"}}}, {insert: {text: "\\n"}}]\n- Supported attributes: bold, italic, underline, strike, code, link, color, background (not applicable to mention/column_value ops)\n\nIMAGE WITH ASSET: For asset-based images, use create_block with block_type "image" and asset_id (instead of public_url). add_markdown_content does NOT support asset images — for mixed content, alternate add_markdown_content (text) and create_block (image) operations in sequence.\n\nCOMMENTS:\n- add_comment: Create a new comment or reply on the document. Three scopes:\n - Doc-level (no block_id): comment appears on the doc as a whole.\n - Block-level (block_id only): comment is anchored to a specific block. The block shows a comment indicator in the UI.\n - Text-selection (block_id + selection_from + selection_length): comment is anchored to a specific character range inside a text/code/list_item block. That text is highlighted with a comment marker.\n Block-level and text-selection comments only work on blocks with text content (text, code, list_item, title, quote). They do NOT work on: divider, page_break, table, layout, notice_box, image, video, or giphy blocks.\n Get block IDs from read_docs with include_blocks: true. Format body with HTML, not markdown. Use mentions_list for @mentions.'}getInputSchema(){return Zg}async executeInternal(e){if(!e.doc_id&&!e.object_id)return{content:"Error: Either doc_id or object_id must be provided."};this.sessionContext.metadata={...this.sessionContext.metadata,operation_types:e.operations?.map((e=>e.operation_type)),operation_count:e.operations?.length??0,...e.object_id&&{object_id:e.object_id}};try{let t=e.doc_id;if(!t){const a=await this.mondayApi.request(q_,{objectId:[e.object_id]}),i=a.docs?.[0];if(!i)return{content:`Error: No document found for object_id ${e.object_id}.`};t=i.id}const a=[];let i=null;for(let r=0;r<e.operations.length;r++){const n=e.operations[r];try{const i=await this.executeOperation(t,n,e.object_id);a.push(`- [OK] ${n.operation_type}${i?`: ${i}`:""}`)}catch(e){const t=e instanceof Error?e.message:"Unknown error";a.push(`- [FAILED] ${n.operation_type}: ${t}`),i=r;break}}const r=null!==i?i:e.operations.length,n=e.operations.length,o=`Completed ${r}/${n} operation${1===n?"":"s"} on doc ${t}.`;return this.sessionContext.metadata={...this.sessionContext.metadata,doc_id:t},{content:`${o}\n\nResults:\n${a.join("\n")}\n\nDoc ID: ${t}`}}catch(e){return{content:`Error: ${e instanceof Error?e.message:String(e)}`}}}async executeOperation(e,t,a){switch(t.operation_type){case"set_name":return this.executeSetName(e,t.name);case"add_markdown_content":return this.executeAddMarkdown(e,t.markdown,t.after_block_id);case"update_block":return this.executeUpdateBlock(t.block_id,t.content);case"create_block":return this.executeCreateBlock(e,t.block,t.after_block_id,t.parent_block_id);case"delete_block":return this.executeDeleteBlock(t.block_id);case"replace_block":return this.executeReplaceBlock(e,t.block_id,t.block,t.after_block_id,t.parent_block_id);case"add_comment":return this.executeAddComment(e,a,t.body,t.parent_update_id,t.mentions_list,t.block_id,t.selection_from,t.selection_length);default:{const e=t.operation_type;throw new Error(`Unsupported operation type: "${e}"`)}}}async executeSetName(e,t){const a={docId:e,name:t},i=await this.mondayApi.request(M_,a);if(!i?.update_doc_name)throw new Error(`No confirmation from update_doc_name — rename to "${t}" may not have applied`);return`Renamed to "${t}"`}async executeAddMarkdown(e,t,a){if(!t.trim())throw new Error("markdown must not be empty");const i={docId:e,markdown:t,afterBlockId:a},r=await this.mondayApi.request(B_,i),n=r?.add_content_to_doc_from_markdown;if(!n?.success)throw new Error(n?.error||"Failed to add markdown content");const o=n.block_ids?.length??0;return`${o} block${1===o?"":"s"} added${n.block_ids?.length?`. Block IDs: ${n.block_ids.join(", ")}`:""}`}async executeUpdateBlock(e,t){const a=function(e){switch(e.block_content_type){case"text":return{deltaFormat:Tg(e.delta_format),alignment:e.alignment,direction:e.direction};case"code":return{deltaFormat:Tg(e.delta_format),language:e.language};case"list_item":return{deltaFormat:Tg(e.delta_format),checked:e.checked,indentation:e.indentation};default:{const t=e.block_content_type;throw new Error(`Unsupported block_content_type: "${t}"`)}}}(t),i={blockId:e,content:JSON.stringify(a)},r=await this.mondayApi.request(H_,i);if(!r?.update_doc_block)throw new Error("No response from update_doc_block");return`Block ${e} updated`}async executeCreateBlock(e,t,a,i){const r=function(e){switch(e.block_type){case"text":return{text_block:{delta_format:Ig(e.delta_format),text_block_type:e.text_block_type?e.text_block_type:void 0,alignment:bg(e.alignment),direction:yg(e.direction)}};case"list_item":return{list_block:{delta_format:Ig(e.delta_format),list_block_type:e.list_block_type?e.list_block_type:void 0,indentation:e.indentation}};case"code":return{text_block:{delta_format:Ig(e.delta_format),text_block_type:jl.Code}};case"divider":return{divider_block:{}};case"page_break":return{page_break_block:{}};case"image":if(null==e.asset_id&&!e.public_url)throw new Error("image block requires either asset_id or public_url");return{image_block:null!=e.asset_id?{asset_id:String(e.asset_id),width:e.width}:{public_url:e.public_url,width:e.width}};case"video":return{video_block:{raw_url:e.raw_url,width:e.width}};case"notice_box":return{notice_box_block:{theme:e.theme}};case"table":return{table_block:{row_count:e.row_count,column_count:e.column_count,width:e.width,column_style:e.column_style?.map((e=>({width:e.width})))}};case"layout":return{layout_block:{column_count:e.column_count,column_style:e.column_style?.map((e=>({width:e.width})))}};default:{const t=e.block_type;throw new Error(`Unsupported block_type: "${t}"`)}}}(t);if(i){const e=Object.keys(r);if(1!==e.length)throw new Error(`Cannot inject parent_block_id: expected exactly 1 key in block input, got: ${e.join(", ")}`);const t=e[0],a=r[t];if(!a||"object"!=typeof a)throw new Error(`Cannot inject parent_block_id into block type "${t}" — block value is not an object`);a.parent_block_id=i}const n={docId:e,afterBlockId:a,blocksInput:[r]},o=await this.mondayApi.request(K_,n),s=o?.create_doc_blocks;if(!s||0===s.length)throw new Error("No blocks returned from create_doc_blocks");return`Block created (ID: ${s.map((e=>e.id)).join(", ")})`}async executeDeleteBlock(e){const t={blockId:e},a=await this.mondayApi.request(G_,t);if(!a?.delete_doc_block)throw new Error("No response from delete_doc_block");return`Block ${e} deleted`}async resolveObjectId(e,t){if(t)return t;const a=await this.mondayApi.request(W_,{docId:[e]}),i=a.docs?.[0];if(!i?.object_id)throw new Error(`Could not resolve object_id for doc ${e}`);return i.object_id}async resolveDocItemId(e){const t=await this.mondayApi.request(Y_,{boardId:e}),a=t.boards?.[0]?.items_page?.items?.[0]?.id;if(!a)throw new Error(`No item found on the document backing board (object_id: ${e})`);return a}async fetchAllBlockContent(e){const t=await this.mondayApi.request(Q_,{docId:[e]});return(t.docs?.[0]?.blocks??[]).filter((e=>null!=e)).map((t=>{let a;if("string"==typeof t.content)try{a=JSON.parse(t.content)}catch{throw new Error(`Failed to parse content of block ${t.id} in doc ${e} as JSON`)}else a=t.content??{};return{id:t.id??"",type:t.type??"",content:a}}))}async executeAddComment(e,t,a,i,r,n,o,s){if((null!=o||null!=s)&&!n)throw new Error("selection_from and selection_length require block_id");if(null!=o!=(null!=s))throw new Error("selection_from and selection_length must both be provided together");const d=n?Array.isArray(n)?n:[n]:[];if((null!=o||null!=s)&&d.length>1)throw new Error("selection_from and selection_length are only supported with a single block_id");const p=await this.resolveObjectId(e,t),l=await this.resolveDocItemId(p);let c;if(r){const e=JSON.parse(r),t=Lf.safeParse(e);if(!t.success)throw new Error(`Invalid mentions_list format: ${t.error.message}`);c=t.data}const m={itemId:l,body:a,parentId:i?.toString(),mentionsList:c},u=await this.mondayApi.request(z_,m);if(!u.create_update?.id)throw new Error("Failed to create comment: no update returned");const h=u.create_update.id,f=Number(h),_=i?`Reply to update ${i}`:"Comment";if(d.length>0){if(Number.isNaN(f))throw new Error(`${_} created (update ID: ${h}) but block annotation aborted: comment ID is not numeric and cannot be used as a delta reference`);const t=await this.fetchAllBlockContent(e);for(const a of d){const i=t.find((e=>e.id===a));if(!i)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} not found in doc ${e}`);const r=i.content.deltaFormat;if(!r)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has no deltaFormat — only text, code, and list_item blocks are supported`);let n=0;for(const e of r)n+="string"==typeof e.insert?e.insert.length:1;if(0===n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: block ${a} has an empty deltaFormat and cannot be annotated`);const d=o??0,p=s??n;if(d+p>n)throw new Error(`${_} created (update ID: ${h}) but block annotation failed: selection [${d}, ${d+p}) is out of range for block ${a} (total length ${n})`);let l;try{l=Sg(r,f,d,p)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`${_} created (update ID: ${h}) but delta annotation failed for block ${a}: ${t}`)}const c={...i.content,deltaFormat:l},m=await this.mondayApi.request(H_,{blockId:a,content:JSON.stringify(c)});if(!m?.update_doc_block)throw new Error(`${_} created (update ID: ${h}) but block annotation write returned no confirmation for block ${a}`)}}const g=d.length;return`${_} created${g>1?` across ${g} blocks`:1===g?" on block":""} (update ID: ${h})`}async executeReplaceBlock(e,t,a,i,r){await this.executeDeleteBlock(t);try{return`Block ${t} replaced. ${await this.executeCreateBlock(e,a,i,r)}`}catch(e){const a=e instanceof Error?e.message:String(e);throw new Error(`Original block ${t} was deleted, but replacement creation failed: ${a}. The original block is gone.`)}}},class extends Er{constructor(){super(...arguments),this.name="update_workspace",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing workspace in monday.com"}getInputSchema(){return ov}async executeInternal(e){const t={id:e.id,attributes:{account_product_id:e.attributeAccountProductId,description:e.attributeDescription,kind:e.attributeKind,name:e.attributeName}},a=await this.mondayApi.request(nv,t),i=await F_(this.mondayApi),r=i?U_(i,a.update_workspace?.id):void 0;return{content:{message:`Workspace ${a.update_workspace?.id} updated`,workspace_id:a.update_workspace?.id,workspace_name:a.update_workspace?.name,workspace_url:r}}}},class extends Er{constructor(){super(...arguments),this.name="update_folder",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update an existing folder in monday.com"}getInputSchema(){return dv}async executeInternal(e){const{position_object_id:t,position_object_type:a,position_is_after:i}=e;if(!!t!=!!a)throw new Error("position_object_id and position_object_type must be provided together");const r={folderId:e.folderId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId,workspaceId:e.workspaceId,accountProductId:e.accountProductId,position:t?{position_is_after:i,position_object_id:t,position_object_type:a}:void 0},n=await this.mondayApi.request(sv,r);return{content:{message:`Folder ${n.update_folder?.id} updated`,folder_id:n.update_folder?.id,folder_name:n.update_folder?.name}}}},class extends Er{constructor(){super(...arguments),this.name="create_workspace",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Workspace",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new workspace in monday.com"}getInputSchema(){return lv}async executeInternal(e){const t={name:e.name,workspaceKind:e.workspaceKind,description:e.description,accountProductId:e.accountProductId},a=await this.mondayApi.request(pv,t),i=await F_(this.mondayApi),r=i&&a.create_workspace?.id?U_(i,a.create_workspace.id):void 0;return{content:{message:`Workspace ${a.create_workspace?.id} successfully created`,workspace_id:a.create_workspace?.id,workspace_name:a.create_workspace?.name,workspace_url:r}}}},class extends Er{constructor(){super(...arguments),this.name="create_folder",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Folder",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new folder in a monday.com workspace"}getInputSchema(){return mv}async executeInternal(e){const t={workspaceId:e.workspaceId,name:e.name,color:e.color,fontWeight:e.fontWeight,customIcon:e.customIcon,parentFolderId:e.parentFolderId},a=await this.mondayApi.request(cv,t);return{content:{message:`Folder ${a.create_folder?.id} successfully created`,folder_id:a.create_folder?.id,folder_name:a.create_folder?.name}}}},class extends Er{constructor(){super(...arguments),this.name="move_object",this.type=Vi.WRITE,this.annotations=Tr({title:"Move Object",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Move a folder, board, or overview in monday.com. Use position for relative placement based on another object, parentFolderId for folder changes, workspaceId for workspace moves, and accountProductId for account product changes."}getInputSchema(){return fv}async executeUpdateFolder(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={folderId:t,position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,parentFolderId:n,workspaceId:o,accountProductId:s},p=await this.mondayApi.request(sv,d);return{content:{message:"Object moved",object_id:p.update_folder?.id}}}async executeUpdateBoardHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={boardId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(uv,d);return p.update_board_hierarchy?.success?{content:{message:"Board position updated",object_id:p.update_board_hierarchy?.board?.id,action_name:"move_board"}}:{content:`Board position update failed: ${p.update_board_hierarchy?.message}`}}async executeUpdateOverviewHierarchy(e){const{id:t,position_object_id:a,position_object_type:i,position_is_after:r,parentFolderId:n,workspaceId:o,accountProductId:s}=e;if(!!a!=!!i)throw new Error("position_object_id and position_object_type must be provided together");const d={overviewId:t,attributes:{position:a?{position_is_after:r,position_object_id:a,position_object_type:i}:void 0,folder_id:n,workspace_id:o,account_product_id:s}},p=await this.mondayApi.request(hv,d);return p.update_overview_hierarchy?.success?{content:{message:"Overview position updated",object_id:p.update_overview_hierarchy?.overview?.id}}:{content:`Overview position update failed: ${p.update_overview_hierarchy?.message}`}}async executeInternal(e){const{objectType:t}=e;switch(t){case hl.Folder:return this.executeUpdateFolder(e);case hl.Board:return this.executeUpdateBoardHierarchy(e);case hl.Overview:return this.executeUpdateOverviewHierarchy(e);default:throw new Error(`Unsupported object type: ${t}`)}}},class extends Er{constructor(){super(...arguments),this.name="create_dashboard",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Dashboard",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Use this tool to create a new monday.com dashboard that aggregates data from one or more boards. \n Dashboards provide visual representations of board data through widgets and charts.\n \n Use this tool when users want to:\n - Create a dashboard to visualize board data\n - Aggregate information from multiple boards\n - Set up a data visualization container for widgets"}getInputSchema(){return iv}async executeInternal(e){try{const t={name:e.name,workspace_id:e.workspace_id.toString(),board_ids:e.board_ids,kind:e.kind,board_folder_id:e.board_folder_id?.toString()},a=await this.mondayApi.request(ev,t);if(!a.create_dashboard)throw new Error("Failed to create dashboard");const i=a.create_dashboard;return{content:{message:`Dashboard ${i.id} successfully created`,dashboard_id:i.id,dashboard_name:i.name}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to create dashboard: ${t}`)}}},class extends Er{constructor(){super(...arguments),this.name="all_widgets_schema",this.type=Vi.READ,this.annotations=Tr({title:"Get All Widget Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch complete JSON Schema 7 definitions for all available widget types in monday.com.\n \n This tool is essential before creating widgets as it provides:\n - Complete schema definitions for all supported widgets\n - Required and optional fields for each widget type\n - Data type specifications and validation rules\n - Detailed descriptions of widget capabilities\n \n Use this tool when you need to:\n - Understand widget configuration requirements before creating widgets\n - Validate widget settings against official schemas\n - Plan widget implementations with proper data structures\n \n The response includes JSON Schema 7 definitions that describe exactly what settings each widget type accepts."}getInputSchema(){return{}}async executeInternal(){try{const e={},t=await this.mondayApi.request(tv,e);if(!t.all_widgets_schema||0===t.all_widgets_schema.length)throw new Error("No widget schemas found - API returned empty response");const a={};let i=0;for(const e of t.all_widgets_schema)if(e?.widget_type&&e?.schema){const t="string"==typeof e.schema?JSON.parse(e.schema):e.schema,r=t?.description||t?.title||`${e.widget_type} widget for data visualization`;a[e.widget_type]={type:e.widget_type,description:r,schema:e.schema},i++}if(0===i)throw new Error("No valid widget schemas found in API response");Object.keys(a).map((e=>`• **${e}**: ${a[e].description}`)).join("\n");return{content:{message:"Widgets schema",data:a,url:p_}}}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`Failed to fetch widget schemas: ${t}`)}}},class extends Er{constructor(){super(...arguments),this.name="create_widget",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Widget",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new widget in a dashboard or board view with specific configuration settings.\n \n This tool creates data visualization widgets that display information from monday.com boards:\n **Parent Containers:**\n - **DASHBOARD**: Place widget in a dashboard (most common use case)\n - **BOARD_VIEW**: Place widget in a specific board view\n \n **Critical Requirements:**\n 1. **Schema Compliance**: Widget settings MUST conform to the JSON schema for the specific widget type\n 2. **Use all_widgets_schema first**: Always fetch widget schemas before creating widgets\n 3. **Validate settings**: Ensure all required fields are provided and data types match\n \n **Workflow:**\n 1. Use 'all_widgets_schema' to get schema definitions\n 2. Prepare widget settings according to the schema\n 3. Use this tool to create the widget"}getInputSchema(){return rv}async executeInternal(e){if(!e.settings)throw new Error("You must pass the settings parameter");try{const t={parent:{kind:e.parent_container_type,id:e.parent_container_id.toString()},kind:e.widget_kind,name:e.widget_name,settings:e.settings},a=await this.mondayApi.request(av,t);if(!a.create_widget)throw new Error("Failed to create widget");const i=a.create_widget;i.parent?.kind===ac.Dashboard?i.parent.id:i.parent;return{content:{message:`Widget ${i.id} created`,widget_id:i.id,widget_name:i.name,dashboard_id:i.parent?.id}}}catch(t){const a=t instanceof Error?t.message:String(t);throw new Error(`Failed to create ${e.widget_kind} widget: ${a}`)}}},class extends Er{constructor(){super(...arguments),this.name="board_insights",this.type=Vi.READ,this.annotations=Tr({title:"Get Board Insights",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"This tool allows you to calculate insights about board's data by filtering, grouping and aggregating columns. For example, you can get the total number of items in a board, the number of items in each status, the number of items in each column, etc. Use this tool when you need to get a summary of the board's data, for example, you want to know the total number of items in a board, the number of items in each status, the number of items in each column, etc.[REQUIRED PRECONDITION]: Before using this tool, if new columns were added to the board or if you are not familiar with the board's structure (column IDs, column types, status labels, etc.), first use get_board_info to understand the board metadata. This is essential for constructing proper filters and knowing which columns are available.[IMPORTANT]: For some columns, human-friendly label is returned inside 'LABEL_<column_id' field. E.g. for column with id 'status_123' the label is returned inside 'LABEL_status_123' field."}getInputSchema(){return wv}async executeInternal(e){if(!e.aggregations)return{content:'Input must contain the "aggregations" field.'};const{selectElements:t,groupByElements:a}=function(e){const t={},a=e.groupBy?.map((e=>({column_id:e})))||[],i=new Set(e.aggregations.filter((e=>e.function===Cd.Label)).map((e=>e.columnId))),r=e.groupBy?.filter((e=>!i.has(e))).map((e=>({function:Cd.Label,columnId:e})))??[],n=e.aggregations.concat(r).map((e=>{if(e.function){const n=`${e.function}_${e.columnId}`,o=t[n]||0;t[n]=o+1;const s=`${n}_${o}`;return bv.has(e.function)&&(a.some((e=>e.column_id===s))||a.push({column_id:s})),{type:Rd.Function,function:(i=e.function,r=e.columnId,{function:i,params:i===Cd.CountItems?[]:[{type:Rd.Column,column:yv(r),as:r}]}),as:s}}var i,r;const n={type:Rd.Column,column:yv(e.columnId),as:e.columnId};return a.some((t=>t.column_id===e.columnId))||a.push({column_id:e.columnId}),n}));return a.forEach((e=>{n.some((t=>t.as===e.column_id))||n.push({type:Rd.Column,column:yv(e.column_id),as:e.column_id})})),{selectElements:n,groupByElements:a}}(e),i=function(e){if(!e.filters&&!e.orderBy)return;const t={};return e.filters&&(t.rules=e.filters.map((e=>({column_id:e.columnId,compare_value:e.compareValue,operator:e.operator,compare_attribute:e.compareAttribute}))),t.operator=e.filtersOperator),e.orderBy&&(t.order_by=function(e){return e.orderBy?.map((e=>({column_id:e.columnId,direction:e.direction})))}(e)),t}(e),r=function(e){return{id:e.boardId.toString(),type:Od.Table}}(e),n={query:{from:r,query:i,select:t,group_by:a,limit:e.limit},boardId:String(e.boardId)},o=await this.mondayApi.request(_v,n),s=(o.aggregate?.results??[]).map((e=>{const t={};return(e.entries??[]).forEach((e=>{const a=e.alias??"";if(!a)return;const i=e.value;if(!i)return void(t[a]=null);const r=i.result??i.value??null;t[a]=r})),t}));return s.length?{content:{message:"Board insights retrieved",board_name:o.boards?.[0]?.name,board_url:o.boards?.[0]?.url,data:s}}:{content:"No board insights found for the given query."}}},class extends Er{constructor(){super(...arguments),this.name="search",this.type=Vi.READ,this.annotations=Tr({title:"Search",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Search within monday.com platform. Can search for boards, documents, items, folders.\nFor searching/listing specific users and teams, use list_users_and_teams tool.\nFor account-level info (plan, member count, products), use get_user_context tool.\nFor workspaces, use list_workspaces tool.\nFor groups, use get_board_info tool.\nITEMS search requires a searchTerm and only returns id, title, and url.\nIMPORTANT: ids returned by this tool are prefixed with the type of the object (e.g doc-123, board-456, folder-789, item-321). When passing the ids to other tools, you need to remove the prefix and just pass the number.\n "}getInputSchema(){return Ov}async executeInternal(e){if(e.searchType!==kv.FOLDERS&&e.searchTerm)try{return{content:{message:"Search results",data:(await this.runSmartSearchAsync(e)).items}}}catch(t){if(Xm(t),e.searchType===kv.ITEMS)throw t}const t={[kv.BOARD]:this.searchBoardsAsync.bind(this),[kv.DOCUMENTS]:this.searchDocsAsync.bind(this),[kv.FOLDERS]:this.searchFoldersAsync.bind(this),[kv.ITEMS]:()=>{throw new Error("Items search requires a searchTerm")}},a=await t[e.searchType](e);return{content:{message:"Search results",disclaimer:a.wasFiltered||!e.searchTerm?void 0:"[IMPORTANT]Items were not filtered. Please perform the filtering.",data:a.items}}}async runSmartSearchAsync(e){if(e.page>1)throw new Error("Pagination is not supported for search, increase the limit parameter instead");const t=e.workspaceIds?.map((e=>e.toString()));if(e.searchType===kv.BOARD)return this.searchBoardsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===kv.DOCUMENTS)return this.searchDocsWithDevEndpointAsync(e.searchTerm,e.limit,t);if(e.searchType===kv.ITEMS)return this.searchItemsAsync(e.searchTerm,e.limit,t);throw new Error(`Unsupported search type for smart search: ${e.searchType}`)}async searchBoardsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Av,i,{versionOverride:"dev",timeout:Km})).search.boards.results.map((e=>({id:Nv.BOARD+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchDocsWithDevEndpointAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Dv,i,{versionOverride:"dev",timeout:Km})).search.docs.results.map((e=>({id:Nv.DOCUMENT+e.indexed_data.id,title:e.indexed_data.name}))),wasFiltered:!0}}async searchItemsAsync(e,t,a){const i={query:e,limit:t,workspaceIds:a};return{items:(await this.mondayApi.request(Sv,i,{timeout:Km})).search.items.results.map((e=>({id:Nv.ITEM+e.indexed_data.id,title:e.indexed_data.name,url:e.indexed_data.url}))),wasFiltered:!0}}async searchFoldersAsync(e){const t={...this.getPagingParamsForSearch(e,100),workspace_ids:e.workspaceIds?.map((e=>e.toString()))};t.workspace_ids??=[],0===t.workspace_ids.length&&Jm(new Error("Searching for folders require specifying workspace ids"),"search folders");const a=await this.mondayApi.request(Ev,t),i=this.searchAndVirtuallyPaginate(e,a.folders||[],(e=>e.name));return{items:i.items.map((e=>({id:Nv.FOLDER+e.id,title:e.name}))),wasFiltered:i.wasFiltered}}async searchDocsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Tv,t),i=this.searchAndVirtuallyPaginate(e,a.docs||[],(e=>e.name));return{items:i.items.map((e=>({id:Nv.DOCUMENT+e.id,title:e.name,url:e.url||void 0}))),wasFiltered:i.wasFiltered}}async searchBoardsAsync(e){const t={...this.getPagingParamsForSearch(e),workspace_ids:e.workspaceIds?.map((e=>e.toString()))},a=await this.mondayApi.request(Iv,t),i=this.searchAndVirtuallyPaginate(e,a.boards||[],(e=>e.name));return{items:i.items.map((e=>({id:Nv.BOARD+e.id,title:e.name,url:e.url}))),wasFiltered:i.wasFiltered}}getPagingParamsForSearch(e,t=1e3){return{page:e.searchTerm?1:e.page,limit:e.searchTerm?Math.min(1e3,t):e.limit}}searchAndVirtuallyPaginate(e,t,a){if(t.length<=20)return{items:t,wasFiltered:!1};const i=rg(e.searchTerm??""),r=(e.page-1)*e.limit,n=r+e.limit;return{items:t.filter((e=>rg(a(e)).includes(i))).slice(r,n),wasFiltered:!0}}},class extends Er{constructor(){super(...arguments),this.name="get_user_context",this.type=Vi.READ,this.annotations=Tr({title:"Get User Context",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch current user information, account information, and their relevant items (boards, folders, workspaces, dashboards).\n\n Use this tool to:\n - Get context about who the current user is (id, name, title)\n - Get account info: plan tier, active member count, trial status, and active products\n - Get the number of active members in the account (returns active_members_count)\n - Discover user's favorite boards, folders, workspaces, and dashboards\n - Get user's most relevant boards based on visit frequency and recency\n - Get user's most relevant people based on interaction frequency and recency\n - Reduce the need for search requests by knowing user's commonly accessed items\n "}getInputSchema(){}async executeInternal(){const{me:e,favorites:t,intelligence:a}=await this.mondayApi.request(Vv,{},{versionOverride:"dev"});if(!e)return{content:"AUTHENTICATION_ERROR: Unable to fetch current user. Verify API token and user permissions."};const i=await this.fetchFavorites(t||[]),r=this.extractRelevantBoards(a),n=this.extractRelevantPeople(a),{account:o,...s}=e;return{content:{message:"User context",...{user:s,account:o?{tier:o.tier,active_members_count:o.active_members_count,is_during_trial:o.is_during_trial,products:o.products?.filter(Boolean).map((e=>({kind:e.kind,tier:e.tier})))??[]}:null,favorites:i,relevantBoards:r,relevantPeople:n}}}}async fetchFavorites(e){const t=this.groupByType(e),a=Object.keys(t);if(0===a.length)return[];const i={};for(const e of a)i[Mv[e]]=t[e];const r=await this.mondayApi.request(jv,i),n=[];for(const e of a){const t=Bv[e];for(const a of r[t]??[])a?.id&&n.push({id:a.id,name:a.name,type:e})}return n}extractRelevantBoards(e){if(!e?.relevant_boards)return[];const t=[];for(const a of e.relevant_boards)a?.id&&a?.board?.name&&t.push({id:a.id,name:a.board.name});return t}extractRelevantPeople(e){if(!e?.relevant_people)return[];const t=[];for(const a of e.relevant_people)a?.id&&a?.user?.name&&t.push({id:a.id,name:a.user.name});return t}groupByType(e){const t={};for(const a of e){const e=a?.object;e?.id&&e?.type&&(t[e.type]??=[]).push(e.id)}return t}},class extends Er{constructor(){super(...arguments),this.name="update_assets_on_item",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Assets On Item",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Update a file or doc column value on an item using existing assets, docs, or links. Sets the column to the provided list of files, adding new ones and removing any not in the list."}getInputSchema(){return Lv}async executeInternal(e){const t={boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,files:e.files},a=await this.mondayApi.request($v,t);return{content:`Item ${a.update_assets_on_item?.id} (${a.update_assets_on_item?.name}) assets successfully updated`}}},class extends Er{constructor(){super(...arguments),this.name="get_assets",this.type=Vi.READ,this.annotations=Tr({title:"Get Assets",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Get assets (files) by their IDs. Returns file metadata including name, extension, size, public URL (valid for 1 hour), thumbnail URL, upload date, and who uploaded it."}getInputSchema(){return Uv}async executeInternal(e){const t=await this.mondayApi.request(Fv,{ids:e.ids}),a=t.assets?.filter(Boolean);if(!a||0===a.length)return{content:`No assets found for the provided IDs: ${e.ids.join(", ")}`};return{content:{results:a.map((e=>({id:e.id,name:e.name,file_extension:e.file_extension,file_size:e.file_size,public_url:e.public_url,url:e.url,url_thumbnail:e.url_thumbnail??null,created_at:e.created_at??null,original_geometry:e.original_geometry??null,uploaded_by:e.uploaded_by})))}}}},class extends Er{constructor(){super(...arguments),this.name="get_notetaker_meetings",this.type=Vi.READ,this.annotations=Tr({title:"Get Notetaker Meetings",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve notetaker meetings with optional detailed fields. Use include_summary, include_topics, include_action_items, and include_transcript flags to control which details are returned. Use access to filter by meeting access level (OWN, SHARED_WITH_ME, SHARED_WITH_ACCOUNT, ALL). Defaults to OWN. Supports filtering by ids, search term, and cursor-based pagination."}getInputSchema(){return Hv}async executeInternal(e){const t={access:e.access};e.ids&&e.ids.length>0&&(t.ids=e.ids),e.search&&(t.search=e.search);const a={limit:e.limit,cursor:e.cursor||void 0,filters:t,includeSummary:e.include_summary,includeTopics:e.include_topics,includeActionItems:e.include_action_items,includeTranscript:e.include_transcript},i=await this.mondayApi.request(qv,a,{versionOverride:"2026-04"}),r=i.notetaker?.meetings;if(!r?.meetings||0===r.meetings.length)return{content:"No notetaker meetings found matching the specified criteria."};return{content:{message:"Meetings retrieved",data:{meetings:r.meetings,pagination:{has_next_page:r.page_info?.has_next_page??!1,cursor:r.page_info?.cursor??null,count:r.meetings.length}}}}}},class extends Er{constructor(){super(...arguments),this.name="create_view",this.type=Vi.WRITE,this.annotations=Tr({title:"Create View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new board view (tab) with optional filters and sorting. This creates a saved view on a monday.com board that users can switch to.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return ku}async executeInternal(e){const t={boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Nu,t);return a.create_view?{content:`View "${a.create_view.name}" (ID: ${a.create_view.id}, type: ${a.create_view.type}) successfully created`}:{content:"Failed to create view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="update_view",this.type=Vi.WRITE,this.annotations=Tr({title:"Update View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing board view (tab) — change its name, filter rules, or sort order. Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample filter for people column: { "rules": [{ "column_id": "people", "compare_value": ["person-12345"], "operator": "any_of" }] }\nExample filter for status column: { "rules": [{ "column_id": "status", "compare_value": [1], "operator": "any_of" }] }'}getInputSchema(){return Ru}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,type:e.type,name:e.name,filter:e.filter,sort:e.sort,settings:e.settings},a=await this.mondayApi.request(Ou,t);return a.update_view?{content:`View "${a.update_view.name}" (ID: ${a.update_view.id}, type: ${a.update_view.type}) successfully updated`}:{content:"Failed to update view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="create_view_table",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Create a new table-type board view with optional filters, sort, tags, and table-specific settings (column visibility/order and group-by). Use this instead of create_view when you need to configure table-specific settings. For a simple table view, create_view also works.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return xu}async executeInternal(e){const t={boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(Cu,t);return a.create_view_table?{content:`Table view "${a.create_view_table.name}" (ID: ${a.create_view_table.id}, type: ${a.create_view_table.type}) successfully created`}:{content:"Failed to create table view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="update_view_table",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Table View",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Update an existing table-type board view — change its name, filters, sort, tags, or table-specific settings (column visibility/order and group-by). Provide only the fields you want to change. Omitted fields are left unchanged.\n\nFilter operators: any_of, not_any_of, is_empty, is_not_empty, greater_than, lower_than, between, contains_text, not_contains_text\n\nExample settings.columns: { "column_properties": [{ "column_id": "status", "visible": true }], "column_order": ["name", "status", "date"] }\nExample settings.group_by: { "conditions": [{ "columnId": "status" }], "hideEmptyGroups": true }'}getInputSchema(){return Vu}async executeInternal(e){const t={viewId:e.viewId,boardId:e.boardId,name:e.name,filter:e.filter,sort:e.sort,tags:e.tags,settings:e.settings},a=await this.mondayApi.request(Lu,t);return a.update_view_table?{content:`Table view "${a.update_view_table.name}" (ID: ${a.update_view_table.id}, type: ${a.update_view_table.type}) successfully updated`}:{content:"Failed to update table view - no response from API"}}},class extends Er{constructor(){super(...arguments),this.name="undo_action",this.type=Vi.WRITE,this.annotations=Tr({title:"Undo Action",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Undo a previous action on a board using its action_record_uuid. Supports undoing column changes, deletes, archives, moves, duplicates, and more. Use get_board_activity with includeData=true to find the action_record_uuid."}getInputSchema(){return Wv}async executeInternal(e){return await this.mondayApi.request(Gv,{boardId:e.boardId.toString(),undoRecordId:e.undoRecordId},{versionOverride:"dev"}),{content:`Successfully undid action "${e.undoRecordId}" on board ${e.boardId}.`}}},class extends Er{constructor(){super(...arguments),this.name="get_object_schemas",this.type=Vi.READ,this.annotations=Tr({title:"Get Object Schemas",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Retrieve account-level object schemas by their IDs or names. Schemas define the structure and columns of boards. Provide ids or names to filter specific schemas. Omit both to list all schemas (paginated)."}getInputSchema(){return ou}async executeInternal(e){const t={ids:e.ids,names:e.names,limit:e.limit,page:e.page,excludeCreatedByMonday:e.excludeCreatedByMonday},a=(await this.mondayApi.request(nu,t)).get_object_schemas??[];return{content:{message:`Retrieved ${a.length} object schema(s)`,schemas:a}}}},class extends Er{constructor(){super(...arguments),this.name="create_object_schema",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Create a new account-level object schema. Schemas define the structure and columns of boards."}getInputSchema(){return du}async executeInternal(e){const t={name:e.name,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(su,t);return{content:{message:`Object schema "${a.create_object_schema?.name}" successfully created`,schema_id:a.create_object_schema?.id,schema_name:a.create_object_schema?.name,revision:a.create_object_schema?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="update_object_schema",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Object Schema",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Update an account-level object schema. Requires the current revision number for optimistic locking — retrieve it first via get_object_schemas."}getInputSchema(){return lu}async executeInternal(e){const t={id:e.id,revision:e.revision,parentId:e.parentId,description:e.description},a=await this.mondayApi.request(pu,t);return{content:{message:`Object schema "${a.update_object_schema?.name}" successfully updated`,schema_id:a.update_object_schema?.id,schema_name:a.update_object_schema?.name,revision:a.update_object_schema?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="delete_object_schema",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Object Schema",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Delete an account-level object schema. Only allowed when no boards are connected to the schema. Provide either id or name."}getInputSchema(){return mu}async executeInternal(e){if(!e.id&&!e.name)throw new Error("Either id or name must be provided");const t={id:e.id,name:e.name},a=await this.mondayApi.request(cu,t);return{content:{message:`Object schema "${a.delete_object_schema?.name}" successfully deleted`,schema_id:a.delete_object_schema?.id,schema_name:a.delete_object_schema?.name}}}},class extends Er{constructor(){super(...arguments),this.name="delete_object_schema_columns",this.type=Vi.WRITE,this.annotations=Tr({title:"Delete Object Schema Columns",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Permanently delete columns from an account-level object schema. Only allowed when no boards are connected to the schema. Use manage_object_schema_column with action=deactivate for a reversible alternative."}getInputSchema(){return hu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnIds:e.columnIds},a=await this.mondayApi.request(uu,t,{versionOverride:"dev"});return{content:{message:`${e.columnIds.length} column(s) successfully deleted from object schema "${a.delete_object_schema_columns?.name}"`,schema_id:a.delete_object_schema_columns?.id,schema_name:a.delete_object_schema_columns?.name,revision:a.delete_object_schema_columns?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="manage_object_schema_board_connection",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage Object Schema Board Connection",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Connect or detach a board from an account-level object schema. connect: attaches a board to an object schema so it inherits the schema column structure. detach: removes one or more boards from their object schema."}getInputSchema(){return gu}async executeInternal(e){if("connect"===e.action){if(!e.boardId)throw new Error("boardId is required for action=connect");if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided for action=connect");const t={boardId:e.boardId,objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName},a=await this.mondayApi.request(fu,t);return{content:{message:"Board successfully connected to object schema",connection_id:a.connect_board_to_object_schema?.id,schema_id:a.connect_board_to_object_schema?.object_schema_id}}}{if(!e.boardIds?.length)throw new Error("boardIds is required for action=detach");const t={boardIds:e.boardIds},a=(await this.mondayApi.request(_u,t)).detach_boards_from_object_schema??[],i=a.filter((e=>e.success)).length,r=a.filter((e=>!e.success));return{content:{message:`${i} board(s) successfully detached`,results:a,...r.length>0&&{failures:r}}}}}},class extends Er{constructor(){super(...arguments),this.name="manage_object_schema_columns",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage Object Schema Columns",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return`Create or update columns on an account-level object schema. Column changes are propagated to all boards connected to the schema. create: adds new columns. Each column requires type and title. Call get_column_type_info with fetchMode "${vu.Schema}" first to understand valid defaults per column type. update: modifies existing columns. Each entry must include column_id. Only send the columns you want to modify — other columns are unaffected. Use opt_out_by_default=true to stop a column from being auto-added to boards (opt out), or opt_out_by_default=false to restore auto-adding (opt in).`}getInputSchema(){return Eu}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");if("create"===e.action){const t=e.columns.map((e=>{const t=e;return{type:t.type,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:{can_override:t.policy?.can_override??[],cannot_delete:t.policy?.cannot_delete??!1}}})),a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:t},i=await this.mondayApi.request(bu,a);return{content:{message:`Columns successfully added to object schema "${i.create_object_schema_columns?.name}"`,schema_id:i.create_object_schema_columns?.id,schema_name:i.create_object_schema_columns?.name,revision:i.create_object_schema_columns?.revision}}}{const t={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columns:e.columns.map((e=>{const t=e;return{column_id:t.column_id,title:t.title,description:t.description,defaults:t.defaults,opt_out_by_default:t.opt_out_by_default,policy:t.policy?{can_override:t.policy.can_override??[],cannot_delete:t.policy.cannot_delete??!1}:void 0}}))},a=await this.mondayApi.request(yu,t);return{content:{message:`Columns successfully updated on object schema "${a.update_object_schema_columns?.name}"`,schema_id:a.update_object_schema_columns?.id,schema_name:a.update_object_schema_columns?.name,revision:a.update_object_schema_columns?.revision}}}}},class extends Er{constructor(){super(...arguments),this.name="set_object_schema_column_active_state",this.type=Vi.WRITE,this.annotations=Tr({title:"Set Object Schema Column Active State",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Set the active state of a column on an account-level object schema. deactivate: soft-disables the column, preventing it from being used on new boards. The column is not deleted and can be restored. reactivate: restores a previously deactivated column, making it available again."}getInputSchema(){return Au}async executeInternal(e){if(!e.objectSchemaId&&!e.objectSchemaName)throw new Error("Either objectSchemaId or objectSchemaName must be provided");const t={deactivate:dp.Deactivate,reactivate:dp.Reactivate},a={objectSchemaId:e.objectSchemaId,objectSchemaName:e.objectSchemaName,columnId:e.columnId,action:t[e.action]},i=await this.mondayApi.request(Su,a);return{content:{message:`Column successfully ${e.action}d on object schema "${i.set_object_schema_column_active_state?.name}"`,schema_id:i.set_object_schema_column_active_state?.id,schema_name:i.set_object_schema_column_active_state?.name,revision:i.set_object_schema_column_active_state?.revision}}}},class extends Er{constructor(){super(...arguments),this.name="get_asset_upload_url",this.type=Vi.WRITE,this.annotations=Tr({title:"Get Asset Upload URL",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Get a presigned URL to upload a file to monday.com. Returns an upload_id and upload_url.\n\nAfter calling this tool, upload the file to the returned URL using an HTTP PUT request and capture the ETag header from the response:\n\ncurl -i -X PUT "<upload_url>" \\\n -H "Content-Type: <the contentType you provided>" \\\n --data-binary @<local_file_path>\n\nThe response includes an ETag header (e.g. ETag: "abc123...") — save this value.\n\nThen call finalize_asset_upload with the upload_id, etag, board_id, item_id, and column_id to complete the upload and attach the file to an item\'s file column.\n\nMax file size: 500MB.'}getInputSchema(){return Qv}async executeInternal(e){const t=(await this.mondayApi.request(Yv,{input:{file_name:e.fileName,content_type:e.contentType,file_size:e.fileSize,source:"mcp",multipart:!1}},{versionOverride:"dev"})).create_upload,a=t.parts[0]?.url;if(!a)throw new Error("create_upload returned no upload URL — parts array was empty");return{content:{upload_id:t.upload_id,upload_url:a,url_expires_at:t.expires_at}}}},class extends Er{constructor(){super(...arguments),this.name="finalize_asset_upload",this.type=Vi.WRITE,this.annotations=Tr({title:"Finalize Asset Upload",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Finalize a file upload and create the asset on monday.com. Call this after uploading the file to the presigned URL from get_asset_upload_url. Requires the etag value from the PUT response headers. Automatically attaches the uploaded asset to the specified file column on the item. Returns the created asset_id."}getInputSchema(){return Jv}async executeInternal(e){const t=(await this.mondayApi.request(zv,{input:{upload_id:e.uploadId,holder:{type:"ITEM",id:e.itemId},board_id:e.boardId,parts:[{part_number:1,etag:e.etag}]}},{versionOverride:"dev"})).complete_upload,a=JSON.stringify({added_file:{fileType:"ASSET",name:t.filename,assetId:String(t.id)}});return await this.mondayApi.request(Kv,{boardId:e.boardId,itemId:e.itemId,columnId:e.columnId,value:a}),{content:{asset_id:t.id,filename:t.filename,content_type:t.content_type,file_size:t.file_size,url:t.url,filelink:t.filelink}}}},class extends Er{constructor(){super(...arguments),this.name="link_board_items_workflow",this.type=Vi.READ,this.annotations=Tr({title:"Link Board Items Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'When to use: any board-relation / cross-board linking task. **Hard gate — you MUST call this BEFORE get_board_items_page, or change_item_column_values in the same turn. No discovery, matching, or write happens first.** Triggers: **link** or **connect** items **across boards** (board-relation / "connect boards" / pairs) — also vague phrasings where only one side is named ("link this to **an** item on another board", "**the matching** row"). This tool is read-only (no API).'}getInputSchema(){return Zv}async executeInternal(e){return{content:Xv}}},class extends Er{constructor(){super(...arguments),this.name="fetch_file_content",this.type=Vi.READ,this.annotations=Tr({title:"Fetch File Content",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Fetch and extract the text content from a file stored in a monday.com files column.\n\nUse this tool when you need to read, summarize, or analyze the content of files attached to board items. Provide the item ID and column ID from the get_board_items_page response — the column value will be a URL like \"https://monday.com/protected_static/...\" indicating a file is present (null means no file).\n\nPROACTIVE USE: If you retrieve board items and notice a files column with a non-null value (a URL), consider fetching its content if it could help answer the user's question — don't wait to be explicitly asked.\n\nSupported file types and what is returned:\n- Text files (.txt, .md, .csv, .json): raw text content\n- Word documents (.docx): extracted text content\n- PDF files (.pdf): extracted text content\n- Excel files (.xlsx, .xls): extracted text content per sheet\n- Images (.png, .jpg, .gif, .webp, .svg, .bmp, .ico): returns the public URL so you can view or analyze the image directly\n\nText responses include a total_length field. If has_more is true, the content was truncated — you can call this tool again with next_offset if you need the remaining content.\n\nWhen to use:\n- User asks to summarize, read, or analyze the content of a file in a files column\n- User asks questions about what is inside a file (e.g., \"what does the PDF say?\")\n- User wants to extract data from a CSV or Excel file attached to a board item\n- A board item has a files column with a non-null value and the user's question may be answered by its content — even if the user didn't explicitly ask to read the file\n\nWhen NOT to use:\n- The files column value is null (no file uploaded for that item)"}getInputSchema(){return pb}async executeInternal(e){const{item_id:t,column_id:a,file_name:i,offset:r=0}=e,n=await this.mondayApi.request(eb,{itemId:[t],columnId:[a]}),o=n?.items?.[0]?.assets;if(!o||0===o.length)return{content:{message:`No file found for item ${t} in column ${a}. The column may be empty or the column ID may be incorrect.`}};return{content:{files:await Promise.all(o.map((e=>mb(e,r,i))))}}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Full lifecycle management for monday platform agents — create, read, update, delete, change state, and run.\n\nmonday platform agents are user-built work orchestrators on monday.com — each has a profile (name, role, avatar), a goal, and a markdown execution plan. Agents in state ACTIVE can be triggered automatically. They are NOT local LangChain or MCP agents.\n\nACTIONS (only pass fields that apply to the chosen action):\n- create: { action:"create", prompt, agent_model? } — AI-generated agent. Platform creates profile, goal, and plan from the prompt.\n- create_blank: { action:"create_blank", name?, role?, role_description?, avatar_url?, gender?, background_color?, user_prompt? } — manually defined agent.\n- get one: { action:"get", agent_id }\n- list owned: { action:"get" }\n- update: { action:"update", agent_id, name?, role?, role_description?, plan?, agent_model? }\n- delete: { action:"delete", agent_id }\n- activate: { action:"activate", agent_id }\n- deactivate: { action:"deactivate", agent_id }\n- run: { action:"run", agent_id }\n\nRULES:\n- "create_blank" with no fields creates a nameless blank agent — only do this intentionally.\n- "update" requires at least one of name/role/role_description/plan/agent_model.\n- "update", "delete", "activate", "deactivate", "run" all require "agent_id".\n- Created agents start INACTIVE. Follow with action:"activate" using the returned agent_id before they can be triggered.\n- ⚠️ DESTRUCTIVE — "delete" is permanent and irreversible. When the user refers to an agent by name, ALWAYS call action:"get" first to confirm the correct agent_id before deleting.\n- "run" is fire-and-forget. Returns trigger_uuid — no run-status query exists, treat successful enqueue as the only signal.\n- Agent state is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED only appears as the return value of action:"delete".\n\nUSAGE EXAMPLES:\n- AI create: { "action": "create", "prompt": "Run my daily standup every weekday at 9am." }\n- Manual create:{ "action": "create_blank", "name": "Standup Bot", "role": "Project Manager", "gender": "female" }\n- Fetch one: { "action": "get", "agent_id": "42" }\n- List mine: { "action": "get" }\n- Rename: { "action": "update", "agent_id": "7", "name": "New Name" }\n- Activate: { "action": "activate", "agent_id": "7" }\n- Deactivate: { "action": "deactivate", "agent_id": "7" }\n- Run: { "action": "run", "agent_id": "7" }\n- Delete: { "action": "delete", "agent_id": "7" }\n\nRELATED TOOLS:\n- agent_catalog — browse available trigger types and skills before wiring them to an agent\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent_knowledge — manage which boards/docs this agent has access to'}getInputSchema(){return vT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"create_blank":return this.handleCreateBlank(e);case"get":return this.handleGet(e);case"update":return this.handleUpdate(e);case"delete":return this.handleDelete(e);case"activate":return this.handleActivate(e);case"deactivate":return this.handleDeactivate(e);case"run":return this.handleRun(e)}}async handleCreate(e){if(!e.prompt)throw new Error('manage_agent action:"create" requires "prompt". For a manually configured agent, use action:"create_blank".');try{const t={input:{prompt:e.prompt,agent_model:e.agent_model}},a=await this.mondayApi.request(iT,t,{versionOverride:"dev"});if(!a.create_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${a.create_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${a.create_agent.id}" to activate it`,agent:a.create_agent}}}catch(e){Jm(e,"create monday platform agent")}}async handleCreateBlank(e){try{const t={};void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.avatar_url&&(t.avatar_url=e.avatar_url),void 0!==e.gender&&(t.gender=e.gender),void 0!==e.background_color&&(t.background_color=e.background_color),void 0!==e.user_prompt&&(t.user_prompt=e.user_prompt);const a={input:t},i=await this.mondayApi.request(rT,a,{versionOverride:"dev"});if(!i.create_blank_agent?.id)throw new Error("monday platform agent creation returned no id");return{content:{message:`monday platform agent ${i.create_blank_agent.id} created in state INACTIVE — call manage_agent with action:"activate" and agent_id:"${i.create_blank_agent.id}" to activate it`,agent:i.create_blank_agent}}}catch(e){Jm(e,"create blank monday platform agent")}}async handleGet(e){if(void 0!==e.agent_id)try{const{agents:t}=await this.mondayApi.request(aT,{ids:[e.agent_id]},{versionOverride:"dev"}),a=t?.[0];return a?{content:{message:"monday platform agent",agent:a}}:{content:`monday platform agent ${e.agent_id} not found, or the authenticated user does not have access to it.`}}catch(e){Jm(e,"get monday platform agent")}try{const{agents:e}=await this.mondayApi.request(aT,{limit:100},{versionOverride:"dev"}),t=e??[];return{content:{message:"monday platform agents owned by the authenticated user (limited to 100 — ask the user if they need more)",count:t.length,agents:t}}}catch(e){Jm(e,"list monday platform agents")}}async handleUpdate(e){if(!e.agent_id)throw new Error('manage_agent action:"update" requires "agent_id".');try{const t={};if(void 0!==e.name&&(t.name=e.name),void 0!==e.role&&(t.role=e.role),void 0!==e.role_description&&(t.role_description=e.role_description),void 0!==e.plan&&(t.plan=e.plan),void 0!==e.agent_model&&(t.agent_model=e.agent_model),0===Object.keys(t).length)throw new Error('manage_agent action:"update" requires at least one of: name, role, role_description, plan, agent_model.');const a={id:e.agent_id,input:t},i=await this.mondayApi.request(nT,a,{versionOverride:"dev"});if(!i.update_agent)throw new Error("update_agent returned no data — the agent may not exist");return{content:{message:"monday platform agent updated",agent:i.update_agent}}}catch(e){Jm(e,"update monday platform agent")}}async handleDelete(e){if(!e.agent_id)throw new Error('manage_agent action:"delete" requires "agent_id".');try{const t={id:e.agent_id},a=await this.mondayApi.request(oT,t,{versionOverride:"dev"});if(!a.delete_agent?.id)throw new Error("monday platform agent delete returned no id");return{content:{message:`monday platform agent ${a.delete_agent.id} deleted`,agent:a.delete_agent}}}catch(e){Jm(e,"delete monday platform agent")}}async handleActivate(e){if(!e.agent_id)throw new Error('manage_agent action:"activate" requires "agent_id".');try{const t=await this.mondayApi.request(sT,{id:e.agent_id},{versionOverride:"dev"});return{content:{message:"Agent activated.",success:t.activate_agent?.success??!1}}}catch(e){Jm(e,"activate monday platform agent")}}async handleDeactivate(e){if(!e.agent_id)throw new Error('manage_agent action:"deactivate" requires "agent_id".');try{const t={id:e.agent_id,inactive_reason:lw.DeactivatedByUser},a=await this.mondayApi.request(dT,t,{versionOverride:"dev"});return{content:{message:"Agent deactivated.",success:a.deactivate_agent?.success??!1}}}catch(e){Jm(e,"deactivate monday platform agent")}}async handleRun(e){if(!e.agent_id)throw new Error('manage_agent action:"run" requires "agent_id".');try{const t=await this.mondayApi.request(pT,{id:e.agent_id},{versionOverride:"dev"});if(!t.run_agent)throw new Error("run_agent returned no data — the agent run may not have been enqueued");return{content:{message:"Agent run enqueued.",trigger_uuid:t.run_agent.trigger_uuid}}}catch(e){Jm(e,"run monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent_triggers",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent Triggers",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the triggers attached to a monday platform agent — triggers define WHEN the agent runs automatically.\n\nACTIONS:\n- list: { agent_id } — returns active triggers with node_id, block_reference_id, name, field_summary.\n- add: { agent_id, block_reference_id, field_values? } — attaches a trigger type to the agent.\n- remove: { agent_id, node_id } — detaches a trigger instance by node_id (NOT block_reference_id).\n\nWORKFLOW — add a trigger:\n1. Call agent_catalog action:"list_triggers" — note block_reference_id, field_schemas, and required_fields.\n2. Collect required field values from the user (e.g. board_id, column_id).\n3. Call this tool action:"add" with block_reference_id and field_values.\nNote: add returns only { success } — no node_id for the new instance. Call action:"list" afterward if you need the node_id.\n\nWORKFLOW — remove a trigger:\n1. Call action:"list" to see active triggers and note the node_id of the instance to remove.\n2. Call action:"remove" with that node_id.\n\nNOTE: Only triggers that can be added programmatically appear in the catalog. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\nrequire user setup in the monday.com UI — they will not appear in agent_catalog and cannot be managed here.\n\nUSAGE EXAMPLES:\n- List triggers: { "action": "list", "agent_id": "7" }\n- Add trigger: { "action": "add", "agent_id": "7", "block_reference_id": "status-change-ref", "field_values": { "board_id": "42" } }\n- Remove trigger: { "action": "remove", "agent_id": "7", "node_id": "node-abc" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_triggers" — discover available trigger types and their required field_values before calling action:"add" here\n- manage_agent_skills — manage which skills this agent can perform\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return bT}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t={agent_id:e.agent_id},a=(await this.mondayApi.request(lT,t,{versionOverride:"dev"})).agent_active_triggers??[];return{content:{message:'Active triggers on this agent. Use node_id with action:"remove" to detach a trigger.',count:a.length,triggers:a}}}catch(e){Jm(e,"list active triggers for monday platform agent")}}async handleAdd(e){if(!e.block_reference_id)throw new Error('block_reference_id is required for action:"add". Call agent_catalog action:"list_triggers" first to find the block_reference_id.');try{const t={agent_id:e.agent_id,block_reference_id:e.block_reference_id,field_values:e.field_values},a=await this.mondayApi.request(cT,t,{versionOverride:"dev"});return{content:{message:'Trigger added to agent. Call action:"list" to verify and retrieve the node_id.',success:a.add_trigger_to_agent?.success??!1}}}catch(e){Jm(e,"add trigger to monday platform agent")}}async handleRemove(e){if(!e.node_id)throw new Error('node_id is required for action:"remove". Call action:"list" first to get node_id values.');try{const t={agent_id:e.agent_id,node_id:e.node_id},a=await this.mondayApi.request(mT,t,{versionOverride:"dev"});return{content:{message:"Trigger removed from agent.",success:a.remove_trigger_from_agent?.success??!1}}}catch(e){Jm(e,"remove trigger from monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent_skills",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent Skills",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Manage the full skill lifecycle for monday platform agents — create new skills in the catalog, attach skills to an agent, or detach them.\n\nSkills extend what an agent can do (e.g. sending emails, querying databases, posting to Slack).\n\nACTIONS:\n- create: { name, content, description? } — creates a new custom skill in the account-wide catalog.\n The skill becomes available to all agents in the account.\n- add: { agent_id, skill_id } — attaches a skill to this agent.\n- remove: { agent_id, skill_id } — detaches a skill from this agent.\n\nWORKFLOW — attach an existing skill:\n1. Call agent_catalog action:"list_skills" — find the skill_id of the skill to attach.\n2. Call this tool action:"add" with agent_id and that skill_id.\n\nWORKFLOW — create a new skill and attach it:\n1. Call this tool action:"create" with name and content — note the returned id.\n2. Call this tool action:"add" with agent_id and that id directly (no catalog lookup needed).\n\nNOTE: There is no action to list which skills are currently attached to a specific agent — the platform does not yet expose that query.\nTo browse all skills available in the account catalog, use agent_catalog action:"list_skills".\n\nUSAGE EXAMPLES:\n- Create a skill: { "action": "create", "name": "Send Slack Message", "content": "## Instructions\\nPost a message to a Slack channel.", "description": "Sends a message to Slack" }\n- Add a skill: { "action": "add", "agent_id": "7", "skill_id": "skill-abc-123" }\n- Remove a skill: { "action": "remove", "agent_id": "7", "skill_id": "skill-abc-123" }\n\nRELATED TOOLS:\n- agent_catalog action:"list_skills" — browse existing skills to find a skill_id before calling action:"add"\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)'}getInputSchema(){return yT}async executeInternal(e){switch(e.action){case"create":return this.handleCreate(e);case"add":return this.handleAdd(e);case"remove":return this.handleRemove(e)}}async handleCreate(e){if(!e.name||!e.content)throw new Error('action:"create" requires both "name" and "content".');try{const t={name:e.name,content:e.content,description:e.description},a=await this.mondayApi.request(gT,t,{versionOverride:"dev"});if(!a.create_agent_skill)throw new Error("create_agent_skill returned no data");return{content:{message:'Skill created and added to the account catalog. Use the returned id with action:"add" to attach it to an agent.',skill:a.create_agent_skill}}}catch(e){Jm(e,"create monday platform agent skill")}}async handleAdd(e){if(!e.agent_id)throw new Error('agent_id is required for action:"add".');if(!e.skill_id)throw new Error('skill_id is required for action:"add". Get it from agent_catalog action:"list_skills" or from action:"create" in this tool.');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(uT,t,{versionOverride:"dev"});return{content:{message:"Skill added to agent.",success:a.add_skill_to_agent?.success??!1}}}catch(e){Jm(e,"add skill to monday platform agent")}}async handleRemove(e){if(!e.agent_id)throw new Error('agent_id is required for action:"remove".');if(!e.skill_id)throw new Error('skill_id is required for action:"remove".');try{const t={agent_id:e.agent_id,skill_id:e.skill_id},a=await this.mondayApi.request(hT,t,{versionOverride:"dev"});return{content:{message:"Skill removed from agent.",success:a.remove_skill_from_agent?.success??!1}}}catch(e){Jm(e,"remove skill from monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="manage_agent_knowledge",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage monday Platform Agent Knowledge",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'List, grant, update, or revoke a monday platform agent\'s access to boards and docs.\n\nAn agent\'s "knowledge" is the set of monday.com boards and docs it can read from or write to during a run.\n\n- list: Returns all resources the agent currently has access to, including permission level and resource type.\n- add: Grants the agent access to a board or doc with the specified permission level.\n- update: Changes the permission level on a resource the agent already has access to. Call action:"list" first to confirm the resource_id exists.\n- remove: Revokes the agent\'s access to a board or doc entirely. Call action:"list" first to confirm the resource_id exists.\n\nPermission types:\n- READ: Agent can read data from the resource.\n- READ_WRITE: Agent can read and write data to the resource.\n\nUSAGE EXAMPLES:\n- List: { "action": "list", "agent_id": "7" }\n- Add board access: { "action": "add", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ" }\n- Update to read-write: { "action": "update", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD", "permission_type": "READ_WRITE" }\n- Remove access: { "action": "remove", "agent_id": "7", "resource_id": "42", "scope_type": "BOARD" }\n\nRELATED TOOLS:\n- manage_agent — manage the agent entity itself (create, activate, deactivate, etc.)\n- manage_agent_triggers — manage which triggers fire this agent automatically\n- manage_agent_skills — manage which skills this agent can perform'}getInputSchema(){return ST}async executeInternal(e){switch(e.action){case"list":return this.handleList(e);case"add":return this.handleAdd(e);case"update":return this.handleUpdate(e);case"remove":return this.handleRemove(e)}}async handleList(e){try{const t=(await this.mondayApi.request(wT,{id:e.agent_id},{versionOverride:"dev"})).agent_knowledge??{resources:[],files:[]};return{content:{message:"Current agent resource access.",count:t.resources?.length??0,knowledge:t}}}catch(e){Jm(e,"list agent knowledge for monday platform agent")}}async handleAdd(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:add");try{const t=await this.mondayApi.request(IT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access granted to agent.",success:t.add_agent_resource_access?.success??!1}}}catch(e){Jm(e,"add agent resource access for monday platform agent")}}async handleUpdate(e){if(!e.resource_id||!e.scope_type||!e.permission_type)throw new Error("resource_id, scope_type, and permission_type are required for action:update");try{const t=await this.mondayApi.request(ET,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type,permission_type:e.permission_type},{versionOverride:"dev"});return{content:{message:"Resource access updated.",success:t.update_agent_resource_access?.success??!1}}}catch(e){Jm(e,"update agent resource access for monday platform agent")}}async handleRemove(e){if(!e.resource_id||!e.scope_type)throw new Error("resource_id and scope_type are required for action:remove");try{const t=await this.mondayApi.request(TT,{id:e.agent_id,resource_id:e.resource_id,scope_type:e.scope_type},{versionOverride:"dev"});return{content:{message:"Resource access removed from agent.",success:t.remove_agent_resource_access?.success??!1}}}catch(e){Jm(e,"remove agent resource access for monday platform agent")}}},class extends Er{constructor(){super(...arguments),this.name="agent_catalog",this.type=Vi.READ,this.annotations=Tr({title:"monday Platform Agent Catalog",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return'Browse the account-wide catalog of available trigger types and skills for monday platform agents. READ-ONLY — no agent_id required.\n\nUse this tool to discover what\'s available BEFORE wiring anything to a specific agent.\n\nACTIONS:\n- list_triggers: { block_reference_ids? } — returns available trigger types.\n Each entry has block_reference_id (required for manage_agent_triggers action:"add"), name, description,\n field_schemas (describes field_values shape), and required_fields (fields to collect from the user).\n Note: only triggers that can be added programmatically appear here. OAuth/3rd-party triggers (Slack, Gmail, Salesforce, etc.)\n require user setup in the monday.com UI and will not appear here.\n\n- list_skills: {} — returns available skills with id, name, description.\n Never guess or invent a skill id — always look it up here before calling manage_agent_skills action:"add".\n\nUSAGE EXAMPLES:\n- List all trigger types: { "action": "list_triggers" }\n- Fetch specific trigger: { "action": "list_triggers", "block_reference_ids": ["some-block-ref-id"] }\n- List all skills: { "action": "list_skills" }\n\nRELATED TOOLS:\n- manage_agent_triggers — use block_reference_id from list_triggers to attach a trigger to a specific agent\n- manage_agent_skills — use skill id from list_skills, or action:"create" to author a new skill, then attach to an agent\n- manage_agent — manage the agent entity itself (create, update, delete, activate, etc.)'}getInputSchema(){return AT}async executeInternal(e){switch(e.action){case"list_triggers":return this.handleListTriggers(e);case"list_skills":return this.handleListSkills()}}async handleListTriggers(e){try{const t={block_reference_ids:e.block_reference_ids},a=(await this.mondayApi.request(fT,t,{versionOverride:"dev"})).agent_triggers_catalog??[];return{content:{message:'Available trigger types. Use block_reference_id and inspect field_schemas/required_fields before calling manage_agent_triggers action:"add".',count:a.length,triggers:a}}}catch(e){Jm(e,"fetch monday platform agent triggers catalog")}}async handleListSkills(){try{const e=(await this.mondayApi.request(_T,{},{versionOverride:"dev"})).agent_skills_catalog??[];return{content:{message:'Available skills. Use id when calling manage_agent_skills action:"add".',count:e.length,skills:e}}}catch(e){Jm(e,"fetch monday platform agent skills catalog")}}},class extends Er{constructor(){super(...arguments),this.name="list_automations",this.type=Vi.READ,this.annotations=Tr({title:"List Board Automations",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"List all automations on a specific monday.com board, including their ids, titles, active state, and configuration.\nWhen NOT to use: Do not call this tool to get general board information unrelated to automations.\nNote: Some legacy automations may not appear — mention this if users ask about missing automations.\n"}getInputSchema(){return OT}async executeInternal(e){try{const t={boardIds:[e.boardId],limit:e.limit??100,...e.cursor?{cursor:e.cursor}:{}},a=await this.mondayApi.request(DT,t,{versionOverride:"2026-10"}),i=(a.board_automations?.items??[]).map(kT),r=a.board_automations?.cursor??null;return{content:{message:`Found ${i.length} live workflow(s) on board ${e.boardId}`,workflows:i,pagination:{nextCursor:r,hasMore:null!==r}}}}catch(e){Jm(e,"list live workflows")}}},class extends Er{constructor(){super(...arguments),this.name="manage_automations",this.type=Vi.WRITE,this.annotations=Tr({title:"Manage Automations",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return'Activate, deactivate, or delete an existing monday.com automation.\n\nRequires an automation id. When the user refers to an automation by name, always call list_automations first to resolve the id — never guess or infer ids.\n\nActions:\n- activate: enables a paused automation so it starts responding to its trigger.\n- deactivate: pauses an automation while preserving its definition.\n- delete: permanently removes an automation — irreversible.\n\nWhen intent is ambiguous ("stop", "turn off", "pause"), prefer deactivate over delete.'}getInputSchema(){return $T}async executeInternal(e){const t=e;switch(t.action){case"activate":return this.activateWorkflow(t);case"deactivate":return this.deactivateWorkflow(t);case"delete":return this.deleteWorkflow(t)}}async activateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(RT,t,{versionOverride:"dev"});if(!a.activate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} activation did not report success`);return{content:{message:`Workflow ${e.workflowId} activated`,workflowId:e.workflowId,isActive:!0}}}catch(e){Jm(e,"activate workflow")}}async deactivateWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(CT,t,{versionOverride:"dev"});if(!a.deactivate_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deactivation did not report success`);return{content:{message:`Workflow ${e.workflowId} deactivated`,workflowId:e.workflowId,isActive:!1}}}catch(e){Jm(e,"deactivate workflow")}}async deleteWorkflow(e){try{const t={id:e.workflowId},a=await this.mondayApi.request(PT,t,{versionOverride:"dev"});if(!a.delete_live_workflow?.is_success)throw new Error(`Workflow ${e.workflowId} deletion did not report success`);return{content:{message:`Workflow ${e.workflowId} deleted`,workflowId:e.workflowId}}}catch(e){Jm(e,"delete workflow")}}},class extends Er{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="create_automation",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Automation",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'\n Creates an automation on a monday board from a structured natural-language description.\n\nUse this tool only when you know:\n- boardId\n- the user\'s intended trigger\n- at least one intended action\n- any details the user provided that are relevant to the trigger, conditions, or actions\n\nThe caller does not need to know the exact available automation blocks or their required fields. Describe the user\'s intent clearly — the tool will translate that intent into supported blocks and values.\n\nIf a required detail is missing from the user\'s request, ask for clarification before calling the tool.\n\nIf the tool returns status: "needs_clarification", present the unresolved fields to the user, gather answers, then call the tool again.\n\nDescribe the automation in this format:\n\nTrigger:\n When <the event that should start the automation>\n Details:\n <relevant detail>: <value>\n\nConditions:\n - Only if <condition that should be true>\n Details:\n <relevant detail>: <value>\n\nActions:\n - <action the automation should perform>:\n <relevant detail>: <value>\n\nRules:\n- Use one trigger.\n- Conditions are optional.\n- Multiple conditions mean AND.\n- Use one or more actions.\n- Do not use branching.\n- Use natural language, not block IDs or internal field names.\n- Actions may reference values from the trigger context, such as "{{item name}}", "{{creator}}", "{{status}}", "{{group}}", or "{{board}}".\n\nTerminology:\n- Trigger: the event that starts the automation, such as "when a new item is created".\n- Conditions: optional requirements that must be true before actions run.\n- Actions: what the automation does when it runs.\n\nExample:\n\nTrigger:\n When a new item is created\n\nActions:\n - Send a notification:\n Recipient: John Snow\n Title: Important Update\n Message: The item "{{item name}}" was created.\n\n - Move the item to a group:\n Group: Top group\n'}getInputSchema(){return xT}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/lite-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({userPrompt:e.userPrompt,boardId:e.boardId}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`lite-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Jm(e,"create automation")}}},class extends Er{constructor(){super(...arguments),this.name="create_workflow",this.type=Vi.WRITE,this.annotations=Tr({title:"Create Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Creates a new empty workflow in a monday.com workspace.\n\nUse this when the user wants to build a new standalone workflow from scratch. Workflows are cross-board, workspace-level — distinct from automations (use create_automation for those). You only need a workspaceId to get started — all other fields are optional.\n\nReturns:\n- workflowObjectId: the workflow object ID\n- workflowDraftId: the current draft version ID — workflows start as drafts and must be published before they run\n\nTerminology:\n- Workflows vs. automations: workflows are standalone objects scoped to a workspace. Automations (create_automation) are per-board trigger/action rules. They are different products.\n- Draft: the editable, inactive version of a workflow. Changes are made on the draft version until it is published as the live version.\n- Privacy: PUBLIC — visible to all workspace members (default). PRIVATE — restricted access. SHAREABLE — accessible to guests outside the account.\n"}getInputSchema(){return FT}async executeInternal(e){try{const t={workspace_id:e.workspaceId,...void 0!==e.title?{title:e.title}:{},...void 0!==e.privacyKind?{privacy_kind:e.privacyKind}:{},...void 0!==e.description?{description:e.description}:{},...void 0!==e.folderId?{folder_id:e.folderId}:{},...void 0!==e.ownerIds?{owner_ids:e.ownerIds}:{}},a=await this.mondayApi.request(LT,t,{versionOverride:"dev"});if(!a.create_workflow)throw new Error("create_workflow returned null");const{workflow_object_id:i,workflow_draft_id:r}=a.create_workflow;if(!i||!r)throw new Error("create_workflow returned missing identifiers");return{content:{message:`Workflow Builder workflow created in workspace ${e.workspaceId}`,workflowObjectId:i,workflowDraftId:r}}}catch(e){Jm(e,"create Workflow Builder workflow")}}},class extends Er{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="update_workflow",this.type=Vi.WRITE,this.annotations=Tr({title:"Update Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return'Updates an existing workflow draft using an AI agent.\n\nThe agent interprets the prompt and applies structural changes to the workflow — creating, updating, or deleting steps. Pass clear, descriptive instructions and the agent will decide which operations to perform, then return a summary of what it did.\n\nUse this after create_workflow to build out the workflow step by step. You can call it multiple times on the same draft to iteratively refine the workflow.\n\nParameters:\n- workflowObjectId and workflowDraftId: both returned by create_workflow — they identify which draft to update.\n- prompt: describe what you want to change in plain English (e.g. "Add a trigger that fires when an item is created on the Marketing board"). Maximum 2000 characters.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowDraftId: the draft version ID (unchanged)\n- result: agent response describing the changes made\n\nNote: the workflow runs only after it is published to live version.\n'}getInputSchema(){return UT}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-builder",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({workflowObjectId:e.workflowObjectId,workflowDraftId:e.workflowDraftId,prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-builder responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Jm(e,"update workflow")}}},class extends Er{constructor(e,t,a){super(e,a),this.apiToken=t,this.name="plan_workflow",this.type=Vi.READ,this.annotations=Tr({title:"Plan Workflow",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Plans one or more monday.com workflows for a described process using an AI agent.\n\nThe agent analyzes the prompt, decides how many workflows are needed, identifies the required boards and columns, selects the correct trigger and action blocks (with their IDs), and returns a structured implementation plan with Mermaid diagrams and build notes for each workflow.\n\nUse this before create_workflow to understand how to break a complex process into individual workflows and which resources to create first.\n\nParameters:\n- prompt: describe the full end-to-end process in plain English. Maximum 2000 characters.\n\nReturns:\n- result: structured markdown plan with workflow breakdowns, block IDs, resource definitions, and a list of assumptions and gaps\n"}getInputSchema(){return VT}async executeInternal(e){try{const t=await fetch("https://api.monday.com/platform-ai-gateway/agents/workflow-planner",{method:"POST",headers:{Authorization:this.apiToken,"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt}),signal:AbortSignal.timeout(18e4)});if(!t.ok){const e=await t.text().catch((()=>""));throw new Error(`workflow-planner responded with HTTP ${t.status}${e?`: ${e}`:""}`)}return{content:await t.json()}}catch(e){Jm(e,"plan workflow")}}},class extends Er{constructor(){super(...arguments),this.name="publish_workflow",this.type=Vi.WRITE,this.annotations=Tr({title:"Publish Workflow",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1})}getDescription(){return"Publishes a workflow draft, promoting it to the live version.\n\nUse this after create_workflow (and optionally update_workflow) to make the workflow active. Before publishing, the workflow is validated — if it has missing or misconfigured steps, publish will fail with a WORKFLOW_VALIDATION_FAILED error that includes structured issue details: which step failed, the issue type, and which inputs are missing. Use those details to guide the user on what to fix before retrying.\n\nParameters:\n- workflowObjectId and workflowDraftId: returned by create_workflow — they identify which draft to publish.\n- shouldActivate: whether to activate the workflow immediately after publish. Defaults to true — pass false to publish without activating.\n\nReturns:\n- workflowObjectId: the workflow object ID (unchanged)\n- workflowLiveId: the new live version ID — this changes on every publish, so do not cache it\n\n"}getInputSchema(){return MT}async executeInternal(e){try{const t={workflow_object_id:e.workflowObjectId,workflow_draft_id:e.workflowDraftId,...void 0!==e.shouldActivate?{should_activate:e.shouldActivate}:{}},a=await this.mondayApi.request(jT,t,{versionOverride:"dev"});if(!a.publish_workflow)throw new Error("publish_workflow returned null");const{workflow_object_id:i,workflow_live_id:r}=a.publish_workflow;if(!i||!r)throw new Error("publish_workflow returned missing identifiers");return{content:{message:`Workflow ${e.workflowObjectId} published successfully`,workflowObjectId:i,workflowLiveId:r}}}catch(e){Jm(e,"publish workflow")}}}];var IE;!function(e){e.API="api",e.APPS="apps",e.ATP="atp"}(IE||(IE={}));const TE=(e,t)=>{let a=[];t?.mode===IE.APPS?a=[...Ir]:t?.mode!==IE.API&&t?.mode||(a=[...wE,...yE]);const i=a.map((t=>((e,t)=>e.prototype instanceof Er?new e(t.apiClient,t.apiToken,t.context):e.prototype instanceof er?new e(t.apiToken):new e)(t,e)));return i.filter((e=>{if(!t)return e.type!==Vi.ALL_API;if(t.mode===IE.API&&"only"===t.enableDynamicApiTools)return e.type===Vi.ALL_API;let a=!1;return t.mode===IE.API&&!1===t.enableDynamicApiTools&&(a=a||e.type===Vi.ALL_API),t.readOnlyMode&&(a=a||e.type!==Vi.READ),t.include?a=a||!t.include?.includes(e.name):t.exclude&&(a=a||t.exclude?.includes(e.name)),!a}))};class EE{constructor(){this.dynamicTools=new Map}registerTool(e,t){const a=e.enabledByDefault??!0,i=a;this.dynamicTools.set(e.name,{instance:e,mcpTool:t,enabled:i,enabledByDefault:a}),a||t.disable()}enableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled||(t.mcpTool.enable(),t.enabled=!0),!0)}disableTool(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabled&&(t.mcpTool.disable(),t.enabled=!1),!0)}isToolEnabled(e){const t=this.dynamicTools.get(e);return!!t&&t.enabled}isToolEnabledByDefault(e){const t=this.dynamicTools.get(e);return!t||t.enabledByDefault}getToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]=t.enabled})),e}getDynamicToolNames(){return Array.from(this.dynamicTools.keys())}getDetailedToolsStatus(){const e={};return this.dynamicTools.forEach(((t,a)=>{e[a]={enabled:t.enabled,enabledByDefault:t.enabledByDefault}})),e}resetToolToDefault(e){const t=this.dynamicTools.get(e);return!!t&&(t.enabledByDefault&&!t.enabled?(t.mcpTool.enable(),t.enabled=!0,!0):!(!t.enabledByDefault&&t.enabled)||(t.mcpTool.disable(),t.enabled=!1,!0))}getAllDynamicTools(){return this.dynamicTools}clear(){this.dynamicTools.clear()}}class SE extends Pi{constructor(e){super({name:"monday.com",version:"1.0.0"},{capabilities:{tools:{listChanged:!0}}}),this.dynamicToolManager=new EE,this.toolInstances=[],this.managementTool=null,this.mondayApiToken=e.mondayApiToken,this.toolkitConfig=e;const t="function"==typeof e.mondayApiToken?e.mondayApiToken():e.mondayApiToken;this.mondayApiClient=this.createApiClient(t,e),this.context={...e.context,apiVersion:e.mondayApiVersion??Xi},this.registerTools(e)}createApiClientFromToken(){return this.createApiClient(this.mondayApiToken(),this.toolkitConfig)}createApiClient(e,t){return new i({token:e,apiVersion:t.mondayApiVersion??Xi,endpoint:t.mondayApiEndpoint,requestConfig:{...t.mondayApiRequestConfig,headers:{...t.mondayApiRequestConfig?.headers||{},"user-agent":"monday-api-mcp"}}})}registerTools(e){try{this.toolInstances=this.initializeTools(e),this.toolInstances.forEach((e=>this.registerSingleTool(e))),!0===e.toolsConfiguration?.enableToolManager&&this.registerManagementTool()}catch(e){throw new Error(`Failed to initialize Monday Agent Toolkit: ${e instanceof Error?e.message:String(e)}`)}}registerManagementTool(){const e=new qT;e.setToolkitManager(this.dynamicToolManager),this.managementTool=e,this.registerSingleTool(this.managementTool)}initializeTools(e){const t={apiClient:"function"==typeof this.mondayApiToken?()=>this.createApiClientFromToken():this.mondayApiClient,apiToken:this.mondayApiToken,context:this.context};return TE(t,e.toolsConfiguration)}registerSingleTool(t){const a=t.getInputSchema(),i=this.registerTool(t.name,{...t,title:t.annotations?.title,description:t.getDescription(),inputSchema:a,annotations:t.annotations},(async(i,r)=>{try{let r;if(a){const n=e.object(a).safeParse(i);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);r=await t.execute(n.data)}else r=await t.execute();return this.formatToolResult(r.content)}catch(e){return this.handleToolError(e,t.name)}}));this.dynamicToolManager.registerTool(t,i)}enableTool(e){return this.dynamicToolManager.enableTool(e)}disableTool(e){return this.dynamicToolManager.disableTool(e)}isToolEnabled(e){return this.dynamicToolManager.isToolEnabled(e)}getToolsStatus(){return this.dynamicToolManager.getToolsStatus()}getDynamicToolNames(){return this.dynamicToolManager.getDynamicToolNames()}getServer(){return this}getTools(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createToolHandler(t)})))}getToolsForMcp(e){const t=[...this.toolInstances];return this.managementTool&&t.push(this.managementTool),t.map((t=>({name:t.name,description:t.getDescription(),schema:this.getSchemaForTool(t,e),annotations:t.annotations,handler:this.createMcpToolHandler(t)})))}createToolHandler(t){return async a=>{const i=t.getInputSchema();if(i){const r=e.object(i).safeParse(a);if(!r.success)throw new Error(`Invalid arguments: ${r.error.message}`);return(await t.execute(r.data)).content}return(await t.execute()).content}}createMcpToolHandler(t){return async(a,i)=>{try{const r=t.getInputSchema();if(r){const n=e.object(r).safeParse(a);if(!n.success)throw new Error(`Invalid arguments: ${n.error.message}`);const o=await t.execute(n.data,i);return this.formatToolResult(o.content)}{const e=await t.execute(void 0,i);return this.formatToolResult(e.content)}}catch(e){return Zm(e)}}}getSchemaForTool(t,i){const r=t.getInputSchema();if(r)return"json"===i?.schemaFormat?a(e.object(r)):r}formatToolResult(e){return"string"==typeof e?{content:[{type:"text",text:e}]}:{structuredContent:e,content:[{type:"text",text:JSON.stringify(e)}]}}handleToolError(e,t){return Zm(e,{toolName:t,errorPrefix:`Failed to execute tool ${t}: `})}}export{EE as DynamicToolManager,SE as MondayAgentToolkit};
|
|
2654
2654
|
//# sourceMappingURL=index.js.map
|