spec

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MCPSchemaVersion = "2026-05-30"

	MCPStoreFileName            = "mcpservers.json"
	MCPBuiltInOverlayDBFileName = "mcpbuiltin.overlay.sqlite"
	DefaultConnectTimeoutMS     = 30_000
	DefaultRequestTimeoutMS     = 60_000

	MaxMCPServerPageSize = 256
	DefaultMCPPageSize   = 25

	MCPHostName    = "FlexiGPT"
	MCPHostVersion = "dev"

	// DefaultInteractiveOAuthTimeout bounds the connect step for the interactive
	// OAuth 2.1 authorization-code flow, where a human may need to complete a
	// browser login. Non-interactive flows (client_credentials, none, stdio) use
	// the regular configured connect timeout.
	DefaultInteractiveOAuthTimeout = 10 * time.Minute

	NotificationRefreshDebounce = 1 * time.Second

	BaseMCPBundleID          bundleitemutils.BundleID   = "019e785b-2b96-7ecc-a1c2-9b2bac90e08c"
	BaseMCPBundleSlug        bundleitemutils.BundleSlug = "base"
	BaseMCPBundleDisplayName                            = "Base MCP Servers"
	BaseMCPBundleDescription                            = "Editable starter bundle for custom MCP servers."
)
View Source
const SecretRefVersion = "mcpv1"

Variables

View Source
var (
	ErrMCPBundleNotFound         = errors.New("mcp bundle not found")
	ErrMCPBundleDisabled         = errors.New("mcp bundle is disabled")
	ErrMCPBundleDeleting         = errors.New("mcp bundle is being deleted")
	ErrMCPBundleNotEmpty         = errors.New("mcp bundle still contains servers")
	ErrMCPReservedBundleReadOnly = errors.New("reserved mcp bundle metadata is read-only")
	ErrMCPBuiltInReadOnly        = errors.New("built-in mcp resource is read-only")

	ErrMCPInvalidRequest  = errors.New("invalid mcp request")
	ErrMCPConflict        = errors.New("mcp resource already exists")
	ErrMCPServerNotFound  = errors.New("mcp server not found")
	ErrMCPServerDisabled  = errors.New("mcp server is disabled")
	ErrMCPRuntimeNotReady = errors.New("mcp runtime is not ready")
	ErrMCPAuthRequired    = errors.New("mcp authorization required")
	ErrMCPPolicyDenied    = errors.New("mcp policy denied request")
	ErrMCPApprovalNeeded  = errors.New("mcp approval required")
	ErrMCPStaleReference  = errors.New("mcp stale reference")
)

Functions

This section is empty.

Types

type AllMCPBundles

type AllMCPBundles struct {
	Bundles map[bundleitemutils.BundleID]MCPBundle `json:"bundles"`
}

type CancelPendingMCPOAuthAuthorizationRequest

type CancelPendingMCPOAuthAuthorizationRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type CancelPendingMCPOAuthAuthorizationResponse

type CancelPendingMCPOAuthAuthorizationResponse struct{}

type ConnectMCPServerRequest

type ConnectMCPServerRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type ConnectMCPServerResponse

type ConnectMCPServerResponse struct {
	Body *MCPServerRuntimeSnapshot
}

type DeleteMCPBundleRequest

type DeleteMCPBundleRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
}

type DeleteMCPBundleResponse

type DeleteMCPBundleResponse struct{}

type DeleteMCPServerRequest

type DeleteMCPServerRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type DeleteMCPServerResponse

type DeleteMCPServerResponse struct{}

type DeleteMCPServerSecretRequest

type DeleteMCPServerSecretRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Kind MCPSecretKind `required:"true" query:"kind"`
	Slot string        `required:"true" query:"slot"`
}

type DeleteMCPServerSecretResponse

type DeleteMCPServerSecretResponse struct{}

type DisconnectMCPServerRequest

type DisconnectMCPServerRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type DisconnectMCPServerResponse

type DisconnectMCPServerResponse struct{}

type EvaluateMCPToolCallRequest

type EvaluateMCPToolCallRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *InvokeMCPToolRequestBody
}

type EvaluateMCPToolCallResponse

type EvaluateMCPToolCallResponse struct {
	Body *MCPApprovalEvaluation
}

type GetMCPServerAuthHealthRequest

type GetMCPServerAuthHealthRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type GetMCPServerAuthHealthResponse

type GetMCPServerAuthHealthResponse struct {
	Body *MCPAuthHealth
}

type GetMCPServerAuthStatusRequest

type GetMCPServerAuthStatusRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type GetMCPServerAuthStatusResponse

type GetMCPServerAuthStatusResponse struct {
	Body *MCPAuthStatus
}

type GetMCPServerRequest

type GetMCPServerRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type GetMCPServerResponse

type GetMCPServerResponse struct {
	Body *MCPServerConfig
}

type GetMCPServerStatusRequest

type GetMCPServerStatusRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type GetMCPServerStatusResponse

type GetMCPServerStatusResponse struct {
	Body *MCPServerRuntimeSnapshot
}

type GetMCPSettingsRequest added in v0.1.13

type GetMCPSettingsRequest struct{}

type GetMCPSettingsResponse added in v0.1.13

type GetMCPSettingsResponse struct {
	Body *MCPSettingsView
}

type GrantType

type GrantType string
const (
	GrantTypeAuthorizationCode GrantType = "authorization_code"
	GrantTypeRefreshToken      GrantType = "refresh_token"
)

type InvokeMCPToolRequest

type InvokeMCPToolRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *InvokeMCPToolRequestBody
}

type InvokeMCPToolRequestBody

type InvokeMCPToolRequestBody struct {
	Source           MCPInvocationSource `json:"source"                     required:"true"`
	ToolName         string              `json:"toolName"                   required:"true"`
	ProviderToolName string              `json:"providerToolName,omitempty"`
	ToolDigest       string              `json:"toolDigest,omitempty"`

	Arguments map[string]any `json:"arguments,omitempty"`

	ApprovalID    string `json:"approvalID,omitempty"`
	ApprovalToken string `json:"approvalToken,omitempty"`

	ConversationID string `json:"conversationID,omitempty"`
	MessageID      string `json:"messageID,omitempty"`
	ToolUseID      string `json:"toolUseID,omitempty"`

	AppInstanceID string `json:"appInstanceID,omitempty"`
}

type InvokeMCPToolResponse

type InvokeMCPToolResponse struct {
	Body *InvokeMCPToolResponseBody
}

type InvokeMCPToolResponseBody

