Maikel Veen commited on
Commit
76b9f6d
·
unverified ·
1 Parent(s): 17763eb

docs: Fix type annotation in return value documentation (#1499)

Browse files
Files changed (1) hide show
  1. docs/servers/prompts.mdx +2 -2
docs/servers/prompts.mdx CHANGED
@@ -188,10 +188,10 @@ FastMCP intelligently handles different return types from your prompt function:
188
  - **`Any`**: If the return type is not one of the above, the return value is attempted to be converted to a string and used as a `PromptMessage`.
189
 
190
  ```python
191
- from fastmcp.prompts.prompt import Message
192
 
193
  @mcp.prompt
194
- def roleplay_scenario(character: str, situation: str) -> list[Message]:
195
  """Sets up a roleplaying scenario with initial messages."""
196
  return [
197
  Message(f"Let's roleplay. You are {character}. The situation is: {situation}"),
 
188
  - **`Any`**: If the return type is not one of the above, the return value is attempted to be converted to a string and used as a `PromptMessage`.
189
 
190
  ```python
191
+ from fastmcp.prompts.prompt import PromptMessage
192
 
193
  @mcp.prompt
194
+ def roleplay_scenario(character: str, situation: str) -> list[PromptMessage]:
195
  """Sets up a roleplaying scenario with initial messages."""
196
  return [
197
  Message(f"Let's roleplay. You are {character}. The situation is: {situation}"),