
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `McpConnection` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.js"
import type * as Prisma from "../internal/prismaNamespace.js"

/**
 * Model McpConnection
 * 
 */
export type McpConnectionModel = runtime.Types.Result.DefaultSelection<Prisma.$McpConnectionPayload>

export type AggregateMcpConnection = {
  _count: McpConnectionCountAggregateOutputType | null
  _min: McpConnectionMinAggregateOutputType | null
  _max: McpConnectionMaxAggregateOutputType | null
}

export type McpConnectionMinAggregateOutputType = {
  mcpConnectionId: string | null
  organizationId: string | null
  userId: string | null
  catalogItemId: string | null
  displayName: string | null
  provider: string | null
  mcpUrl: string | null
  smitheryNamespace: string | null
  smitheryConnectionId: string | null
  status: $Enums.McpConnectionStatus | null
  setupUrl: string | null
  lastSyncedAt: Date | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type McpConnectionMaxAggregateOutputType = {
  mcpConnectionId: string | null
  organizationId: string | null
  userId: string | null
  catalogItemId: string | null
  displayName: string | null
  provider: string | null
  mcpUrl: string | null
  smitheryNamespace: string | null
  smitheryConnectionId: string | null
  status: $Enums.McpConnectionStatus | null
  setupUrl: string | null
  lastSyncedAt: Date | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type McpConnectionCountAggregateOutputType = {
  mcpConnectionId: number
  organizationId: number
  userId: number
  catalogItemId: number
  displayName: number
  provider: number
  mcpUrl: number
  smitheryNamespace: number
  smitheryConnectionId: number
  status: number
  setupUrl: number
  tools: number
  metadata: number
  lastSyncedAt: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type McpConnectionMinAggregateInputType = {
  mcpConnectionId?: true
  organizationId?: true
  userId?: true
  catalogItemId?: true
  displayName?: true
  provider?: true
  mcpUrl?: true
  smitheryNamespace?: true
  smitheryConnectionId?: true
  status?: true
  setupUrl?: true
  lastSyncedAt?: true
  createdAt?: true
  updatedAt?: true
}

export type McpConnectionMaxAggregateInputType = {
  mcpConnectionId?: true
  organizationId?: true
  userId?: true
  catalogItemId?: true
  displayName?: true
  provider?: true
  mcpUrl?: true
  smitheryNamespace?: true
  smitheryConnectionId?: true
  status?: true
  setupUrl?: true
  lastSyncedAt?: true
  createdAt?: true
  updatedAt?: true
}

export type McpConnectionCountAggregateInputType = {
  mcpConnectionId?: true
  organizationId?: true
  userId?: true
  catalogItemId?: true
  displayName?: true
  provider?: true
  mcpUrl?: true
  smitheryNamespace?: true
  smitheryConnectionId?: true
  status?: true
  setupUrl?: true
  tools?: true
  metadata?: true
  lastSyncedAt?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type McpConnectionAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which McpConnection to aggregate.
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of McpConnections to fetch.
   */
  orderBy?: Prisma.McpConnectionOrderByWithRelationInput | Prisma.McpConnectionOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.McpConnectionWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` McpConnections from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` McpConnections.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned McpConnections
  **/
  _count?: true | McpConnectionCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: McpConnectionMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: McpConnectionMaxAggregateInputType
}

export type GetMcpConnectionAggregateType<T extends McpConnectionAggregateArgs> = {
      [P in keyof T & keyof AggregateMcpConnection]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateMcpConnection[P]>
    : Prisma.GetScalarType<T[P], AggregateMcpConnection[P]>
}




export type McpConnectionGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.McpConnectionWhereInput
  orderBy?: Prisma.McpConnectionOrderByWithAggregationInput | Prisma.McpConnectionOrderByWithAggregationInput[]
  by: Prisma.McpConnectionScalarFieldEnum[] | Prisma.McpConnectionScalarFieldEnum
  having?: Prisma.McpConnectionScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: McpConnectionCountAggregateInputType | true
  _min?: McpConnectionMinAggregateInputType
  _max?: McpConnectionMaxAggregateInputType
}

export type McpConnectionGroupByOutputType = {
  mcpConnectionId: string
  organizationId: string
  userId: string | null
  catalogItemId: string | null
  displayName: string
  provider: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status: $Enums.McpConnectionStatus
  setupUrl: string | null
  tools: runtime.JsonValue | null
  metadata: runtime.JsonValue | null
  lastSyncedAt: Date | null
  createdAt: Date
  updatedAt: Date
  _count: McpConnectionCountAggregateOutputType | null
  _min: McpConnectionMinAggregateOutputType | null
  _max: McpConnectionMaxAggregateOutputType | null
}

export type GetMcpConnectionGroupByPayload<T extends McpConnectionGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<McpConnectionGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof McpConnectionGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], McpConnectionGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], McpConnectionGroupByOutputType[P]>
      }
    >
  >



export type McpConnectionWhereInput = {
  AND?: Prisma.McpConnectionWhereInput | Prisma.McpConnectionWhereInput[]
  OR?: Prisma.McpConnectionWhereInput[]
  NOT?: Prisma.McpConnectionWhereInput | Prisma.McpConnectionWhereInput[]
  mcpConnectionId?: Prisma.StringFilter<"McpConnection"> | string
  organizationId?: Prisma.StringFilter<"McpConnection"> | string
  userId?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  catalogItemId?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  displayName?: Prisma.StringFilter<"McpConnection"> | string
  provider?: Prisma.StringFilter<"McpConnection"> | string
  mcpUrl?: Prisma.StringFilter<"McpConnection"> | string
  smitheryNamespace?: Prisma.StringFilter<"McpConnection"> | string
  smitheryConnectionId?: Prisma.StringFilter<"McpConnection"> | string
  status?: Prisma.EnumMcpConnectionStatusFilter<"McpConnection"> | $Enums.McpConnectionStatus
  setupUrl?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  tools?: Prisma.JsonNullableFilter<"McpConnection">
  metadata?: Prisma.JsonNullableFilter<"McpConnection">
  lastSyncedAt?: Prisma.DateTimeNullableFilter<"McpConnection"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"McpConnection"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"McpConnection"> | Date | string
  organization?: Prisma.XOR<Prisma.OrganizationScalarRelationFilter, Prisma.OrganizationWhereInput>
  user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
  catalogItem?: Prisma.XOR<Prisma.McpServerCatalogItemNullableScalarRelationFilter, Prisma.McpServerCatalogItemWhereInput> | null
  agents?: Prisma.AgentMcpConnectionListRelationFilter
  executionLogs?: Prisma.McpToolExecutionLogListRelationFilter
}

export type McpConnectionOrderByWithRelationInput = {
  mcpConnectionId?: Prisma.SortOrder
  organizationId?: Prisma.SortOrder
  userId?: Prisma.SortOrderInput | Prisma.SortOrder
  catalogItemId?: Prisma.SortOrderInput | Prisma.SortOrder
  displayName?: Prisma.SortOrder
  provider?: Prisma.SortOrder
  mcpUrl?: Prisma.SortOrder
  smitheryNamespace?: Prisma.SortOrder
  smitheryConnectionId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  setupUrl?: Prisma.SortOrderInput | Prisma.SortOrder
  tools?: Prisma.SortOrderInput | Prisma.SortOrder
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder
  lastSyncedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  organization?: Prisma.OrganizationOrderByWithRelationInput
  user?: Prisma.UserOrderByWithRelationInput
  catalogItem?: Prisma.McpServerCatalogItemOrderByWithRelationInput
  agents?: Prisma.AgentMcpConnectionOrderByRelationAggregateInput
  executionLogs?: Prisma.McpToolExecutionLogOrderByRelationAggregateInput
}

