Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMCPServer(s grpc.ServiceRegistrar, srv MCPServer)
- type CallToolRequest
- func (*CallToolRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallToolRequest) GetArguments() map[string]string
- 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 ClientInfo
- type Content
- func (*Content) Descriptor() ([]byte, []int)deprecated
- func (x *Content) GetContent() isContent_Content
- func (x *Content) GetImage() *ImageContent
- func (x *Content) GetResource() *ResourceContent
- func (x *Content) GetText() *TextContent
- func (*Content) ProtoMessage()
- func (x *Content) ProtoReflect() protoreflect.Message
- func (x *Content) Reset()
- func (x *Content) String() string
- type Content_Image
- type Content_Resource
- type Content_Text
- type ImageContent
- func (*ImageContent) Descriptor() ([]byte, []int)deprecated
- func (x *ImageContent) GetData() string
- func (x *ImageContent) GetMimeType() string
- func (x *ImageContent) GetType() string
- func (*ImageContent) ProtoMessage()
- func (x *ImageContent) ProtoReflect() protoreflect.Message
- func (x *ImageContent) Reset()
- func (x *ImageContent) String() string
- type InitializeRequest
- func (*InitializeRequest) Descriptor() ([]byte, []int)deprecated
- 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) 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 InputSchema
- func (*InputSchema) Descriptor() ([]byte, []int)deprecated
- func (x *InputSchema) GetProperties() map[string]*PropertySchema
- func (x *InputSchema) GetRequired() []string
- func (x *InputSchema) GetType() string
- func (*InputSchema) ProtoMessage()
- func (x *InputSchema) ProtoReflect() protoreflect.Message
- func (x *InputSchema) Reset()
- func (x *InputSchema) String() string
- type ListResourcesRequest
- type ListResourcesResponse
- func (*ListResourcesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesResponse) GetResources() []*Resource
- func (*ListResourcesResponse) ProtoMessage()
- func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
- func (x *ListResourcesResponse) Reset()
- func (x *ListResourcesResponse) String() string
- type ListToolsRequest
- type ListToolsResponse
- type MCPClient
- type MCPServer
- type PropertySchema
- func (*PropertySchema) Descriptor() ([]byte, []int)deprecated
- func (x *PropertySchema) GetDescription() string
- func (x *PropertySchema) GetEnumValues() []string
- func (x *PropertySchema) GetType() string
- func (*PropertySchema) ProtoMessage()
- func (x *PropertySchema) ProtoReflect() protoreflect.Message
- func (x *PropertySchema) Reset()
- func (x *PropertySchema) String() string
- type ReadResourceRequest
- func (*ReadResourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadResourceRequest) GetUri() string
- func (*ReadResourceRequest) ProtoMessage()
- func (x *ReadResourceRequest) ProtoReflect() protoreflect.Message
- func (x *ReadResourceRequest) Reset()
- func (x *ReadResourceRequest) String() string
- type ReadResourceResponse
- func (*ReadResourceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadResourceResponse) GetContents() []*Content
- func (*ReadResourceResponse) ProtoMessage()
- func (x *ReadResourceResponse) ProtoReflect() protoreflect.Message
- func (x *ReadResourceResponse) Reset()
- func (x *ReadResourceResponse) String() string
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)deprecated
- func (x *Resource) GetDescription() string
- func (x *Resource) GetMimeType() string
- func (x *Resource) GetName() string
- func (x *Resource) GetUri() string
- func (*Resource) ProtoMessage()
- func (x *Resource) ProtoReflect() protoreflect.Message
- func (x *Resource) Reset()
- func (x *Resource) String() string
- type ResourceContent
- func (*ResourceContent) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceContent) GetBlob() string
- func (x *ResourceContent) GetResource() *Resource
- func (x *ResourceContent) GetText() string
- func (x *ResourceContent) GetType() string
- func (*ResourceContent) ProtoMessage()
- func (x *ResourceContent) ProtoReflect() protoreflect.Message
- func (x *ResourceContent) Reset()
- func (x *ResourceContent) String() string
- type ServerCapabilities
- func (*ServerCapabilities) Descriptor() ([]byte, []int)deprecated
- func (x *ServerCapabilities) GetPrompts() bool
- func (x *ServerCapabilities) GetResources() bool
- func (x *ServerCapabilities) GetTools() bool
- func (*ServerCapabilities) ProtoMessage()
- func (x *ServerCapabilities) ProtoReflect() protoreflect.Message
- func (x *ServerCapabilities) Reset()
- func (x *ServerCapabilities) String() string
- type ServerInfo
- func (*ServerInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ServerInfo) GetCapabilities() *ServerCapabilities
- func (x *ServerInfo) GetName() string
- func (x *ServerInfo) GetVersion() string
- func (*ServerInfo) ProtoMessage()
- func (x *ServerInfo) ProtoReflect() protoreflect.Message
- func (x *ServerInfo) Reset()
- func (x *ServerInfo) String() string
- type TextContent
- type Tool
- func (*Tool) Descriptor() ([]byte, []int)deprecated
- func (x *Tool) GetDescription() string
- func (x *Tool) GetInputSchema() *InputSchema
- func (x *Tool) GetName() string
- func (*Tool) ProtoMessage()
- func (x *Tool) ProtoReflect() protoreflect.Message
- func (x *Tool) Reset()
- func (x *Tool) String() string
- type UnimplementedMCPServer
- func (UnimplementedMCPServer) CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
- func (UnimplementedMCPServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
- func (UnimplementedMCPServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
- func (UnimplementedMCPServer) ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
- func (UnimplementedMCPServer) ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
- type UnsafeMCPServer
Constants ¶
const ( MCP_Initialize_FullMethodName = "/codefly.mcp.v0.MCP/Initialize" MCP_ListTools_FullMethodName = "/codefly.mcp.v0.MCP/ListTools" MCP_CallTool_FullMethodName = "/codefly.mcp.v0.MCP/CallTool" MCP_ListResources_FullMethodName = "/codefly.mcp.v0.MCP/ListResources" MCP_ReadResource_FullMethodName = "/codefly.mcp.v0.MCP/ReadResource" )
Variables ¶
var File_codefly_mcp_v0_mcp_proto protoreflect.FileDescriptor
var MCP_ServiceDesc = grpc.ServiceDesc{ ServiceName: "codefly.mcp.v0.MCP", HandlerType: (*MCPServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Initialize", Handler: _MCP_Initialize_Handler, }, { MethodName: "ListTools", Handler: _MCP_ListTools_Handler, }, { MethodName: "CallTool", Handler: _MCP_CallTool_Handler, }, { MethodName: "ListResources", Handler: _MCP_ListResources_Handler, }, { MethodName: "ReadResource", Handler: _MCP_ReadResource_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "codefly/mcp/v0/mcp.proto", }
MCP_ServiceDesc is the grpc.ServiceDesc for MCP service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMCPServer ¶
func RegisterMCPServer(s grpc.ServiceRegistrar, srv MCPServer)
Types ¶
type CallToolRequest ¶
type CallToolRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Arguments map[string]string `` /* 145-byte string literal not displayed */
// contains filtered or unexported fields
}
Tool execution
func (*CallToolRequest) Descriptor
deprecated
func (*CallToolRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallToolRequest.ProtoReflect.Descriptor instead.
func (*CallToolRequest) GetArguments ¶
func (x *CallToolRequest) GetArguments() map[string]string
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
}
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 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
}
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 {
// Types that are valid to be assigned to Content:
//
// *Content_Text
// *Content_Image
// *Content_Resource
Content isContent_Content `protobuf_oneof:"content"`
// contains filtered or unexported fields
}
func (*Content) Descriptor
deprecated
func (*Content) GetContent ¶
func (x *Content) GetContent() isContent_Content
func (*Content) GetImage ¶
func (x *Content) GetImage() *ImageContent
func (*Content) GetResource ¶
func (x *Content) GetResource() *ResourceContent
func (*Content) GetText ¶
func (x *Content) GetText() *TextContent
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) ProtoReflect ¶
func (x *Content) ProtoReflect() protoreflect.Message
type Content_Image ¶
type Content_Image struct {
Image *ImageContent `protobuf:"bytes,2,opt,name=image,proto3,oneof"`
}
type Content_Resource ¶
type Content_Resource struct {
Resource *ResourceContent `protobuf:"bytes,3,opt,name=resource,proto3,oneof"`
}
type Content_Text ¶
type Content_Text struct {
Text *TextContent `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}
type ImageContent ¶
type ImageContent struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "image"
Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// contains filtered or unexported fields
}
func (*ImageContent) Descriptor
deprecated
func (*ImageContent) Descriptor() ([]byte, []int)
Deprecated: Use ImageContent.ProtoReflect.Descriptor instead.
func (*ImageContent) GetData ¶
func (x *ImageContent) GetData() string
func (*ImageContent) GetMimeType ¶
func (x *ImageContent) GetMimeType() string
func (*ImageContent) GetType ¶
func (x *ImageContent) GetType() string
func (*ImageContent) ProtoMessage ¶
func (*ImageContent) ProtoMessage()
func (*ImageContent) ProtoReflect ¶
func (x *ImageContent) ProtoReflect() protoreflect.Message
func (*ImageContent) Reset ¶
func (x *ImageContent) Reset()
func (*ImageContent) String ¶
func (x *ImageContent) String() string
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"`
// contains filtered or unexported fields
}
Initialize
func (*InitializeRequest) Descriptor
deprecated
func (*InitializeRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead.
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"`
// contains filtered or unexported fields
}
func (*InitializeResponse) Descriptor
deprecated
func (*InitializeResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitializeResponse.ProtoReflect.Descriptor instead.
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 InputSchema ¶
type InputSchema struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "object"
Properties map[string]*PropertySchema `` /* 147-byte string literal not displayed */
Required []string `protobuf:"bytes,3,rep,name=required,proto3" json:"required,omitempty"`
// contains filtered or unexported fields
}
func (*InputSchema) Descriptor
deprecated
func (*InputSchema) Descriptor() ([]byte, []int)
Deprecated: Use InputSchema.ProtoReflect.Descriptor instead.
func (*InputSchema) GetProperties ¶
func (x *InputSchema) GetProperties() map[string]*PropertySchema
func (*InputSchema) GetRequired ¶
func (x *InputSchema) GetRequired() []string
func (*InputSchema) GetType ¶
func (x *InputSchema) GetType() string
func (*InputSchema) ProtoMessage ¶
func (*InputSchema) ProtoMessage()
func (*InputSchema) ProtoReflect ¶
func (x *InputSchema) ProtoReflect() protoreflect.Message
func (*InputSchema) Reset ¶
func (x *InputSchema) Reset()
func (*InputSchema) String ¶
func (x *InputSchema) String() string
type ListResourcesRequest ¶
type ListResourcesRequest struct {
// contains filtered or unexported fields
}
func (*ListResourcesRequest) Descriptor
deprecated
func (*ListResourcesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.
func (*ListResourcesRequest) ProtoMessage ¶
func (*ListResourcesRequest) ProtoMessage()
func (*ListResourcesRequest) ProtoReflect ¶
func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
func (*ListResourcesRequest) Reset ¶
func (x *ListResourcesRequest) Reset()
func (*ListResourcesRequest) String ¶
func (x *ListResourcesRequest) String() string
type ListResourcesResponse ¶
type ListResourcesResponse struct {
Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
// contains filtered or unexported fields
}
func (*ListResourcesResponse) Descriptor
deprecated
func (*ListResourcesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.
func (*ListResourcesResponse) GetResources ¶
func (x *ListResourcesResponse) GetResources() []*Resource
func (*ListResourcesResponse) ProtoMessage ¶
func (*ListResourcesResponse) ProtoMessage()
func (*ListResourcesResponse) ProtoReflect ¶
func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
func (*ListResourcesResponse) Reset ¶
func (x *ListResourcesResponse) Reset()
func (*ListResourcesResponse) String ¶
func (x *ListResourcesResponse) String() string
type ListToolsRequest ¶
type ListToolsRequest struct {
// contains filtered or unexported fields
}
Tool listing
func (*ListToolsRequest) Descriptor
deprecated
func (*ListToolsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListToolsRequest.ProtoReflect.Descriptor instead.
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"`
// contains filtered or unexported fields
}
func (*ListToolsResponse) Descriptor
deprecated
func (*ListToolsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListToolsResponse.ProtoReflect.Descriptor instead.
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 MCPClient ¶
type MCPClient interface {
Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error)
ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error)
CallTool(ctx context.Context, in *CallToolRequest, opts ...grpc.CallOption) (*CallToolResponse, error)
ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error)
ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error)
}
MCPClient is the client API for MCP 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.
MCP Service (for potential gRPC usage, though MCP typically uses JSON-RPC)
func NewMCPClient ¶
func NewMCPClient(cc grpc.ClientConnInterface) MCPClient
type MCPServer ¶
type MCPServer interface {
Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
// contains filtered or unexported methods
}
MCPServer is the server API for MCP service. All implementations must embed UnimplementedMCPServer for forward compatibility.
MCP Service (for potential gRPC usage, though MCP typically uses JSON-RPC)
type PropertySchema ¶
type PropertySchema 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"`
EnumValues []string `protobuf:"bytes,3,rep,name=enum_values,json=enumValues,proto3" json:"enum_values,omitempty"` // For enum types
// contains filtered or unexported fields
}
func (*PropertySchema) Descriptor
deprecated
func (*PropertySchema) Descriptor() ([]byte, []int)
Deprecated: Use PropertySchema.ProtoReflect.Descriptor instead.
func (*PropertySchema) GetDescription ¶
func (x *PropertySchema) GetDescription() string
func (*PropertySchema) GetEnumValues ¶
func (x *PropertySchema) GetEnumValues() []string
func (*PropertySchema) GetType ¶
func (x *PropertySchema) GetType() string
func (*PropertySchema) ProtoMessage ¶
func (*PropertySchema) ProtoMessage()
func (*PropertySchema) ProtoReflect ¶
func (x *PropertySchema) ProtoReflect() protoreflect.Message
func (*PropertySchema) Reset ¶
func (x *PropertySchema) Reset()
func (*PropertySchema) String ¶
func (x *PropertySchema) String() string
type ReadResourceRequest ¶
type ReadResourceRequest struct {
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
// contains filtered or unexported fields
}
Resource operations
func (*ReadResourceRequest) Descriptor
deprecated
func (*ReadResourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadResourceRequest.ProtoReflect.Descriptor instead.
func (*ReadResourceRequest) GetUri ¶
func (x *ReadResourceRequest) GetUri() string
func (*ReadResourceRequest) ProtoMessage ¶
func (*ReadResourceRequest) ProtoMessage()
func (*ReadResourceRequest) ProtoReflect ¶
func (x *ReadResourceRequest) ProtoReflect() protoreflect.Message
func (*ReadResourceRequest) Reset ¶
func (x *ReadResourceRequest) Reset()
func (*ReadResourceRequest) String ¶
func (x *ReadResourceRequest) String() string
type ReadResourceResponse ¶
type ReadResourceResponse struct {
Contents []*Content `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"`
// contains filtered or unexported fields
}
func (*ReadResourceResponse) Descriptor
deprecated
func (*ReadResourceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResourceResponse.ProtoReflect.Descriptor instead.
func (*ReadResourceResponse) GetContents ¶
func (x *ReadResourceResponse) GetContents() []*Content
func (*ReadResourceResponse) ProtoMessage ¶
func (*ReadResourceResponse) ProtoMessage()
func (*ReadResourceResponse) ProtoReflect ¶
func (x *ReadResourceResponse) ProtoReflect() protoreflect.Message
func (*ReadResourceResponse) Reset ¶
func (x *ReadResourceResponse) Reset()
func (*ReadResourceResponse) String ¶
func (x *ReadResourceResponse) String() string
type Resource ¶
type Resource struct {
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
MCP Resource Definition
func (*Resource) Descriptor
deprecated
func (*Resource) GetDescription ¶
func (*Resource) GetMimeType ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type ResourceContent ¶
type ResourceContent struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "resource"
Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
Blob string `protobuf:"bytes,4,opt,name=blob,proto3" json:"blob,omitempty"`
// contains filtered or unexported fields
}
func (*ResourceContent) Descriptor
deprecated
func (*ResourceContent) Descriptor() ([]byte, []int)
Deprecated: Use ResourceContent.ProtoReflect.Descriptor instead.
func (*ResourceContent) GetBlob ¶
func (x *ResourceContent) GetBlob() string
func (*ResourceContent) GetResource ¶
func (x *ResourceContent) GetResource() *Resource
func (*ResourceContent) GetText ¶
func (x *ResourceContent) GetText() string
func (*ResourceContent) GetType ¶
func (x *ResourceContent) GetType() string
func (*ResourceContent) ProtoMessage ¶
func (*ResourceContent) ProtoMessage()
func (*ResourceContent) ProtoReflect ¶
func (x *ResourceContent) ProtoReflect() protoreflect.Message
func (*ResourceContent) Reset ¶
func (x *ResourceContent) Reset()
func (*ResourceContent) String ¶
func (x *ResourceContent) String() string
type ServerCapabilities ¶
type ServerCapabilities struct {
Tools bool `protobuf:"varint,1,opt,name=tools,proto3" json:"tools,omitempty"`
Resources bool `protobuf:"varint,2,opt,name=resources,proto3" json:"resources,omitempty"`
Prompts bool `protobuf:"varint,3,opt,name=prompts,proto3" json:"prompts,omitempty"`
// contains filtered or unexported fields
}
func (*ServerCapabilities) Descriptor
deprecated
func (*ServerCapabilities) Descriptor() ([]byte, []int)
Deprecated: Use ServerCapabilities.ProtoReflect.Descriptor instead.
func (*ServerCapabilities) GetPrompts ¶
func (x *ServerCapabilities) GetPrompts() bool
func (*ServerCapabilities) GetResources ¶
func (x *ServerCapabilities) GetResources() bool
func (*ServerCapabilities) GetTools ¶
func (x *ServerCapabilities) GetTools() bool
func (*ServerCapabilities) ProtoMessage ¶
func (*ServerCapabilities) ProtoMessage()
func (*ServerCapabilities) ProtoReflect ¶
func (x *ServerCapabilities) ProtoReflect() protoreflect.Message
func (*ServerCapabilities) Reset ¶
func (x *ServerCapabilities) Reset()
func (*ServerCapabilities) String ¶
func (x *ServerCapabilities) 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"`
Capabilities *ServerCapabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
// contains filtered or unexported fields
}
Server info
func (*ServerInfo) Descriptor
deprecated
func (*ServerInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.
func (*ServerInfo) GetCapabilities ¶
func (x *ServerInfo) GetCapabilities() *ServerCapabilities
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 TextContent ¶
type TextContent struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "text"
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}
Content types returned by tools and resources
func (*TextContent) Descriptor
deprecated
func (*TextContent) Descriptor() ([]byte, []int)
Deprecated: Use TextContent.ProtoReflect.Descriptor instead.
func (*TextContent) GetText ¶
func (x *TextContent) GetText() string
func (*TextContent) GetType ¶
func (x *TextContent) GetType() string
func (*TextContent) ProtoMessage ¶
func (*TextContent) ProtoMessage()
func (*TextContent) ProtoReflect ¶
func (x *TextContent) ProtoReflect() protoreflect.Message
func (*TextContent) Reset ¶
func (x *TextContent) Reset()
func (*TextContent) String ¶
func (x *TextContent) 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 *InputSchema `protobuf:"bytes,3,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"`
// contains filtered or unexported fields
}
MCP Tool Definition (aligned with Model Context Protocol spec)
func (*Tool) Descriptor
deprecated
func (*Tool) GetDescription ¶
func (*Tool) GetInputSchema ¶
func (x *Tool) GetInputSchema() *InputSchema
func (*Tool) ProtoMessage ¶
func (*Tool) ProtoMessage()
func (*Tool) ProtoReflect ¶
func (x *Tool) ProtoReflect() protoreflect.Message
type UnimplementedMCPServer ¶
type UnimplementedMCPServer struct{}
UnimplementedMCPServer 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 (UnimplementedMCPServer) CallTool ¶
func (UnimplementedMCPServer) CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
func (UnimplementedMCPServer) Initialize ¶
func (UnimplementedMCPServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
func (UnimplementedMCPServer) ListResources ¶
func (UnimplementedMCPServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
func (UnimplementedMCPServer) ListTools ¶
func (UnimplementedMCPServer) ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
func (UnimplementedMCPServer) ReadResource ¶
func (UnimplementedMCPServer) ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
type UnsafeMCPServer ¶
type UnsafeMCPServer interface {
// contains filtered or unexported methods
}
UnsafeMCPServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MCPServer will result in compilation errors.