type InvokeMCPToolResponseBody struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`

	ToolName         string `json:"toolName"`
	ProviderToolName string `json:"providerToolName,omitempty"`

	Content           []MCPContent `json:"content,omitempty"`
	StructuredContent any          `json:"structuredContent,omitempty"`
	IsError           bool         `json:"isError,omitempty"`

	Provenance MCPToolCallProvenance `json:"provenance"`
	App        *MCPToolAppRenderInfo `json:"app,omitempty"`
}

type JSONRawString

type JSONRawString = string

type ListMCPBundlesRequest

type ListMCPBundlesRequest struct {
	BundleIDs       []bundleitemutils.BundleID `query:"bundleIDs"`
	IncludeDisabled bool                       `query:"includeDisabled"`
	PageSize        int                        `query:"pageSize"`
	PageToken       string                     `query:"pageToken"`
}

type ListMCPBundlesResponse

type ListMCPBundlesResponse struct {
	Body *ListMCPBundlesResponseBody
}

type ListMCPBundlesResponseBody

type ListMCPBundlesResponseBody struct {
	Bundles       []MCPBundle `json:"bundles"`
	NextPageToken *string     `json:"nextPageToken,omitempty"`
}

type ListMCPServerPromptsRequest

type ListMCPServerPromptsRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	PageSize  int    `query:"pageSize"`
	PageToken string `query:"pageToken"`
}

type ListMCPServerPromptsResponse

type ListMCPServerPromptsResponse struct {
	Body *ListMCPServerPromptsResponseBody
}

type ListMCPServerPromptsResponseBody

type ListMCPServerPromptsResponseBody struct {
	Prompts       []MCPPromptRef `json:"prompts"`
	NextPageToken *string        `json:"nextPageToken,omitempty"`
}

type ListMCPServerResourceTemplatesRequest

type ListMCPServerResourceTemplatesRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	PageSize  int    `query:"pageSize"`
	PageToken string `query:"pageToken"`
}

type ListMCPServerResourceTemplatesResponse

type ListMCPServerResourceTemplatesResponse struct {
	Body *ListMCPServerResourceTemplatesResponseBody
}

type ListMCPServerResourceTemplatesResponseBody

type ListMCPServerResourceTemplatesResponseBody struct {
	ResourceTemplates []MCPResourceTemplateRef `json:"resourceTemplates"`
	NextPageToken     *string                  `json:"nextPageToken,omitempty"`
}

type ListMCPServerResourcesRequest

type ListMCPServerResourcesRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	PageSize  int    `query:"pageSize"`
	PageToken string `query:"pageToken"`
}

type ListMCPServerResourcesResponse

type ListMCPServerResourcesResponse struct {
	Body *ListMCPServerResourcesResponseBody
}

type ListMCPServerResourcesResponseBody

type ListMCPServerResourcesResponseBody struct {
	Resources     []MCPResourceRef `json:"resources"`
	NextPageToken *string          `json:"nextPageToken,omitempty"`
}

type ListMCPServerToolsRequest

type ListMCPServerToolsRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	PageSize  int    `query:"pageSize"`
	PageToken string `query:"pageToken"`
}

type ListMCPServerToolsResponse

type ListMCPServerToolsResponse struct {
	Body *ListMCPServerToolsResponseBody
}

type ListMCPServerToolsResponseBody

type ListMCPServerToolsResponseBody struct {
	Tools         []MCPToolCapability `json:"tools"`
	NextPageToken *string             `json:"nextPageToken,omitempty"`
}

type ListMCPServersRequest

type ListMCPServersRequest struct {
	BundleID        bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerIDs       []MCPServerID            `                                query:"serverIDs"`
	Enabled         *bool                    `                                query:"enabled"`
	IncludeDisabled bool                     `                                query:"includeDisabled"`
	PageSize        int                      `                                query:"pageSize"`
	PageToken       string                   `                                query:"pageToken"`
}

type ListMCPServersResponse

type ListMCPServersResponse struct {
	Body *ListMCPServersResponseBody
}

type ListMCPServersResponseBody

type ListMCPServersResponseBody struct {
	Servers       []MCPServerConfig `json:"servers"`
	NextPageToken *string           `json:"nextPageToken,omitempty"`
}

type ListPendingMCPOAuthAuthorizationsRequest

type ListPendingMCPOAuthAuthorizationsRequest struct{}

type ListPendingMCPOAuthAuthorizationsResponse

type ListPendingMCPOAuthAuthorizationsResponse struct {
	Body *ListPendingMCPOAuthAuthorizationsResponseBody
}

type ListPendingMCPOAuthAuthorizationsResponseBody

type ListPendingMCPOAuthAuthorizationsResponseBody struct {
	Authorizations []MCPOAuthAuthorization `json:"authorizations"`
}

type MCPAppModelContextUpdate

type MCPAppModelContextUpdate struct {
	InstanceID string                   `json:"instanceID,omitempty"`
	BundleID   bundleitemutils.BundleID `json:"bundleID,omitempty"`
	ServerID   MCPServerID              `json:"serverID,omitempty"`

	ResourceURI string `json:"resourceUri,omitempty"`

	Content           []MCPContent `json:"content,omitempty"`
	StructuredContent any          `json:"structuredContent,omitempty"`

	UpdatedAt string `json:"updatedAt,omitempty"`
}

type MCPApprovalDecision

type MCPApprovalDecision string
const (
	MCPApprovalDecisionAllowed          MCPApprovalDecision = "allowed"
	MCPApprovalDecisionDenied           MCPApprovalDecision = "denied"
	MCPApprovalDecisionApprovalRequired MCPApprovalDecision = "approvalRequired"
)

type MCPApprovalEvaluation

type MCPApprovalEvaluation struct {
	Decision   MCPApprovalDecision `json:"decision"`
	Reason     string              `json:"reason,omitempty"`
	ApprovalID string              `json:"approvalID,omitempty"`
	Summary    *MCPApprovalSummary `json:"summary,omitempty"`
}

type MCPApprovalResolution

type MCPApprovalResolution string
const (
	MCPApprovalResolutionAllowOnce   MCPApprovalResolution = "allowOnce"
	MCPApprovalResolutionAllowAlways MCPApprovalResolution = "allowAlways"
	MCPApprovalResolutionDenyOnce    MCPApprovalResolution = "denyOnce"
	MCPApprovalResolutionDenyAlways  MCPApprovalResolution = "denyAlways"
)

type MCPApprovalRule

type MCPApprovalRule string
const (
	MCPApprovalRuleAsk   MCPApprovalRule = "ask"
	MCPApprovalRuleAllow MCPApprovalRule = "allow"
	MCPApprovalRuleDeny  MCPApprovalRule = "deny"
)

type MCPApprovalSummary

type MCPApprovalSummary struct {
	BundleID          bundleitemutils.BundleID `json:"bundleID"`
	ServerID          MCPServerID              `json:"serverID"`
	ServerDisplayName string                   `json:"serverDisplayName,omitempty"`
	ToolName          string                   `json:"toolName"`
	ToolDigest        string                   `json:"toolDigest,omitempty"`
	Risk              MCPToolRisk              `json:"risk"`
	Arguments         JSONRawString            `json:"arguments,omitempty"`
}

type MCPApprovalToken

type MCPApprovalToken struct {
	ApprovalID string `json:"approvalID"`
	Token      string `json:"token"`
	ExpiresAt  string `json:"expiresAt"`
}

type MCPAppsPolicy

type MCPAppsPolicy struct {
	Enabled                          bool `json:"enabled"`
	AllowAppInitiatedToolCalls       bool `json:"allowAppInitiatedToolCalls"`
	RequireApprovalForOpenLink       bool `json:"requireApprovalForOpenLink"`
	RequireApprovalForContextUpdates bool `json:"requireApprovalForContextUpdates"`
}

type MCPArgumentDefinition

type MCPArgumentDefinition struct {
	Name        string `json:"name"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Required    bool   `json:"required,omitempty"`
}