export type McpConnectionWhereUniqueInput = Prisma.AtLeast<{
  mcpConnectionId?: string
  organizationId_smitheryConnectionId?: Prisma.McpConnectionOrganizationIdSmitheryConnectionIdCompoundUniqueInput
  AND?: Prisma.McpConnectionWhereInput | Prisma.McpConnectionWhereInput[]
  OR?: Prisma.McpConnectionWhereInput[]
  NOT?: Prisma.McpConnectionWhereInput | Prisma.McpConnectionWhereInput[]
  organizationId?: Prisma.StringFilter<"McpConnection"> | string
  userId?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  catalogItemId?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  displayName?: Prisma.StringFilter<"McpConnection"> | string
  provider?: Prisma.StringFilter<"McpConnection"> | string
  mcpUrl?: Prisma.StringFilter<"McpConnection"> | string
  smitheryNamespace?: Prisma.StringFilter<"McpConnection"> | string
  smitheryConnectionId?: Prisma.StringFilter<"McpConnection"> | string
  status?: Prisma.EnumMcpConnectionStatusFilter<"McpConnection"> | $Enums.McpConnectionStatus
  setupUrl?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  tools?: Prisma.JsonNullableFilter<"McpConnection">
  metadata?: Prisma.JsonNullableFilter<"McpConnection">
  lastSyncedAt?: Prisma.DateTimeNullableFilter<"McpConnection"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"McpConnection"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"McpConnection"> | Date | string
  organization?: Prisma.XOR<Prisma.OrganizationScalarRelationFilter, Prisma.OrganizationWhereInput>
  user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
  catalogItem?: Prisma.XOR<Prisma.McpServerCatalogItemNullableScalarRelationFilter, Prisma.McpServerCatalogItemWhereInput> | null
  agents?: Prisma.AgentMcpConnectionListRelationFilter
  executionLogs?: Prisma.McpToolExecutionLogListRelationFilter
}, "mcpConnectionId" | "organizationId_smitheryConnectionId">

export type McpConnectionOrderByWithAggregationInput = {
  mcpConnectionId?: Prisma.SortOrder
  organizationId?: Prisma.SortOrder
  userId?: Prisma.SortOrderInput | Prisma.SortOrder
  catalogItemId?: Prisma.SortOrderInput | Prisma.SortOrder
  displayName?: Prisma.SortOrder
  provider?: Prisma.SortOrder
  mcpUrl?: Prisma.SortOrder
  smitheryNamespace?: Prisma.SortOrder
  smitheryConnectionId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  setupUrl?: Prisma.SortOrderInput | Prisma.SortOrder
  tools?: Prisma.SortOrderInput | Prisma.SortOrder
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder
  lastSyncedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.McpConnectionCountOrderByAggregateInput
  _max?: Prisma.McpConnectionMaxOrderByAggregateInput
  _min?: Prisma.McpConnectionMinOrderByAggregateInput
}

export type McpConnectionScalarWhereWithAggregatesInput = {
  AND?: Prisma.McpConnectionScalarWhereWithAggregatesInput | Prisma.McpConnectionScalarWhereWithAggregatesInput[]
  OR?: Prisma.McpConnectionScalarWhereWithAggregatesInput[]
  NOT?: Prisma.McpConnectionScalarWhereWithAggregatesInput | Prisma.McpConnectionScalarWhereWithAggregatesInput[]
  mcpConnectionId?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  organizationId?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  userId?: Prisma.StringNullableWithAggregatesFilter<"McpConnection"> | string | null
  catalogItemId?: Prisma.StringNullableWithAggregatesFilter<"McpConnection"> | string | null
  displayName?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  provider?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  mcpUrl?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  smitheryNamespace?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  smitheryConnectionId?: Prisma.StringWithAggregatesFilter<"McpConnection"> | string
  status?: Prisma.EnumMcpConnectionStatusWithAggregatesFilter<"McpConnection"> | $Enums.McpConnectionStatus
  setupUrl?: Prisma.StringNullableWithAggregatesFilter<"McpConnection"> | string | null
  tools?: Prisma.JsonNullableWithAggregatesFilter<"McpConnection">
  metadata?: Prisma.JsonNullableWithAggregatesFilter<"McpConnection">
  lastSyncedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"McpConnection"> | Date | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"McpConnection"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"McpConnection"> | Date | string
}

