Documentation
¶
Index ¶
- Constants
- func BuildRecord(app protocol.App, catalogEnv map[string]protocol.Input, descriptor *Descriptor) protocol.BuildRecord
- func Variables(template string, declared map[string]InputFields, required bool) (map[string]wire.Input, error)
- type Descriptor
- type DescriptorInput
- type HolonMetadata
- type InputFields
- type Package
- type RunConfig
- type Transport
- type Value
Constants ¶
View Source
const ( PublisherMetadata = "io.modelcontextprotocol.registry/publisher-provided" MaxDescriptorBytes = 1 << 20 )
Variables ¶
This section is empty.
Functions ¶
func BuildRecord ¶
func BuildRecord(app protocol.App, catalogEnv map[string]protocol.Input, descriptor *Descriptor) protocol.BuildRecord
Types ¶
type Descriptor ¶
type Descriptor struct {
Icons []wire.Icon `json:"icons,omitempty"`
Name string `json:"name"`
Title string `json:"title"`
Version string `json:"version"`
Description string `json:"description"`
WebsiteURL string `json:"websiteUrl"`
Repository struct {
URL string `json:"url"`
} `json:"repository"`
Remotes []Transport `json:"remotes"`
Packages []Package `json:"packages"`
Meta map[string]json.RawMessage `json:"_meta"`
Requires map[string]wire.RegistryRef `json:"-"`
Egress wire.Egress `json:"-"`
}
func Fetch ¶
func Fetch(ctx context.Context, ref protocol.RegistryRef) (*Descriptor, error)
func ParseDescriptor ¶
func ParseDescriptor(data []byte) (*Descriptor, error)
func (*Descriptor) Identity ¶
func (d *Descriptor) Identity() mcpcontract.Identity
type DescriptorInput ¶
type DescriptorInput struct {
InputFields
Name string `json:"name"`
Type string `json:"type"`
ValueHint string `json:"valueHint"`
Variables map[string]InputFields `json:"variables"`
}
func ParseInput ¶
func ParseInput(raw json.RawMessage) (DescriptorInput, wire.Input, map[string]wire.Input, error)
type HolonMetadata ¶
type HolonMetadata struct {
Requires map[string]wire.RegistryRef `description:"Dependencies keyed by project app name; each app must be declared with access.server." json:"requires"`
Egress wire.Egress `` /* 137-byte string literal not displayed */
}
type InputFields ¶
type Package ¶
type Package struct {
Version string `json:"version"`
RegistryType string `json:"registryType"`
Identifier string `json:"identifier"`
Transport Transport `json:"transport"`
Environment []json.RawMessage `json:"environmentVariables"`
RuntimeArguments []json.RawMessage `json:"runtimeArguments"`
PackageArguments []json.RawMessage `json:"packageArguments"`
}
func (Package) ValidateTransport ¶
type Transport ¶
type Transport struct {
Type string `json:"type"`
URL string `json:"url"`
Headers []DescriptorInput `json:"headers"`
Variables map[string]InputFields `json:"variables"`
}
func SelectServerSource ¶
func SelectServerSource(d *Descriptor, source protocol.RegistrySource) (int, *Transport, error)
Click to show internal directories.
Click to hide internal directories.