---
title: "Prompts"
description: "Create reusable prompts for AI assistants with optional arguments."
canonical_url: "https://mcp-toolkit.nuxt.dev/prompts/overview"
---
# Prompts

> Create reusable prompts for AI assistants with optional arguments.

## What are Prompts?

Prompts are reusable message templates that can be used by AI assistants. They can include dynamic arguments and return pre-formatted messages.

<prompt :actions="["copy","cursor","windsurf"]" description="Scaffold a new MCP prompt" icon="i-lucide-message-square">

Create a new MCP prompt in my Nuxt app using @nuxtjs/mcp-toolkit.

- Create a file in server/mcp/prompts/ (e.g. server/mcp/prompts/review-code.ts)
- Use defineMcpPrompt (auto-imported) with a description and handler
- The handler can return a string (auto-wrapped as a user message) or a full GetPromptResult with messages array
- Define arguments with `import { z } from 'zod'` in inputSchema (prompt arguments must be strings)
- Use the role option ('user' or 'assistant') to control the default role for string returns
- Use completable() to provide autocompletion suggestions for arguments
- Return multiple messages to create a conversation flow
- Name and title are auto-generated from the filename
- Prompts appear in Cursor and VS Code when typing / in the chat

Docs: [https://mcp-toolkit.nuxt.dev/prompts/overview](https://mcp-toolkit.nuxt.dev/prompts/overview)

</prompt>

## Why Use Prompts?

MCP prompts offer several advantages over ad-hoc instructions:

<card-group>
<card icon="i-lucide-repeat" title="Reusability">

Define once, use everywhere. Share prompts across your team for consistent AI interactions.

</card>

<card icon="i-lucide-check-square" title="Standardization">

Ensure consistent formatting and context for specific tasks like code reviews or documentation.

</card>

<card icon="i-lucide-settings-2" title="Customization">

Use arguments to adapt prompts to different contexts while maintaining structure.

</card>

<card icon="i-lucide-plug" title="IDE Integration">

Prompts appear in Cursor, VS Code, and Visual Studio for easy access during development.

</card>
</card-group>

## IDE Integration

MCP prompts integrate seamlessly with modern development environments. When your MCP server is connected, prompts become available directly in your IDE.

### Using Prompts in Cursor / VS Code

1. **Type /** — in the chat, type `/` to see all available MCP prompts.
2. **Select a prompt** — choose from the list (e.g. `local-mcp/setup-mcp-server`).
3. **Fill arguments** — for parameterized prompts, a dialog appears to collect the values defined in your `inputSchema`.
4. **Send** — the prompt's messages are inserted into the conversation as if you had typed them.

Prompts surface with the prefix `<server-name>/<prompt-name>`, so renaming your handler in `defineMcpHandler({ name })` changes how they appear in clients.

## Going further

<card-group>
<card icon="i-lucide-pen-line" title="Authoring & structure" color="neutral" to="https://mcp-toolkit.nuxt.dev/prompts/authoring">

Auto-generated names, simple prompts, default roles, and prompt structure.

</card>

<card icon="i-lucide-layers" title="Input, handler & messages" color="neutral" to="https://mcp-toolkit.nuxt.dev/prompts/input-handler-messages">

Zod arguments, completable autocomplete, return types, and multi-message conversations.

</card>

<card icon="i-lucide-line-chart" title="Patterns & advanced" color="neutral" to="https://mcp-toolkit.nuxt.dev/prompts/patterns-advanced">

Real-world examples, groups, type safety, best practices, and conditional registration.

</card>

<card icon="i-lucide-message-square" title="Prompt examples" color="neutral" to="https://mcp-toolkit.nuxt.dev/examples/prompt-examples">

Code review, documentation, email, and commit-message prompts you can copy.

</card>
</card-group>

## Next Steps

- [Authoring & structure](https://mcp-toolkit.nuxt.dev/prompts/authoring) — write your first prompt.
- [Tools](https://mcp-toolkit.nuxt.dev/tools/overview) — pair prompts with actions the AI can take.
- [Resources](https://mcp-toolkit.nuxt.dev/resources/overview) — feed context alongside your prompts.

---

- [Authoring & structure](https://mcp-toolkit.nuxt.dev/prompts/authoring)
- [Input, handler & messages](https://mcp-toolkit.nuxt.dev/prompts/input-handler-messages)
- [Patterns & advanced](https://mcp-toolkit.nuxt.dev/prompts/patterns-advanced)


## Sitemap

See the full [sitemap](https://mcp-toolkit.nuxt.dev/sitemap.md) for all pages.