export type McpConnectionCreateInput = {
  mcpConnectionId?: string
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  organization: Prisma.OrganizationCreateNestedOneWithoutMcpConnectionsInput
  user?: Prisma.UserCreateNestedOneWithoutMcpConnectionsInput
  catalogItem?: Prisma.McpServerCatalogItemCreateNestedOneWithoutConnectionsInput
  agents?: Prisma.AgentMcpConnectionCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUncheckedCreateInput = {
  mcpConnectionId?: string
  organizationId: string
  userId?: string | null
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUpdateInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  organization?: Prisma.OrganizationUpdateOneRequiredWithoutMcpConnectionsNestedInput
  user?: Prisma.UserUpdateOneWithoutMcpConnectionsNestedInput
  catalogItem?: Prisma.McpServerCatalogItemUpdateOneWithoutConnectionsNestedInput
  agents?: Prisma.AgentMcpConnectionUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionCreateManyInput = {
  mcpConnectionId?: string
  organizationId: string
  userId?: string | null
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type McpConnectionUpdateManyMutationInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type McpConnectionUncheckedUpdateManyInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type McpConnectionListRelationFilter = {
  every?: Prisma.McpConnectionWhereInput
  some?: Prisma.McpConnectionWhereInput
  none?: Prisma.McpConnectionWhereInput
}

export type McpConnectionOrderByRelationAggregateInput = {
  _count?: Prisma.SortOrder
}

export type McpConnectionOrganizationIdSmitheryConnectionIdCompoundUniqueInput = {
  organizationId: string
  smitheryConnectionId: string
}

export type McpConnectionCountOrderByAggregateInput = {
  mcpConnectionId?: Prisma.SortOrder
  organizationId?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  catalogItemId?: Prisma.SortOrder
  displayName?: Prisma.SortOrder
  provider?: Prisma.SortOrder
  mcpUrl?: Prisma.SortOrder
  smitheryNamespace?: Prisma.SortOrder
  smitheryConnectionId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  setupUrl?: Prisma.SortOrder
  tools?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  lastSyncedAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type McpConnectionMaxOrderByAggregateInput = {
  mcpConnectionId?: Prisma.SortOrder
  organizationId?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  catalogItemId?: Prisma.SortOrder
  displayName?: Prisma.SortOrder
  provider?: Prisma.SortOrder
  mcpUrl?: Prisma.SortOrder
  smitheryNamespace?: Prisma.SortOrder
  smitheryConnectionId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  setupUrl?: Prisma.SortOrder
  lastSyncedAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type McpConnectionMinOrderByAggregateInput = {
  mcpConnectionId?: Prisma.SortOrder
  organizationId?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  catalogItemId?: Prisma.SortOrder
  displayName?: Prisma.SortOrder
  provider?: Prisma.SortOrder
  mcpUrl?: Prisma.SortOrder
  smitheryNamespace?: Prisma.SortOrder
  smitheryConnectionId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  setupUrl?: Prisma.SortOrder
  lastSyncedAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type McpConnectionScalarRelationFilter = {
  is?: Prisma.McpConnectionWhereInput
  isNot?: Prisma.McpConnectionWhereInput
}

export type McpConnectionCreateNestedManyWithoutUserInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutUserInput, Prisma.McpConnectionUncheckedCreateWithoutUserInput> | Prisma.McpConnectionCreateWithoutUserInput[] | Prisma.McpConnectionUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutUserInput | Prisma.McpConnectionCreateOrConnectWithoutUserInput[]
  createMany?: Prisma.McpConnectionCreateManyUserInputEnvelope
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
}

export type McpConnectionUncheckedCreateNestedManyWithoutUserInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutUserInput, Prisma.McpConnectionUncheckedCreateWithoutUserInput> | Prisma.McpConnectionCreateWithoutUserInput[] | Prisma.McpConnectionUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutUserInput | Prisma.McpConnectionCreateOrConnectWithoutUserInput[]
  createMany?: Prisma.McpConnectionCreateManyUserInputEnvelope
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
}

export type McpConnectionUpdateManyWithoutUserNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutUserInput, Prisma.McpConnectionUncheckedCreateWithoutUserInput> | Prisma.McpConnectionCreateWithoutUserInput[] | Prisma.McpConnectionUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutUserInput | Prisma.McpConnectionCreateOrConnectWithoutUserInput[]
  upsert?: Prisma.McpConnectionUpsertWithWhereUniqueWithoutUserInput | Prisma.McpConnectionUpsertWithWhereUniqueWithoutUserInput[]
  createMany?: Prisma.McpConnectionCreateManyUserInputEnvelope
  set?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  disconnect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  delete?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  update?: Prisma.McpConnectionUpdateWithWhereUniqueWithoutUserInput | Prisma.McpConnectionUpdateWithWhereUniqueWithoutUserInput[]
  updateMany?: Prisma.McpConnectionUpdateManyWithWhereWithoutUserInput | Prisma.McpConnectionUpdateManyWithWhereWithoutUserInput[]
  deleteMany?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
}

export type McpConnectionUncheckedUpdateManyWithoutUserNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutUserInput, Prisma.McpConnectionUncheckedCreateWithoutUserInput> | Prisma.McpConnectionCreateWithoutUserInput[] | Prisma.McpConnectionUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutUserInput | Prisma.McpConnectionCreateOrConnectWithoutUserInput[]
  upsert?: Prisma.McpConnectionUpsertWithWhereUniqueWithoutUserInput | Prisma.McpConnectionUpsertWithWhereUniqueWithoutUserInput[]
  createMany?: Prisma.McpConnectionCreateManyUserInputEnvelope
  set?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  disconnect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  delete?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  update?: Prisma.McpConnectionUpdateWithWhereUniqueWithoutUserInput | Prisma.McpConnectionUpdateWithWhereUniqueWithoutUserInput[]
  updateMany?: Prisma.McpConnectionUpdateManyWithWhereWithoutUserInput | Prisma.McpConnectionUpdateManyWithWhereWithoutUserInput[]
  deleteMany?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
}

export type McpConnectionCreateNestedManyWithoutOrganizationInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutOrganizationInput, Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput> | Prisma.McpConnectionCreateWithoutOrganizationInput[] | Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput | Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput[]
  createMany?: Prisma.McpConnectionCreateManyOrganizationInputEnvelope
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
}

export type McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutOrganizationInput, Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput> | Prisma.McpConnectionCreateWithoutOrganizationInput[] | Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput | Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput[]
  createMany?: Prisma.McpConnectionCreateManyOrganizationInputEnvelope
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
}

export type McpConnectionUpdateManyWithoutOrganizationNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutOrganizationInput, Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput> | Prisma.McpConnectionCreateWithoutOrganizationInput[] | Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput | Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput[]
  upsert?: Prisma.McpConnectionUpsertWithWhereUniqueWithoutOrganizationInput | Prisma.McpConnectionUpsertWithWhereUniqueWithoutOrganizationInput[]
  createMany?: Prisma.McpConnectionCreateManyOrganizationInputEnvelope
  set?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  disconnect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  delete?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  update?: Prisma.McpConnectionUpdateWithWhereUniqueWithoutOrganizationInput | Prisma.McpConnectionUpdateWithWhereUniqueWithoutOrganizationInput[]
  updateMany?: Prisma.McpConnectionUpdateManyWithWhereWithoutOrganizationInput | Prisma.McpConnectionUpdateManyWithWhereWithoutOrganizationInput[]
  deleteMany?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
}

export type McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutOrganizationInput, Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput> | Prisma.McpConnectionCreateWithoutOrganizationInput[] | Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput | Prisma.McpConnectionCreateOrConnectWithoutOrganizationInput[]
  upsert?: Prisma.McpConnectionUpsertWithWhereUniqueWithoutOrganizationInput | Prisma.McpConnectionUpsertWithWhereUniqueWithoutOrganizationInput[]
  createMany?: Prisma.McpConnectionCreateManyOrganizationInputEnvelope
  set?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  disconnect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  delete?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  update?: Prisma.McpConnectionUpdateWithWhereUniqueWithoutOrganizationInput | Prisma.McpConnectionUpdateWithWhereUniqueWithoutOrganizationInput[]
  updateMany?: Prisma.McpConnectionUpdateManyWithWhereWithoutOrganizationInput | Prisma.McpConnectionUpdateManyWithWhereWithoutOrganizationInput[]
  deleteMany?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
}

export type McpConnectionCreateNestedManyWithoutCatalogItemInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput> | Prisma.McpConnectionCreateWithoutCatalogItemInput[] | Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput | Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput[]
  createMany?: Prisma.McpConnectionCreateManyCatalogItemInputEnvelope
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
}

export type McpConnectionUncheckedCreateNestedManyWithoutCatalogItemInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput> | Prisma.McpConnectionCreateWithoutCatalogItemInput[] | Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput | Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput[]
  createMany?: Prisma.McpConnectionCreateManyCatalogItemInputEnvelope
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
}

export type McpConnectionUpdateManyWithoutCatalogItemNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput> | Prisma.McpConnectionCreateWithoutCatalogItemInput[] | Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput | Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput[]
  upsert?: Prisma.McpConnectionUpsertWithWhereUniqueWithoutCatalogItemInput | Prisma.McpConnectionUpsertWithWhereUniqueWithoutCatalogItemInput[]
  createMany?: Prisma.McpConnectionCreateManyCatalogItemInputEnvelope
  set?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  disconnect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  delete?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  update?: Prisma.McpConnectionUpdateWithWhereUniqueWithoutCatalogItemInput | Prisma.McpConnectionUpdateWithWhereUniqueWithoutCatalogItemInput[]
  updateMany?: Prisma.McpConnectionUpdateManyWithWhereWithoutCatalogItemInput | Prisma.McpConnectionUpdateManyWithWhereWithoutCatalogItemInput[]
  deleteMany?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
}

export type McpConnectionUncheckedUpdateManyWithoutCatalogItemNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput> | Prisma.McpConnectionCreateWithoutCatalogItemInput[] | Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput[]
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput | Prisma.McpConnectionCreateOrConnectWithoutCatalogItemInput[]
  upsert?: Prisma.McpConnectionUpsertWithWhereUniqueWithoutCatalogItemInput | Prisma.McpConnectionUpsertWithWhereUniqueWithoutCatalogItemInput[]
  createMany?: Prisma.McpConnectionCreateManyCatalogItemInputEnvelope
  set?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  disconnect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  delete?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  connect?: Prisma.McpConnectionWhereUniqueInput | Prisma.McpConnectionWhereUniqueInput[]
  update?: Prisma.McpConnectionUpdateWithWhereUniqueWithoutCatalogItemInput | Prisma.McpConnectionUpdateWithWhereUniqueWithoutCatalogItemInput[]
  updateMany?: Prisma.McpConnectionUpdateManyWithWhereWithoutCatalogItemInput | Prisma.McpConnectionUpdateManyWithWhereWithoutCatalogItemInput[]
  deleteMany?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
}

