Skip to content

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:

  1. Adds the Rust crate to src-tauri/Cargo.toml
  2. Registers the plugin in your app's entry point (lib.rs or main.rs)
  3. Enables withGlobalTauri in tauri.conf.json
  4. Adds the required permissions to your capabilities file

Example usage:

/setup

The 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:

  1. Connects to your running Tauri app via the MCP bridge
  2. Retrieves console logs and errors from the webview
  3. Analyzes error messages, stack traces, and identifies root causes
  4. Locates the problematic source code in your project
  5. Proposes concrete fixes for each error found
  6. Cleans up the session when done

Example usage:

/fix-webview-errors

The 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 withGlobalTauri option must be enabled in tauri.conf.json

What it does behind the scenes:

StepTool UsedPurpose
1tauri_driver_sessionConnect to the running app
2tauri_read_logsRetrieve JS errors and warnings
3Code search toolsFind source code locations
4tauri_driver_sessionClean 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 CasePromptTool
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 workflowAsk AI to create one-
Check a specific element-tauri_webview_find_element
Guided debugging sessionUse a prompt-
Quick one-off action-Let AI choose the tool

See Also

This is an unofficial community project. Not affiliated with, endorsed by, or associated with the Tauri project or CrabNebula Ltd.