MCP Slash Commands
MCP server prompts are automatically registered as slash commands in CLI and TUI chat interfaces.
Command Discoveryβ
Prompts are automatically discovered and registered when MCP servers are initialized:
# List available slash commands
rad mcp prompts
Command Formatβ
Slash commands use the format /prompt-name:
- Prompt names are normalized (spaces β underscores, lowercase)
- Example:
"Search Database"becomes/search_database
Using Slash Commandsβ
In CLI Chatβ
rad chat assistant
> /search_database query="SELECT * FROM users"
In TUIβ
Type slash commands directly in the chat interface:
> /search_database query="SELECT * FROM users"
Command Argumentsβ
Arguments are passed as space-separated values:
/search query text here
Arguments are converted to JSON based on the prompt's argument schema.
Help Commandβ
View available slash commands:
# In chat
/help
# Or list MCP commands specifically
/mcp-commands
Command Executionβ
- Command is parsed from input
- Lookup in slash command registry
- Server identified from registry
- Prompt executed via MCP
- Result displayed
Example Promptsβ
Common MCP prompts might include:
/search- Search functionality/translate- Translation service/analyze- Data analysis/generate- Content generation
Troubleshootingβ
Command not found:
- Ensure MCP server is connected:
rad mcp test - Check prompts are available:
rad mcp prompts - Verify server has prompts configured
Execution errors:
- Check server connection status
- Verify prompt arguments match schema
- Review server logs for errors
Examplesβ
See basic-server.toml for a server configuration with prompts.