Skip to content

get_prompt doesn't return the prompt description #602

Open
jlowin/fastmcp
#325
@megandsouza03

Description

@megandsouza03

Describe the bug
When session.get_prompt(prompt.name) is called the GetPromptResult doesn't return the prompt description

To Reproduce
Steps to reproduce the behavior:

  1. Create a FastMCP server and add a prompt description
@mcp.prompt(description="This prompt summarizes the brave search data")
def summarize_brave_data() -> str:
   return f"ABCABCABCB"
  1. Create a client and call list_prompts along with get_prompts
prompt_data = await self.session.get_prompt(prompt.name)
print(prompt_data)
  1. Output:-
INFO     Processing request of type GetPromptRequest                                                     server.py:534
meta=None description=None messages=[PromptMessage(role='user', content=TextContent(type='text', text='ABCABCABCB', annotations=None))]

Expected behavior

INFO     Processing request of type GetPromptRequest                                                     server.py:534
meta=None description="This prompt summarizes the brave search data" messages=[PromptMessage(role='user', content=TextContent(type='text', text='ABCABCABCB', annotations=None))]

Screenshots
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions