Some MCP clients only support tools. They cannot list or get prompts directly because they lack prompt protocol support. TheDocumentation Index
Fetch the complete documentation index at: https://gofastmcp.com/llms.txt
Use this file to discover all available pages before exploring further.
PromptsAsTools transform bridges this gap by generating tools that provide access to your server’s prompts.
When you add PromptsAsTools to a server, it creates two tools that clients can call instead of using the prompt protocol:
list_promptsreturns JSON describing all available prompts and their argumentsget_promptrenders a specific prompt with provided arguments
Basic Usage
Pass your FastMCP server toPromptsAsTools when adding the transform. The generated tools route through the server at runtime, which means all server middleware — auth, visibility, rate limiting — applies to prompt operations automatically, exactly as it would for direct prompts/get calls.
PromptsAsTools (and ResourcesAsTools) should be applied to a FastMCP server instance, not a raw Provider. The generated tools call back into the server’s middleware chain at runtime, so they need a server to route through. If you want to expose only a subset of prompts, create a dedicated FastMCP server for those prompts and apply the transform there.list_prompts and get_prompt.
Listing Prompts
Thelist_prompts tool returns JSON with metadata for each prompt, including its arguments.
name: The argument namedescription: Optional description from type hints or docstringsrequired: Whether the argument must be provided
Getting Prompts
Theget_prompt tool accepts a prompt name and optional arguments dict. It returns the rendered prompt as JSON with a messages array.
arguments field or pass an empty dict:
Message Format
Rendered prompts return a messages array following the standard MCP format. Each message includes:role: The message role (“user” or “assistant”)content: The message text content