export type EnumMcpConnectionStatusFieldUpdateOperationsInput = {
  set?: $Enums.McpConnectionStatus
}

export type McpConnectionCreateNestedOneWithoutAgentsInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutAgentsInput, Prisma.McpConnectionUncheckedCreateWithoutAgentsInput>
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutAgentsInput
  connect?: Prisma.McpConnectionWhereUniqueInput
}

export type McpConnectionUpdateOneRequiredWithoutAgentsNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutAgentsInput, Prisma.McpConnectionUncheckedCreateWithoutAgentsInput>
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutAgentsInput
  upsert?: Prisma.McpConnectionUpsertWithoutAgentsInput
  connect?: Prisma.McpConnectionWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.McpConnectionUpdateToOneWithWhereWithoutAgentsInput, Prisma.McpConnectionUpdateWithoutAgentsInput>, Prisma.McpConnectionUncheckedUpdateWithoutAgentsInput>
}

export type McpConnectionCreateNestedOneWithoutExecutionLogsInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutExecutionLogsInput, Prisma.McpConnectionUncheckedCreateWithoutExecutionLogsInput>
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutExecutionLogsInput
  connect?: Prisma.McpConnectionWhereUniqueInput
}

export type McpConnectionUpdateOneRequiredWithoutExecutionLogsNestedInput = {
  create?: Prisma.XOR<Prisma.McpConnectionCreateWithoutExecutionLogsInput, Prisma.McpConnectionUncheckedCreateWithoutExecutionLogsInput>
  connectOrCreate?: Prisma.McpConnectionCreateOrConnectWithoutExecutionLogsInput
  upsert?: Prisma.McpConnectionUpsertWithoutExecutionLogsInput
  connect?: Prisma.McpConnectionWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.McpConnectionUpdateToOneWithWhereWithoutExecutionLogsInput, Prisma.McpConnectionUpdateWithoutExecutionLogsInput>, Prisma.McpConnectionUncheckedUpdateWithoutExecutionLogsInput>
}

export type McpConnectionCreateWithoutUserInput = {
  mcpConnectionId?: string
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  organization: Prisma.OrganizationCreateNestedOneWithoutMcpConnectionsInput
  catalogItem?: Prisma.McpServerCatalogItemCreateNestedOneWithoutConnectionsInput
  agents?: Prisma.AgentMcpConnectionCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUncheckedCreateWithoutUserInput = {
  mcpConnectionId?: string
  organizationId: string
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionCreateOrConnectWithoutUserInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutUserInput, Prisma.McpConnectionUncheckedCreateWithoutUserInput>
}

export type McpConnectionCreateManyUserInputEnvelope = {
  data: Prisma.McpConnectionCreateManyUserInput | Prisma.McpConnectionCreateManyUserInput[]
  skipDuplicates?: boolean
}

export type McpConnectionUpsertWithWhereUniqueWithoutUserInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  update: Prisma.XOR<Prisma.McpConnectionUpdateWithoutUserInput, Prisma.McpConnectionUncheckedUpdateWithoutUserInput>
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutUserInput, Prisma.McpConnectionUncheckedCreateWithoutUserInput>
}

export type McpConnectionUpdateWithWhereUniqueWithoutUserInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateWithoutUserInput, Prisma.McpConnectionUncheckedUpdateWithoutUserInput>
}

export type McpConnectionUpdateManyWithWhereWithoutUserInput = {
  where: Prisma.McpConnectionScalarWhereInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateManyMutationInput, Prisma.McpConnectionUncheckedUpdateManyWithoutUserInput>
}

export type McpConnectionScalarWhereInput = {
  AND?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
  OR?: Prisma.McpConnectionScalarWhereInput[]
  NOT?: Prisma.McpConnectionScalarWhereInput | Prisma.McpConnectionScalarWhereInput[]
  mcpConnectionId?: Prisma.StringFilter<"McpConnection"> | string
  organizationId?: Prisma.StringFilter<"McpConnection"> | string
  userId?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  catalogItemId?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  displayName?: Prisma.StringFilter<"McpConnection"> | string
  provider?: Prisma.StringFilter<"McpConnection"> | string
  mcpUrl?: Prisma.StringFilter<"McpConnection"> | string
  smitheryNamespace?: Prisma.StringFilter<"McpConnection"> | string
  smitheryConnectionId?: Prisma.StringFilter<"McpConnection"> | string
  status?: Prisma.EnumMcpConnectionStatusFilter<"McpConnection"> | $Enums.McpConnectionStatus
  setupUrl?: Prisma.StringNullableFilter<"McpConnection"> | string | null
  tools?: Prisma.JsonNullableFilter<"McpConnection">
  metadata?: Prisma.JsonNullableFilter<"McpConnection">
  lastSyncedAt?: Prisma.DateTimeNullableFilter<"McpConnection"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"McpConnection"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"McpConnection"> | Date | string
}

export type McpConnectionCreateWithoutOrganizationInput = {
  mcpConnectionId?: string
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  user?: Prisma.UserCreateNestedOneWithoutMcpConnectionsInput
  catalogItem?: Prisma.McpServerCatalogItemCreateNestedOneWithoutConnectionsInput
  agents?: Prisma.AgentMcpConnectionCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUncheckedCreateWithoutOrganizationInput = {
  mcpConnectionId?: string
  userId?: string | null
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionCreateOrConnectWithoutOrganizationInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutOrganizationInput, Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput>
}

export type McpConnectionCreateManyOrganizationInputEnvelope = {
  data: Prisma.McpConnectionCreateManyOrganizationInput | Prisma.McpConnectionCreateManyOrganizationInput[]
  skipDuplicates?: boolean
}

export type McpConnectionUpsertWithWhereUniqueWithoutOrganizationInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  update: Prisma.XOR<Prisma.McpConnectionUpdateWithoutOrganizationInput, Prisma.McpConnectionUncheckedUpdateWithoutOrganizationInput>
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutOrganizationInput, Prisma.McpConnectionUncheckedCreateWithoutOrganizationInput>
}

export type McpConnectionUpdateWithWhereUniqueWithoutOrganizationInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateWithoutOrganizationInput, Prisma.McpConnectionUncheckedUpdateWithoutOrganizationInput>
}

export type McpConnectionUpdateManyWithWhereWithoutOrganizationInput = {
  where: Prisma.McpConnectionScalarWhereInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateManyMutationInput, Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationInput>
}

export type McpConnectionCreateWithoutCatalogItemInput = {
  mcpConnectionId?: string
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  organization: Prisma.OrganizationCreateNestedOneWithoutMcpConnectionsInput
  user?: Prisma.UserCreateNestedOneWithoutMcpConnectionsInput
  agents?: Prisma.AgentMcpConnectionCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUncheckedCreateWithoutCatalogItemInput = {
  mcpConnectionId?: string
  organizationId: string
  userId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutMcpConnectionInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionCreateOrConnectWithoutCatalogItemInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput>
}

export type McpConnectionCreateManyCatalogItemInputEnvelope = {
  data: Prisma.McpConnectionCreateManyCatalogItemInput | Prisma.McpConnectionCreateManyCatalogItemInput[]
  skipDuplicates?: boolean
}

export type McpConnectionUpsertWithWhereUniqueWithoutCatalogItemInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  update: Prisma.XOR<Prisma.McpConnectionUpdateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedUpdateWithoutCatalogItemInput>
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedCreateWithoutCatalogItemInput>
}