type MCPAuthHealth

type MCPAuthHealth struct {
	BundleID bundleitemutils.BundleID `json:"bundleID,omitempty"`

	ServerID MCPServerID        `json:"serverID"`
	AuthMode MCPHTTPAuthMode    `json:"authMode"`
	State    MCPAuthHealthState `json:"state"`

	Configured bool `json:"configured"`

	Resource  string     `json:"resource,omitempty"`
	Scopes    []string   `json:"scopes,omitempty"`
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	AuthorizationPending   bool   `json:"authorizationPending,omitempty"`
	AuthorizationURL       string `json:"authorizationURL,omitempty"`
	AuthorizationExpiresAt string `json:"authorizationExpiresAt,omitempty"`

	OAuthRedirectURL        string `json:"oauthRedirectURL,omitempty"`
	OAuthLoopbackListenAddr string `json:"oauthLoopbackListenAddr,omitempty"`

	LastError string `json:"lastError,omitempty"`
}

type MCPAuthHealthState

type MCPAuthHealthState string
const (
	MCPAuthHealthStateNotRequired          MCPAuthHealthState = "notRequired"
	MCPAuthHealthStateNotConfigured        MCPAuthHealthState = "notConfigured"
	MCPAuthHealthStateAuthorizationNeeded  MCPAuthHealthState = "authorizationNeeded"
	MCPAuthHealthStateAuthorizationPending MCPAuthHealthState = "authorizationPending"
	MCPAuthHealthStateAuthorized           MCPAuthHealthState = "authorized"
	MCPAuthHealthStateExpired              MCPAuthHealthState = "expired"
	MCPAuthHealthStateInsufficientScope    MCPAuthHealthState = "insufficientScope"
	MCPAuthHealthStateError                MCPAuthHealthState = "error"
)

type MCPAuthState

type MCPAuthState string
const (
	MCPAuthStateNotRequired       MCPAuthState = "notRequired"
	MCPAuthStateRequired          MCPAuthState = "required"
	MCPAuthStateAuthorized        MCPAuthState = "authorized"
	MCPAuthStateExpired           MCPAuthState = "expired"
	MCPAuthStateInsufficientScope MCPAuthState = "insufficientScope"
	MCPAuthStateError             MCPAuthState = "error"
)

type MCPAuthStatus

type MCPAuthStatus struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`
	AuthMode MCPHTTPAuthMode          `json:"authMode"`
	State    MCPAuthState             `json:"state"`

	Scopes              []string   `json:"scopes,omitempty"`
	ExpiresAt           *time.Time `json:"expiresAt,omitempty"`
	LastError           string     `json:"lastError,omitempty"`
	AuthorizationServer string     `json:"authorizationServer,omitempty"`
	Resource            string     `json:"resource,omitempty"`
}

type MCPBuiltInServerOverlay added in v0.1.13

type MCPBuiltInServerOverlay struct {
	Stdio          *MCPStdioConfigOverlay          `json:"stdio,omitempty"`
	StreamableHTTP *MCPStreamableHTTPConfigOverlay `json:"streamableHttp,omitempty"`
}

MCPBuiltInServerOverlay is user-owned runtime config layered on top of a read-only built-in server. Secret values are referenced, not inlined.

type MCPBundle

type MCPBundle struct {
	SchemaVersion string                     `json:"schemaVersion"`
	ID            bundleitemutils.BundleID   `json:"id"`
	Slug          bundleitemutils.BundleSlug `json:"slug"`

	DisplayName string `json:"displayName,omitempty"`
	Description string `json:"description,omitempty"`

	IsEnabled     bool       `json:"isEnabled"`
	CreatedAt     time.Time  `json:"createdAt"`
	ModifiedAt    time.Time  `json:"modifiedAt"`
	IsBuiltIn     bool       `json:"isBuiltIn"`
	SoftDeletedAt *time.Time `json:"softDeletedAt,omitempty"`
}

type MCPBundlePageToken

type MCPBundlePageToken struct {
	BundleIDs       []bundleitemutils.BundleID `json:"ids,omitempty"`
	IncludeDisabled bool                       `json:"d,omitempty"`
	PageSize        int                        `json:"s"`
	CursorMod       string                     `json:"t,omitempty"`
	CursorID        bundleitemutils.BundleID   `json:"id,omitempty"`
}

type MCPCompleteArgumentRequest

type MCPCompleteArgumentRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *MCPCompleteArgumentRequestBody
}

type MCPCompleteArgumentRequestBody

type MCPCompleteArgumentRequestBody struct {
	RefType       string            `json:"refType"                 required:"true"` // resource | prompt
	Name          string            `json:"name"                    required:"true"`
	ArgumentName  string            `json:"argumentName"            required:"true"`
	ArgumentValue string            `json:"argumentValue,omitempty"`
	Context       map[string]string `json:"context,omitempty"`
}

type MCPCompletionResult

type MCPCompletionResult struct {
	Values  []string `json:"values,omitempty"`
	Total   int      `json:"total,omitempty"`
	HasMore bool     `json:"hasMore,omitempty"`
}

type MCPContent

type MCPContent struct {
	Type MCPContentType `json:"type"`

	Text     string `json:"text,omitempty"`
	Data     []byte `json:"data,omitempty"`
	MIMEType string `json:"mimeType,omitempty"`

	URI         string `json:"uri,omitempty"`
	Name        string `json:"name,omitempty"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Size        *int64 `json:"size,omitempty"`

	Resource *MCPResourceContents `json:"resource,omitempty"`

	Annotations map[string]any `json:"annotations,omitempty"`
	Meta        map[string]any `json:"_meta,omitempty"`
	Icons       []MCPIcon      `json:"icons,omitempty"`
}

type MCPContentType

type MCPContentType string
const (
	MCPContentTypeText         MCPContentType = "text"
	MCPContentTypeImage        MCPContentType = "image"
	MCPContentTypeAudio        MCPContentType = "audio"
	MCPContentTypeResourceLink MCPContentType = "resource_link"
	MCPContentTypeResource     MCPContentType = "resource"
)

type MCPConversationContext

type MCPConversationContext struct {
	Servers           []MCPServerSelection           `json:"servers"`
	Resources         []MCPResourceRef               `json:"resources,omitempty"`
	ResourceTemplates []MCPResourceTemplateSelection `json:"resourceTemplates,omitempty"`
	Prompts           []MCPPromptSelection           `json:"prompts,omitempty"`
}

type MCPDiscoveryPageToken

type MCPDiscoveryPageToken struct {
	BundleID       bundleitemutils.BundleID `json:"bid"`
	ServerID       MCPServerID              `json:"sid"`
	SnapshotDigest string                   `json:"dig"`
	Kind           string                   `json:"k"`
	PageSize       int                      `json:"ps"`
	Index          int                      `json:"i"`
}

MCPDiscoveryPageToken is an opaque cursor for paginating cached discovery snapshots. It is encoded as base64(JSON) and should not be interpreted by callers.

type MCPDiscoverySnapshot

type MCPDiscoverySnapshot struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`

	NegotiatedProtocolVersion string                        `json:"negotiatedProtocolVersion,omitempty"`
	ServerInfo                *MCPImplementationInfo        `json:"serverInfo,omitempty"`
	ServerCapabilities        *MCPServerCapabilitiesSummary `json:"serverCapabilities,omitempty"`
	Instructions              string                        `json:"instructions,omitempty"`

	Tools             []MCPToolCapability      `json:"tools,omitempty"`
	Resources         []MCPResourceRef         `json:"resources,omitempty"`
	ResourceTemplates []MCPResourceTemplateRef `json:"resourceTemplates,omitempty"`
	Prompts           []MCPPromptRef           `json:"prompts,omitempty"`

	Digest   string `json:"digest,omitempty"`
	SyncedAt string `json:"syncedAt,omitempty"`
}

type MCPExecutionMode

type MCPExecutionMode string
const (
	MCPExecutionModeManual MCPExecutionMode = "manual"
	MCPExecutionModeAuto   MCPExecutionMode = "auto"
)

type MCPGetPromptRequest

type MCPGetPromptRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *MCPGetPromptRequestBody
}

type MCPGetPromptRequestBody

type MCPGetPromptRequestBody struct {
	PromptName string            `json:"promptName"          required:"true"`
	Arguments  map[string]string `json:"arguments,omitempty"`
}

type MCPGetPromptResponse

type MCPGetPromptResponse struct {
	Body *MCPGetPromptResponseBody
}

type MCPGetPromptResponseBody

type MCPGetPromptResponseBody struct {
	BundleID    bundleitemutils.BundleID `json:"bundleID"`
	ServerID    MCPServerID              `json:"serverID"`
	PromptName  string                   `json:"promptName"`
	Description string                   `json:"description,omitempty"`
	Messages    []MCPPromptMessage       `json:"messages,omitempty"`
}

type MCPHTTPAuthMode

type MCPHTTPAuthMode string
const (
	MCPHTTPAuthNone              MCPHTTPAuthMode = "none"
	MCPHTTPAuthAPIKey            MCPHTTPAuthMode = "apiKey"
	MCPHTTPAuthOAuth             MCPHTTPAuthMode = "oauth"
	MCPHTTPAuthClientCredentials MCPHTTPAuthMode = "clientCredentials"
)

type MCPIcon

type MCPIcon struct {
	Source   string   `json:"src"`
	MIMEType string   `json:"mimeType,omitempty"`
	Sizes    []string `json:"sizes,omitempty"`
	Theme    string   `json:"theme,omitempty"`
}

type MCPImplementationInfo

type MCPImplementationInfo struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

type MCPInvocationSource

type MCPInvocationSource string
const (
	MCPInvocationSourceModel MCPInvocationSource = "model"
	MCPInvocationSourceUser  MCPInvocationSource = "user"
	MCPInvocationSourceApp   MCPInvocationSource = "app"
)

type MCPOAuthAuthorization

type MCPOAuthAuthorization struct {
	BundleID         bundleitemutils.BundleID `json:"bundleID"`
	ServerID         MCPServerID              `json:"serverID"`
	AuthorizationURL string                   `json:"authorizationURL"`
	ExpiresAt        string                   `json:"expiresAt,omitempty"`
}

type MCPPageToken

type MCPPageToken struct {
	PageSize        int                        `json:"s"`
	BundleID        bundleitemutils.BundleID   `json:"bid"`
	CursorID        MCPServerID                `json:"id,omitempty"`
	CursorAt        string                     `json:"t,omitempty"`
	Enabled         *bool                      `json:"e,omitempty"`
	IncludeDisabled bool                       `json:"d,omitempty"`
	IDs             []MCPServerID              `json:"ids,omitempty"`
	BundleIDs       []bundleitemutils.BundleID `json:"bids,omitempty"`
}

type MCPPromptMessage

type MCPPromptMessage struct {
	Role    string     `json:"role"`
	Content MCPContent `json:"content"`
}

type MCPPromptRef

type MCPPromptRef struct {
	BundleID    bundleitemutils.BundleID         `json:"bundleID"`
	ServerID    MCPServerID                      `json:"serverID"`
	PromptName  string                           `json:"promptName"`
	Title       string                           `json:"title,omitempty"`
	DisplayName string                           `json:"displayName"`
	Description string                           `json:"description,omitempty"`
	Arguments   map[string]MCPArgumentDefinition `json:"arguments,omitempty"`
	Digest      string                           `json:"digest,omitempty"`
}

type MCPPromptSelection

type MCPPromptSelection struct {
	MCPPromptRef

	ArgumentValues map[string]string `json:"argumentValues,omitempty"`
}

type MCPProviderToolMapping

type MCPProviderToolMapping struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`

	ProviderToolName string `json:"providerToolName"`
	ChoiceID         string `json:"choiceID"`

	ToolName   string `json:"toolName"`
	ToolDigest string `json:"toolDigest"`

	ApprovalRule   MCPApprovalRule  `json:"approvalRule,omitempty"`
	ExecutionMode  MCPExecutionMode `json:"executionMode,omitempty"`
	AppResourceURI string           `json:"appResourceUri,omitempty"`
	Visibility     []string         `json:"visibility,omitempty"`
}

type MCPReadResourceRequest

type MCPReadResourceRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *MCPReadResourceRequestBody
}

type MCPReadResourceRequestBody

type MCPReadResourceRequestBody struct {
	URI string `json:"uri" required:"true"`
}

type MCPReadResourceResponse

type MCPReadResourceResponse struct {
	Body *MCPReadResourceResponseBody
}

type MCPReadResourceResponseBody

