Documentation
¶
Index ¶
- func Close(session *ClientSession) error
- func ErrorResult(msg string) any
- func New(name string, version string) *mcp.Server
- func Required(schema map[string]any, names []string) map[string]any
- func Schema(props []SchemaProperty) map[string]any
- func Serve(server *mcp.Server) error
- func TextResult(text string) any
- func Tool(server *mcp.Server, name string, description string, schema any, ...)
- func ToolWithSampling(server *mcp.Server, name string, description string, schema any, ...)
- type AudioContent
- type CallToolParams
- type CallToolResult
- type Client
- type ClientSession
- func BearerConnect(ctx context.Context, endpoint string, token string) (*ClientSession, error)
- func Connect(ctx context.Context, endpoint string) (*ClientSession, error)
- func ConnectFromSession(inner *mcp.ClientSession) *ClientSession
- func ConnectWithClient(ctx context.Context, endpoint string, httpClient *http.Client) (*ClientSession, error)
- type ClientTool
- type CreateMessageParams
- type CreateMessageResult
- type CreateMessageWithToolsParams
- type CreateMessageWithToolsResult
- type EmbeddedResource
- type ImageContent
- type ResourceContents
- type ResourceLink
- type SamplingCapabilities
- type SamplingHandler
- type SamplingMessage
- type SamplingMessageV2
- type SamplingToolsCapabilities
- type SamplingWithToolsHandler
- type SchemaProperty
- type Server
- type ServerSession
- type TextContent
- type ToolChoice
- type ToolHandler
- type ToolResultContent
- type ToolSamplingHandler
- type ToolUseContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶ added in v0.0.31
func Close(session *ClientSession) error
func ErrorResult ¶
func Schema ¶
func Schema(props []SchemaProperty) map[string]any
func TextResult ¶
func ToolWithSampling ¶ added in v0.1.5
Types ¶
type AudioContent ¶ added in v0.1.7
type AudioContent = mcp.AudioContent
type CallToolParams ¶ added in v0.1.5
type CallToolParams = mcp.CallToolParams
type CallToolResult ¶ added in v0.0.31
func CallTool ¶ added in v0.0.31
func CallTool(ctx context.Context, session *ClientSession, name string, args map[string]any) (CallToolResult, error)
type Client ¶ added in v0.1.5
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithSampling ¶ added in v0.1.5
func NewClientWithSampling(name string, version string, handler SamplingHandler) *Client
func NewClientWithSamplingTools ¶ added in v0.1.5
func NewClientWithSamplingTools(name string, version string, handler SamplingWithToolsHandler) *Client
func (*Client) ConnectWith ¶ added in v0.1.5
type ClientSession ¶ added in v0.0.31
type ClientSession struct {
// contains filtered or unexported fields
}
func BearerConnect ¶ added in v0.1.3
func Connect ¶ added in v0.0.31
func Connect(ctx context.Context, endpoint string) (*ClientSession, error)
func ConnectFromSession ¶ added in v0.1.7
func ConnectFromSession(inner *mcp.ClientSession) *ClientSession
func ConnectWithClient ¶ added in v0.1.3
type ClientTool ¶ added in v0.0.31
func ListTools ¶ added in v0.0.31
func ListTools(ctx context.Context, session *ClientSession) ([]ClientTool, error)
type CreateMessageParams ¶ added in v0.1.5
type CreateMessageParams = mcp.CreateMessageParams
type CreateMessageResult ¶ added in v0.1.5
type CreateMessageResult = mcp.CreateMessageResult
type CreateMessageWithToolsParams ¶ added in v0.1.5
type CreateMessageWithToolsParams = mcp.CreateMessageWithToolsParams
type CreateMessageWithToolsResult ¶ added in v0.1.5
type CreateMessageWithToolsResult = mcp.CreateMessageWithToolsResult
type EmbeddedResource ¶ added in v0.1.7
type EmbeddedResource = mcp.EmbeddedResource
type ImageContent ¶ added in v0.1.5
type ImageContent = mcp.ImageContent
type ResourceContents ¶ added in v0.1.7
type ResourceContents = mcp.ResourceContents
type ResourceLink ¶ added in v0.1.7
type ResourceLink = mcp.ResourceLink
type SamplingCapabilities ¶ added in v0.1.5
type SamplingCapabilities = mcp.SamplingCapabilities
type SamplingHandler ¶ added in v0.1.5
type SamplingHandler func(context.Context, *mcp.CreateMessageParams) (*mcp.CreateMessageResult, error)
type SamplingMessage ¶ added in v0.1.5
type SamplingMessage = mcp.SamplingMessage
type SamplingMessageV2 ¶ added in v0.1.5
type SamplingMessageV2 = mcp.SamplingMessageV2
type SamplingToolsCapabilities ¶ added in v0.1.5
type SamplingToolsCapabilities = mcp.SamplingToolsCapabilities
type SamplingWithToolsHandler ¶ added in v0.1.5
type SamplingWithToolsHandler func(context.Context, *mcp.CreateMessageWithToolsParams) (*mcp.CreateMessageWithToolsResult, error)
type SchemaProperty ¶
type ServerSession ¶ added in v0.1.5
type ServerSession struct {
// contains filtered or unexported fields
}
func (*ServerSession) CreateMessage ¶ added in v0.1.5
func (ss *ServerSession) CreateMessage(ctx context.Context, params *mcp.CreateMessageParams) (*mcp.CreateMessageResult, error)
func (*ServerSession) CreateMessageWithTools ¶ added in v0.1.5
func (ss *ServerSession) CreateMessageWithTools(ctx context.Context, params *mcp.CreateMessageWithToolsParams) (*mcp.CreateMessageWithToolsResult, error)
type TextContent ¶ added in v0.1.5
type TextContent = mcp.TextContent
type ToolChoice ¶ added in v0.1.5
type ToolChoice = mcp.ToolChoice
type ToolResultContent ¶ added in v0.1.5
type ToolResultContent = mcp.ToolResultContent
type ToolSamplingHandler ¶ added in v0.1.5
type ToolUseContent ¶ added in v0.1.5
type ToolUseContent = mcp.ToolUseContent
Click to show internal directories.
Click to hide internal directories.