muster

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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

View Source
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.

type Tool

type Tool struct {
	Name        string            `json:"name"`
	Server      string            `json:"server,omitempty"`
	Kind        string            `json:"kind,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations *Annotations      `json:"annotations,omitempty"`
}

Tool is one tool a toolset resolves to.

func (Tool) ReadOnly

func (t Tool) ReadOnly() bool

ReadOnly reports whether the tool's server marks it read-only.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL