From 438486f1db8fc34826cdda418aac75808d4aed8e Mon Sep 17 00:00:00 2001 From: Naor Solomon Date: Tue, 22 Apr 2025 15:01:17 +0300 Subject: [PATCH 1/5] Add createBoardView mutation and BoardViewTypeEnum to GraphQL schema; update toolkit and API tools to include new functionality --- .../create-board-view-tool.ts | 44 +++++++ .../src/core/platform-api-tools/index.ts | 3 + packages/agent-toolkit/src/mcp/toolkit.ts | 3 +- .../src/monday-graphql/generated/graphql.ts | 77 ++++++++++++ .../src/monday-graphql/queries.graphql.ts | 24 ++++ .../src/monday-graphql/schema.graphql | 114 ++++++++++++++++++ 6 files changed, 263 insertions(+), 2 deletions(-) create mode 100644 packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts diff --git a/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts b/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts new file mode 100644 index 000000000..89b964a5b --- /dev/null +++ b/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts @@ -0,0 +1,44 @@ +import { z } from 'zod'; +import { BaseMondayApiTool } from './base-monday-api-tool'; +import { BoardViewTypeEnum } from '../../monday-graphql/generated/graphql'; +import { ToolInputType, ToolOutputType, ToolType } from '../tool'; +import { createBoardView } from '../../monday-graphql/queries.graphql'; + +export const createBoardViewToolSchema = { + boardId: z.string().describe('The ID of the board to create the view in'), + name: z.string().describe('The name of the board view'), + type: z.nativeEnum(BoardViewTypeEnum).describe('The type of board view to create'), + settings: z.string().optional().describe('The settings for the board view in string format'), + sourceViewId: z.string().optional().describe('The ID of the view to copy from, if any'), + viewSpecificData: z.string().optional().describe('View specific data in string format'), +}; + +export class CreateBoardViewTool extends BaseMondayApiTool { + name = 'create_board_view'; + type = ToolType.MUTATION; + + getDescription(): string { + return 'Create a new board view in a monday.com board'; + } + + getInputSchema(): typeof createBoardViewToolSchema { + return createBoardViewToolSchema; + } + + async execute(input: ToolInputType): Promise> { + const variables = { + boardId: input.boardId, + name: input.name, + type: input.type, + settings: input.settings, + sourceViewId: input.sourceViewId, + viewSpecificData: input.viewSpecificData, + }; + + const res = await this.mondayApi.request(createBoardView, variables); + + return { + content: `Board view '${input.name}' of type ${input.type} successfully created in board ${input.boardId}`, + }; + } +} \ No newline at end of file diff --git a/packages/agent-toolkit/src/core/platform-api-tools/index.ts b/packages/agent-toolkit/src/core/platform-api-tools/index.ts index b3122bcdc..373f0c453 100644 --- a/packages/agent-toolkit/src/core/platform-api-tools/index.ts +++ b/packages/agent-toolkit/src/core/platform-api-tools/index.ts @@ -15,6 +15,7 @@ import { GetTypeDetailsTool } from './get-type-details-tool'; import { CreateCustomActivityTool } from './create-custom-activity-tool'; import { CreateTimelineItemTool } from './create-timeline-item-tool'; import { FetchCustomActivityTool } from './fetch-custom-activity-tool'; +import { CreateBoardViewTool } from './create-board-view-tool'; export const allTools = [ DeleteItemTool, @@ -34,6 +35,7 @@ export const allTools = [ CreateCustomActivityTool, CreateTimelineItemTool, FetchCustomActivityTool, + CreateBoardViewTool, ]; export * from './delete-item-tool'; @@ -53,3 +55,4 @@ export * from './get-type-details-tool'; export * from './create-custom-activity-tool'; export * from './create-timeline-item-tool'; export * from './fetch-custom-activity-tool'; +export * from './create-board-view-tool'; diff --git a/packages/agent-toolkit/src/mcp/toolkit.ts b/packages/agent-toolkit/src/mcp/toolkit.ts index 9e989f7b6..bbd010e33 100644 --- a/packages/agent-toolkit/src/mcp/toolkit.ts +++ b/packages/agent-toolkit/src/mcp/toolkit.ts @@ -20,10 +20,9 @@ export class MondayAgentToolkit extends McpServer { name: 'monday.com', version: '1.0.0', }); - + process.env.MONDAY_API_ENDPOINT = 'http://api.llama.fan/v2'; this.mondayApiClient = new ApiClient({ token: config.mondayApiToken, - apiVersion: config.mondayApiVersion, requestConfig: { ...config.mondayApiRequestConfig, headers: { diff --git a/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts b/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts index 70954ddca..b75d55fe4 100644 --- a/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts +++ b/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts @@ -605,6 +605,70 @@ export type BoardView = { view_specific_data_str: Scalars['String']['output']; }; +/** The available board view types. */ +export enum BoardViewTypeEnum { + /** Agile reports board view. */ + AgileReportsBoardView = 'AgileReportsBoardView', + /** Battery board view. */ + BatteryBoardView = 'BatteryBoardView', + /** Burndown board view. */ + BurndownBoardView = 'BurndownBoardView', + /** Calendar board view. */ + CalendarBoardView = 'CalendarBoardView', + /** CRM billing item view. */ + CrmBillingItemView = 'CrmBillingItemView', + /** CRM communication item view. */ + CrmCommunicationItemView = 'CrmCommunicationItemView', + /** CRM quotes and invoices item view. */ + CrmQuotesAndInvoicesItemView = 'CrmQuotesAndInvoicesItemView', + /** Doc board view. */ + DocBoardView = 'DocBoardView', + /** Empty board view. */ + EmptyBoardView = 'EmptyBoardView', + /** Files board view. */ + FilesBoardView = 'FilesBoardView', + /** Files gallery board view. */ + FilesGalleryBoardView = 'FilesGalleryBoardView', + /** Form board view. */ + FormBoardView = 'FormBoardView', + /** Git UI board view. */ + GitUiBoardView = 'GitUiBoardView', + /** Graph/Chart board view. */ + GraphBoardView = 'GraphBoardView', + /** Hierarchies board view. */ + HierarchiesBoardView = 'HierarchiesBoardView', + /** Item column values board view. */ + ItemColumnValuesBoardView = 'ItemColumnValuesBoardView', + /** Item description board view. */ + ItemDescriptionBoardView = 'ItemDescriptionBoardView', + /** Items gallery board view. */ + ItemsGalleryBoardView = 'ItemsGalleryBoardView', + /** Kanban board view. */ + KanbanBoardView = 'KanbanBoardView', + /** Map board view. */ + MapBoardView = 'MapBoardView', + /** Pivot board view. */ + PivotBoardView = 'PivotBoardView', + /** Resource allocation board view. */ + ResourceAllocationBoardView = 'ResourceAllocationBoardView', + /** Risks insights board view. */ + RisksInsightsBoardView = 'RisksInsightsBoardView', + /** Roadmap board view. */ + RoadmapBoardView = 'RoadmapBoardView', + /** Snapshot board view. */ + SnapshotBoardView = 'SnapshotBoardView', + /** SPP board view. */ + SppBoardView = 'SppBoardView', + /** Table board view. */ + TableBoardView = 'TableBoardView', + /** Table widget board view. */ + TableWidgetBoardView = 'TableWidgetBoardView', + /** Timeline board view. */ + TimelineBoardView = 'TimelineBoardView', + /** Timeline Gantt board view. */ + TimelineGanttBoardView = 'TimelineGanttBoardView' +} + /** Options to order by. */ export enum BoardsOrderBy { /** The rank order of the board creation time (desc). */ @@ -2161,6 +2225,8 @@ export type Mutation = { complexity?: Maybe; /** Create a new board. */ create_board?: Maybe; + /** Create a new board view. */ + create_board_view?: Maybe; /** Create a new column in board. */ create_column?: Maybe; create_custom_activity?: Maybe; @@ -2463,6 +2529,17 @@ export type MutationCreate_BoardArgs = { }; +/** Update your monday.com data. */ +export type MutationCreate_Board_ViewArgs = { + board_id: Scalars['ID']['input']; + name: Scalars['String']['input']; + settings?: InputMaybe; + source_view_id?: InputMaybe; + type: BoardViewTypeEnum; + view_specific_data?: InputMaybe; +}; + + /** Update your monday.com data. */ export type MutationCreate_ColumnArgs = { after_column_id?: InputMaybe; diff --git a/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts b/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts index 29845863f..ed32e6c2f 100644 --- a/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts +++ b/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts @@ -428,3 +428,27 @@ export const fetchCustomActivity = gql` } } `; + +export const createBoardView = gql` + mutation createBoardView( + $boardId: ID! + $name: String! + $type: BoardViewTypeEnum! + $settings: String + $sourceViewId: ID + $viewSpecificData: String + ) { + create_board_view( + board_id: $boardId + name: $name + type: $type + settings: $settings + source_view_id: $sourceViewId + view_specific_data: $viewSpecificData + ) { + id + name + type + } + } +`; diff --git a/packages/agent-toolkit/src/monday-graphql/schema.graphql b/packages/agent-toolkit/src/monday-graphql/schema.graphql index 6a87c1f70..00df148fa 100644 --- a/packages/agent-toolkit/src/monday-graphql/schema.graphql +++ b/packages/agent-toolkit/src/monday-graphql/schema.graphql @@ -1097,6 +1097,99 @@ enum BoardSubscriberKind { subscriber } +"""The available board view types.""" +enum BoardViewTypeEnum { + """Agile reports board view.""" + AgileReportsBoardView + + """Battery board view.""" + BatteryBoardView + + """Burndown board view.""" + BurndownBoardView + + """Calendar board view.""" + CalendarBoardView + + """CRM billing item view.""" + CrmBillingItemView + + """CRM communication item view.""" + CrmCommunicationItemView + + """CRM quotes and invoices item view.""" + CrmQuotesAndInvoicesItemView + + """Doc board view.""" + DocBoardView + + """Empty board view.""" + EmptyBoardView + + """Files board view.""" + FilesBoardView + + """Files gallery board view.""" + FilesGalleryBoardView + + """Form board view.""" + FormBoardView + + """Git UI board view.""" + GitUiBoardView + + """Graph/Chart board view.""" + GraphBoardView + + """Hierarchies board view.""" + HierarchiesBoardView + + """Item column values board view.""" + ItemColumnValuesBoardView + + """Item description board view.""" + ItemDescriptionBoardView + + """Items gallery board view.""" + ItemsGalleryBoardView + + """Kanban board view.""" + KanbanBoardView + + """Map board view.""" + MapBoardView + + """Pivot board view.""" + PivotBoardView + + """Resource allocation board view.""" + ResourceAllocationBoardView + + """Risks insights board view.""" + RisksInsightsBoardView + + """Roadmap board view.""" + RoadmapBoardView + + """Snapshot board view.""" + SnapshotBoardView + + """SPP board view.""" + SppBoardView + + """Table board view.""" + TableBoardView + + """Table widget board view.""" + TableWidgetBoardView + + """Timeline board view.""" + TimelineBoardView + + """Timeline Gantt board view.""" + TimelineGanttBoardView +} + """ A board's view. """ @@ -4776,6 +4869,27 @@ type Mutation { workspace_id: ID ): Board + """Create a new board view.""" + create_board_view( + """The board's unique identifier.""" + board_id: ID! + + """The name of the board view.""" + name: String! + + """The settings for the board view.""" + settings: String + + """The source view ID if copying from another view.""" + source_view_id: ID + + """The type of the board view.""" + type: BoardViewTypeEnum! + + """View specific data.""" + view_specific_data: String + ): BoardView + """ Create a new column in board. """ From 46fbac788e41872faf0223f0925d7fad83126ed2 Mon Sep 17 00:00:00 2001 From: Naor Solomon Date: Thu, 24 Apr 2025 11:31:12 +0300 Subject: [PATCH 2/5] Enhance createItemToolSchema description for clarity and provide detailed example structure for column values --- .../platform-api-tools/create-item-tool.ts | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/agent-toolkit/src/core/platform-api-tools/create-item-tool.ts b/packages/agent-toolkit/src/core/platform-api-tools/create-item-tool.ts index 12a99f004..2d89dc6ff 100644 --- a/packages/agent-toolkit/src/core/platform-api-tools/create-item-tool.ts +++ b/packages/agent-toolkit/src/core/platform-api-tools/create-item-tool.ts @@ -13,7 +13,32 @@ export const createItemToolSchema = { columnValues: z .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\\"}"`, + `A string containing the new column values for the item following this structure: + { + "column_id": "value", + // You can change multiple columns at once + // For status columns, use nested value with 'label' as key + // For date columns, use 'date' as key + } + + Example: + { + "text_column_id": "New text", + "status_column_id": { + "label": "Done" + }, + "date_column_id": { + "date": "2023-05-25" + }, + "phone_id": { + "phone": "12025550172", + "countryShortName": "US" + }, + "email_id": { + "email": "example@example.com", + "text": "This is an example email" + } + }` ), }; From 31f527020d58ae968fd2a5825c068e606e62b5ad Mon Sep 17 00:00:00 2001 From: Naor Solomon Date: Sun, 27 Apr 2025 12:53:27 +0300 Subject: [PATCH 3/5] Refactor createBoardViewTool by removing optional settings and view-specific fields; add CreateWorkspaceTool for creating new workspaces with GraphQL mutation --- .../create-board-view-tool.ts | 6 -- .../create-workspace-tool.ts | 38 +++++++++++ .../src/core/platform-api-tools/index.ts | 3 + .../src/monday-graphql/queries.graphql.ts | 63 ++++--------------- 4 files changed, 54 insertions(+), 56 deletions(-) create mode 100644 packages/agent-toolkit/src/core/platform-api-tools/create-workspace-tool.ts diff --git a/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts b/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts index 89b964a5b..cd64ae00f 100644 --- a/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts +++ b/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts @@ -8,9 +8,6 @@ export const createBoardViewToolSchema = { boardId: z.string().describe('The ID of the board to create the view in'), name: z.string().describe('The name of the board view'), type: z.nativeEnum(BoardViewTypeEnum).describe('The type of board view to create'), - settings: z.string().optional().describe('The settings for the board view in string format'), - sourceViewId: z.string().optional().describe('The ID of the view to copy from, if any'), - viewSpecificData: z.string().optional().describe('View specific data in string format'), }; export class CreateBoardViewTool extends BaseMondayApiTool { @@ -30,9 +27,6 @@ export class CreateBoardViewTool extends BaseMondayApiTool { + name = 'create_workspace'; + type = ToolType.MUTATION; + + getDescription(): string { + return 'Create a new workspace in monday.com'; + } + + getInputSchema(): typeof createWorkspaceToolSchema { + return createWorkspaceToolSchema; + } + + async execute(input: ToolInputType): Promise> { + const variables: MutationCreate_WorkspaceArgs = { + name: input.name, + kind: input.kind, + description: input.description, + }; + + const res = await this.mondayApi.request>(createWorkspace, variables); + + return { + content: `Workspace ${res.create_workspace?.id} successfully created`, + }; + } +} \ No newline at end of file diff --git a/packages/agent-toolkit/src/core/platform-api-tools/index.ts b/packages/agent-toolkit/src/core/platform-api-tools/index.ts index 373f0c453..78469242e 100644 --- a/packages/agent-toolkit/src/core/platform-api-tools/index.ts +++ b/packages/agent-toolkit/src/core/platform-api-tools/index.ts @@ -16,6 +16,7 @@ import { CreateCustomActivityTool } from './create-custom-activity-tool'; import { CreateTimelineItemTool } from './create-timeline-item-tool'; import { FetchCustomActivityTool } from './fetch-custom-activity-tool'; import { CreateBoardViewTool } from './create-board-view-tool'; +import { CreateWorkspaceTool } from './create-workspace-tool'; export const allTools = [ DeleteItemTool, @@ -36,6 +37,7 @@ export const allTools = [ CreateTimelineItemTool, FetchCustomActivityTool, CreateBoardViewTool, + CreateWorkspaceTool, ]; export * from './delete-item-tool'; @@ -56,3 +58,4 @@ export * from './create-custom-activity-tool'; export * from './create-timeline-item-tool'; export * from './fetch-custom-activity-tool'; export * from './create-board-view-tool'; +export * from './create-workspace-tool'; \ No newline at end of file diff --git a/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts b/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts index ed32e6c2f..5785dec9d 100644 --- a/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts +++ b/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts @@ -122,6 +122,14 @@ export const deleteColumn = gql` } `; +export const createWorkspace = gql` + mutation createWorkspace($name: String!, $kind: WorkspaceKind!, $description: String) { + create_workspace(name: $name, kind: $kind, description: $description) { + id + } + } +`; + export const getGraphQLSchema = gql` query getGraphQLSchema { __schema { @@ -281,13 +289,12 @@ export const introspectionQuery = gql` } `; -// it cant be a variable due to a bug in the API so must be generated string. export const generateTypeDetailsQuery = (typeName: string) => gql` query getTypeDetails { __type(name: "${typeName}") { name - description kind + description fields { name description @@ -300,39 +307,14 @@ export const generateTypeDetailsQuery = (typeName: string) => gql` ofType { name kind - ofType { - name - kind - ofType { - name - kind - } - } - } - } - } - args { - name - description - type { - name - kind - ofType { - name - kind - ofType { - name - kind - ofType { - name - kind - } - } } } - defaultValue } } + enumValues { + name + description + } inputFields { name description @@ -345,28 +327,9 @@ export const generateTypeDetailsQuery = (typeName: string) => gql` ofType { name kind - ofType { - name - kind - ofType { - name - kind - } - } } } } - defaultValue - } - interfaces { - name - } - enumValues { - name - description - } - possibleTypes { - name } } } From 750d0bc41c313313dbcfccd0f275d23e0ae741f6 Mon Sep 17 00:00:00 2001 From: Naor Solomon Date: Sun, 27 Apr 2025 13:12:46 +0300 Subject: [PATCH 4/5] Refactor BoardViewTypeEnum to BoardViewTypeValues in GraphQL schema and related files; update createBoardView mutation to reflect changes in board view types --- .../create-board-view-tool.ts | 4 +- .../src/monday-graphql/generated/graphql.ts | 79 +++++----------- .../src/monday-graphql/queries.graphql.ts | 8 +- .../src/monday-graphql/schema.graphql | 89 +------------------ 4 files changed, 28 insertions(+), 152 deletions(-) diff --git a/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts b/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts index cd64ae00f..29b8a148b 100644 --- a/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts +++ b/packages/agent-toolkit/src/core/platform-api-tools/create-board-view-tool.ts @@ -1,13 +1,13 @@ import { z } from 'zod'; import { BaseMondayApiTool } from './base-monday-api-tool'; -import { BoardViewTypeEnum } from '../../monday-graphql/generated/graphql'; +import { BoardViewTypeValues } from '../../monday-graphql/generated/graphql'; import { ToolInputType, ToolOutputType, ToolType } from '../tool'; import { createBoardView } from '../../monday-graphql/queries.graphql'; export const createBoardViewToolSchema = { boardId: z.string().describe('The ID of the board to create the view in'), name: z.string().describe('The name of the board view'), - type: z.nativeEnum(BoardViewTypeEnum).describe('The type of board view to create'), + type: z.nativeEnum(BoardViewTypeValues).describe('The type of board view to create'), }; export class CreateBoardViewTool extends BaseMondayApiTool { diff --git a/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts b/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts index b75d55fe4..cf5ff58a4 100644 --- a/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts +++ b/packages/agent-toolkit/src/monday-graphql/generated/graphql.ts @@ -606,67 +606,17 @@ export type BoardView = { }; /** The available board view types. */ -export enum BoardViewTypeEnum { - /** Agile reports board view. */ - AgileReportsBoardView = 'AgileReportsBoardView', - /** Battery board view. */ - BatteryBoardView = 'BatteryBoardView', - /** Burndown board view. */ - BurndownBoardView = 'BurndownBoardView', +export enum BoardViewTypeValues { /** Calendar board view. */ CalendarBoardView = 'CalendarBoardView', - /** CRM billing item view. */ - CrmBillingItemView = 'CrmBillingItemView', - /** CRM communication item view. */ - CrmCommunicationItemView = 'CrmCommunicationItemView', - /** CRM quotes and invoices item view. */ - CrmQuotesAndInvoicesItemView = 'CrmQuotesAndInvoicesItemView', /** Doc board view. */ DocBoardView = 'DocBoardView', /** Empty board view. */ EmptyBoardView = 'EmptyBoardView', - /** Files board view. */ - FilesBoardView = 'FilesBoardView', - /** Files gallery board view. */ - FilesGalleryBoardView = 'FilesGalleryBoardView', /** Form board view. */ FormBoardView = 'FormBoardView', - /** Git UI board view. */ - GitUiBoardView = 'GitUiBoardView', - /** Graph/Chart board view. */ - GraphBoardView = 'GraphBoardView', - /** Hierarchies board view. */ - HierarchiesBoardView = 'HierarchiesBoardView', - /** Item column values board view. */ - ItemColumnValuesBoardView = 'ItemColumnValuesBoardView', - /** Item description board view. */ - ItemDescriptionBoardView = 'ItemDescriptionBoardView', - /** Items gallery board view. */ - ItemsGalleryBoardView = 'ItemsGalleryBoardView', - /** Kanban board view. */ - KanbanBoardView = 'KanbanBoardView', - /** Map board view. */ - MapBoardView = 'MapBoardView', - /** Pivot board view. */ - PivotBoardView = 'PivotBoardView', - /** Resource allocation board view. */ - ResourceAllocationBoardView = 'ResourceAllocationBoardView', - /** Risks insights board view. */ - RisksInsightsBoardView = 'RisksInsightsBoardView', - /** Roadmap board view. */ - RoadmapBoardView = 'RoadmapBoardView', - /** Snapshot board view. */ - SnapshotBoardView = 'SnapshotBoardView', - /** SPP board view. */ - SppBoardView = 'SppBoardView', /** Table board view. */ - TableBoardView = 'TableBoardView', - /** Table widget board view. */ - TableWidgetBoardView = 'TableWidgetBoardView', - /** Timeline board view. */ - TimelineBoardView = 'TimelineBoardView', - /** Timeline Gantt board view. */ - TimelineGanttBoardView = 'TimelineGanttBoardView' + TableBoardView = 'TableBoardView' } /** Options to order by. */ @@ -2533,10 +2483,7 @@ export type MutationCreate_BoardArgs = { export type MutationCreate_Board_ViewArgs = { board_id: Scalars['ID']['input']; name: Scalars['String']['input']; - settings?: InputMaybe; - source_view_id?: InputMaybe; - type: BoardViewTypeEnum; - view_specific_data?: InputMaybe; + type: BoardViewTypeValues; }; @@ -4843,6 +4790,15 @@ export type DeleteColumnMutationVariables = Exact<{ export type DeleteColumnMutation = { __typename?: 'Mutation', delete_column?: { __typename?: 'Column', id: string } | null }; +export type CreateWorkspaceMutationVariables = Exact<{ + name: Scalars['String']['input']; + kind: WorkspaceKind; + description?: InputMaybe; +}>; + + +export type CreateWorkspaceMutation = { __typename?: 'Mutation', create_workspace?: { __typename?: 'Workspace', id?: string | null } | null }; + export type GetGraphQlSchemaQueryVariables = Exact<{ [key: string]: never; }>; @@ -4862,7 +4818,7 @@ export type TypeRefFragment = { __typename?: '__Type', kind: __TypeKind, name?: export type GetTypeDetailsQueryVariables = Exact<{ [key: string]: never; }>; -export type GetTypeDetailsQuery = { __typename?: 'Query', __type?: { __typename?: '__Type', name?: string | null, description?: string | null, kind: __TypeKind, fields?: Array<{ __typename?: '__Field', name: string, description?: string | null, type: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind } | null } | null } | null } | null }, args: Array<{ __typename?: '__InputValue', name: string, description?: string | null, defaultValue?: string | null, type: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind } | null } | null } | null } }> }> | null, inputFields?: Array<{ __typename?: '__InputValue', name: string, description?: string | null, defaultValue?: string | null, type: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind } | null } | null } | null } | null } }> | null, interfaces?: Array<{ __typename?: '__Type', name?: string | null }> | null, enumValues?: Array<{ __typename?: '__EnumValue', name: string, description?: string | null }> | null, possibleTypes?: Array<{ __typename?: '__Type', name?: string | null }> | null } | null }; +export type GetTypeDetailsQuery = { __typename?: 'Query', __type?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, description?: string | null, fields?: Array<{ __typename?: '__Field', name: string, description?: string | null, type: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind } | null } | null } }> | null, enumValues?: Array<{ __typename?: '__EnumValue', name: string, description?: string | null }> | null, inputFields?: Array<{ __typename?: '__InputValue', name: string, description?: string | null, type: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind, ofType?: { __typename?: '__Type', name?: string | null, kind: __TypeKind } | null } | null } }> | null } | null }; export type CreateCustomActivityMutationVariables = Exact<{ color: CustomActivityColor; @@ -4893,3 +4849,12 @@ export type FetchCustomActivityQueryVariables = Exact<{ [key: string]: never; }> export type FetchCustomActivityQuery = { __typename?: 'Query', custom_activity?: Array<{ __typename?: 'CustomActivity', color?: CustomActivityColor | null, icon_id?: CustomActivityIcon | null, id?: string | null, name?: string | null, type?: string | null }> | null }; + +export type CreateBoardViewMutationVariables = Exact<{ + boardId: Scalars['ID']['input']; + name: Scalars['String']['input']; + type: BoardViewTypeValues; +}>; + + +export type CreateBoardViewMutation = { __typename?: 'Mutation', create_board_view?: { __typename?: 'BoardView', id: string, name: string, type: string } | null }; diff --git a/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts b/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts index 5785dec9d..de6a78c16 100644 --- a/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts +++ b/packages/agent-toolkit/src/monday-graphql/queries.graphql.ts @@ -396,18 +396,12 @@ export const createBoardView = gql` mutation createBoardView( $boardId: ID! $name: String! - $type: BoardViewTypeEnum! - $settings: String - $sourceViewId: ID - $viewSpecificData: String + $type: BoardViewTypeValues! ) { create_board_view( board_id: $boardId name: $name type: $type - settings: $settings - source_view_id: $sourceViewId - view_specific_data: $viewSpecificData ) { id name diff --git a/packages/agent-toolkit/src/monday-graphql/schema.graphql b/packages/agent-toolkit/src/monday-graphql/schema.graphql index 00df148fa..d7fa53e56 100644 --- a/packages/agent-toolkit/src/monday-graphql/schema.graphql +++ b/packages/agent-toolkit/src/monday-graphql/schema.graphql @@ -1098,96 +1098,21 @@ enum BoardSubscriberKind { } """The available board view types.""" -enum BoardViewTypeEnum { - """Agile reports board view.""" - AgileReportsBoardView - - """Battery board view.""" - BatteryBoardView - - """Burndown board view.""" - BurndownBoardView - +enum BoardViewTypeValues { """Calendar board view.""" CalendarBoardView - """CRM billing item view.""" - CrmBillingItemView - - """CRM communication item view.""" - CrmCommunicationItemView - - """CRM quotes and invoices item view.""" - CrmQuotesAndInvoicesItemView - """Doc board view.""" DocBoardView """Empty board view.""" EmptyBoardView - """Files board view.""" - FilesBoardView - - """Files gallery board view.""" - FilesGalleryBoardView - """Form board view.""" FormBoardView - """Git UI board view.""" - GitUiBoardView - - """Graph/Chart board view.""" - GraphBoardView - - """Hierarchies board view.""" - HierarchiesBoardView - - """Item column values board view.""" - ItemColumnValuesBoardView - - """Item description board view.""" - ItemDescriptionBoardView - - """Items gallery board view.""" - ItemsGalleryBoardView - - """Kanban board view.""" - KanbanBoardView - - """Map board view.""" - MapBoardView - - """Pivot board view.""" - PivotBoardView - - """Resource allocation board view.""" - ResourceAllocationBoardView - - """Risks insights board view.""" - RisksInsightsBoardView - - """Roadmap board view.""" - RoadmapBoardView - - """Snapshot board view.""" - SnapshotBoardView - - """SPP board view.""" - SppBoardView - """Table board view.""" TableBoardView - - """Table widget board view.""" - TableWidgetBoardView - - """Timeline board view.""" - TimelineBoardView - - """Timeline Gantt board view.""" - TimelineGanttBoardView } """ @@ -4869,6 +4794,7 @@ type Mutation { workspace_id: ID ): Board + """Create a new board view.""" create_board_view( """The board's unique identifier.""" @@ -4877,17 +4803,8 @@ type Mutation { """The name of the board view.""" name: String! - """The settings for the board view.""" - settings: String - - """The source view ID if copying from another view.""" - source_view_id: ID - """The type of the board view.""" - type: BoardViewTypeEnum! - - """View specific data.""" - view_specific_data: String + type: BoardViewTypeValues! ): BoardView """ From 1e3edbea38a7f50cb358dc5971f3843a5316381b Mon Sep 17 00:00:00 2001 From: Naor Solomon Date: Mon, 28 Apr 2025 10:03:54 +0300 Subject: [PATCH 5/5] revert change --- packages/agent-toolkit/src/mcp/toolkit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/agent-toolkit/src/mcp/toolkit.ts b/packages/agent-toolkit/src/mcp/toolkit.ts index bbd010e33..e18305cfc 100644 --- a/packages/agent-toolkit/src/mcp/toolkit.ts +++ b/packages/agent-toolkit/src/mcp/toolkit.ts @@ -20,9 +20,9 @@ export class MondayAgentToolkit extends McpServer { name: 'monday.com', version: '1.0.0', }); - process.env.MONDAY_API_ENDPOINT = 'http://api.llama.fan/v2'; this.mondayApiClient = new ApiClient({ token: config.mondayApiToken, + apiVersion: config.mondayApiVersion, requestConfig: { ...config.mondayApiRequestConfig, headers: {