File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ def add_prompt(
3535 Args:
3636 prompt_or_fn: Either a Prompt instance or a function to create a prompt from
3737 name: Optional name for the prompt (only used if prompt_or_fn is a function)
38- description: Optional description of the prompt (only used if prompt_or_fn is a function)
38+ description: Optional description of the prompt
39+ (only used if prompt_or_fn is a function)
3940 """
4041 if isinstance (prompt_or_fn , Prompt ):
4142 prompt = prompt_or_fn
Original file line number Diff line number Diff line change @@ -500,7 +500,8 @@ def add_prompt(
500500 Args:
501501 prompt_or_fn: Either a Prompt instance or a function to create a prompt from
502502 name: Optional name for the prompt (only used if prompt_or_fn is a function)
503- description: Optional description of the prompt (only used if prompt_or_fn is a function)
503+ description: Optional description of the prompt
504+ (only used if prompt_or_fn is a function)
504505 """
505506 self ._prompt_manager .add_prompt (
506507 prompt_or_fn , name = name , description = description
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def fn() -> str:
3030 assert manager .get_prompt ("test_prompt" ) == prompt
3131
3232 def test_add_prompt_object_ignores_name_and_description (self ):
33- """Test that name and description args are ignored when adding a Prompt object."""
33+ """Test if name and description args are ignored when adding a Prompt object."""
3434
3535 def fn () -> str :
3636 return "Hello, world!"
Original file line number Diff line number Diff line change 1111from mcp .server .fastmcp .prompts .base import (
1212 EmbeddedResource ,
1313 Message ,
14- UserMessage ,
1514 Prompt ,
15+ UserMessage ,
1616)
1717from mcp .server .fastmcp .resources import FileResource , FunctionResource
1818from mcp .server .fastmcp .utilities .types import Image
You can’t perform that action at this time.
0 commit comments