mcp

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mcp provides the Model Context Protocol (MCP) server for CEL expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEnvConfig

func LoadEnvConfig(envPathOrJSON string) (*tools.Config, error)

LoadEnvConfig loads an environment Config from a file path or inline JSON string.

func LoadFileDescriptorSet

func LoadFileDescriptorSet(path string) (cel.EnvOption, error)

LoadFileDescriptorSet reads a binary FileDescriptorSet from the filesystem.

func NewServer

func NewServer(fixedEnv *tools.Config, opts ...cel.EnvOption) *mcp.Server

NewServer creates a new MCP Server configured for CEL tools.

func SetupServer

func SetupServer(fdsPath, envPath string) (*mcp.Server, error)

SetupServer configures and initializes an MCP Server with the given file descriptor set and environment.

Types

type CompileArgs

type CompileArgs struct {
	EnvConfig *tools.Config `json:"envConfig" jsonschema_description:"The JSON string representing the CEL environment schema."`
	Expr      string        `json:"expr" jsonschema_description:"The CEL expression to compile."`
}

CompileArgs is the arguments for the cel_compile tool.

type CreateEnvConfigArgs

type CreateEnvConfigArgs struct {
	EnvConfig *tools.Config `json:"envConfig" jsonschema_description:"The JSON string representing the CEL environment configuration."`
}

CreateEnvConfigArgs is the arguments for the cel_create_environment tool.

type EvaluateArgs

type EvaluateArgs struct {
	EnvConfig *tools.Config    `json:"envConfig" jsonschema_description:"The JSON string representing the CEL environment schema."`
	Expr      string           `json:"expr" jsonschema_description:"The CEL expression to evaluate."`
	TestCases []tools.TestCase `json:"testCases" jsonschema_description:"The test cases for evaluation."`
}

EvaluateArgs is the arguments for the cel_evaluate tool.

type FixedEnvCompileArgs

type FixedEnvCompileArgs struct {
	Expr string `json:"expr" jsonschema_description:"The CEL expression to compile."`
}

FixedEnvCompileArgs is the arguments for the cel_compile tool when a static environment is configured.

type FixedEnvEvaluateArgs

type FixedEnvEvaluateArgs struct {
	Expr      string           `json:"expr" jsonschema_description:"The CEL expression to evaluate."`
	TestCases []tools.TestCase `json:"testCases" jsonschema_description:"The test cases for evaluation."`
}

FixedEnvEvaluateArgs is the arguments for the cel_evaluate tool when a static environment is configured.

type FixedEnvGeneratePromptArgs

type FixedEnvGeneratePromptArgs struct {
	UserPrompt string `json:"userPrompt" jsonschema_description:"The user prompt to generate the CEL expression for."`
}

FixedEnvGeneratePromptArgs is the arguments for the cel_generate_prompt tool when a static environment is configured.

type GeneratePromptArgs

type GeneratePromptArgs struct {
	EnvConfig  *tools.Config `json:"envConfig" jsonschema_description:"The JSON string representing the CEL environment schema."`
	UserPrompt string        `json:"userPrompt" jsonschema_description:"The user prompt to generate the CEL expression for."`
}

GeneratePromptArgs is the arguments for the cel_generate_prompt tool.

Jump to

Keyboard shortcuts

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