Prompts (Slash Commands)
Prompts are pre-built templates that guide your AI assistant through common Tauri development tasks. In MCP clients like Claude Desktop, Cursor, and others, these appear as slash commands that you can invoke directly.
Prompts Not Supported Everywhere
Some MCP clients don't support prompts yet (e.g., Windsurf). If slash commands don't work in your editor, see the Getting Started guide for a workaround.
What Are Prompts?
Unlike tools (which the AI calls automatically), prompts are user-controlled. When you type a slash command like /fix-webview-errors, the prompt injects a structured set of instructions into your conversation, guiding the AI through a multi-step workflow.
When to Use Prompts
Use prompts when you want a guided, multi-step workflow rather than a single action. They're perfect for debugging sessions, testing flows, and complex tasks that require multiple tools working together.
Available Prompts
setup
Slash command: /setup
Guides you through setting up the MCP Bridge plugin in a Tauri project. This prompt instructs the AI to make all necessary changes to your project:
- Adds the Rust crate to
src-tauri/Cargo.toml - Registers the plugin in your app's entry point (
lib.rsormain.rs) - Enables
withGlobalTauriintauri.conf.json - Adds the required permissions to your capabilities file
Example usage:
/setupThe AI will examine your project structure and make the necessary changes. It will also verify the setup is correct and provide troubleshooting guidance if needed.
When to Use
Use this prompt when you're adding the MCP bridge to a new Tauri project, or when you're not sure if your existing setup is correct.
fix-webview-errors
Slash command: /fix-webview-errors
Finds and fixes JavaScript errors in your Tauri app's webview. This prompt guides the AI through a complete debugging workflow:
- Connects to your running Tauri app via the MCP bridge
- Retrieves console logs and errors from the webview
- Analyzes error messages, stack traces, and identifies root causes
- Locates the problematic source code in your project
- Proposes concrete fixes for each error found
- Cleans up the session when done
Example usage:
/fix-webview-errorsThe AI will then:
- Start an automation session with your app
- Pull any JavaScript errors from the console
- Help you understand what went wrong and how to fix it
Prerequisites
- Your Tauri app must be running with the MCP bridge plugin installed
- The
withGlobalTaurioption must be enabled intauri.conf.json
What it does behind the scenes:
| Step | Tool Used | Purpose |
|---|---|---|
| 1 | tauri_driver_session | Connect to the running app |
| 2 | tauri_read_logs | Retrieve JS errors and warnings |
| 3 | Code search tools | Find source code locations |
| 4 | tauri_driver_session | Clean up connection |
How Prompts Work
When you invoke a prompt, it sends a structured message to the AI that includes:
- Context about what you're trying to accomplish
- Step-by-step instructions for the AI to follow
- Tool suggestions for each step
- Error handling guidance for common issues
The AI then executes these steps using the available MCP tools, providing feedback along the way.
Creating Custom Workflows
While the built-in prompts cover common scenarios, you can always ask your AI to perform similar workflows manually. For example:
"Connect to my Tauri app, check for any console errors, and help me fix them"
This achieves the same result as /fix-webview-errors but gives you more control over the process.
Prompt vs Tool: When to Use Which
| Use Case | Prompt | Tool |
|---|---|---|
| Set up MCP bridge in a project | /setup | - |
| Debug JS errors in webview | /fix-webview-errors | - |
| Take a single screenshot | - | tauri_webview_screenshot |
| Multi-step testing workflow | Ask AI to create one | - |
| Check a specific element | - | tauri_webview_find_element |
| Guided debugging session | Use a prompt | - |
| Quick one-off action | - | Let AI choose the tool |
See Also
- UI Automation Tools - Tools used by debugging prompts
- Getting Started - Setup instructions