export type McpConnectionUpdateWithWhereUniqueWithoutCatalogItemInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateWithoutCatalogItemInput, Prisma.McpConnectionUncheckedUpdateWithoutCatalogItemInput>
}

export type McpConnectionUpdateManyWithWhereWithoutCatalogItemInput = {
  where: Prisma.McpConnectionScalarWhereInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateManyMutationInput, Prisma.McpConnectionUncheckedUpdateManyWithoutCatalogItemInput>
}

export type McpConnectionCreateWithoutAgentsInput = {
  mcpConnectionId?: string
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  organization: Prisma.OrganizationCreateNestedOneWithoutMcpConnectionsInput
  user?: Prisma.UserCreateNestedOneWithoutMcpConnectionsInput
  catalogItem?: Prisma.McpServerCatalogItemCreateNestedOneWithoutConnectionsInput
  executionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUncheckedCreateWithoutAgentsInput = {
  mcpConnectionId?: string
  organizationId: string
  userId?: string | null
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  executionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionCreateOrConnectWithoutAgentsInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutAgentsInput, Prisma.McpConnectionUncheckedCreateWithoutAgentsInput>
}

export type McpConnectionUpsertWithoutAgentsInput = {
  update: Prisma.XOR<Prisma.McpConnectionUpdateWithoutAgentsInput, Prisma.McpConnectionUncheckedUpdateWithoutAgentsInput>
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutAgentsInput, Prisma.McpConnectionUncheckedCreateWithoutAgentsInput>
  where?: Prisma.McpConnectionWhereInput
}

export type McpConnectionUpdateToOneWithWhereWithoutAgentsInput = {
  where?: Prisma.McpConnectionWhereInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateWithoutAgentsInput, Prisma.McpConnectionUncheckedUpdateWithoutAgentsInput>
}

export type McpConnectionUpdateWithoutAgentsInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  organization?: Prisma.OrganizationUpdateOneRequiredWithoutMcpConnectionsNestedInput
  user?: Prisma.UserUpdateOneWithoutMcpConnectionsNestedInput
  catalogItem?: Prisma.McpServerCatalogItemUpdateOneWithoutConnectionsNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateWithoutAgentsInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  executionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionCreateWithoutExecutionLogsInput = {
  mcpConnectionId?: string
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  organization: Prisma.OrganizationCreateNestedOneWithoutMcpConnectionsInput
  user?: Prisma.UserCreateNestedOneWithoutMcpConnectionsInput
  catalogItem?: Prisma.McpServerCatalogItemCreateNestedOneWithoutConnectionsInput
  agents?: Prisma.AgentMcpConnectionCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionUncheckedCreateWithoutExecutionLogsInput = {
  mcpConnectionId?: string
  organizationId: string
  userId?: string | null
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutMcpConnectionInput
}

export type McpConnectionCreateOrConnectWithoutExecutionLogsInput = {
  where: Prisma.McpConnectionWhereUniqueInput
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutExecutionLogsInput, Prisma.McpConnectionUncheckedCreateWithoutExecutionLogsInput>
}

export type McpConnectionUpsertWithoutExecutionLogsInput = {
  update: Prisma.XOR<Prisma.McpConnectionUpdateWithoutExecutionLogsInput, Prisma.McpConnectionUncheckedUpdateWithoutExecutionLogsInput>
  create: Prisma.XOR<Prisma.McpConnectionCreateWithoutExecutionLogsInput, Prisma.McpConnectionUncheckedCreateWithoutExecutionLogsInput>
  where?: Prisma.McpConnectionWhereInput
}

export type McpConnectionUpdateToOneWithWhereWithoutExecutionLogsInput = {
  where?: Prisma.McpConnectionWhereInput
  data: Prisma.XOR<Prisma.McpConnectionUpdateWithoutExecutionLogsInput, Prisma.McpConnectionUncheckedUpdateWithoutExecutionLogsInput>
}

export type McpConnectionUpdateWithoutExecutionLogsInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  organization?: Prisma.OrganizationUpdateOneRequiredWithoutMcpConnectionsNestedInput
  user?: Prisma.UserUpdateOneWithoutMcpConnectionsNestedInput
  catalogItem?: Prisma.McpServerCatalogItemUpdateOneWithoutConnectionsNestedInput
  agents?: Prisma.AgentMcpConnectionUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateWithoutExecutionLogsInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionCreateManyUserInput = {
  mcpConnectionId?: string
  organizationId: string
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type McpConnectionUpdateWithoutUserInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  organization?: Prisma.OrganizationUpdateOneRequiredWithoutMcpConnectionsNestedInput
  catalogItem?: Prisma.McpServerCatalogItemUpdateOneWithoutConnectionsNestedInput
  agents?: Prisma.AgentMcpConnectionUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateWithoutUserInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateManyWithoutUserInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type McpConnectionCreateManyOrganizationInput = {
  mcpConnectionId?: string
  userId?: string | null
  catalogItemId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type McpConnectionUpdateWithoutOrganizationInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  user?: Prisma.UserUpdateOneWithoutMcpConnectionsNestedInput
  catalogItem?: Prisma.McpServerCatalogItemUpdateOneWithoutConnectionsNestedInput
  agents?: Prisma.AgentMcpConnectionUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateWithoutOrganizationInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateManyWithoutOrganizationInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  catalogItemId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type McpConnectionCreateManyCatalogItemInput = {
  mcpConnectionId?: string
  organizationId: string
  userId?: string | null
  displayName: string
  provider?: string
  mcpUrl: string
  smitheryNamespace: string
  smitheryConnectionId: string
  status?: $Enums.McpConnectionStatus
  setupUrl?: string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type McpConnectionUpdateWithoutCatalogItemInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  organization?: Prisma.OrganizationUpdateOneRequiredWithoutMcpConnectionsNestedInput
  user?: Prisma.UserUpdateOneWithoutMcpConnectionsNestedInput
  agents?: Prisma.AgentMcpConnectionUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateWithoutCatalogItemInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  agents?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutMcpConnectionNestedInput
  executionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutMcpConnectionNestedInput
}

export type McpConnectionUncheckedUpdateManyWithoutCatalogItemInput = {
  mcpConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  organizationId?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  displayName?: Prisma.StringFieldUpdateOperationsInput | string
  provider?: Prisma.StringFieldUpdateOperationsInput | string
  mcpUrl?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryNamespace?: Prisma.StringFieldUpdateOperationsInput | string
  smitheryConnectionId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumMcpConnectionStatusFieldUpdateOperationsInput | $Enums.McpConnectionStatus
  setupUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  tools?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type McpConnectionCountOutputType
 */

export type McpConnectionCountOutputType = {
  agents: number
  executionLogs: number
}

export type McpConnectionCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  agents?: boolean | McpConnectionCountOutputTypeCountAgentsArgs
  executionLogs?: boolean | McpConnectionCountOutputTypeCountExecutionLogsArgs
}

/**
 * McpConnectionCountOutputType without action
 */
export type McpConnectionCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnectionCountOutputType
   */
  select?: Prisma.McpConnectionCountOutputTypeSelect<ExtArgs> | null
}

/**
 * McpConnectionCountOutputType without action
 */
export type McpConnectionCountOutputTypeCountAgentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AgentMcpConnectionWhereInput
}

/**
 * McpConnectionCountOutputType without action
 */
export type McpConnectionCountOutputTypeCountExecutionLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.McpToolExecutionLogWhereInput
}


export type McpConnectionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  mcpConnectionId?: boolean
  organizationId?: boolean
  userId?: boolean
  catalogItemId?: boolean
  displayName?: boolean
  provider?: boolean
  mcpUrl?: boolean
  smitheryNamespace?: boolean
  smitheryConnectionId?: boolean
  status?: boolean
  setupUrl?: boolean
  tools?: boolean
  metadata?: boolean
  lastSyncedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  organization?: boolean | Prisma.OrganizationDefaultArgs<ExtArgs>
  user?: boolean | Prisma.McpConnection$userArgs<ExtArgs>
  catalogItem?: boolean | Prisma.McpConnection$catalogItemArgs<ExtArgs>
  agents?: boolean | Prisma.McpConnection$agentsArgs<ExtArgs>
  executionLogs?: boolean | Prisma.McpConnection$executionLogsArgs<ExtArgs>
  _count?: boolean | Prisma.McpConnectionCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["mcpConnection"]>

export type McpConnectionSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  mcpConnectionId?: boolean
  organizationId?: boolean
  userId?: boolean
  catalogItemId?: boolean
  displayName?: boolean
  provider?: boolean
  mcpUrl?: boolean
  smitheryNamespace?: boolean
  smitheryConnectionId?: boolean
  status?: boolean
  setupUrl?: boolean
  tools?: boolean
  metadata?: boolean
  lastSyncedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  organization?: boolean | Prisma.OrganizationDefaultArgs<ExtArgs>
  user?: boolean | Prisma.McpConnection$userArgs<ExtArgs>
  catalogItem?: boolean | Prisma.McpConnection$catalogItemArgs<ExtArgs>
}, ExtArgs["result"]["mcpConnection"]>

export type McpConnectionSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  mcpConnectionId?: boolean
  organizationId?: boolean
  userId?: boolean
  catalogItemId?: boolean
  displayName?: boolean
  provider?: boolean
  mcpUrl?: boolean
  smitheryNamespace?: boolean
  smitheryConnectionId?: boolean
  status?: boolean
  setupUrl?: boolean
  tools?: boolean
  metadata?: boolean
  lastSyncedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  organization?: boolean | Prisma.OrganizationDefaultArgs<ExtArgs>
  user?: boolean | Prisma.McpConnection$userArgs<ExtArgs>
  catalogItem?: boolean | Prisma.McpConnection$catalogItemArgs<ExtArgs>
}, ExtArgs["result"]["mcpConnection"]>

export type McpConnectionSelectScalar = {
  mcpConnectionId?: boolean
  organizationId?: boolean
  userId?: boolean
  catalogItemId?: boolean
  displayName?: boolean
  provider?: boolean
  mcpUrl?: boolean
  smitheryNamespace?: boolean
  smitheryConnectionId?: boolean
  status?: boolean
  setupUrl?: boolean
  tools?: boolean
  metadata?: boolean
  lastSyncedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type McpConnectionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"mcpConnectionId" | "organizationId" | "userId" | "catalogItemId" | "displayName" | "provider" | "mcpUrl" | "smitheryNamespace" | "smitheryConnectionId" | "status" | "setupUrl" | "tools" | "metadata" | "lastSyncedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["mcpConnection"]>
export type McpConnectionInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  organization?: boolean | Prisma.OrganizationDefaultArgs<ExtArgs>
  user?: boolean | Prisma.McpConnection$userArgs<ExtArgs>
  catalogItem?: boolean | Prisma.McpConnection$catalogItemArgs<ExtArgs>
  agents?: boolean | Prisma.McpConnection$agentsArgs<ExtArgs>
  executionLogs?: boolean | Prisma.McpConnection$executionLogsArgs<ExtArgs>
  _count?: boolean | Prisma.McpConnectionCountOutputTypeDefaultArgs<ExtArgs>
}
export type McpConnectionIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  organization?: boolean | Prisma.OrganizationDefaultArgs<ExtArgs>
  user?: boolean | Prisma.McpConnection$userArgs<ExtArgs>
  catalogItem?: boolean | Prisma.McpConnection$catalogItemArgs<ExtArgs>
}
export type McpConnectionIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  organization?: boolean | Prisma.OrganizationDefaultArgs<ExtArgs>
  user?: boolean | Prisma.McpConnection$userArgs<ExtArgs>
  catalogItem?: boolean | Prisma.McpConnection$catalogItemArgs<ExtArgs>
}

export type $McpConnectionPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "McpConnection"
  objects: {
    organization: Prisma.$OrganizationPayload<ExtArgs>
    user: Prisma.$UserPayload<ExtArgs> | null
    catalogItem: Prisma.$McpServerCatalogItemPayload<ExtArgs> | null
    agents: Prisma.$AgentMcpConnectionPayload<ExtArgs>[]
    executionLogs: Prisma.$McpToolExecutionLogPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    mcpConnectionId: string
    organizationId: string
    userId: string | null
    catalogItemId: string | null
    displayName: string
    provider: string
    mcpUrl: string
    smitheryNamespace: string
    smitheryConnectionId: string
    status: $Enums.McpConnectionStatus
    setupUrl: string | null
    tools: runtime.JsonValue | null
    metadata: runtime.JsonValue | null
    lastSyncedAt: Date | null
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["mcpConnection"]>
  composites: {}
}

export type McpConnectionGetPayload<S extends boolean | null | undefined | McpConnectionDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload, S>

export type McpConnectionCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<McpConnectionFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: McpConnectionCountAggregateInputType | true
  }

