# Prompts URL: /concepts/model-context-protocol/features/prompts Prompts allow MCP servers to expose reusable prompt templates that can be easily inserted into your application. This enables standardized workflows, consistent prompt patterns, and quick access to commonly used prompts provided by MCP servers. For more details on the prompts specification, see the [MCP Prompts documentation](https://modelcontextprotocol.io/docs/concepts/prompts). ## What are Prompts? Prompts are predefined text templates exposed by MCP servers that users can insert into their message input. This is useful when: * An MCP server provides helpful prompt templates for common tasks * You want to standardize how users interact with specific tools or workflows * Users need quick access to complex prompts without memorizing syntax For example, a GitHub MCP server might provide prompts like "Create a detailed issue report" or "Review this pull request", which expand into well-structured templates when selected. ## Built-in Support The `message-input` component automatically displays available prompts from all connected MCP servers. When any MCP server exposes prompts, a document button (📄) appears in the message input area: ```tsx import { MessageInput } from "@/components/ui/message-input"; // Prompts are automatically displayed - no additional setup needed ; ``` The prompt picker automatically: * Discovers prompts from all connected MCP servers * Displays them in a dropdown menu * Inserts the selected prompt into the message input * Only appears when at least one MCP server has prompts available ## How It Works Here's the typical flow when a user selects an MCP prompt: ## User Experience Prompts Button When prompts are available: 1. A document icon (📄) appears in the message input area 2. Clicking it opens a dropdown showing all available prompts 3. Prompts are organized by MCP server 4. Selecting a prompt inserts its content into the message input 5. The user can then edit the prompt before sending ## Current Limitations **Parameters are not yet supported.** While the MCP specification allows prompts to accept parameters for customization, Tambo's current implementation does not expose parameter input fields. All prompts are inserted as-is without user customization. This means: * Prompts with parameters will use their default values * Users cannot customize prompt templates at insertion time * Parameter support is planned for a future release ## Programmatic Access You can access Prompts programmatically using the provided hooks: ### List All Prompts Use `useTamboMcpPromptList` to get all available prompts from connected servers: ```tsx import { useTamboMcpPromptList } from "@tambo-ai/react/mcp"; function PromptList() { const { data: prompts, isLoading, error } = useTamboMcpPromptList(); if (isLoading) return
Loading prompts...
; if (error) return
Error loading prompts
; return ( ); } ``` The hook returns an array of `ListPromptEntry` objects, each containing: * `server` - The connected MCP server providing this prompt * `prompt` - The prompt metadata (name, description) ### Get Specific Prompt Use `useTamboMcpPrompt` to fetch a specific prompt's content: ```tsx import { useTamboMcpPrompt } from "@tambo-ai/react/mcp"; function PromptContent({ promptName }: { promptName: string }) { const { data: prompt, isLoading, error } = useTamboMcpPrompt(promptName); if (isLoading) return
Loading...
; if (error) return
Error loading prompt
; if (!prompt) return null; return (

{prompt.description}

{prompt.messages.map((msg, idx) => (
{msg.role}: {msg.content.type === "text" &&

{msg.content.text}

}
))}
); } ``` The hook accepts: * `promptName` - The name of the prompt to fetch * `args` - Optional parameters (currently not exposed in UI) ## Connection Type Support Prompts work with both connection types: * **[Server-side MCP](/concepts/model-context-protocol/providers/serverside-mcp-connection)** - ✅ Fully supported * **[Client-side MCP](/concepts/model-context-protocol/providers/clientside-mcp-connection)** - ✅ Fully supported Both connection types can expose prompts that will appear in the prompt picker. ## Example Use Cases ### Documentation Templates A documentation MCP server provides prompts for common documentation patterns: * "API endpoint documentation" * "Component usage guide" * "Troubleshooting section" ### Code Review Prompts A code review MCP server offers structured review templates: * "Security-focused code review" * "Performance optimization review" * "Accessibility audit" ### Task Management A task tracking MCP server provides prompts for common workflows: * "Create bug report" * "Plan feature implementation" * "Write release notes" ## Future Capabilities Planned enhancements for MCP prompts include: * **Inline prompts**: Allow users to edit prompts in the message input, with a `/` hotkey. * **Parameter support**: Allow users to customize prompts with dynamic values * **Custom UI**: Build custom prompt pickers with different layouts * **Prompt history**: Track frequently used prompts ## Related Features import LearnMore from "@/components/learn-more";