Versions in this module Expand all Collapse all v0 v0.1.0 Sep 18, 2026 v0.0.2 Sep 18, 2026 Changes in this version + const DefaultClientVersion v0.0.1 Sep 17, 2026 Changes in this version + var ErrIssuerMismatch = errors.New("scout: authorization response came from the wrong issuer") + var ErrResourceMismatch = errors.New("scout: protected resource metadata does not identify this endpoint") + var SessionVersions = []string + var StatelessVersions = []string + var SupportedProtocolVersions = []string + func Unauthorized(err error) (auth.Challenge, bool) + type AuthConfig struct + Extra url.Values + Mode AuthMode + Overrides Overrides + RedirectURI string + Registration auth.RegistrationOptions + Scope string + StepUp auth.StepUpFunc + Token string + TokenAuthMethod string + type AuthMode string + const AuthAuthorizationCode + const AuthBearer + const AuthClientCredentials + const AuthNone + type CallToolResult struct + Content []Content + IsError bool + StructuredContent json.RawMessage + func (r *CallToolResult) Text() string + type Client struct + func New(cfg Config) (*Client, error) + func (c *Client) AllowedOrigins() []string + func (c *Client) Call(ctx context.Context, method string, params, result any) error + func (c *Client) CallTool(ctx context.Context, name string, args any) (*CallToolResult, error) + func (c *Client) ClientCredentialsSource(d *Discovery) (*auth.ClientCredentialsSource, error) + func (c *Client) CompleteAuthorization(ctx context.Context, code, state string) (*ConnectResult, error) + func (c *Client) CompleteAuthorizationFrom(ctx context.Context, code, state, iss string) (*ConnectResult, error) + func (c *Client) Config() Config + func (c *Client) Connect(ctx context.Context) (*ConnectResult, error) + func (c *Client) Discover(ctx context.Context, challenge auth.Challenge) (*Discovery, error) + func (c *Client) Discoverer() *auth.Discoverer + func (c *Client) GetPrompt(ctx context.Context, name string, args map[string]string) (*GetPromptResult, error) + func (c *Client) HTTPClient() *http.Client + func (c *Client) Initialize(ctx context.Context) (*InitializeResult, error) + func (c *Client) LastConnect() *ConnectResult + func (c *Client) ListPrompts(ctx context.Context) ([]Prompt, error) + func (c *Client) ListResourceTemplates(ctx context.Context) ([]ResourceTemplate, error) + func (c *Client) ListResources(ctx context.Context) ([]Resource, error) + func (c *Client) ListTools(ctx context.Context) ([]Tool, error) + func (c *Client) Negotiate(ctx context.Context) (*Negotiation, error) + func (c *Client) Negotiation() *Negotiation + func (c *Client) Ping(ctx context.Context) error + func (c *Client) ReadResource(ctx context.Context, uri string) (*ReadResourceResult, error) + func (c *Client) Register(ctx context.Context, d *Discovery) (*auth.Registration, error) + func (c *Client) Resume(ctx context.Context, src auth.TokenSource) (*ConnectResult, error) + func (c *Client) ServerInfo() *InitializeResult + func (c *Client) SetTokenSource(src auth.TokenSource) + func (c *Client) StartAuthorization(d *Discovery) (string, string, error) + func (c *Client) TokenSource() auth.TokenSource + func (c *Client) Transport() *transport.Streamable + type ClientCapabilities struct + Elicitation *struct{} + Roots ... + Sampling *struct{} + type Config struct + AllowResourceMismatch bool + Auth AuthConfig + ClientInfo Implementation + Endpoint string + HTTPClient *http.Client + Headers map[string]string + URLPolicy auth.URLPolicy + type ConnectResult struct + AuthorizationURL string + Discovery *Discovery + Initialize *InitializeResult + State string + Status Status + type Content struct + Data string + MimeType string + Resource json.RawMessage + Text string + Type string + type DiscoverResult struct + Capabilities ServerCapabilities + Extensions []string + Instructions string + ResultType string + ServerInfo Implementation + type Discovery struct + Challenge auth.Challenge + Overridden bool + PRM *auth.ProtectedResourceMetadata + PRMSource string + Registration *auth.Registration + Resource string + Scope string + Server *auth.ServerMetadata + func (d *Discovery) Endpoint(authMethod string) auth.Endpoint + type Era string + const EraSession + const EraStateless + const EraUnknown + type GetPromptResult struct + Description string + Messages []PromptMessage + type Implementation struct + Name string + Title string + Version string + type InitializeResult struct + Capabilities ServerCapabilities + Instructions string + ProtocolVersion string + ServerInfo Implementation + type Negotiation struct + Attempted []string + Discovered *DiscoverResult + Era Era + Reason string + ServerSupported []string + Version string + type Overrides struct + AuthorizationURL string + Resource string + TokenURL string + type Prompt struct + Arguments []PromptArgument + Description string + Name string + Title string + type PromptArgument struct + Description string + Name string + Required bool + Title string + type PromptMessage struct + Content Content + Role string + type ReadResourceResult struct + Contents []ResourceContents + type Resource struct + Annotations json.RawMessage + Description string + MimeType string + Name string + Size int64 + Title string + URI string + type ResourceContents struct + Blob string + MimeType string + Text string + URI string + type ResourceTemplate struct + Description string + MimeType string + Name string + Title string + URITemplate string + type ServerCapabilities struct + Logging *struct{} + Prompts ... + Resources ... + Tools ... + type Status string + const StatusAuthorizationRequired + const StatusConnected + type Tool struct + Annotations *ToolAnnotations + Description string + InputSchema json.RawMessage + Name string + OutputSchema json.RawMessage + Title string + func (t Tool) IsDestructive() bool + func (t Tool) IsReadOnly() bool + type ToolAnnotations struct + DestructiveHint *bool + IdempotentHint *bool + OpenWorldHint *bool + ReadOnlyHint *bool + Title string