export interface McpConnectionDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['McpConnection'], meta: { name: 'McpConnection' } }
  /**
   * Find zero or one McpConnection that matches the filter.
   * @param {McpConnectionFindUniqueArgs} args - Arguments to find a McpConnection
   * @example
   * // Get one McpConnection
   * const mcpConnection = await prisma.mcpConnection.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends McpConnectionFindUniqueArgs>(args: Prisma.SelectSubset<T, McpConnectionFindUniqueArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find one McpConnection that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {McpConnectionFindUniqueOrThrowArgs} args - Arguments to find a McpConnection
   * @example
   * // Get one McpConnection
   * const mcpConnection = await prisma.mcpConnection.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends McpConnectionFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, McpConnectionFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first McpConnection that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionFindFirstArgs} args - Arguments to find a McpConnection
   * @example
   * // Get one McpConnection
   * const mcpConnection = await prisma.mcpConnection.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends McpConnectionFindFirstArgs>(args?: Prisma.SelectSubset<T, McpConnectionFindFirstArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first McpConnection that matches the filter or
   * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionFindFirstOrThrowArgs} args - Arguments to find a McpConnection
   * @example
   * // Get one McpConnection
   * const mcpConnection = await prisma.mcpConnection.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends McpConnectionFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, McpConnectionFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more McpConnections that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all McpConnections
   * const mcpConnections = await prisma.mcpConnection.findMany()
   * 
   * // Get first 10 McpConnections
   * const mcpConnections = await prisma.mcpConnection.findMany({ take: 10 })
   * 
   * // Only select the `mcpConnectionId`
   * const mcpConnectionWithMcpConnectionIdOnly = await prisma.mcpConnection.findMany({ select: { mcpConnectionId: true } })
   * 
   */
  findMany<T extends McpConnectionFindManyArgs>(args?: Prisma.SelectSubset<T, McpConnectionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

  /**
   * Create a McpConnection.
   * @param {McpConnectionCreateArgs} args - Arguments to create a McpConnection.
   * @example
   * // Create one McpConnection
   * const McpConnection = await prisma.mcpConnection.create({
   *   data: {
   *     // ... data to create a McpConnection
   *   }
   * })
   * 
   */
  create<T extends McpConnectionCreateArgs>(args: Prisma.SelectSubset<T, McpConnectionCreateArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Create many McpConnections.
   * @param {McpConnectionCreateManyArgs} args - Arguments to create many McpConnections.
   * @example
   * // Create many McpConnections
   * const mcpConnection = await prisma.mcpConnection.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *     
   */
  createMany<T extends McpConnectionCreateManyArgs>(args?: Prisma.SelectSubset<T, McpConnectionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create many McpConnections and returns the data saved in the database.
   * @param {McpConnectionCreateManyAndReturnArgs} args - Arguments to create many McpConnections.
   * @example
   * // Create many McpConnections
   * const mcpConnection = await prisma.mcpConnection.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many McpConnections and only return the `mcpConnectionId`
   * const mcpConnectionWithMcpConnectionIdOnly = await prisma.mcpConnection.createManyAndReturn({
   *   select: { mcpConnectionId: true },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  createManyAndReturn<T extends McpConnectionCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, McpConnectionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

  /**
   * Delete a McpConnection.
   * @param {McpConnectionDeleteArgs} args - Arguments to delete one McpConnection.
   * @example
   * // Delete one McpConnection
   * const McpConnection = await prisma.mcpConnection.delete({
   *   where: {
   *     // ... filter to delete one McpConnection
   *   }
   * })
   * 
   */
  delete<T extends McpConnectionDeleteArgs>(args: Prisma.SelectSubset<T, McpConnectionDeleteArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one McpConnection.
   * @param {McpConnectionUpdateArgs} args - Arguments to update one McpConnection.
   * @example
   * // Update one McpConnection
   * const mcpConnection = await prisma.mcpConnection.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends McpConnectionUpdateArgs>(args: Prisma.SelectSubset<T, McpConnectionUpdateArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Delete zero or more McpConnections.
   * @param {McpConnectionDeleteManyArgs} args - Arguments to filter McpConnections to delete.
   * @example
   * // Delete a few McpConnections
   * const { count } = await prisma.mcpConnection.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   * 
   */
  deleteMany<T extends McpConnectionDeleteManyArgs>(args?: Prisma.SelectSubset<T, McpConnectionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more McpConnections.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many McpConnections
   * const mcpConnection = await prisma.mcpConnection.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  updateMany<T extends McpConnectionUpdateManyArgs>(args: Prisma.SelectSubset<T, McpConnectionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more McpConnections and returns the data updated in the database.
   * @param {McpConnectionUpdateManyAndReturnArgs} args - Arguments to update many McpConnections.
   * @example
   * // Update many McpConnections
   * const mcpConnection = await prisma.mcpConnection.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more McpConnections and only return the `mcpConnectionId`
   * const mcpConnectionWithMcpConnectionIdOnly = await prisma.mcpConnection.updateManyAndReturn({
   *   select: { mcpConnectionId: true },
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  updateManyAndReturn<T extends McpConnectionUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, McpConnectionUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

  /**
   * Create or update one McpConnection.
   * @param {McpConnectionUpsertArgs} args - Arguments to update or create a McpConnection.
   * @example
   * // Update or create a McpConnection
   * const mcpConnection = await prisma.mcpConnection.upsert({
   *   create: {
   *     // ... data to create a McpConnection
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the McpConnection we want to update
   *   }
   * })
   */
  upsert<T extends McpConnectionUpsertArgs>(args: Prisma.SelectSubset<T, McpConnectionUpsertArgs<ExtArgs>>): Prisma.Prisma__McpConnectionClient<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


  /**
   * Count the number of McpConnections.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionCountArgs} args - Arguments to filter McpConnections to count.
   * @example
   * // Count the number of McpConnections
   * const count = await prisma.mcpConnection.count({
   *   where: {
   *     // ... the filter for the McpConnections we want to count
   *   }
   * })
  **/
  count<T extends McpConnectionCountArgs>(
    args?: Prisma.Subset<T, McpConnectionCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], McpConnectionCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a McpConnection.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
   * @example
   * // Ordered by age ascending
   * // Where email contains prisma.io
   * // Limited to the 10 users
   * const aggregations = await prisma.user.aggregate({
   *   _avg: {
   *     age: true,
   *   },
   *   where: {
   *     email: {
   *       contains: "prisma.io",
   *     },
   *   },
   *   orderBy: {
   *     age: "asc",
   *   },
   *   take: 10,
   * })
  **/
  aggregate<T extends McpConnectionAggregateArgs>(args: Prisma.Subset<T, McpConnectionAggregateArgs>): Prisma.PrismaPromise<GetMcpConnectionAggregateType<T>>

  /**
   * Group by McpConnection.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {McpConnectionGroupByArgs} args - Group by arguments.
   * @example
   * // Group by city, order by createdAt, get count
   * const result = await prisma.user.groupBy({
   *   by: ['city', 'createdAt'],
   *   orderBy: {
   *     createdAt: true
   *   },
   *   _count: {
   *     _all: true
   *   },
   * })
   * 
  **/
  groupBy<
    T extends McpConnectionGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: McpConnectionGroupByArgs['orderBy'] }
      : { orderBy?: McpConnectionGroupByArgs['orderBy'] },
    OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
    ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
    ByValid extends Prisma.Has<ByFields, OrderFields>,
    HavingFields extends Prisma.GetHavingFields<T['having']>,
    HavingValid extends Prisma.Has<ByFields, HavingFields>,
    ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
    InputErrors extends ByEmpty extends Prisma.True
    ? `Error: "by" must not be empty.`
    : HavingValid extends Prisma.False
    ? {
        [P in HavingFields]: P extends ByFields
          ? never
          : P extends string
          ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
          : [
              Error,
              'Field ',
              P,
              ` in "having" needs to be provided in "by"`,
            ]
      }[HavingFields]
    : 'take' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "take", you also need to provide "orderBy"'
    : 'skip' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "skip", you also need to provide "orderBy"'
    : ByValid extends Prisma.True
    ? {}
    : {
        [P in OrderFields]: P extends ByFields
          ? never
          : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
      }[OrderFields]
  >(args: Prisma.SubsetIntersection<T, McpConnectionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetMcpConnectionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the McpConnection model
 */
readonly fields: McpConnectionFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for McpConnection.
 * Why is this prefixed with `Prisma__`?
 * Because we want to prevent naming conflicts as mentioned in
 * https://github.com/prisma/prisma-client-js/issues/707
 */
export interface Prisma__McpConnectionClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  organization<T extends Prisma.OrganizationDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.OrganizationDefaultArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  user<T extends Prisma.McpConnection$userArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.McpConnection$userArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  catalogItem<T extends Prisma.McpConnection$catalogItemArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.McpConnection$catalogItemArgs<ExtArgs>>): Prisma.Prisma__McpServerCatalogItemClient<runtime.Types.Result.GetResult<Prisma.$McpServerCatalogItemPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  agents<T extends Prisma.McpConnection$agentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.McpConnection$agentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentMcpConnectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  executionLogs<T extends Prisma.McpConnection$executionLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.McpConnection$executionLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpToolExecutionLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the McpConnection model
 */
export interface McpConnectionFieldRefs {
  readonly mcpConnectionId: Prisma.FieldRef<"McpConnection", 'String'>
  readonly organizationId: Prisma.FieldRef<"McpConnection", 'String'>
  readonly userId: Prisma.FieldRef<"McpConnection", 'String'>
  readonly catalogItemId: Prisma.FieldRef<"McpConnection", 'String'>
  readonly displayName: Prisma.FieldRef<"McpConnection", 'String'>
  readonly provider: Prisma.FieldRef<"McpConnection", 'String'>
  readonly mcpUrl: Prisma.FieldRef<"McpConnection", 'String'>
  readonly smitheryNamespace: Prisma.FieldRef<"McpConnection", 'String'>
  readonly smitheryConnectionId: Prisma.FieldRef<"McpConnection", 'String'>
  readonly status: Prisma.FieldRef<"McpConnection", 'McpConnectionStatus'>
  readonly setupUrl: Prisma.FieldRef<"McpConnection", 'String'>
  readonly tools: Prisma.FieldRef<"McpConnection", 'Json'>
  readonly metadata: Prisma.FieldRef<"McpConnection", 'Json'>
  readonly lastSyncedAt: Prisma.FieldRef<"McpConnection", 'DateTime'>
  readonly createdAt: Prisma.FieldRef<"McpConnection", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"McpConnection", 'DateTime'>
}
    

// Custom InputTypes
/**
 * McpConnection findUnique
 */
export type McpConnectionFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * Filter, which McpConnection to fetch.
   */
  where: Prisma.McpConnectionWhereUniqueInput
}

/**
 * McpConnection findUniqueOrThrow
 */
export type McpConnectionFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * Filter, which McpConnection to fetch.
   */
  where: Prisma.McpConnectionWhereUniqueInput
}

/**
 * McpConnection findFirst
 */
export type McpConnectionFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * Filter, which McpConnection to fetch.
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of McpConnections to fetch.
   */
  orderBy?: Prisma.McpConnectionOrderByWithRelationInput | Prisma.McpConnectionOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for McpConnections.
   */
  cursor?: Prisma.McpConnectionWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` McpConnections from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` McpConnections.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of McpConnections.
   */
  distinct?: Prisma.McpConnectionScalarFieldEnum | Prisma.McpConnectionScalarFieldEnum[]
}

/**
 * McpConnection findFirstOrThrow
 */
export type McpConnectionFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * Filter, which McpConnection to fetch.
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of McpConnections to fetch.
   */
  orderBy?: Prisma.McpConnectionOrderByWithRelationInput | Prisma.McpConnectionOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for McpConnections.
   */
  cursor?: Prisma.McpConnectionWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` McpConnections from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` McpConnections.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of McpConnections.
   */
  distinct?: Prisma.McpConnectionScalarFieldEnum | Prisma.McpConnectionScalarFieldEnum[]
}

/**
 * McpConnection findMany
 */
export type McpConnectionFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * Filter, which McpConnections to fetch.
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of McpConnections to fetch.
   */
  orderBy?: Prisma.McpConnectionOrderByWithRelationInput | Prisma.McpConnectionOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing McpConnections.
   */
  cursor?: Prisma.McpConnectionWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` McpConnections from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` McpConnections.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of McpConnections.
   */
  distinct?: Prisma.McpConnectionScalarFieldEnum | Prisma.McpConnectionScalarFieldEnum[]
}

/**
 * McpConnection create
 */
export type McpConnectionCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * The data needed to create a McpConnection.
   */
  data: Prisma.XOR<Prisma.McpConnectionCreateInput, Prisma.McpConnectionUncheckedCreateInput>
}

/**
 * McpConnection createMany
 */
export type McpConnectionCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many McpConnections.
   */
  data: Prisma.McpConnectionCreateManyInput | Prisma.McpConnectionCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * McpConnection createManyAndReturn
 */
export type McpConnectionCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * The data used to create many McpConnections.
   */
  data: Prisma.McpConnectionCreateManyInput | Prisma.McpConnectionCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * McpConnection update
 */
export type McpConnectionUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * The data needed to update a McpConnection.
   */
  data: Prisma.XOR<Prisma.McpConnectionUpdateInput, Prisma.McpConnectionUncheckedUpdateInput>
  /**
   * Choose, which McpConnection to update.
   */
  where: Prisma.McpConnectionWhereUniqueInput
}

/**
 * McpConnection updateMany
 */
export type McpConnectionUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update McpConnections.
   */
  data: Prisma.XOR<Prisma.McpConnectionUpdateManyMutationInput, Prisma.McpConnectionUncheckedUpdateManyInput>
  /**
   * Filter which McpConnections to update
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * Limit how many McpConnections to update.
   */
  limit?: number
}

/**
 * McpConnection updateManyAndReturn
 */
export type McpConnectionUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * The data used to update McpConnections.
   */
  data: Prisma.XOR<Prisma.McpConnectionUpdateManyMutationInput, Prisma.McpConnectionUncheckedUpdateManyInput>
  /**
   * Filter which McpConnections to update
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * Limit how many McpConnections to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * McpConnection upsert
 */
export type McpConnectionUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * The filter to search for the McpConnection to update in case it exists.
   */
  where: Prisma.McpConnectionWhereUniqueInput
  /**
   * In case the McpConnection found by the `where` argument doesn't exist, create a new McpConnection with this data.
   */
  create: Prisma.XOR<Prisma.McpConnectionCreateInput, Prisma.McpConnectionUncheckedCreateInput>
  /**
   * In case the McpConnection was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.McpConnectionUpdateInput, Prisma.McpConnectionUncheckedUpdateInput>
}

/**
 * McpConnection delete
 */
export type McpConnectionDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  /**
   * Filter which McpConnection to delete.
   */
  where: Prisma.McpConnectionWhereUniqueInput
}

/**
 * McpConnection deleteMany
 */
export type McpConnectionDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which McpConnections to delete
   */
  where?: Prisma.McpConnectionWhereInput
  /**
   * Limit how many McpConnections to delete.
   */
  limit?: number
}

