Documentation
¶
Index ¶
- func NormalizeEndpoint(raw string) string
- func ServerKey(endpoint string) string
- type CLIFlagHint
- type CLIFlagOverride
- type CLIGroupDef
- type CLIOverlay
- type CLITool
- type CLIToolOverride
- type Client
- func (c *Client) FetchDetail(ctx context.Context, mcpID int) (DetailResponse, error)
- func (c *Client) FetchDetailByURL(ctx context.Context, detailURL string) (DetailResponse, error)
- func (c *Client) FetchServers(ctx context.Context, limit int) (ListResponse, error)
- func (c *Client) FetchServersFromURL(ctx context.Context, fullURL string) (ListResponse, error)
- type DetailLocator
- type DetailResponse
- type DetailResult
- type DetailTool
- type EnvelopeMeta
- type LifecycleInfo
- type ListMetadata
- type ListResponse
- type QualityMetadata
- type RegistryMetadata
- type RegistryRemote
- type RegistryServer
- type ServerDescriptor
- type ServerEnvelope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeEndpoint ¶
Types ¶
type CLIFlagHint ¶
type CLIFlagOverride ¶
type CLIFlagOverride struct {
Alias string `json:"alias"`
Transform string `json:"transform,omitempty"`
TransformArgs map[string]any `json:"transformArgs,omitempty"`
EnvDefault string `json:"envDefault,omitempty"`
Hidden bool `json:"hidden,omitempty"`
Default string `json:"default,omitempty"`
}
CLIFlagOverride describes how to map an MCP parameter to a CLI flag.
type CLIGroupDef ¶
type CLIGroupDef struct {
Description string `json:"description"`
}
CLIGroupDef defines a sub-command group within a CLI module.
type CLIOverlay ¶
type CLIOverlay struct {
ID string `json:"id"`
Command string `json:"command"`
Parent string `json:"parent,omitempty"`
Description string `json:"description"`
Prefixes []string `json:"prefixes"`
Aliases []string `json:"aliases"`
Group string `json:"group"`
Skip bool `json:"skip"`
Hidden bool `json:"hidden"`
Tools []CLITool `json:"tools"`
Groups map[string]CLIGroupDef `json:"groups,omitempty"`
ToolOverrides map[string]CLIToolOverride `json:"toolOverrides,omitempty"`
}
type CLIToolOverride ¶
type CLIToolOverride struct {
CLIName string `json:"cliName"`
Description string `json:"description,omitempty"`
Group string `json:"group,omitempty"`
IsSensitive bool `json:"isSensitive,omitempty"`
Hidden bool `json:"hidden,omitempty"`
Flags map[string]CLIFlagOverride `json:"flags,omitempty"`
OutputFormat map[string]any `json:"outputFormat,omitempty"`
}
CLIToolOverride maps an MCP tool to a CLI command with flag aliases and transforms.
type Client ¶
func (*Client) FetchDetail ¶
func (*Client) FetchDetailByURL ¶
func (*Client) FetchServers ¶
func (*Client) FetchServersFromURL ¶
FetchServersFromURL fetches the server list from a full URL (no path appending). This is used when DWS_SERVERS_URL is set to a complete endpoint.
type DetailLocator ¶
type DetailResponse ¶
type DetailResponse struct {
Result DetailResult `json:"result"`
Success bool `json:"success"`
}
type DetailResult ¶
type DetailResult struct {
MCPID int `json:"mcpId"`
Name string `json:"name"`
Description string `json:"description"`
Tools []DetailTool `json:"tools"`
}
type DetailTool ¶
type EnvelopeMeta ¶
type EnvelopeMeta struct {
Registry RegistryMetadata `json:"com.dingtalk.mcp.registry/metadata"`
CLI CLIOverlay `json:"com.dingtalk.mcp.registry/cli"`
}
type LifecycleInfo ¶
type ListMetadata ¶
type ListResponse ¶
type ListResponse struct {
Metadata ListMetadata `json:"metadata"`
Servers []ServerEnvelope `json:"servers"`
}
type QualityMetadata ¶
type RegistryMetadata ¶
type RegistryMetadata struct {
IsLatest bool `json:"isLatest"`
PublishedAt string `json:"publishedAt"`
UpdatedAt string `json:"updatedAt"`
Status string `json:"status"`
MCPID int `json:"mcpId"`
DetailURL string `json:"detailUrl"`
Quality QualityMetadata `json:"quality"`
Lifecycle LifecycleInfo `json:"lifecycle"`
}
type RegistryRemote ¶
type RegistryServer ¶
type RegistryServer struct {
SchemaURI string `json:"$schema"`
Name string `json:"name"`
Description string `json:"description"`
Remotes []RegistryRemote `json:"remotes"`
}
type ServerDescriptor ¶
type ServerDescriptor struct {
Key string `json:"key"`
SourceServerID string `json:"source_server_id,omitempty"`
DisplayName string `json:"display_name"`
Description string `json:"description,omitempty"`
Endpoint string `json:"endpoint"`
SchemaURI string `json:"schema_uri,omitempty"`
NegotiatedProtocolVersion string `json:"negotiated_protocol_version,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
PublishedAt time.Time `json:"published_at,omitempty"`
Status string `json:"status,omitempty"`
Source string `json:"source"`
Degraded bool `json:"degraded"`
DetailLocator DetailLocator `json:"detail_locator,omitempty"`
Lifecycle LifecycleInfo `json:"lifecycle,omitempty"`
CLI CLIOverlay `json:"cli,omitempty"`
HasCLIMeta bool `json:"has_cli_meta,omitempty"`
AuthHeaders map[string]string `json:"auth_headers,omitempty"` // plugin-level auth headers for third-party MCP servers
}
func NormalizeServers ¶
func NormalizeServers(response ListResponse, source string) []ServerDescriptor
type ServerEnvelope ¶
type ServerEnvelope struct {
Server RegistryServer `json:"server"`
Meta EnvelopeMeta `json:"_meta"`
}
Click to show internal directories.
Click to hide internal directories.