You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/model/types.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,13 @@ type Package struct {
32
32
// - For MCPB: direct download URL
33
33
Identifierstring`json:"identifier" minLength:"1" doc:"Package identifier - either a package name (for registries) or URL (for direct downloads)" example:"@modelcontextprotocol/server-brave-search"`
34
34
// Version is the package version (used by npm, pypi, nuget; not used by oci, mcpb where version is in the identifier)
35
-
Versionstring`json:"version" minLength:"1" doc:"Package version. Must be a specific version. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3', '>=1.2.3', '1.x', '1.*')." example:"1.0.2"`
35
+
Versionstring`json:"version,omitempty" minLength:"1" doc:"Package version. Must be a specific version. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3', '>=1.2.3', '1.x', '1.*')." example:"1.0.2"`
36
36
// FileSHA256 is the SHA-256 hash for integrity verification (required for mcpb, optional for others)
37
37
FileSHA256string`json:"fileSha256,omitempty" pattern:"^[a-f0-9]{64}$" doc:"SHA-256 hash of the package file for integrity verification. Required for MCPB packages and optional for other package types. Authors are responsible for generating correct SHA-256 hashes when creating server.json. If present, MCP clients must validate the downloaded file matches the hash before running packages to ensure file integrity." example:"fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce"`
38
38
// RunTimeHint suggests the appropriate runtime for the package
39
39
RunTimeHintstring`json:"runtimeHint,omitempty" doc:"A hint to help clients determine the appropriate runtime for the package. This field should be provided when runtimeArguments are present." example:"npx"`
40
40
// Transport is required and specifies the transport protocol configuration
41
-
TransportTransport`json:"transport,omitempty" doc:"Transport protocol configuration for the package"`
41
+
TransportTransport`json:"transport" doc:"Transport protocol configuration for the package"`
42
42
// RuntimeArguments are passed to the package's runtime command (e.g., docker, npx)
43
43
RuntimeArguments []Argument`json:"runtimeArguments,omitempty" doc:"A list of arguments to be passed to the package's runtime command (such as docker or npx). The runtimeHint field should be provided when runtimeArguments are present."`
44
44
// PackageArguments are passed to the package's binary
@@ -66,7 +66,7 @@ const (
66
66
typeInputstruct {
67
67
Descriptionstring`json:"description,omitempty" doc:"A description of the input, which clients can use to provide context to the user."`
68
68
IsRequiredbool`json:"isRequired,omitempty" default:"false" doc:"Whether the input is required"`
69
-
FormatFormat`json:"format,omitempty" default:"string" enum:"string,number,boolean,filepath" doc:"Specifies the input format. Supported values include filepath, which should be interpreted as a file on the user's filesystem."`
69
+
FormatFormat`json:"format,omitempty" enum:"string,number,boolean,filepath" doc:"Specifies the input format. Supported values include filepath, which should be interpreted as a file on the user's filesystem."`
70
70
Valuestring`json:"value,omitempty" doc:"The value for the input. If this is not set, the user may be prompted to provide a value. Identifiers wrapped in {curly_braces} will be replaced with the corresponding properties from the input variables map."`
71
71
IsSecretbool`json:"isSecret,omitempty" default:"false" doc:"Indicates whether the input is a secret value (e.g., password, token). If true, clients should handle the value securely."`
72
72
Defaultstring`json:"default,omitempty" doc:"The default value for the input. This should be a valid value for the input. If you want to provide input examples or guidance, use the placeholder field instead."`
0 commit comments