type MCPReadResourceResponseBody struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`
	URI      string                   `json:"uri"`
	Contents []MCPContent             `json:"contents,omitempty"`
}

type MCPResourceContents

type MCPResourceContents struct {
	URI      string         `json:"uri"`
	MIMEType string         `json:"mimeType,omitempty"`
	Text     string         `json:"text,omitempty"`
	Blob     []byte         `json:"blob,omitempty"`
	Meta     map[string]any `json:"_meta,omitempty"`
}

type MCPResourceRef

type MCPResourceRef struct {
	BundleID    bundleitemutils.BundleID `json:"bundleID"`
	ServerID    MCPServerID              `json:"serverID"`
	URI         string                   `json:"uri"`
	Name        string                   `json:"name,omitempty"`
	Title       string                   `json:"title,omitempty"`
	DisplayName string                   `json:"displayName"`
	Description string                   `json:"description,omitempty"`
	MimeType    string                   `json:"mimeType,omitempty"`
	Size        int64                    `json:"size,omitempty"`
	Annotations map[string]any           `json:"annotations,omitempty"`
	Digest      string                   `json:"digest,omitempty"`
}

type MCPResourceTemplateRef

type MCPResourceTemplateRef struct {
	BundleID    bundleitemutils.BundleID         `json:"bundleID"`
	ServerID    MCPServerID                      `json:"serverID"`
	URITemplate string                           `json:"uriTemplate"`
	Name        string                           `json:"name,omitempty"`
	Title       string                           `json:"title,omitempty"`
	DisplayName string                           `json:"displayName"`
	Description string                           `json:"description,omitempty"`
	MimeType    string                           `json:"mimeType,omitempty"`
	Arguments   map[string]MCPArgumentDefinition `json:"arguments,omitempty"`
	Annotations map[string]any                   `json:"annotations,omitempty"`
	Digest      string                           `json:"digest,omitempty"`
}

type MCPResourceTemplateSelection

type MCPResourceTemplateSelection struct {
	MCPResourceTemplateRef

	ArgumentValues map[string]string `json:"argumentValues,omitempty"`
}

type MCPSecretKind

type MCPSecretKind string
const (
	//nolint:gosec // Enum val.
	MCPSecretKindStdioEnv MCPSecretKind = "stdioEnv"
	// MCPSecretKindOAuthClientCredentials stores a JSON object with OAuth client
	// credentials: {"clientID":"...","clientSecret":"..."}.
	// clientSecret is optional for authorization-code public clients using PKCE
	// and required for the client_credentials grant.
	//nolint:gosec // Enum val.
	MCPSecretKindOAuthClientCredentials MCPSecretKind = "oauthClientCredentials"

	// MCPSecretKindOAuthToken stores the app-managed OAuth authorization-code
	// token JSON for one MCP server. It is internal and is not user-editable via
	// the MCP server secret UI.
	MCPSecretKindOAuthToken MCPSecretKind = "oauthToken"

	MCPSecretKindHTTPHeader MCPSecretKind = "httpHeader"
)

type MCPSecretRef

type MCPSecretRef struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`
	Kind     MCPSecretKind            `json:"kind"`
	Slot     string                   `json:"slot,omitempty"`
}

type MCPServerCapabilitiesSummary

type MCPServerCapabilitiesSummary struct {
	Tools                bool           `json:"tools,omitempty"`
	ToolsListChanged     bool           `json:"toolsListChanged,omitempty"`
	Resources            bool           `json:"resources,omitempty"`
	ResourcesSubscribe   bool           `json:"resourcesSubscribe,omitempty"`
	ResourcesListChanged bool           `json:"resourcesListChanged,omitempty"`
	Prompts              bool           `json:"prompts,omitempty"`
	PromptsListChanged   bool           `json:"promptsListChanged,omitempty"`
	Completions          bool           `json:"completions,omitempty"`
	Experimental         map[string]any `json:"experimental,omitempty"`
	Extensions           map[string]any `json:"extensions,omitempty"`
}

type MCPServerConfig

type MCPServerConfig struct {
	SchemaVersion string `json:"schemaVersion"`

	BundleID    bundleitemutils.BundleID `json:"bundleID"`
	ID          MCPServerID              `json:"id"`
	DisplayName string                   `json:"displayName"`
	Enabled     bool                     `json:"enabled"`
	Transport   MCPTransportType         `json:"transport"`

	TrustLevel MCPTrustLevel `json:"trustLevel"`

	Stdio          *MCPStdioConfig          `json:"stdio,omitempty"`
	StreamableHTTP *MCPStreamableHTTPConfig `json:"streamableHttp,omitempty"`

	DefaultPolicy MCPServerPolicy                  `json:"defaultPolicy"`
	ToolPolicies  map[string]MCPToolPolicyOverride `json:"toolPolicies,omitempty"`
	AppsPolicy    *MCPAppsPolicy                   `json:"appsPolicy,omitempty"`
	Setup         *MCPServerSetup                  `json:"setup,omitempty"`

	IsBuiltIn  bool      `json:"isBuiltIn"`
	CreatedAt  time.Time `json:"createdAt"`
	ModifiedAt time.Time `json:"modifiedAt"`
}

type MCPServerID

type MCPServerID string

type MCPServerPolicy

type MCPServerPolicy struct {
	DefaultApprovalRule  MCPApprovalRule  `json:"defaultApprovalRule"`
	DefaultExecutionMode MCPExecutionMode `json:"defaultExecutionMode"`

	RequireApprovalForUnknownRisk bool `json:"requireApprovalForUnknownRisk"`
	RequireApprovalForWrite       bool `json:"requireApprovalForWrite"`
	RequireApprovalForDestructive bool `json:"requireApprovalForDestructive"`
}

func DefaultMCPServerPolicy

func DefaultMCPServerPolicy() MCPServerPolicy

type MCPServerRuntimeSnapshot

type MCPServerRuntimeSnapshot struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`
	Status   MCPServerStatus          `json:"status"`

	NegotiatedProtocolVersion string                        `json:"negotiatedProtocolVersion,omitempty"`
	ServerInfo                *MCPImplementationInfo        `json:"serverInfo,omitempty"`
	ServerCapabilities        *MCPServerCapabilitiesSummary `json:"serverCapabilities,omitempty"`
	Instructions              string                        `json:"instructions,omitempty"`

	LastError       string `json:"lastError,omitempty"`
	LastConnectedAt string `json:"lastConnectedAt,omitempty"`
	LastSyncedAt    string `json:"lastSyncedAt,omitempty"`

	ToolCount             int `json:"toolCount"`
	ResourceCount         int `json:"resourceCount"`
	ResourceTemplateCount int `json:"resourceTemplateCount"`
	PromptCount           int `json:"promptCount"`

	SnapshotDigest string `json:"snapshotDigest,omitempty"`
}

type MCPServerSelection

type MCPServerSelection struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`

	SnapshotDigest string `json:"snapshotDigest,omitempty"`

	ToolExposure  MCPToolExposure    `json:"toolExposure"` // none | all | selected
	SelectedTools []MCPToolSelection `json:"selectedTools,omitempty"`

	IncludeServerInstructions bool `json:"includeServerInstructions,omitempty"`
}

type MCPServerSetup added in v0.1.13

type MCPServerSetup struct {
	Note   string                `json:"note,omitempty"`
	Inputs []MCPServerSetupInput `json:"inputs,omitempty"`
}

MCPServerSetup declares what user input a server needs before it can connect.

type MCPServerSetupInput added in v0.1.13

type MCPServerSetupInput struct {
	ID          string                  `json:"id"`
	Kind        MCPServerSetupInputKind `json:"kind"`
	Label       string                  `json:"label,omitempty"`
	Description string                  `json:"description,omitempty"`
	Note        string                  `json:"note,omitempty"`
	Placeholder string                  `json:"placeholder,omitempty"`
	Required    bool                    `json:"required,omitempty"`

	OAuthClientCredentials      *MCPSetupOAuthClientCredentialsInput      `json:"oauthClientCredentials,omitempty"`
	HTTPHeader                  *MCPSetupHTTPHeaderInput                  `json:"httpHeader,omitempty"`
	StdioEnv                    *MCPSetupStdioEnvInput                    `json:"stdioEnv,omitempty"`
	StreamableHTTPURL           *MCPSetupStreamableHTTPURLInput           `json:"streamableHttpUrl,omitempty"`
	ClientIDMetadataDocumentURL *MCPSetupClientIDMetadataDocumentURLInput `json:"clientIDMetadataDocumentURL,omitempty"`
}

MCPServerSetupInput is a discriminated union. Kind is mandatory and exactly one kind-specific pointer must be set and match Kind.

type MCPServerSetupInputKind added in v0.1.13

type MCPServerSetupInputKind string
const (
	//nolint:gosec // Enum val.
	MCPSetupKindOAuthClientCredentials MCPServerSetupInputKind = "oauthClientCredentials"
	MCPSetupKindHTTPHeader             MCPServerSetupInputKind = "httpHeader"
	MCPSetupKindStdioEnv               MCPServerSetupInputKind = "stdioEnv"
	MCPSetupKindStreamableHTTPURL      MCPServerSetupInputKind = "streamableHttpUrl"
	MCPSetupKindClientIDMetadataDocURL MCPServerSetupInputKind = "clientIDMetadataDocumentURL"
)

type MCPServerSetupInputValue added in v0.1.13

type MCPServerSetupInputValue struct {
	Value        string `json:"value,omitempty"`
	ClientID     string `json:"clientID,omitempty"`
	ClientSecret string `json:"clientSecret,omitempty"`
}

type MCPServerStatus

type MCPServerStatus string
const (
	MCPServerStatusDisabled     MCPServerStatus = "disabled"
	MCPServerStatusDisconnected MCPServerStatus = "disconnected"
	MCPServerStatusConnecting   MCPServerStatus = "connecting"
	MCPServerStatusReady        MCPServerStatus = "ready"
	MCPServerStatusError        MCPServerStatus = "error"
)

type MCPSettings added in v0.1.13

type MCPSettings struct {
	// Empty means a random loopback port is used for this process.
	// Example fixed value: "127.0.0.1:37645".
	OAuthLoopbackListenAddr string `json:"oauthLoopbackListenAddr,omitempty"`
}

type MCPSettingsView added in v0.1.13

type MCPSettingsView struct {
	Settings                MCPSettings `json:"settings"`
	OAuthRedirectURL        string      `json:"oauthRedirectURL,omitempty"`
	OAuthLoopbackListenAddr string      `json:"oauthLoopbackListenAddr,omitempty"`
	OAuthRestartRequired    bool        `json:"oauthRestartRequired,omitempty"`
}

type MCPSetupClientIDMetadataDocumentURLInput added in v0.1.13

type MCPSetupClientIDMetadataDocumentURLInput struct{}

type MCPSetupHTTPHeaderInput added in v0.1.13

type MCPSetupHTTPHeaderInput struct {
	HeaderName string `json:"headerName"`
	// Secret stores the value in the secret store and references it via
	// secretHeaderRefs. Non-secret headers are stored inline.
	Secret      bool   `json:"secret,omitempty"`
	ValuePrefix string `json:"valuePrefix,omitempty"`
	ValueSuffix string `json:"valueSuffix,omitempty"`
}

type MCPSetupOAuthClientCredentialsInput added in v0.1.13

type MCPSetupOAuthClientCredentialsInput struct {
	ClientSecretRequired bool `json:"clientSecretRequired,omitempty"`
}

type MCPSetupStdioEnvInput added in v0.1.13

type MCPSetupStdioEnvInput struct {
	EnvName     string `json:"envName"`
	Secret      bool   `json:"secret,omitempty"`
	ValuePrefix string `json:"valuePrefix,omitempty"`
	ValueSuffix string `json:"valueSuffix,omitempty"`
}

type MCPSetupStreamableHTTPURLInput added in v0.1.13

type MCPSetupStreamableHTTPURLInput struct{}

type MCPStdioConfig

type MCPStdioConfig struct {
	Command          string            `json:"command"`
	Args             []string          `json:"args,omitempty"`
	WorkingDir       string            `json:"workingDir,omitempty"`
	Env              map[string]string `json:"env,omitempty"`
	SecretEnvRefs    map[string]string `json:"secretEnvRefs,omitempty"`
	StartupTimeoutMS int               `json:"startupTimeoutMS,omitempty"`
}

type MCPStdioConfigOverlay added in v0.1.13

type MCPStdioConfigOverlay struct {
	Env           map[string]string `json:"env,omitempty"`
	SecretEnvRefs map[string]string `json:"secretEnvRefs,omitempty"`
}

type MCPStreamableHTTPConfig

type MCPStreamableHTTPConfig struct {
	URL       string          `json:"url"`
	TimeoutMS int             `json:"timeoutMS,omitempty"`
	AuthMode  MCPHTTPAuthMode `json:"authMode"`

	// Headers are non-secret HTTP headers sent to the MCP endpoint.
	Headers map[string]string `json:"headers,omitempty"`

	// SecretHeaderRefs maps HTTP header names to MCP secret refs. Use this for
	// API keys, PATs, or Authorization Bearer tokens.
	SecretHeaderRefs map[string]string `json:"secretHeaderRefs,omitempty"`

	// ClientCredentialRef references an MCP OAuth client credential secret.
	// For authMode "oauth", the secret may contain only clientID for a public
	// PKCE client, or clientID plus clientSecret for a confidential client.
	// For authMode "clientCredentials", clientSecret is required.
	ClientCredentialRef string `json:"clientCredentialRef,omitempty"`

	// ClientIDMetadataDocumentURL enables the standard OAuth Client ID Metadata
	// Document registration path supported by the official MCP Go SDK.
	ClientIDMetadataDocumentURL string `json:"clientIDMetadataDocumentURL,omitempty"`
}

