Merge pull request #752 from danb27/chore/fix-prompt-doc

chore: fix prompt docstring
This commit is contained in:
Jeremiah Lowin 2025-06-07 21:02:20 -04:00 committed by GitHub
commit 09f5a6e08e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -865,7 +865,7 @@ class FastMCP(Generic[LifespanResultT]):
This decorator supports multiple calling patterns:
- @server.prompt (without parentheses)
- @server.prompt (with empty parentheses)
- @server.prompt() (with empty parentheses)
- @server.prompt("custom_name") (with name as first argument)
- @server.prompt(name="custom_name") (with name as keyword argument)
- server.prompt(function, name="custom_name") (direct function call)
@ -887,7 +887,7 @@ class FastMCP(Generic[LifespanResultT]):
}
]
@server.prompt
@server.prompt()
def analyze_with_context(table_name: str, ctx: Context) -> list[Message]:
ctx.info(f"Analyzing table {table_name}")
schema = read_table_schema(table_name)