Documentation Index
Fetch the complete documentation index at: https://gofastmcp.com/llms.txt
Use this file to discover all available pages before exploring further.
fastmcp.server.transforms.prompts_as_tools
Transform that exposes prompts as tools.
This transform generates tools for listing and getting prompts, enabling
clients that only support tools to access prompt functionality.
The generated tools route through ctx.fastmcp at runtime, so all server
middleware (auth, visibility, rate limiting, etc.) applies to prompt
operations exactly as it would for direct prompts/get calls.
Example:
Classes
PromptsAsTools
Transform that adds tools for listing and getting prompts.
Generates two tools:
list_prompts: Lists all promptsget_prompt: Gets a specific prompt with optional arguments

