Skip to content

Problems in the official documentation #204

Closed
@ryzqi

Description

@ryzqi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions