Documentation
¶
Index ¶
- func ValidateMCPAppContextUpdates(values []MCPAppModelContextUpdate) error
- func ValidateMCPAppContextUpdatesForContext(contextValue MCPConversationContext, updates []MCPAppModelContextUpdate) error
- func ValidateMCPConversationContext(value MCPConversationContext) error
- func ValidateMCPProviderToolMapping(m MCPProviderToolMapping) error
- func ValidateMCPProviderToolMappingsForContext(contextValue MCPConversationContext, mappings []MCPProviderToolMapping) error
- type MCPAppModelContextUpdate
- type MCPConversationContext
- type MCPPromptSelection
- type MCPProviderToolMapping
- type MCPResourceTemplateSelection
- type MCPServerSelection
- type MCPToolExposure
- type MCPToolSelection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateMCPAppContextUpdates ¶
func ValidateMCPAppContextUpdates( values []MCPAppModelContextUpdate, ) error
ValidateMCPAppContextUpdates validates application-originated MCP App context updates before they are inserted into model input.
func ValidateMCPAppContextUpdatesForContext ¶
func ValidateMCPAppContextUpdatesForContext( contextValue MCPConversationContext, updates []MCPAppModelContextUpdate, ) error
ValidateMCPAppContextUpdatesForContext binds App-originated model context updates to the exact durable MCP server selection that authorized them.
func ValidateMCPConversationContext ¶
func ValidateMCPConversationContext(value MCPConversationContext) error
ValidateMCPConversationContext validates durable MCP conversation selection structure without requiring a live MCP runtime connection.
func ValidateMCPProviderToolMapping ¶
func ValidateMCPProviderToolMapping(m MCPProviderToolMapping) error
ValidateMCPProviderToolMapping validates one durable provider-tool mapping emitted during MCP inference hydration. These mappings bind later model tool calls to a specific Artifact-backed MCP server and discovered tool digest.
func ValidateMCPProviderToolMappingsForContext ¶
func ValidateMCPProviderToolMappingsForContext( contextValue MCPConversationContext, mappings []MCPProviderToolMapping, ) error
ValidateMCPProviderToolMappingsForContext validates durable provider-tool mappings against the exact durable MCP context that authorized their inference exposure.
This belongs in MCP validation, not in Conversation storage. Conversation owns persistence, while MCP owns the meaning of a mapping.
Types ¶
type MCPAppModelContextUpdate ¶
type MCPAppModelContextUpdate struct {
InstanceID string `json:"instanceID,omitempty"`
Server mcpServer.ServerID `json:"server"`
ResourceURI string `json:"resourceUri,omitempty"`
Content []mcpServer.MCPContent `json:"content,omitempty"`
StructuredContent any `json:"structuredContent,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
RawArguments jsonutil.JSONRawString `json:"rawArguments,omitempty"`
}
type MCPConversationContext ¶
type MCPConversationContext struct {
Servers []MCPServerSelection `json:"servers"`
Resources []mcpServer.MCPResourceRef `json:"resources,omitempty"`
ResourceTemplates []MCPResourceTemplateSelection `json:"resourceTemplates,omitempty"`
Prompts []MCPPromptSelection `json:"prompts,omitempty"`
}
type MCPPromptSelection ¶
type MCPPromptSelection struct {
mcpServer.MCPPromptRef
ArgumentValues map[string]string `json:"argumentValues,omitempty"`
}
type MCPProviderToolMapping ¶
type MCPProviderToolMapping struct {
Server mcpServer.ServerID `json:"server"`
ProviderToolName string `json:"providerToolName"`
ChoiceID string `json:"choiceID"`
ToolName string `json:"toolName"`
ToolDigest string `json:"toolDigest"`
ApprovalRule mcpPolicy.MCPApprovalRule `json:"approvalRule,omitempty"`
ExecutionMode mcpPolicy.MCPExecutionMode `json:"executionMode,omitempty"`
AppResourceURI string `json:"appResourceUri,omitempty"`
Visibility []string `json:"visibility,omitempty"`
}
type MCPResourceTemplateSelection ¶
type MCPResourceTemplateSelection struct {
mcpServer.MCPResourceTemplateRef
ArgumentValues map[string]string `json:"argumentValues,omitempty"`
}
type MCPServerSelection ¶
type MCPServerSelection struct {
Server mcpServer.ServerID `json:"server"`
SnapshotDigest string `json:"snapshotDigest,omitempty"`
ToolExposure MCPToolExposure `json:"toolExposure"` // none | all | selected
SelectedTools []MCPToolSelection `json:"selectedTools,omitempty"`
IncludeServerInstructions bool `json:"includeServerInstructions,omitempty"`
}
type MCPToolExposure ¶
type MCPToolExposure string
const ( MCPToolExposureNone MCPToolExposure = "none" MCPToolExposureAll MCPToolExposure = "all" MCPToolExposureSelected MCPToolExposure = "selected" )
type MCPToolSelection ¶
type MCPToolSelection struct {
Server mcpServer.ServerID `json:"server"`
ToolName string `json:"toolName"`
ProviderToolName string `json:"providerToolName,omitempty"`
ChoiceID string `json:"choiceID,omitempty"`
Digest string `json:"digest,omitempty"`
ApprovalRule *mcpPolicy.MCPApprovalRule `json:"approvalRule,omitempty"`
ExecutionMode *mcpPolicy.MCPExecutionMode `json:"executionMode,omitempty"`
AppResourceURI string `json:"appResourceUri,omitempty"`
Visibility []string `json:"visibility,omitempty"`
}