Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMCPServiceServer(s grpc.ServiceRegistrar, srv MCPServiceServer)
- type CallToolRequest
- func (*CallToolRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallToolRequest) GetArguments() map[string]*Value
- func (x *CallToolRequest) GetName() string
- func (*CallToolRequest) ProtoMessage()
- func (x *CallToolRequest) ProtoReflect() protoreflect.Message
- func (x *CallToolRequest) Reset()
- func (x *CallToolRequest) String() string
- type CallToolResponse
- func (*CallToolResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CallToolResponse) GetContent() []*Content
- func (x *CallToolResponse) GetIsError() bool
- func (*CallToolResponse) ProtoMessage()
- func (x *CallToolResponse) ProtoReflect() protoreflect.Message
- func (x *CallToolResponse) Reset()
- func (x *CallToolResponse) String() string
- type Capabilities
- func (*Capabilities) Descriptor() ([]byte, []int)deprecated
- func (x *Capabilities) GetSupportedContentTypes() []string
- func (x *Capabilities) GetSupportsCancellation() bool
- func (x *Capabilities) GetSupportsProgress() bool
- func (x *Capabilities) GetSupportsStreaming() bool
- func (*Capabilities) ProtoMessage()
- func (x *Capabilities) ProtoReflect() protoreflect.Message
- func (x *Capabilities) Reset()
- func (x *Capabilities) String() string
- type ClientInfo
- type Content
- func (*Content) Descriptor() ([]byte, []int)deprecated
- func (x *Content) GetData() []byte
- func (x *Content) GetMetadata() map[string]string
- func (x *Content) GetText() string
- func (x *Content) GetType() string
- func (*Content) ProtoMessage()
- func (x *Content) ProtoReflect() protoreflect.Message
- func (x *Content) Reset()
- func (x *Content) String() string
- type InitializeRequest
- func (*InitializeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InitializeRequest) GetCapabilities() *Capabilities
- func (x *InitializeRequest) GetClientInfo() *ClientInfo
- func (x *InitializeRequest) GetProtocolVersion() string
- func (*InitializeRequest) ProtoMessage()
- func (x *InitializeRequest) ProtoReflect() protoreflect.Message
- func (x *InitializeRequest) Reset()
- func (x *InitializeRequest) String() string
- type InitializeResponse
- func (*InitializeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InitializeResponse) GetCapabilities() *Capabilities
- func (x *InitializeResponse) GetProtocolVersion() string
- func (x *InitializeResponse) GetServerInfo() *ServerInfo
- func (*InitializeResponse) ProtoMessage()
- func (x *InitializeResponse) ProtoReflect() protoreflect.Message
- func (x *InitializeResponse) Reset()
- func (x *InitializeResponse) String() string
- type ListToolsRequest
- type ListToolsResponse
- func (*ListToolsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListToolsResponse) GetNextCursor() string
- func (x *ListToolsResponse) GetTools() []*Tool
- func (*ListToolsResponse) ProtoMessage()
- func (x *ListToolsResponse) ProtoReflect() protoreflect.Message
- func (x *ListToolsResponse) Reset()
- func (x *ListToolsResponse) String() string
- type ListValue
- type MCPServiceClient
- type MCPServiceServer
- type MCPService_StreamCallToolClient
- type MCPService_StreamCallToolServer
- type NullValue
- type PingRequest
- type PingResponse
- func (*PingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PingResponse) GetStatus() string
- func (x *PingResponse) GetTimestamp() int64
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) String() string
- type Schema
- func (*Schema) Descriptor() ([]byte, []int)deprecated
- func (x *Schema) GetProperties() map[string]*SchemaField
- func (x *Schema) GetRequired() []string
- func (x *Schema) GetType() string
- func (*Schema) ProtoMessage()
- func (x *Schema) ProtoReflect() protoreflect.Message
- func (x *Schema) Reset()
- func (x *Schema) String() string
- type SchemaField
- func (*SchemaField) Descriptor() ([]byte, []int)deprecated
- func (x *SchemaField) GetDefaultValue() *Value
- func (x *SchemaField) GetDescription() string
- func (x *SchemaField) GetType() string
- func (*SchemaField) ProtoMessage()
- func (x *SchemaField) ProtoReflect() protoreflect.Message
- func (x *SchemaField) Reset()
- func (x *SchemaField) String() string
- type ServerInfo
- type StructValue
- type Tool
- type UnimplementedMCPServiceServer
- func (UnimplementedMCPServiceServer) CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
- func (UnimplementedMCPServiceServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
- func (UnimplementedMCPServiceServer) ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
- func (UnimplementedMCPServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
- func (UnimplementedMCPServiceServer) StreamCallTool(*CallToolRequest, grpc.ServerStreamingServer[CallToolResponse]) error
- type UnsafeMCPServiceServer
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetBoolValue() bool
- func (x *Value) GetKind() isValue_Kind
- func (x *Value) GetListValue() *ListValue
- func (x *Value) GetNullValue() NullValue
- func (x *Value) GetNumberValue() float64
- func (x *Value) GetStringValue() string
- func (x *Value) GetStructValue() *StructValue
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
- type Value_BoolValue
- type Value_ListValue
- type Value_NullValue
- type Value_NumberValue
- type Value_StringValue
- type Value_StructValue
Constants ¶
const ( MCPService_Initialize_FullMethodName = "/mcp.MCPService/Initialize" MCPService_ListTools_FullMethodName = "/mcp.MCPService/ListTools" MCPService_CallTool_FullMethodName = "/mcp.MCPService/CallTool" MCPService_StreamCallTool_FullMethodName = "/mcp.MCPService/StreamCallTool" MCPService_Ping_FullMethodName = "/mcp.MCPService/Ping" )
Variables ¶
var ( NullValue_name = map[int32]string{ 0: "NULL_VALUE", } NullValue_value = map[string]int32{ "NULL_VALUE": 0, } )
Enum value maps for NullValue.
var File_proto_mcp_mcp_proto protoreflect.FileDescriptor
var MCPService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mcp.MCPService", HandlerType: (*MCPServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Initialize", Handler: _MCPService_Initialize_Handler, }, { MethodName: "ListTools", Handler: _MCPService_ListTools_Handler, }, { MethodName: "CallTool", Handler: _MCPService_CallTool_Handler, }, { MethodName: "Ping", Handler: _MCPService_Ping_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamCallTool", Handler: _MCPService_StreamCallTool_Handler, ServerStreams: true, }, }, Metadata: "proto/mcp/mcp.proto", }
MCPService_ServiceDesc is the grpc.ServiceDesc for MCPService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMCPServiceServer ¶
func RegisterMCPServiceServer(s grpc.ServiceRegistrar, srv MCPServiceServer)
Types ¶
type CallToolRequest ¶
type CallToolRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Arguments map[string]*Value `` /* 145-byte string literal not displayed */
// contains filtered or unexported fields
}
CallToolRequest executes a tool
func (*CallToolRequest) Descriptor
deprecated
func (*CallToolRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallToolRequest.ProtoReflect.Descriptor instead.
func (*CallToolRequest) GetArguments ¶
func (x *CallToolRequest) GetArguments() map[string]*Value
func (*CallToolRequest) GetName ¶
func (x *CallToolRequest) GetName() string
func (*CallToolRequest) ProtoMessage ¶
func (*CallToolRequest) ProtoMessage()
func (*CallToolRequest) ProtoReflect ¶
func (x *CallToolRequest) ProtoReflect() protoreflect.Message
func (*CallToolRequest) Reset ¶
func (x *CallToolRequest) Reset()
func (*CallToolRequest) String ¶
func (x *CallToolRequest) String() string
type CallToolResponse ¶
type CallToolResponse struct {
Content []*Content `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
IsError bool `protobuf:"varint,2,opt,name=is_error,json=isError,proto3" json:"is_error,omitempty"`
// contains filtered or unexported fields
}
CallToolResponse returns tool execution result
func (*CallToolResponse) Descriptor
deprecated
func (*CallToolResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallToolResponse.ProtoReflect.Descriptor instead.
func (*CallToolResponse) GetContent ¶
func (x *CallToolResponse) GetContent() []*Content
func (*CallToolResponse) GetIsError ¶
func (x *CallToolResponse) GetIsError() bool
func (*CallToolResponse) ProtoMessage ¶
func (*CallToolResponse) ProtoMessage()
func (*CallToolResponse) ProtoReflect ¶
func (x *CallToolResponse) ProtoReflect() protoreflect.Message
func (*CallToolResponse) Reset ¶
func (x *CallToolResponse) Reset()
func (*CallToolResponse) String ¶
func (x *CallToolResponse) String() string
type Capabilities ¶
type Capabilities struct {
SupportsStreaming bool `protobuf:"varint,1,opt,name=supports_streaming,json=supportsStreaming,proto3" json:"supports_streaming,omitempty"`
SupportsCancellation bool `protobuf:"varint,2,opt,name=supports_cancellation,json=supportsCancellation,proto3" json:"supports_cancellation,omitempty"`
SupportsProgress bool `protobuf:"varint,3,opt,name=supports_progress,json=supportsProgress,proto3" json:"supports_progress,omitempty"`
SupportedContentTypes []string `` /* 126-byte string literal not displayed */
// contains filtered or unexported fields
}
Capabilities defines supported features
func (*Capabilities) Descriptor
deprecated
func (*Capabilities) Descriptor() ([]byte, []int)
Deprecated: Use Capabilities.ProtoReflect.Descriptor instead.
func (*Capabilities) GetSupportedContentTypes ¶
func (x *Capabilities) GetSupportedContentTypes() []string
func (*Capabilities) GetSupportsCancellation ¶
func (x *Capabilities) GetSupportsCancellation() bool
func (*Capabilities) GetSupportsProgress ¶
func (x *Capabilities) GetSupportsProgress() bool
func (*Capabilities) GetSupportsStreaming ¶
func (x *Capabilities) GetSupportsStreaming() bool
func (*Capabilities) ProtoMessage ¶
func (*Capabilities) ProtoMessage()
func (*Capabilities) ProtoReflect ¶
func (x *Capabilities) ProtoReflect() protoreflect.Message
func (*Capabilities) Reset ¶
func (x *Capabilities) Reset()
func (*Capabilities) String ¶
func (x *Capabilities) String() string
type ClientInfo ¶
type ClientInfo struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
ClientInfo contains client metadata
func (*ClientInfo) Descriptor
deprecated
func (*ClientInfo) Descriptor() ([]byte, []int)
Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.
func (*ClientInfo) GetName ¶
func (x *ClientInfo) GetName() string
func (*ClientInfo) GetVersion ¶
func (x *ClientInfo) GetVersion() string
func (*ClientInfo) ProtoMessage ¶
func (*ClientInfo) ProtoMessage()
func (*ClientInfo) ProtoReflect ¶
func (x *ClientInfo) ProtoReflect() protoreflect.Message
func (*ClientInfo) Reset ¶
func (x *ClientInfo) Reset()
func (*ClientInfo) String ¶
func (x *ClientInfo) String() string
type Content ¶
type Content struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "text", "image", "resource"
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
Content represents tool result content
func (*Content) Descriptor
deprecated
func (*Content) GetMetadata ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) ProtoReflect ¶
func (x *Content) ProtoReflect() protoreflect.Message
type InitializeRequest ¶
type InitializeRequest struct {
ProtocolVersion string `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
ClientInfo *ClientInfo `protobuf:"bytes,2,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
// contains filtered or unexported fields
}
InitializeRequest contains client information
func (*InitializeRequest) Descriptor
deprecated
func (*InitializeRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead.
func (*InitializeRequest) GetCapabilities ¶
func (x *InitializeRequest) GetCapabilities() *Capabilities
func (*InitializeRequest) GetClientInfo ¶
func (x *InitializeRequest) GetClientInfo() *ClientInfo
func (*InitializeRequest) GetProtocolVersion ¶
func (x *InitializeRequest) GetProtocolVersion() string
func (*InitializeRequest) ProtoMessage ¶
func (*InitializeRequest) ProtoMessage()
func (*InitializeRequest) ProtoReflect ¶
func (x *InitializeRequest) ProtoReflect() protoreflect.Message
func (*InitializeRequest) Reset ¶
func (x *InitializeRequest) Reset()
func (*InitializeRequest) String ¶
func (x *InitializeRequest) String() string
type InitializeResponse ¶
type InitializeResponse struct {
ProtocolVersion string `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
ServerInfo *ServerInfo `protobuf:"bytes,2,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"`
Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
// contains filtered or unexported fields
}
InitializeResponse contains server information
func (*InitializeResponse) Descriptor
deprecated
func (*InitializeResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitializeResponse.ProtoReflect.Descriptor instead.
func (*InitializeResponse) GetCapabilities ¶
func (x *InitializeResponse) GetCapabilities() *Capabilities
func (*InitializeResponse) GetProtocolVersion ¶
func (x *InitializeResponse) GetProtocolVersion() string
func (*InitializeResponse) GetServerInfo ¶
func (x *InitializeResponse) GetServerInfo() *ServerInfo
func (*InitializeResponse) ProtoMessage ¶
func (*InitializeResponse) ProtoMessage()
func (*InitializeResponse) ProtoReflect ¶
func (x *InitializeResponse) ProtoReflect() protoreflect.Message
func (*InitializeResponse) Reset ¶
func (x *InitializeResponse) Reset()
func (*InitializeResponse) String ¶
func (x *InitializeResponse) String() string
type ListToolsRequest ¶
type ListToolsRequest struct {
// Optional cursor for pagination
Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
// contains filtered or unexported fields
}
ListToolsRequest requests available tools
func (*ListToolsRequest) Descriptor
deprecated
func (*ListToolsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListToolsRequest.ProtoReflect.Descriptor instead.
func (*ListToolsRequest) GetCursor ¶
func (x *ListToolsRequest) GetCursor() string
func (*ListToolsRequest) ProtoMessage ¶
func (*ListToolsRequest) ProtoMessage()
func (*ListToolsRequest) ProtoReflect ¶
func (x *ListToolsRequest) ProtoReflect() protoreflect.Message
func (*ListToolsRequest) Reset ¶
func (x *ListToolsRequest) Reset()
func (*ListToolsRequest) String ¶
func (x *ListToolsRequest) String() string
type ListToolsResponse ¶
type ListToolsResponse struct {
Tools []*Tool `protobuf:"bytes,1,rep,name=tools,proto3" json:"tools,omitempty"`
NextCursor string `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
// contains filtered or unexported fields
}
ListToolsResponse returns available tools
func (*ListToolsResponse) Descriptor
deprecated
func (*ListToolsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListToolsResponse.ProtoReflect.Descriptor instead.
func (*ListToolsResponse) GetNextCursor ¶
func (x *ListToolsResponse) GetNextCursor() string
func (*ListToolsResponse) GetTools ¶
func (x *ListToolsResponse) GetTools() []*Tool
func (*ListToolsResponse) ProtoMessage ¶
func (*ListToolsResponse) ProtoMessage()
func (*ListToolsResponse) ProtoReflect ¶
func (x *ListToolsResponse) ProtoReflect() protoreflect.Message
func (*ListToolsResponse) Reset ¶
func (x *ListToolsResponse) Reset()
func (*ListToolsResponse) String ¶
func (x *ListToolsResponse) String() string
type ListValue ¶
type ListValue struct {
Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
ListValue represents a list of values
func (*ListValue) Descriptor
deprecated
func (*ListValue) ProtoMessage ¶
func (*ListValue) ProtoMessage()
func (*ListValue) ProtoReflect ¶
func (x *ListValue) ProtoReflect() protoreflect.Message
type MCPServiceClient ¶
type MCPServiceClient interface {
// Initialize establishes the connection and exchanges capabilities
Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error)
// ListTools returns all available tools
ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error)
// CallTool executes a tool with given parameters
CallTool(ctx context.Context, in *CallToolRequest, opts ...grpc.CallOption) (*CallToolResponse, error)
// StreamCallTool executes a tool with streaming response
StreamCallTool(ctx context.Context, in *CallToolRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CallToolResponse], error)
// Ping checks server health
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}
MCPServiceClient is the client API for MCPService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
MCPService defines the MCP protocol over gRPC
func NewMCPServiceClient ¶
func NewMCPServiceClient(cc grpc.ClientConnInterface) MCPServiceClient
type MCPServiceServer ¶
type MCPServiceServer interface {
// Initialize establishes the connection and exchanges capabilities
Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
// ListTools returns all available tools
ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
// CallTool executes a tool with given parameters
CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
// StreamCallTool executes a tool with streaming response
StreamCallTool(*CallToolRequest, grpc.ServerStreamingServer[CallToolResponse]) error
// Ping checks server health
Ping(context.Context, *PingRequest) (*PingResponse, error)
// contains filtered or unexported methods
}
MCPServiceServer is the server API for MCPService service. All implementations must embed UnimplementedMCPServiceServer for forward compatibility.
MCPService defines the MCP protocol over gRPC
type MCPService_StreamCallToolClient ¶
type MCPService_StreamCallToolClient = grpc.ServerStreamingClient[CallToolResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MCPService_StreamCallToolServer ¶
type MCPService_StreamCallToolServer = grpc.ServerStreamingServer[CallToolResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NullValue ¶
type NullValue int32
NullValue represents a null value
const (
NullValue_NULL_VALUE NullValue = 0
)
func (NullValue) Descriptor ¶
func (NullValue) Descriptor() protoreflect.EnumDescriptor
func (NullValue) EnumDescriptor
deprecated
func (NullValue) Number ¶
func (x NullValue) Number() protoreflect.EnumNumber
func (NullValue) Type ¶
func (NullValue) Type() protoreflect.EnumType
type PingRequest ¶
type PingRequest struct {
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
PingRequest checks server health
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetTimestamp ¶
func (x *PingRequest) GetTimestamp() int64
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
// contains filtered or unexported fields
}
PingResponse confirms server health
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetStatus ¶
func (x *PingResponse) GetStatus() string
func (*PingResponse) GetTimestamp ¶
func (x *PingResponse) GetTimestamp() int64
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type Schema ¶
type Schema struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Properties map[string]*SchemaField `` /* 147-byte string literal not displayed */
Required []string `protobuf:"bytes,3,rep,name=required,proto3" json:"required,omitempty"`
// contains filtered or unexported fields
}
Schema represents JSON Schema for tool input
func (*Schema) Descriptor
deprecated
func (*Schema) GetProperties ¶
func (x *Schema) GetProperties() map[string]*SchemaField
func (*Schema) GetRequired ¶
func (*Schema) ProtoMessage ¶
func (*Schema) ProtoMessage()
func (*Schema) ProtoReflect ¶
func (x *Schema) ProtoReflect() protoreflect.Message
type SchemaField ¶
type SchemaField struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
DefaultValue *Value `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
// contains filtered or unexported fields
}
SchemaField represents a schema field definition
func (*SchemaField) Descriptor
deprecated
func (*SchemaField) Descriptor() ([]byte, []int)
Deprecated: Use SchemaField.ProtoReflect.Descriptor instead.
func (*SchemaField) GetDefaultValue ¶
func (x *SchemaField) GetDefaultValue() *Value
func (*SchemaField) GetDescription ¶
func (x *SchemaField) GetDescription() string
func (*SchemaField) GetType ¶
func (x *SchemaField) GetType() string
func (*SchemaField) ProtoMessage ¶
func (*SchemaField) ProtoMessage()
func (*SchemaField) ProtoReflect ¶
func (x *SchemaField) ProtoReflect() protoreflect.Message
func (*SchemaField) Reset ¶
func (x *SchemaField) Reset()
func (*SchemaField) String ¶
func (x *SchemaField) String() string
type ServerInfo ¶
type ServerInfo struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
ServerInfo contains server metadata
func (*ServerInfo) Descriptor
deprecated
func (*ServerInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.
func (*ServerInfo) GetName ¶
func (x *ServerInfo) GetName() string
func (*ServerInfo) GetVersion ¶
func (x *ServerInfo) GetVersion() string
func (*ServerInfo) ProtoMessage ¶
func (*ServerInfo) ProtoMessage()
func (*ServerInfo) ProtoReflect ¶
func (x *ServerInfo) ProtoReflect() protoreflect.Message
func (*ServerInfo) Reset ¶
func (x *ServerInfo) Reset()
func (*ServerInfo) String ¶
func (x *ServerInfo) String() string
type StructValue ¶
type StructValue struct {
Fields map[string]*Value `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
StructValue represents a structured value (map)
func (*StructValue) Descriptor
deprecated
func (*StructValue) Descriptor() ([]byte, []int)
Deprecated: Use StructValue.ProtoReflect.Descriptor instead.
func (*StructValue) GetFields ¶
func (x *StructValue) GetFields() map[string]*Value
func (*StructValue) ProtoMessage ¶
func (*StructValue) ProtoMessage()
func (*StructValue) ProtoReflect ¶
func (x *StructValue) ProtoReflect() protoreflect.Message
func (*StructValue) Reset ¶
func (x *StructValue) Reset()
func (*StructValue) String ¶
func (x *StructValue) String() string
type Tool ¶
type Tool struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
InputSchema *Schema `protobuf:"bytes,3,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"`
// contains filtered or unexported fields
}
Tool represents a callable tool
func (*Tool) Descriptor
deprecated
func (*Tool) GetDescription ¶
func (*Tool) GetInputSchema ¶
func (*Tool) ProtoMessage ¶
func (*Tool) ProtoMessage()
func (*Tool) ProtoReflect ¶
func (x *Tool) ProtoReflect() protoreflect.Message
type UnimplementedMCPServiceServer ¶
type UnimplementedMCPServiceServer struct{}
UnimplementedMCPServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedMCPServiceServer) CallTool ¶
func (UnimplementedMCPServiceServer) CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
func (UnimplementedMCPServiceServer) Initialize ¶
func (UnimplementedMCPServiceServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
func (UnimplementedMCPServiceServer) ListTools ¶
func (UnimplementedMCPServiceServer) ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
func (UnimplementedMCPServiceServer) Ping ¶
func (UnimplementedMCPServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedMCPServiceServer) StreamCallTool ¶
func (UnimplementedMCPServiceServer) StreamCallTool(*CallToolRequest, grpc.ServerStreamingServer[CallToolResponse]) error
type UnsafeMCPServiceServer ¶
type UnsafeMCPServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMCPServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MCPServiceServer will result in compilation errors.
type Value ¶
type Value struct {
// Types that are valid to be assigned to Kind:
//
// *Value_StringValue
// *Value_NumberValue
// *Value_BoolValue
// *Value_NullValue
// *Value_ListValue
// *Value_StructValue
Kind isValue_Kind `protobuf_oneof:"kind"`
// contains filtered or unexported fields
}
Value represents a dynamic value
func (*Value) Descriptor
deprecated
func (*Value) GetBoolValue ¶
func (*Value) GetListValue ¶
func (*Value) GetNullValue ¶
func (*Value) GetNumberValue ¶
func (*Value) GetStringValue ¶
func (*Value) GetStructValue ¶
func (x *Value) GetStructValue() *StructValue
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
type Value_BoolValue ¶
type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type Value_ListValue ¶
type Value_ListValue struct {
ListValue *ListValue `protobuf:"bytes,5,opt,name=list_value,json=listValue,proto3,oneof"`
}
type Value_NullValue ¶
type Value_NullValue struct {
NullValue NullValue `protobuf:"varint,4,opt,name=null_value,json=nullValue,proto3,enum=mcp.NullValue,oneof"`
}
type Value_NumberValue ¶
type Value_NumberValue struct {
NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"`
}
type Value_StringValue ¶
type Value_StringValue struct {
StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type Value_StructValue ¶
type Value_StructValue struct {
StructValue *StructValue `protobuf:"bytes,6,opt,name=struct_value,json=structValue,proto3,oneof"`
}