Documentation
¶
Overview ¶
Package test provides integration testing helper functions for ophis It assumes ophis.Command is a root level subcommand
Index ¶
- func CmdPathsToToolNames(paths []string) []string
- func GetInputSchema(t *testing.T, tool *mcp.Tool) *jsonschema.Schema
- func GetTools(t *testing.T, cmd *cobra.Command) []*mcp.Tool
- func GetToolsForCommand(t *testing.T, cmd *cobra.Command, commandName string) []*mcp.Tool
- func ToolNames(t *testing.T, tools []*mcp.Tool, expectedNames ...string)
- func Tools(t *testing.T, cmd *cobra.Command, expectedNames ...string)
- func ToolsForCommand(t *testing.T, cmd *cobra.Command, commandName string, expectedNames ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdPathsToToolNames ¶
CmdPathsToToolNames converts command names with spaces to tool names with underscores
func GetInputSchema ¶
GetInputSchema extracts and returns the input schema from a tool
func GetTools ¶
GetTools runs `mcp tools` command and returns the parsed list of tools. It assumes the ophis command uses the default name "mcp". For custom command names, use GetToolsForCommand.
func GetToolsForCommand ¶ added in v1.1.3
GetToolsForCommand runs `<commandName> tools` and returns the parsed list of tools. commandName is the Use name of the ophis command in the Cobra tree (e.g. "mcp" or "agent").
func Tools ¶
Tools runs `mcp tools` and checks the output tool names against expectedNames. It assumes the ophis command uses the default name "mcp". For custom command names, use ToolsForCommand.
func ToolsForCommand ¶ added in v1.1.3
ToolsForCommand runs `<commandName> tools` and checks the output tool names against expectedNames. commandName is the Use name of the ophis command in the Cobra tree.
Types ¶
This section is empty.