type MCPStreamableHTTPConfigOverlay added in v0.1.13

type MCPStreamableHTTPConfigOverlay struct {
	URL       *string `json:"url,omitempty"`
	TimeoutMS *int    `json:"timeoutMS,omitempty"`

	Headers          map[string]string `json:"headers,omitempty"`
	SecretHeaderRefs map[string]string `json:"secretHeaderRefs,omitempty"`

	ClientCredentialRef         *string `json:"clientCredentialRef,omitempty"`
	ClientIDMetadataDocumentURL *string `json:"clientIDMetadataDocumentURL,omitempty"`
}

type MCPTaskSupport

type MCPTaskSupport string
const (
	MCPTaskSupportForbidden MCPTaskSupport = "forbidden"
	MCPTaskSupportOptional  MCPTaskSupport = "optional"
	MCPTaskSupportRequired  MCPTaskSupport = "required"
)

type MCPToolAnnotations

type MCPToolAnnotations struct {
	DestructiveHint *bool  `json:"destructiveHint,omitempty"`
	IdempotentHint  bool   `json:"idempotentHint"`
	OpenWorldHint   *bool  `json:"openWorldHint,omitempty"`
	ReadOnlyHint    bool   `json:"readOnlyHint"`
	Title           string `json:"title,omitempty"`
}

type MCPToolAppInfo

type MCPToolAppInfo struct {
	ResourceURI string   `json:"resourceUri,omitempty"`
	Visibility  []string `json:"visibility,omitempty"`
}

type MCPToolAppRenderInfo

type MCPToolAppRenderInfo struct {
	ResourceURI       string       `json:"resourceUri,omitempty"`
	MimeType          string       `json:"mimeType,omitempty"`
	Content           []MCPContent `json:"content,omitempty"`
	StructuredContent any          `json:"structuredContent,omitempty"`
	IsError           bool         `json:"isError,omitempty"`
}

type MCPToolCallProvenance

