Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureBuiltinScripts ¶
EnsureBuiltinScripts copies bundled MCP scripts to <configDir>/mcp. This guarantees stdio MCP scripts are available at a stable path for runtime config.
func IsMCPToolName ¶
IsMCPToolName checks whether a tool name is a normalized MCP tool.
func NormalizeToolName ¶
NormalizeToolName converts source/tool pair to normalized tool name.
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime handles MCP tool source discovery and tool execution.
func NewRuntime ¶
func NewRuntime(getConfig configProvider) *Runtime
NewRuntime creates a new MCP runtime.
func (*Runtime) CallTool ¶
func (r *Runtime) CallTool(ctx context.Context, normalizedName string, arguments string) (string, error)
CallTool executes a normalized MCP tool call and returns serialized result.
func (*Runtime) ListOpenAITools ¶
func (r *Runtime) ListOpenAITools(ctx context.Context) []openai.ChatCompletionToolUnionParam
ListOpenAITools returns all MCP tools in normalized OpenAI function-tool format.
Click to show internal directories.
Click to hide internal directories.