Documentation
¶
Index ¶
- Variables
- func NewToolResultAwaitingFormSubmission(message string) *mcp.CallToolResult
- func NewToolResultError(message string) *mcp.CallToolResult
- func NewToolResultErrorFromErr(message string, err error) *mcp.CallToolResult
- func NewToolResultResource(message string, contents *mcp.ResourceContents) *mcp.CallToolResult
- func NewToolResultResourceLink(message string, link *mcp.ResourceLink) *mcp.CallToolResult
- func NewToolResultText(message string) *mcp.CallToolResult
- type APIHost
- func (a APIHost) AuthorizationServerURL(_ context.Context) (*url.URL, error)
- func (a APIHost) BaseRESTURL(_ context.Context) (*url.URL, error)
- func (a APIHost) GraphqlURL(_ context.Context) (*url.URL, error)
- func (a APIHost) RawURL(_ context.Context) (*url.URL, error)
- func (a APIHost) UploadURL(_ context.Context) (*url.URL, error)
- type APIHostResolver
- type HostType
- type TokenType
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingAuthorizationHeader = fmt.Errorf("%w: missing required Authorization header", mark.ErrBadRequest) ErrBadAuthorizationHeader = fmt.Errorf("%w: Authorization header is badly formatted", mark.ErrBadRequest) ErrUnsupportedAuthorizationHeader = fmt.Errorf("%w: unsupported Authorization header", mark.ErrBadRequest) )
Functions ¶
func NewToolResultAwaitingFormSubmission ¶ added in v1.4.0
func NewToolResultAwaitingFormSubmission(message string) *mcp.CallToolResult
NewToolResultAwaitingFormSubmission signals to the agent that a tool call has been intercepted to show an MCP App form to the user and has NOT performed the requested operation. The agent must stop, not chain dependent tool calls, and not claim the operation succeeded. The result is marked IsError=true so agents that bail on error don't proceed; the host still renders the UI because rendering is keyed off the tool's _meta.ui, not the result. The MCP App form will submit the operation directly when the user clicks submit, after which a ui/update-model-context call delivers the real outcome to the agent.
func NewToolResultError ¶
func NewToolResultError(message string) *mcp.CallToolResult
func NewToolResultErrorFromErr ¶
func NewToolResultErrorFromErr(message string, err error) *mcp.CallToolResult
func NewToolResultResource ¶
func NewToolResultResource(message string, contents *mcp.ResourceContents) *mcp.CallToolResult
func NewToolResultResourceLink ¶ added in v0.31.0
func NewToolResultResourceLink(message string, link *mcp.ResourceLink) *mcp.CallToolResult
func NewToolResultText ¶
func NewToolResultText(message string) *mcp.CallToolResult
Types ¶
type APIHost ¶ added in v0.31.0
type APIHost struct {
// contains filtered or unexported fields
}
func (APIHost) AuthorizationServerURL ¶ added in v0.32.0
func (APIHost) BaseRESTURL ¶ added in v0.31.0
APIHostResolver implementation
func (APIHost) GraphqlURL ¶ added in v0.31.0
type APIHostResolver ¶ added in v0.31.0
type APIHostResolver interface {
BaseRESTURL(ctx context.Context) (*url.URL, error)
GraphqlURL(ctx context.Context) (*url.URL, error)
UploadURL(ctx context.Context) (*url.URL, error)
RawURL(ctx context.Context) (*url.URL, error)
AuthorizationServerURL(ctx context.Context) (*url.URL, error)
}
func NewAPIHost ¶ added in v0.31.0
func NewAPIHost(s string) (APIHostResolver, error)
type HostType ¶ added in v1.9.0
type HostType int
HostType identifies which GitHub deployment a host refers to. Tools use this to skip capabilities that only exist on some deployments.
func ParseHostType ¶ added in v1.9.0
ParseHostType classifies a host string. An empty string means github.com, matching NewAPIHost. It returns an error only when the string is not a URL with a scheme.