Documentation
¶
Overview ¶
Package muster resolves toolsets with muster's filter_tools meta-tool, as the caller: every call carries the caller's IdP token as `Authorization: Bearer` and nothing else, so muster resolves the toolset within the caller's own catalogue, the tools the agent will see when it runs as that person. A call that cannot be made, or that muster answers with an error, is an error: the caller of this package fails closed on it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoToken = errors.New("no caller token")
ErrNoToken is returned for a resolution without a caller token: muster resolves a toolset per person, and there is no other identity to ask with.
Functions ¶
This section is empty.
Types ¶
type Annotations ¶
type Annotations struct {
ReadOnlyHint *bool `json:"readOnlyHint,omitempty"`
DestructiveHint *bool `json:"destructiveHint,omitempty"`
}
Annotations are the MCP hints muster forwards from the tool's server; a hint the server did not set is nil.
type Client ¶
type Client struct {
// Version is the client version announced at initialize.
Version string
}
Client resolves toolsets against a muster MCP endpoint. It holds no connection: every resolution opens its own session as its caller.
func (*Client) ResolveToolsets ¶
func (c *Client) ResolveToolsets(ctx context.Context, url, token string, toolsets ...[]string) ([]Resolution, error)
ResolveToolsets resolves each toolset with filter_tools in one session on url, as the caller whose IdP token is token, in the order given.
type Resolution ¶
type Resolution struct {
Tools []Tool
// Unmatched are the selectors that select no tool.
Unmatched []string
// RequiringAuth are the servers the toolset names whose tools are unknown
// until the caller signs in to them.
RequiringAuth []string
}
Resolution is what one toolset resolves to for the caller.
type ServerAuth ¶
type ServerAuth struct {
Name string `json:"name"`
}
ServerAuth is a server whose tools the caller cannot list before signing in.