Documentation
¶
Overview ¶
Package mcp provides the Model Context Protocol (MCP) server for CEL expressions.
Index ¶
- func LoadEnvConfig(envPathOrJSON string) (*tools.Config, error)
- func LoadFileDescriptorSet(path string) (cel.EnvOption, error)
- func NewServer(fixedEnv *tools.Config, opts ...cel.EnvOption) *mcp.Server
- func SetupServer(fdsPath, envPath string) (*mcp.Server, error)
- type CompileArgs
- type CreateEnvConfigArgs
- type EvaluateArgs
- type FixedEnvCompileArgs
- type FixedEnvEvaluateArgs
- type FixedEnvGeneratePromptArgs
- type GeneratePromptArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadEnvConfig ¶
LoadEnvConfig loads an environment Config from a file path or inline JSON string.
func LoadFileDescriptorSet ¶
LoadFileDescriptorSet reads a binary FileDescriptorSet from the filesystem.
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.