GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — mcp package - knative.dev/func/pkg/mcp - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • unchecked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

github.com/knative/func

Links

  • Open Source Insights Logo Open Source Insights

Documentation ¶

Index ¶

  • Constants
  • type BuildInput
    • func (i BuildInput) Args() []string
  • type BuildOutput
  • type ConfigCIInput
    • func (i ConfigCIInput) Args() []string
  • type ConfigCIOutput
  • type ConfigEnvsAddInput
    • func (i ConfigEnvsAddInput) Args() []string
  • type ConfigEnvsAddOutput
  • type ConfigEnvsListInput
    • func (i ConfigEnvsListInput) Args() []string
  • type ConfigEnvsListOutput
  • type ConfigEnvsRemoveInput
    • func (i ConfigEnvsRemoveInput) Args() []string
  • type ConfigEnvsRemoveOutput
  • type ConfigGitRemoveInput
    • func (i ConfigGitRemoveInput) Args() []string
  • type ConfigGitRemoveOutput
  • type ConfigGitSetInput
    • func (i ConfigGitSetInput) Args() []string
  • type ConfigGitSetOutput
  • type ConfigLabelsAddInput
    • func (i ConfigLabelsAddInput) Args() []string
  • type ConfigLabelsAddOutput
  • type ConfigLabelsListInput
    • func (i ConfigLabelsListInput) Args() []string
  • type ConfigLabelsListOutput
  • type ConfigLabelsRemoveInput
    • func (i ConfigLabelsRemoveInput) Args() []string
  • type ConfigLabelsRemoveOutput
  • type ConfigVolumesAddInput
    • func (i ConfigVolumesAddInput) Args() []string
  • type ConfigVolumesAddOutput
  • type ConfigVolumesListInput
    • func (i ConfigVolumesListInput) Args() []string
  • type ConfigVolumesListOutput
  • type ConfigVolumesRemoveInput
    • func (i ConfigVolumesRemoveInput) Args() []string
  • type ConfigVolumesRemoveOutput
  • type CreateInput
    • func (i CreateInput) Args() []string
  • type CreateOutput
  • type DeleteInput
    • func (i DeleteInput) Args() []string
  • type DeleteOutput
  • type DeployInput
    • func (i DeployInput) Args() []string
  • type DeployOutput
  • type DescribeInput
    • func (i DescribeInput) Args() []string
  • type DescribeOutput
  • type HealthcheckInput
  • type HealthcheckOutput
  • type InvokeInput
    • func (i InvokeInput) Args() []string
  • type InvokeOutput
  • type ListInput
    • func (i ListInput) Args() []string
  • type ListOutput
  • type LogsInput
    • func (i LogsInput) Args() []string
  • type LogsOutput
  • type Option
    • func WithExecutor(executor executor) Option
    • func WithPrefix(prefix string) Option
    • func WithProcessStarter(starter processStarter) Option
    • func WithReadonly(readonly bool) Option
    • func WithTransport(transport mcp.Transport) Option
  • type RepositoryAddInput
    • func (i RepositoryAddInput) Args() []string
  • type RepositoryAddOutput
  • type RepositoryListInput
    • func (i RepositoryListInput) Args() []string
  • type RepositoryListOutput
  • type RepositoryRemoveInput
    • func (i RepositoryRemoveInput) Args() []string
  • type RepositoryRemoveOutput
  • type RepositoryRenameInput
    • func (i RepositoryRenameInput) Args() []string
  • type RepositoryRenameOutput
  • type RunInput
    • func (i RunInput) Args(path string) []string
  • type RunOutput
  • type RunStopInput
  • type RunStopOutput
  • type Server
    • func New(options ...Option) *Server
    • func (s *Server) Start(ctx context.Context) error
  • type VersionInput
  • type VersionOutput

Constants ¶

View Source
const (

	// EnvMCPWrite is the environment variable that enables write operations
	// (deploy, delete, and pushing built images) on the MCP server. Set to
	// "true" to allow mutations; the server runs in read-only mode by default.
	EnvMCPWrite = "FUNC_ENABLE_MCP_WRITE"
)

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type BuildInput ¶ added in v0.48.0

