docs: quote all pip install extras for fastmcp sampling handlers

This commit is contained in:
Jeremiah Lowin 2026-07-20 11:06:30 -04:00
commit 51a228a6ae
No known key found for this signature in database
8 changed files with 12 additions and 12 deletions

View file

@ -128,7 +128,7 @@ client = Client(
```
<Note>
Install the OpenAI handler with `pip install fastmcp[openai]`.
Install the OpenAI handler with `pip install 'fastmcp[openai]'`.
</Note>
### Anthropic Handler
@ -146,7 +146,7 @@ client = Client(
```
<Note>
Install the Anthropic handler with `pip install fastmcp[anthropic]`.
Install the Anthropic handler with `pip install 'fastmcp[anthropic]'`.
</Note>
### Google Gemini Handler
@ -164,7 +164,7 @@ client = Client(
```
<Note>
Install the Google Gemini handler with `pip install fastmcp[gemini]`.
Install the Google Gemini handler with `pip install 'fastmcp[gemini]'`.
</Note>
## Sampling Capabilities

View file

@ -137,7 +137,7 @@ Client support for sampling is optional—some clients may not implement it. To
FastMCP provides built-in handlers for [OpenAI and Anthropic APIs](/clients/sampling#built-in-handlers). These handlers support the full sampling API including tools, automatically converting your Python functions to each provider's format.
<Note>
Install handlers with `pip install fastmcp[openai]` or `pip install fastmcp[anthropic]`.
Install handlers with `pip install 'fastmcp[openai]'` or `pip install 'fastmcp[anthropic]'`.
</Note>
```python

View file

@ -212,7 +212,7 @@ client = Client(
```
<Note>
Install the OpenAI handler with `pip install fastmcp[openai]`.
Install the OpenAI handler with `pip install 'fastmcp[openai]'`.
</Note>
### Anthropic Handler
@ -246,7 +246,7 @@ client = Client(
```
<Note>
Install the Anthropic handler with `pip install fastmcp[anthropic]`.
Install the Anthropic handler with `pip install 'fastmcp[anthropic]'`.
</Note>
### Tool Execution

View file

@ -446,7 +446,7 @@ Client support for sampling is optional—some clients may not implement it. To
FastMCP provides built-in handlers for [OpenAI and Anthropic APIs](/v2/clients/sampling#built-in-handlers). These handlers support the full sampling API including tools, automatically converting your Python functions to each provider's format.
<Note>
Install handlers with `pip install fastmcp[openai]` or `pip install fastmcp[anthropic]`.
Install handlers with `pip install 'fastmcp[openai]'` or `pip install 'fastmcp[anthropic]'`.
</Note>
```python

View file

@ -5,7 +5,7 @@ These examples demonstrate FastMCP's sampling API, which allows server tools to
## Prerequisites
```bash
pip install fastmcp[anthropic]
pip install 'fastmcp[anthropic]'
export ANTHROPIC_API_KEY=your-key
```
@ -59,4 +59,4 @@ from fastmcp.client.sampling.handlers.openai import OpenAISamplingHandler
handler = OpenAISamplingHandler(default_model="gpt-4o-mini")
```
And install with `pip install fastmcp[openai]`.
And install with `pip install 'fastmcp[openai]'`.

View file

@ -1052,7 +1052,7 @@ def _build_picker_html(tools: list[dict[str, Any]]) -> str:
from prefab_ui.components.form import Form
from prefab_ui.rx import RESULT, Rx
except ImportError:
return "<html><body><p>prefab-ui not installed. Run: pip install fastmcp[apps]</p></body></html>"
return "<html><body><p>prefab-ui not installed. Run: pip install 'fastmcp[apps]'</p></body></html>"
if not tools:
with Column(gap=4, css_class="p-6 max-w-2xl mx-auto") as view:

View file

@ -41,7 +41,7 @@ try:
except ImportError as e:
raise ImportError(
"The `anthropic` package is not installed. "
"Install it with `pip install fastmcp-slim[anthropic]` or add `anthropic` to your dependencies."
"Install it with `pip install 'fastmcp-slim[anthropic]'` or add `anthropic` to your dependencies."
) from e
__all__ = ["AnthropicSamplingHandler"]

View file

@ -28,7 +28,7 @@ try:
except ImportError as e:
raise ImportError(
"The `google-genai` package is not installed. "
"Install it with `pip install fastmcp-slim[gemini]` or add `google-genai` "
"Install it with `pip install 'fastmcp-slim[gemini]'` or add `google-genai` "
"to your dependencies."
) from e