/**
 * McpConnection.user
 */
export type McpConnection$userArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  where?: Prisma.UserWhereInput
}

/**
 * McpConnection.catalogItem
 */
export type McpConnection$catalogItemArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpServerCatalogItem
   */
  select?: Prisma.McpServerCatalogItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpServerCatalogItem
   */
  omit?: Prisma.McpServerCatalogItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpServerCatalogItemInclude<ExtArgs> | null
  where?: Prisma.McpServerCatalogItemWhereInput
}

/**
 * McpConnection.agents
 */
export type McpConnection$agentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the AgentMcpConnection
   */
  select?: Prisma.AgentMcpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the AgentMcpConnection
   */
  omit?: Prisma.AgentMcpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AgentMcpConnectionInclude<ExtArgs> | null
  where?: Prisma.AgentMcpConnectionWhereInput
  orderBy?: Prisma.AgentMcpConnectionOrderByWithRelationInput | Prisma.AgentMcpConnectionOrderByWithRelationInput[]
  cursor?: Prisma.AgentMcpConnectionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AgentMcpConnectionScalarFieldEnum | Prisma.AgentMcpConnectionScalarFieldEnum[]
}

/**
 * McpConnection.executionLogs
 */
export type McpConnection$executionLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpToolExecutionLog
   */
  select?: Prisma.McpToolExecutionLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpToolExecutionLog
   */
  omit?: Prisma.McpToolExecutionLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpToolExecutionLogInclude<ExtArgs> | null
  where?: Prisma.McpToolExecutionLogWhereInput
  orderBy?: Prisma.McpToolExecutionLogOrderByWithRelationInput | Prisma.McpToolExecutionLogOrderByWithRelationInput[]
  cursor?: Prisma.McpToolExecutionLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.McpToolExecutionLogScalarFieldEnum | Prisma.McpToolExecutionLogScalarFieldEnum[]
}

/**
 * McpConnection without action
 */
export type McpConnectionDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
}