type BuildInput struct {
	Path             string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Builder          *string `json:"builder,omitempty" jsonschema:"Builder to use (pack, s2i, or host)"`
	Registry         *string `json:"registry,omitempty" jsonschema:"Container registry for function image"`
	BuilderImage     *string `json:"builderImage,omitempty" jsonschema:"Custom builder image to use with buildpacks"`
	Image            *string `json:"image,omitempty" jsonschema:"Full image name (overrides registry)"`
	Platform         *string `json:"platform,omitempty" jsonschema:"Target platform (e.g., linux/amd64)"`
	Push             *bool   `json:"push,omitempty" jsonschema:"Push image to registry after building"`
	RegistryInsecure *bool   `json:"registryInsecure,omitempty" jsonschema:"Skip TLS verification for insecure registries"`
	BuildTimestamp   *bool   `json:"buildTimestamp,omitempty" jsonschema:"Use actual time for image timestamp (buildpacks only)"`
	Verbose          *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

BuildInput defines the input parameters for the build tool.

func (BuildInput) Args ¶ added in v0.48.0

func (i BuildInput) Args() []string

type BuildOutput ¶ added in v0.48.0

type BuildOutput struct {
	Image   string `json:"image,omitempty" jsonschema:"The built image name"`
	Message string `json:"message" jsonschema:"Output message from func command"`
}

BuildOutput defines the structured output returned by the build tool.

type ConfigCIInput ¶ added in v0.51.0

type ConfigCIInput struct {
	Path                         string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Branch                       *string `json:"branch,omitempty" jsonschema:"Git branch to trigger the workflow on push (defaults to the current branch)"`
	WorkflowName                 *string `json:"workflowName,omitempty" jsonschema:"Custom name for the generated workflow"`
	KubeconfigSecretName         *string `` /* 146-byte string literal not displayed */
	RegistryLoginUrlVariableName *string `` /* 163-byte string literal not displayed */
	RegistryUserVariableName     *string `` /* 153-byte string literal not displayed */
	RegistryPassSecretName       *string `` /* 155-byte string literal not displayed */
	RegistryUrlVariableName      *string `` /* 151-byte string literal not displayed */
	RegistryLogin                *bool   `json:"registryLogin,omitempty" jsonschema:"Add a registry login step to the generated workflow"`
	Remote                       *bool   `json:"remote,omitempty" jsonschema:"Build the function on a Tekton-enabled cluster instead of in the workflow runner"`
	SelfHostedRunner             *bool   `json:"selfHostedRunner,omitempty" jsonschema:"Use a 'self-hosted' runner instead of the default 'ubuntu-latest'"`
	TestStep                     *bool   `json:"testStep,omitempty" jsonschema:"Add a language-specific test step (supported: go, node, typescript, python, quarkus)"`
	Force                        *bool   `json:"force,omitempty" jsonschema:"Overwrite an existing GitHub workflow file"`
	Verbose                      *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigCIInput) Args ¶ added in v0.51.0

func (i ConfigCIInput) Args() []string

type ConfigCIOutput ¶ added in v0.51.0

type ConfigCIOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigEnvsAddInput ¶ added in v0.50.0

type ConfigEnvsAddInput struct {
	Path          string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Name          *string `json:"name,omitempty" jsonschema:"Name of the environment variable"`
	Value         *string `` /* 127-byte string literal not displayed */
	SecretName    *string `json:"secretName,omitempty" jsonschema:"Name of the Kubernetes Secret to source the value from"`
	SecretKey     *string `json:"secretKey,omitempty" jsonschema:"Key within the Secret; omit to import all keys as env vars"`
	ConfigMapName *string `json:"configMapName,omitempty" jsonschema:"Name of the Kubernetes ConfigMap to source the value from"`
	ConfigMapKey  *string `json:"configMapKey,omitempty" jsonschema:"Key within the ConfigMap; omit to import all keys as env vars"`
	Verbose       *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigEnvsAddInput) Args ¶ added in v0.50.0

func (i ConfigEnvsAddInput) Args() []string

type ConfigEnvsAddOutput ¶ added in v0.50.0

type ConfigEnvsAddOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigEnvsListInput ¶ added in v0.50.0

type ConfigEnvsListInput struct {
	Path    string `json:"path" jsonschema:"required,Path to the function project directory"`
	Verbose *bool  `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigEnvsListInput) Args ¶ added in v0.50.0

func (i ConfigEnvsListInput) Args() []string

type ConfigEnvsListOutput ¶ added in v0.50.0

type ConfigEnvsListOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigEnvsRemoveInput ¶ added in v0.50.0

type ConfigEnvsRemoveInput struct {
	Path    string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Name    *string `json:"name,omitempty" jsonschema:"Name of the environment variable to remove"`
	Verbose *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigEnvsRemoveInput) Args ¶ added in v0.50.0

func (i ConfigEnvsRemoveInput) Args() []string

type ConfigEnvsRemoveOutput ¶ added in v0.50.0

type ConfigEnvsRemoveOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigGitRemoveInput ¶ added in v0.51.0

type ConfigGitRemoveInput struct {
	Path          string `json:"path"                    jsonschema:"required,Absolute path to the Function project directory"`
	DeleteLocal   *bool  `json:"delete_local,omitempty"  jsonschema:"Delete local pipeline template files from the Function directory"`
	DeleteCluster *bool  `json:"delete_cluster,omitempty" jsonschema:"Delete pipeline credentials and config from the cluster"`
	Verbose       *bool  `json:"verbose,omitempty"       jsonschema:"Enable verbose logging output"`
}

ConfigGitRemoveInput defines the input for the config_git_remove tool.

When neither delete-local nor delete-cluster is set, --delete-local is forwarded automatically to prevent the CLI's interactive "delete all?" confirmation prompt in a non-TTY subprocess.

func (ConfigGitRemoveInput) Args ¶ added in v0.51.0

func (i ConfigGitRemoveInput) Args() []string

type ConfigGitRemoveOutput ¶ added in v0.51.0

type ConfigGitRemoveOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigGitSetInput ¶ added in v0.51.0

type ConfigGitSetInput struct {
	Path          string  `json:"path"                     jsonschema:"required,Absolute path to the Function project directory"`
	GitURL        string  `json:"git_url"                  jsonschema:"required,URL of the Git repository containing the Function source code"`
	GitBranch     string  `json:"git_branch"               jsonschema:"required,Git branch or tag to build from (e.g. main)"`
	GitDir        *string `` /* 143-byte string literal not displayed */
	GitProvider   *string `` /* 149-byte string literal not displayed */
	ConfigLocal   *bool   `` /* 152-byte string literal not displayed */
	ConfigCluster *bool   `json:"config_cluster,omitempty" jsonschema:"Create pipeline credentials and config on the cluster"`
	ConfigRemote  *bool   `` /* 129-byte string literal not displayed */
	GhAccessToken *string `` /* 169-byte string literal not displayed */
	Verbose       *bool   `json:"verbose,omitempty"        jsonschema:"Enable verbose logging output"`
}

ConfigGitSetInput defines the input for the config_git_set tool.

git-url and git-branch are required; the CLI will prompt interactively for any missing values, which hangs in a non-TTY subprocess.

git-dir defaults to "." (repository root) when not provided, preventing the CLI's interactive prompt for that field.

When none of config-local/cluster/remote are set, --config-local is forwarded automatically so the CLI skips the webhook confirmation prompt.

func (ConfigGitSetInput) Args ¶ added in v0.51.0

func (i ConfigGitSetInput) Args() []string

type ConfigGitSetOutput ¶ added in v0.51.0

type ConfigGitSetOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigLabelsAddInput ¶ added in v0.50.0

type ConfigLabelsAddInput struct {
	Path    string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Name    *string `json:"name,omitempty" jsonschema:"Name of the label"`
	Value   *string `json:"value,omitempty" jsonschema:"Value of the label"`
	Verbose *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigLabelsAddInput) Args ¶ added in v0.50.0

func (i ConfigLabelsAddInput) Args() []string

type ConfigLabelsAddOutput ¶ added in v0.50.0

type ConfigLabelsAddOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigLabelsListInput ¶ added in v0.50.0

type ConfigLabelsListInput struct {
	Path    string `json:"path" jsonschema:"required,Path to the function project directory"`
	Verbose *bool  `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigLabelsListInput) Args ¶ added in v0.50.0

func (i ConfigLabelsListInput) Args() []string

type ConfigLabelsListOutput ¶ added in v0.50.0

type ConfigLabelsListOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigLabelsRemoveInput ¶ added in v0.50.0

type ConfigLabelsRemoveInput struct {
	Path    string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Name    *string `json:"name,omitempty" jsonschema:"Name of the label to remove"`
	Verbose *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigLabelsRemoveInput) Args ¶ added in v0.50.0

func (i ConfigLabelsRemoveInput) Args() []string

type ConfigLabelsRemoveOutput ¶ added in v0.50.0

type ConfigLabelsRemoveOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigVolumesAddInput ¶ added in v0.50.0

type ConfigVolumesAddInput struct {
	Path      string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Type      *string `json:"type,omitempty" jsonschema:"Volume type: configmap, secret, pvc, or emptydir"`
	MountPath *string `json:"mountPath,omitempty" jsonschema:"Mount path for the volume in the container"`
	Source    *string `json:"source,omitempty" jsonschema:"Name of the ConfigMap, Secret, or PVC to mount"`
	Medium    *string `json:"medium,omitempty" jsonschema:"Storage medium for EmptyDir volume: Memory or empty string"`
	Size      *string `json:"size,omitempty" jsonschema:"Maximum size limit for EmptyDir volume (e.g., 1Gi)"`
	ReadOnly  *bool   `json:"readOnly,omitempty" jsonschema:"Mount volume as read-only (only for PVC)"`
	Verbose   *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigVolumesAddInput) Args ¶ added in v0.50.0

func (i ConfigVolumesAddInput) Args() []string

type ConfigVolumesAddOutput ¶ added in v0.50.0

type ConfigVolumesAddOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigVolumesListInput ¶ added in v0.50.0

type ConfigVolumesListInput struct {
	Path    string `json:"path" jsonschema:"required,Path to the function project directory"`
	Verbose *bool  `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigVolumesListInput) Args ¶ added in v0.50.0

func (i ConfigVolumesListInput) Args() []string

type ConfigVolumesListOutput ¶ added in v0.50.0

type ConfigVolumesListOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type ConfigVolumesRemoveInput ¶ added in v0.50.0

type ConfigVolumesRemoveInput struct {
	Path      string  `json:"path" jsonschema:"required,Path to the function project directory"`
	MountPath *string `json:"mountPath,omitempty" jsonschema:"Mount path of the volume to remove"`
	Verbose   *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (ConfigVolumesRemoveInput) Args ¶ added in v0.50.0

func (i ConfigVolumesRemoveInput) Args() []string

type ConfigVolumesRemoveOutput ¶ added in v0.50.0

type ConfigVolumesRemoveOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type CreateInput ¶ added in v0.48.0

type CreateInput struct {
	Language   string  `json:"language" jsonschema:"required,Language runtime to use"`
	Path       string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Template   *string `json:"template,omitempty" jsonschema:"Function template (e.g., http, cloudevents)"`
	Repository *string `json:"repository,omitempty" jsonschema:"Git repository URI containing custom templates"`
	Verbose    *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (CreateInput) Args ¶ added in v0.48.0

func (i CreateInput) Args() []string

type CreateOutput ¶ added in v0.48.0

type CreateOutput struct {
	Runtime  string  `json:"runtime" jsonschema:"Language runtime used"`
	Template *string `json:"template" jsonschema:"Template used"`
	Message  string  `json:"message,omitempty" jsonschema:"Output message"`
}

type DeleteInput ¶ added in v0.48.0

type DeleteInput struct {
	Path      *string `json:"path,omitempty" jsonschema:"Path to the function project directory (mutually exclusive with name)"`
	Name      *string `json:"name,omitempty" jsonschema:"Name of the function to delete (mutually exclusive with path)"`
	Namespace *string `json:"namespace,omitempty" jsonschema:"Kubernetes namespace to delete from (default: current or active namespace)"`
	All       *bool   `json:"all,omitempty" jsonschema:"Delete all related resources like Pipelines, Secrets"`
	Verbose   *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

DeleteInput defines the input parameters for the delete tool. Exactly one of Path or Name must be provided.

func (DeleteInput) Args ¶ added in v0.48.0

func (i DeleteInput) Args() []string

type DeleteOutput ¶ added in v0.48.0

type DeleteOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

DeleteOutput defines the structured output returned by the delete tool.

type DeployInput ¶ added in v0.48.0

type DeployInput struct {
	Path               string  `json:"path" jsonschema:"required,Path to the function project directory"`
	Builder            *string `json:"builder,omitempty" jsonschema:"Builder to use (pack, s2i, or host)"`
	Registry           *string `json:"registry,omitempty" jsonschema:"Container registry for function image"`
	Image              *string `json:"image,omitempty" jsonschema:"Full image name (overrides registry)"`
	Namespace          *string `json:"namespace,omitempty" jsonschema:"Kubernetes namespace to deploy into"`
	Source             *string `json:"source,omitempty" jsonschema:"Repository to build the function from on the cluster, for remote deployment"`
	Revision           *string `json:"revision,omitempty" jsonschema:"Revision of source to build: a branch, a tag or a commit"`
	SourceDir          *string `json:"sourceDir,omitempty" jsonschema:"Directory within source containing the function"`
	BuilderImage       *string `json:"builderImage,omitempty" jsonschema:"Custom builder image"`
	Domain             *string `json:"domain,omitempty" jsonschema:"Domain for the function route"`
	Platform           *string `json:"platform,omitempty" jsonschema:"Target platform (e.g., linux/amd64)"`
	Build              *string `json:"build,omitempty" jsonschema:"Build control: true, false, or auto"`
	PVCSize            *string `json:"pvcSize,omitempty" jsonschema:"Custom volume size for remote builds"`
	ServiceAccount     *string `json:"serviceAccount,omitempty" jsonschema:"Kubernetes ServiceAccount to use"`
	RemoteStorageClass *string `json:"remoteStorageClass,omitempty" jsonschema:"Storage class for remote volume"`
	Push               *bool   `json:"push,omitempty" jsonschema:"Push image to registry before deployment"`
	RegistryInsecure   *bool   `json:"registryInsecure,omitempty" jsonschema:"Skip TLS verification for registry"`
	BuildTimestamp     *bool   `json:"buildTimestamp,omitempty" jsonschema:"Use actual time in image metadata"`
	Remote             *bool   `json:"remote,omitempty" jsonschema:"Trigger remote deployment"`
	Verbose            *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

DeployInput defines the input parameters for the deploy tool.

func (DeployInput) Args ¶ added in v0.48.0

func (i DeployInput) Args() []string

type DeployOutput ¶ added in v0.48.0

type DeployOutput struct {
	URL     string `json:"url,omitempty" jsonschema:"The deployed Function URL"`
	Image   string `json:"image,omitempty" jsonschema:"The Function image name"`
	Message string `json:"message" jsonschema:"Output message"`
}

DeployOutput defines the structured output returned by the deploy tool.

type DescribeInput ¶ added in v0.51.0

type DescribeInput struct {
	Path      *string `json:"path,omitempty" jsonschema:"Path to the function project directory (mutually exclusive with name)"`
	Name      *string `json:"name,omitempty" jsonschema:"Name of the function to describe (mutually exclusive with path)"`
	Namespace *string `` /* 238-byte string literal not displayed */
	Verbose   *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

DescribeInput defines the input parameters for the describe tool. Exactly one of Path or Name must be provided.

func (DescribeInput) Args ¶ added in v0.51.0

func (i DescribeInput) Args() []string

type DescribeOutput ¶ added in v0.51.0

type DescribeOutput struct {
	Name          string            `json:"name" jsonschema:"Function name"`
	Namespace     string            `json:"namespace,omitempty" jsonschema:"Kubernetes namespace"`
	URL           string            `json:"url,omitempty" jsonschema:"Primary route URL"`
	Routes        []string          `json:"routes,omitempty" jsonschema:"All route URLs"`
	Image         string            `json:"image,omitempty" jsonschema:"Deployed container image"`
	Ready         string            `json:"ready,omitempty" jsonschema:"Overall readiness (true/false/unknown)"`
	Deployer      string            `json:"deployer,omitempty" jsonschema:"Deployer backend (knative, k8s, keda)"`
	Labels        map[string]string `json:"labels,omitempty" jsonschema:"Function labels"`
	Subscriptions []fn.Subscription `json:"subscriptions,omitempty" jsonschema:"Active event subscriptions"`
	Middleware    *fn.Middleware    `json:"middleware,omitempty" jsonschema:"Middleware backend (e.g. keda) applied at deploy time, if any"`
	Revision      string            `json:"revision,omitempty" jsonschema:"Source commit SHA, read from the OCI revision label baked into the built image"`
	Warnings      string            `` /* 191-byte string literal not displayed */
}

DescribeOutput defines the structured output returned by the describe tool.

type HealthcheckInput ¶ added in v0.48.0

type HealthcheckInput struct{}

HealthcheckInput defines the input parameters for the healthcheck tool. No parameters are required for healthcheck.

type HealthcheckOutput ¶ added in v0.48.0

type HealthcheckOutput struct {
	Status  string `json:"status" jsonschema:"Status of the server (ok)"`
	Message string `json:"message" jsonschema:"Healthcheck message"`
	Version string `json:"version" jsonschema:"Version of the MCP server"`
}

HealthcheckOutput defines the structured output returned by the healthcheck tool.

type InvokeInput ¶ added in v0.51.0

type InvokeInput struct {
	Path        string            `json:"path" jsonschema:"required,Path to the function project directory"`
	Target      *string           `` /* 169-byte string literal not displayed */
	Format      *string           `json:"format,omitempty" jsonschema:"Format of message to send: http or cloudevent (default: auto-detected)"`
	ID          *string           `json:"id,omitempty" jsonschema:"CloudEvent id for the request data (default: a randomly generated UUID)"`
	Source      *string           `json:"source,omitempty" jsonschema:"CloudEvent source for the request data (default: '/boson/fn')"`
	Type        *string           `json:"type,omitempty" jsonschema:"CloudEvent type for the request data (default: 'boson.fn')"`
	Data        *string           `` /* 171-byte string literal not displayed */
	ContentType *string           `json:"contentType,omitempty" jsonschema:"MIME type of the data (default: 'application/json')"`
	RequestType *string           `json:"requestType,omitempty" jsonschema:"HTTP method: GET or POST (default: POST)"`
	File        *string           `` /* 259-byte string literal not displayed */
	Extensions  map[string]string `json:"extensions,omitempty" jsonschema:"CloudEvent extension attributes as key-value pairs (cloudevent format only)"`
	Insecure    *bool             `json:"insecure,omitempty" jsonschema:"Skip TLS verification when invoking over SSL"`
	Verbose     *bool             `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

InvokeInput defines the input parameters for the invoke tool.

func (InvokeInput) Args ¶ added in v0.51.0

func (i InvokeInput) Args() []string

type InvokeOutput ¶ added in v0.51.0

type InvokeOutput struct {
	Message string `json:"message" jsonschema:"Output message, including the response body from the invoked Function"`
}

InvokeOutput defines the structured output returned by the invoke tool.

type ListInput ¶ added in v0.48.0

type ListInput struct {
	AllNamespaces *bool   `json:"allNamespaces,omitempty" jsonschema:"List functions in all namespaces (overrides namespace parameter)"`
	Namespace     *string `json:"namespace,omitempty" jsonschema:"Kubernetes namespace to list functions in (default: current namespace)"`
	Verbose       *bool   `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

ListInput defines the input parameters for the list tool. All fields are optional since list can work without any parameters.

func (ListInput) Args ¶ added in v0.48.0

func (i ListInput) Args() []string

type ListOutput ¶ added in v0.48.0

type ListOutput struct {
	Items []fn.ListItem `json:"items" jsonschema:"Deployed Functions matching the query (empty if none found)"`
	// A non-fatal warning on stderr (e.g. a cluster connectivity issue for
	// one of several configured deployers) can accompany an otherwise
	// successful, but partial, list. Surface it so the agent doesn't
	// mistake a short list for the complete picture.
	Warnings string `json:"warnings,omitempty" jsonschema:"Non-fatal warnings emitted while listing Functions"`
}

ListOutput defines the structured output returned by the list tool.

type LogsInput ¶ added in v0.51.0

type LogsInput struct {
	Path      *string `json:"path,omitempty"      jsonschema:"Absolute path to the Function project directory (mutually exclusive with name)"`
	Name      *string `json:"name,omitempty"      jsonschema:"Name of the deployed Function to fetch logs for (mutually exclusive with path)"`
	Namespace *string `` /* 283-byte string literal not displayed */
	Since     *string `` /* 151-byte string literal not displayed */
	Tail      *int    `` /* 228-byte string literal not displayed */
	Verbose   *bool   `` /* 148-byte string literal not displayed */
}

LogsInput defines the input parameters for the logs tool. Exactly one of Path or Name must be provided.

func (LogsInput) Args ¶ added in v0.51.0

func (i LogsInput) Args() []string

type LogsOutput ¶ added in v0.51.0

type LogsOutput struct {
	Logs      string `` /* 159-byte string literal not displayed */
	Truncated bool   `` /* 265-byte string literal not displayed */
	Warnings  string `` /* 334-byte string literal not displayed */
}

LogsOutput defines the structured output returned by the logs tool.

type Option ¶ added in v0.48.0

type Option func(*Server)

func WithExecutor ¶ added in v0.48.0

func WithExecutor(executor executor) Option

WithExecutor sets a custom executor for running commands; used in tests.

func WithPrefix ¶ added in v0.48.0

func WithPrefix(prefix string) Option

WithPrefix sets the command prefix (e.g., "func" or "kn func"). The prefix is validated to reject shell metacharacters.

func WithProcessStarter ¶ added in v0.51.0

func WithProcessStarter(starter processStarter) Option

WithProcessStarter sets a custom process starter for the "run" tool; used in tests.

func WithReadonly ¶ added in v0.48.0

func WithReadonly(readonly bool) Option

WithReadonly sets the server to readonly mode.

func WithTransport ¶ added in v0.48.0

func WithTransport(transport mcp.Transport) Option

WithTransport sets a custom transport for the server; used in tests.

type RepositoryAddInput ¶ added in v0.51.0

type RepositoryAddInput struct {
	Name    string `json:"name" jsonschema:"required,Short name to assign to the repository (e.g. 'boson')"`
	URL     string `json:"url" jsonschema:"required,URL of the git repository to add (may include a branch suffix '#branch')"`
	Verbose *bool  `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (RepositoryAddInput) Args ¶ added in v0.51.0

func (i RepositoryAddInput) Args() []string

type RepositoryAddOutput ¶ added in v0.51.0

type RepositoryAddOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type RepositoryListInput ¶ added in v0.51.0

type RepositoryListInput struct {
	Verbose *bool `json:"verbose,omitempty" jsonschema:"Show the URL of each remote repository"`
}

func (RepositoryListInput) Args ¶ added in v0.51.0

func (i RepositoryListInput) Args() []string

type RepositoryListOutput ¶ added in v0.51.0

type RepositoryListOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type RepositoryRemoveInput ¶ added in v0.51.0

type RepositoryRemoveInput struct {
	Name    string `json:"name" jsonschema:"required,Name of the installed repository to remove"`
	Verbose *bool  `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (RepositoryRemoveInput) Args ¶ added in v0.51.0

func (i RepositoryRemoveInput) Args() []string

type RepositoryRemoveOutput ¶ added in v0.51.0

type RepositoryRemoveOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type RepositoryRenameInput ¶ added in v0.51.0

type RepositoryRenameInput struct {
	Old     string `json:"old" jsonschema:"required,Current name of the repository to rename"`
	New     string `json:"new" jsonschema:"required,New name for the repository"`
	Verbose *bool  `json:"verbose,omitempty" jsonschema:"Enable verbose logging output"`
}

func (RepositoryRenameInput) Args ¶ added in v0.51.0

func (i RepositoryRenameInput) Args() []string

type RepositoryRenameOutput ¶ added in v0.51.0

type RepositoryRenameOutput struct {
	Message string `json:"message" jsonschema:"Output message"`
}

type RunInput ¶ added in v0.51.0

type RunInput struct {
	Path     string  `json:"path" jsonschema:"required,Absolute path to the function project directory"`
	Registry *string `json:"registry,omitempty" jsonschema:"Container registry for the function image"`
	Build    *bool   `` /* 158-byte string literal not displayed */
	Port     *int    `json:"port,omitempty" jsonschema:"Host port to bind (default: 8080, or the first available port)"`
}

RunInput defines the input parameters for the run tool.

func (RunInput) Args ¶ added in v0.51.0

func (i RunInput) Args(path string) []string

Args builds the "func run" argument list for the resolved, absolute path.

type RunOutput ¶ added in v0.51.0

type RunOutput struct {
	Pid int    `json:"pid" jsonschema:"Process ID of the running function"`
	URL string `json:"url" jsonschema:"URL on which the function is listening"`
}

RunOutput defines the structured output returned by the run tool.

type RunStopInput ¶ added in v0.51.0

type RunStopInput struct {
	Path string `json:"path" jsonschema:"required,Absolute path to the function project directory; must match the path used with the run tool"`
}

RunStopInput defines the input parameters for the run_stop tool.

type RunStopOutput ¶ added in v0.51.0

type RunStopOutput struct {
	Message string `json:"message" jsonschema:"Confirmation message"`
}

RunStopOutput defines the structured output returned by the run_stop tool.

type Server ¶ added in v0.48.0

type Server struct {
	OnInit func(context.Context) // Invoked when the server is initialized
	// contains filtered or unexported fields
}

Server is an MCP Server instance

func New ¶ added in v0.48.0

func New(options ...Option) *Server

New MCP Server

func (*Server) Start ¶ added in v0.48.0

func (s *Server) Start(ctx context.Context) error

Start the MCP server using the configured transport. The server's readonly mode is determined at construction time via WithReadonly; it cannot be changed after the server is created.

When Run returns, on normal shutdown (client disconnect, or the caller canceling ctx in response to SIGINT/SIGTERM), any Function runs left active by the "run" tool are stopped so no subprocess (and the port it holds) is left behind. A hard kill of the server process itself (e.g. a second SIGKILL) bypasses this; the OS reaps the orphaned children instead.

type VersionInput ¶ added in v0.51.0

type VersionInput struct{}

VersionInput defines the input parameters for the version tool. No parameters are required for version.

type VersionOutput ¶ added in v0.51.0

type VersionOutput struct {
	Version     string `json:"version" jsonschema:"Version of the func client binary"`
	GitRevision string `json:"gitRevision,omitempty" jsonschema:"Git commit hash the binary was built from, if available"`
}

VersionOutput defines the structured output returned by the version tool.

Source Files ¶

View all Source files
  • instructions.go
  • mcp.go
  • process.go
  • prompts.go
  • prompts_onboard.go
  • resources.go
  • resources_function.go
  • resources_help.go
  • resources_language.go
  • resources_templates.go
  • tools.go
  • tools_build.go
  • tools_config_ci.go
  • tools_config_envs.go
  • tools_config_git.go
  • tools_config_labels.go
  • tools_config_volumes.go
  • tools_create.go
  • tools_delete.go
  • tools_deploy.go
  • tools_describe.go
  • tools_healthcheck.go
  • tools_invoke.go
  • tools_list.go
  • tools_logs.go
  • tools_repository.go
  • tools_run.go
  • tools_run_stop.go
  • tools_version.go

Directories ¶

Path Synopsis
mock
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.