Versions in this module Expand all Collapse all v1 v1.0.0 Mar 22, 2025 Changes in this version + type Annotations struct + Audience []Role + Priority *float64 + type BlobResourceContents struct + Blob string + MimeType *string + Uri string + type Client struct + func NewClient(transport transport.Transport) *Client + func NewClientWithInfo(transport transport.Transport, info ClientInfo) *Client + func (c *Client) CallTool(ctx context.Context, name string, arguments any) (*ToolResponse, error) + func (c *Client) GetCapabilities() *ServerCapabilities + func (c *Client) GetPrompt(ctx context.Context, name string, arguments any) (*PromptResponse, error) + func (c *Client) Initialize(ctx context.Context) (*InitializeResponse, error) + func (c *Client) ListPrompts(ctx context.Context, cursor *string) (*ListPromptsResponse, error) + func (c *Client) ListResources(ctx context.Context, cursor *string) (*ListResourcesResponse, error) + func (c *Client) ListTools(ctx context.Context, cursor *string) (*ToolsResponse, error) + func (c *Client) Ping(ctx context.Context) error + func (c *Client) ReadResource(ctx context.Context, uri string) (*ResourceResponse, error) + type ClientInfo struct + Name string + Version string + type Content struct + Annotations *Annotations + EmbeddedResource *EmbeddedResource + ImageContent *ImageContent + TextContent *TextContent + Type ContentType + func NewBlobResourceContent(uri string, base64EncodedData string, mimeType string) *Content + func NewImageContent(base64EncodedStringData string, mimeType string) *Content + func NewTextContent(content string) *Content + func NewTextResourceContent(uri string, text string, mimeType string) *Content + func (c *Content) UnmarshalJSON(b []byte) error + func (c *Content) WithAnnotations(annotations Annotations) *Content + func (c Content) MarshalJSON() ([]byte, error) + type ContentType string + const ContentTypeEmbeddedResource + const ContentTypeImage + const ContentTypeText + type EmbeddedResource struct + BlobResourceContents *BlobResourceContents + EmbeddedResourceType embeddedResourceType + TextResourceContents *TextResourceContents + func NewBlobEmbeddedResource(uri string, base64EncodedData string, mimeType string) *EmbeddedResource + func NewTextEmbeddedResource(uri string, text string, mimeType string) *EmbeddedResource + func (c EmbeddedResource) MarshalJSON() ([]byte, error) + type ImageContent struct + Data string + MimeType string + type InitializeResponse struct + Capabilities ServerCapabilities + Instructions *string + Meta initializeResultMeta + ProtocolVersion string + ServerInfo implementation + func (j *InitializeResponse) UnmarshalJSON(b []byte) error + type ListPromptsResponse struct + NextCursor *string + Prompts []*PromptSchema + type ListResourcesResponse struct + NextCursor *string + Resources []*ResourceSchema + type PromptMessage struct + Content *Content + Role Role + func NewPromptMessage(content *Content, role Role) *PromptMessage + type PromptResponse struct + Description *string + Messages []*PromptMessage + func NewPromptResponse(description string, messages ...*PromptMessage) *PromptResponse + type PromptSchema struct + Arguments []PromptSchemaArgument + Description *string + Name string + type PromptSchemaArgument struct + Description *string + Name string + Required *bool + type ResourceResponse struct + Contents []*EmbeddedResource + func NewResourceResponse(contents ...*EmbeddedResource) *ResourceResponse + type ResourceSchema struct + Annotations *Annotations + Description *string + MimeType *string + Name string + Uri string + type Role string + const RoleAssistant + const RoleUser + type Server struct + func NewServer(transport transport.Transport, options ...ServerOptions) *Server + func (s *Server) CheckPromptRegistered(name string) bool + func (s *Server) CheckResourceRegistered(uri string) bool + func (s *Server) CheckToolRegistered(name string) bool + func (s *Server) DeregisterPrompt(name string) error + func (s *Server) DeregisterResource(uri string) error + func (s *Server) DeregisterTool(name string) error + func (s *Server) RegisterPrompt(name string, description string, handler any) error + func (s *Server) RegisterResource(uri string, name string, description string, mimeType string, handler any) error + func (s *Server) RegisterTool(name string, description string, handler any) error + func (s *Server) Serve() error + type ServerCapabilities struct + Experimental ServerCapabilitiesExperimental + Logging ServerCapabilitiesLogging + Prompts *ServerCapabilitiesPrompts + Resources *ServerCapabilitiesResources + Tools *ServerCapabilitiesTools + type ServerCapabilitiesExperimental map[string]map[string]interface + type ServerCapabilitiesLogging map[string]interface + type ServerCapabilitiesPrompts struct + ListChanged *bool + type ServerCapabilitiesResources struct + ListChanged *bool + Subscribe *bool + type ServerCapabilitiesTools struct + ListChanged *bool + type ServerOptions func(*Server) + func WithName(name string) ServerOptions + func WithPaginationLimit(limit int) ServerOptions + func WithProtocol(protocol *protocol.Protocol) ServerOptions + func WithVersion(version string) ServerOptions + type TextContent struct + Text string + type TextResourceContents struct + MimeType *string + Text string + Uri string + type ToolResponse struct + Content []*Content + func NewToolResponse(content ...*Content) *ToolResponse + type ToolRetType struct + Description *string + InputSchema interface{} + Name string + type ToolsResponse struct + NextCursor *string + Tools []ToolRetType Other modules containing this package github.com/agentuity/mcp-golang/v2