fastmcp icon indicating copy to clipboard operation
fastmcp copied to clipboard

Problems in the official documentation

Open ryzqi opened this issue 8 months ago • 1 comments

In the Quick Start section, there is the following code

@mcp.tool def greet(name: str) -> str: return f"Hello, {name}!"

but it should be like this

@mcp.tool() def greet(name: str) -> str: return f"Hello, {name}!"

You have to put brackets after @tool, otherwise the code won't work correctly

ryzqi avatar Apr 18 '25 14:04 ryzqi

It is solved now so we can close this issue

harshasiddartha avatar Apr 19 '25 20:04 harshasiddartha

I believe this was solved by @Minseok0917 in https://github.com/jlowin/fastmcp/pull/200/

jlowin avatar Apr 20 '25 23:04 jlowin