type MCPToolCallProvenance struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`

	ServerDisplayName string `json:"serverDisplayName,omitempty"`

	ToolName         string `json:"toolName"`
	ProviderToolName string `json:"providerToolName"`
	ToolDigest       string `json:"toolDigest,omitempty"`

	ToolUseID  string `json:"toolUseID,omitempty"`
	ApprovalID string `json:"approvalID,omitempty"`

	AppResourceURI string `json:"appResourceUri,omitempty"`
	AppInstanceID  string `json:"appInstanceID,omitempty"`
}

type MCPToolCapability

type MCPToolCapability struct {
	BundleID         bundleitemutils.BundleID `json:"bundleID"`
	ServerID         MCPServerID              `json:"serverID"`
	ToolName         string                   `json:"toolName"`
	ProviderToolName string                   `json:"providerToolName"`
	ChoiceID         string                   `json:"choiceID"`

	Title       string `json:"title,omitempty"`
	DisplayName string `json:"displayName"`
	Description string `json:"description,omitempty"`

	InputSchema  map[string]any `json:"inputSchema,omitempty"`
	OutputSchema map[string]any `json:"outputSchema,omitempty"`

	Annotations  *MCPToolAnnotations `json:"annotations,omitempty"`
	InferredRisk MCPToolRisk         `json:"inferredRisk"`

	ApprovalRule  MCPApprovalRule  `json:"approvalRule"`
	ExecutionMode MCPExecutionMode `json:"executionMode"`

	TaskSupport MCPTaskSupport `json:"taskSupport"`

	App *MCPToolAppInfo `json:"app,omitempty"`

	Digest  string `json:"digest"`
	Enabled bool   `json:"enabled"`
	Stale   bool   `json:"stale,omitempty"`
}

type MCPToolExposure

type MCPToolExposure string
const (
	MCPToolExposureNone     MCPToolExposure = "none"
	MCPToolExposureAll      MCPToolExposure = "all"
	MCPToolExposureSelected MCPToolExposure = "selected"
)

type MCPToolPolicyOverride

type MCPToolPolicyOverride struct {
	ToolName string `json:"toolName"`

	ApprovalRule  *MCPApprovalRule  `json:"approvalRule,omitempty"`
	ExecutionMode *MCPExecutionMode `json:"executionMode,omitempty"`

	AllowStaleDigest bool   `json:"allowStaleDigest,omitempty"`
	ExpectedDigest   string `json:"expectedDigest,omitempty"`
}

type MCPToolRisk

type MCPToolRisk string
const (
	MCPToolRiskUnknown     MCPToolRisk = "unknown"
	MCPToolRiskRead        MCPToolRisk = "read"
	MCPToolRiskWrite       MCPToolRisk = "write"
	MCPToolRiskDestructive MCPToolRisk = "destructive"
	MCPToolRiskOpenWorld   MCPToolRisk = "openWorld"
)

type MCPToolSelection

type MCPToolSelection struct {
	BundleID         bundleitemutils.BundleID `json:"bundleID"`
	ServerID         MCPServerID              `json:"serverID"`
	ToolName         string                   `json:"toolName"`
	ProviderToolName string                   `json:"providerToolName,omitempty"`
	ChoiceID         string                   `json:"choiceID,omitempty"`
	Digest           string                   `json:"digest,omitempty"`

	ApprovalRule  *MCPApprovalRule  `json:"approvalRule,omitempty"`
	ExecutionMode *MCPExecutionMode `json:"executionMode,omitempty"`

	AppResourceURI string   `json:"appResourceUri,omitempty"`
	Visibility     []string `json:"visibility,omitempty"`
}

type MCPTransportType

type MCPTransportType string
const (
	MCPTransportStreamableHTTP MCPTransportType = "streamableHttp"
	MCPTransportStdio          MCPTransportType = "stdio"
)

type MCPTrustLevel

type MCPTrustLevel string
const (
	MCPTrustLevelUntrusted MCPTrustLevel = "untrusted"
	MCPTrustLevelTrusted   MCPTrustLevel = "trusted"
)

type MCPUIResourceCSP

type MCPUIResourceCSP struct {
	ConnectDomains  []string `json:"connectDomains,omitempty"`
	ResourceDomains []string `json:"resourceDomains,omitempty"`
	FrameDomains    []string `json:"frameDomains,omitempty"`
	BaseURIDomains  []string `json:"baseUriDomains,omitempty"`
}

type MCPUIResourceContent

type MCPUIResourceContent struct {
	BundleID bundleitemutils.BundleID `json:"bundleID"`
	ServerID MCPServerID              `json:"serverID"`
	URI      string                   `json:"uri"`
	MIMEType string                   `json:"mimeType"`
	HTML     string                   `json:"html"`
	Meta     *MCPUIResourceMeta       `json:"meta,omitempty"`
	Digest   string                   `json:"digest,omitempty"`
}

type MCPUIResourceMeta

type MCPUIResourceMeta struct {
	CSP           *MCPUIResourceCSP         `json:"csp,omitempty"`
	Permissions   *MCPUIResourcePermissions `json:"permissions,omitempty"`
	Domain        string                    `json:"domain,omitempty"`
	PrefersBorder *bool                     `json:"prefersBorder,omitempty"`
}

type MCPUIResourcePermissions

type MCPUIResourcePermissions struct {
	Camera         map[string]any `json:"camera,omitempty"`
	Microphone     map[string]any `json:"microphone,omitempty"`
	Geolocation    map[string]any `json:"geolocation,omitempty"`
	ClipboardWrite map[string]any `json:"clipboardWrite,omitempty"`
}

type PatchMCPBundleRequest

type PatchMCPBundleRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	Body     *PatchMCPBundleRequestBody
}

type PatchMCPBundleRequestBody

type PatchMCPBundleRequestBody struct {
	IsEnabled bool `json:"isEnabled" required:"true"`
}

type PatchMCPBundleResponse

type PatchMCPBundleResponse struct{}

type PatchMCPServerEnabledRequest

type PatchMCPServerEnabledRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *PatchMCPServerEnabledRequestBody
}

type PatchMCPServerEnabledRequestBody

type PatchMCPServerEnabledRequestBody struct {
	Enabled bool `json:"enabled" required:"true"`
}

type PatchMCPServerEnabledResponse

type PatchMCPServerEnabledResponse struct{}

type PatchMCPServerPolicyPayload

type PatchMCPServerPolicyPayload struct {
	DefaultPolicy *MCPServerPolicy                 `json:"defaultPolicy,omitempty"`
	ToolPolicies  map[string]MCPToolPolicyOverride `json:"toolPolicies,omitempty"`
	AppsPolicy    *MCPAppsPolicy                   `json:"appsPolicy,omitempty"`
}

type PatchMCPServerPolicyRequest

type PatchMCPServerPolicyRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *PatchMCPServerPolicyPayload
}

type PatchMCPServerPolicyResponse

type PatchMCPServerPolicyResponse struct{}

type PatchMCPServerSetupRequest added in v0.1.13

type PatchMCPServerSetupRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *PatchMCPServerSetupRequestBody
}

type PatchMCPServerSetupRequestBody added in v0.1.13

type PatchMCPServerSetupRequestBody struct {
	// Reset clears existing user setup before applying. Only supported for
	// built-in servers.
	Reset bool `json:"reset,omitempty"`

	// InputValues are keyed by MCPServerSetupInput.ID declared on the server.
	InputValues map[string]MCPServerSetupInputValue `json:"inputValues,omitempty"`
}

type PatchMCPServerSetupResponse added in v0.1.13

type PatchMCPServerSetupResponse struct {
	Body *MCPServerConfig
}

type PatchMCPSettingsRequest added in v0.1.13

type PatchMCPSettingsRequest struct {
	Body *PatchMCPSettingsRequestBody
}

type PatchMCPSettingsRequestBody added in v0.1.13

type PatchMCPSettingsRequestBody struct {
	OAuthLoopbackListenAddr *string `json:"oauthLoopbackListenAddr,omitempty"`
}

type PatchMCPSettingsResponse added in v0.1.13

type PatchMCPSettingsResponse struct {
	Body *MCPSettingsView
}

type PutMCPBundleRequest

type PutMCPBundleRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	Body     *PutMCPBundleRequestBody
}

type PutMCPBundleRequestBody

type PutMCPBundleRequestBody struct {
	Slug        bundleitemutils.BundleSlug `json:"slug"                  required:"true"`
	DisplayName string                     `json:"displayName"           required:"true"`
	IsEnabled   bool                       `json:"isEnabled"             required:"true"`
	Description string                     `json:"description,omitempty"`
}

type PutMCPBundleResponse

type PutMCPBundleResponse struct{}

type PutMCPServerPayload

type PutMCPServerPayload struct {
	DisplayName string           `json:"displayName" required:"true"`
	Enabled     bool             `json:"enabled"     required:"true"`
	Transport   MCPTransportType `json:"transport"   required:"true"`

	TrustLevel MCPTrustLevel `json:"trustLevel,omitempty"`

	Stdio          *MCPStdioConfig                  `json:"stdio,omitempty"`
	StreamableHTTP *MCPStreamableHTTPConfig         `json:"streamableHttp,omitempty"`
	DefaultPolicy  *MCPServerPolicy                 `json:"defaultPolicy,omitempty"`
	ToolPolicies   map[string]MCPToolPolicyOverride `json:"toolPolicies,omitempty"`
	AppsPolicy     *MCPAppsPolicy                   `json:"appsPolicy,omitempty"`
	Setup          *MCPServerSetup                  `json:"setup,omitempty"`
}

type PutMCPServerRequest

type PutMCPServerRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *PutMCPServerPayload
}

type PutMCPServerResponse

type PutMCPServerResponse struct{}

type PutMCPServerSecretRequest

type PutMCPServerSecretRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`

	Body *PutMCPServerSecretRequestBody
}

type PutMCPServerSecretRequestBody

type PutMCPServerSecretRequestBody struct {
	Kind   MCPSecretKind `json:"kind"   required:"true"`
	Slot   string        `json:"slot"   required:"true"`
	Secret string        `json:"secret" required:"true"`
}

type PutMCPServerSecretResponse

type PutMCPServerSecretResponse struct {
	Body *PutMCPServerSecretResponseBody
}

type PutMCPServerSecretResponseBody

type PutMCPServerSecretResponseBody struct {
	SecretRef string `json:"secretRef"`
	SHA256    string `json:"sha256,omitempty"`
	NonEmpty  bool   `json:"nonEmpty"`
}

type RefreshMCPServerRequest

type RefreshMCPServerRequest struct {
	BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
	ServerID MCPServerID              `path:"serverID" required:"true"`
}

type RefreshMCPServerResponse

type RefreshMCPServerResponse struct {
	Body *MCPServerRuntimeSnapshot
}

type ResolveMCPApprovalRequest

type ResolveMCPApprovalRequest struct {
	Body *ResolveMCPApprovalRequestBody
}

type ResolveMCPApprovalRequestBody

type ResolveMCPApprovalRequestBody struct {
	ApprovalID string                `json:"approvalID" required:"true"`
	Resolution MCPApprovalResolution `json:"resolution" required:"true"`
}

type ResolveMCPApprovalResponse

type ResolveMCPApprovalResponse struct {
	Body *MCPApprovalToken
}

type TimeRange

type TimeRange struct {
	From *time.Time `json:"from,omitempty"`
	To   *time.Time `json:"to,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL