Documentation
¶
Overview ¶
Package mcp is Datly's default implementation of the public outbound MCP client contract (github.com/viant/xdatly/client/mcp) built on github.com/viant/mcp. Sessions are scoped by the exact header set they were initialized with, so principals never share a session and every HTTP stage of a session carries the same explicit headers.
Index ¶
Constants ¶
const (
// TransportStreamable is the supported viant/mcp HTTP transport.
TransportStreamable = "streamable"
)
Variables ¶
This section is empty.
Functions ¶
func SessionKey ¶
SessionKey identifies a session by its complete header set. JSON orders map keys deterministically while preserving value order and boundaries, so reordered or merged repeated headers never reuse another session.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements xmcp.Client for one configured endpoint and tool.
func New ¶
New validates options and builds the client. No connection is opened until the first call.
func (*Client) CallTool ¶
func (c *Client) CallTool(ctx context.Context, request *schema.CallToolRequest, options xmcp.CallOptions) (*schema.CallToolResult, error)
CallTool invokes the configured tool. The request's tool name must match the configuration; the native result, including isError, is returned unchanged and protocol errors are returned as errors.