mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 14:34:17 +02:00
43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
---
|
|
title: prompt_manager
|
|
sidebarTitle: prompt_manager
|
|
---
|
|
|
|
# `fastmcp.prompts.prompt_manager`
|
|
|
|
## Classes
|
|
|
|
### `PromptManager` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/prompts/prompt_manager.py#L21"><Icon icon="github" size="14" /></a></sup>
|
|
|
|
|
|
Manages FastMCP prompts.
|
|
|
|
|
|
**Methods:**
|
|
|
|
#### `mount` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/prompts/prompt_manager.py#L45"><Icon icon="github" size="14" /></a></sup>
|
|
|
|
```python
|
|
mount(self, server: MountedServer) -> None
|
|
```
|
|
|
|
Adds a mounted server as a source for prompts.
|
|
|
|
|
|
#### `add_prompt_from_fn` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/prompts/prompt_manager.py#L114"><Icon icon="github" size="14" /></a></sup>
|
|
|
|
```python
|
|
add_prompt_from_fn(self, fn: Callable[..., PromptResult | Awaitable[PromptResult]], name: str | None = None, description: str | None = None, tags: set[str] | None = None) -> FunctionPrompt
|
|
```
|
|
|
|
Create a prompt from a function.
|
|
|
|
|
|
#### `add_prompt` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/prompts/prompt_manager.py#L134"><Icon icon="github" size="14" /></a></sup>
|
|
|
|
```python
|
|
add_prompt(self, prompt: Prompt) -> Prompt
|
|
```
|
|
|
|
Add a prompt to the manager.
|
|
|