Load MCP Tool Definitions from Package or Directory
Arguments
- pkg
Character. Package name or path to tools directory. If
pkgcontains path separators, space, or., it is treated as a directory path. Otherwise, it is treated as a package name.- groups
Character vector or NULL. Optional group filter(s) to load only tools from specific group(s). Groups are extracted from tool names following the pattern
pkg-mcp_tool_{group}_{action}. Each group can be a regexp pattern. For example, "pipeline", "config", or "(pipeline|config)". IfNULL(default), all tools are loaded.
Examples
# Load all tools from package
tools <- mcptool_load_all("ravepipeline")
# Load only pipeline group tools
pipeline_tools <- mcptool_load_all("ravepipeline", groups = "pipeline")
# Load multiple groups
tools <- mcptool_load_all("ravepipeline", groups = c("pipeline", "config"))
# Load from directory
path <- system.file("mcp", "tools", package = "ravepipeline")
tools <- mcptool_load_all(path)