chore: import upstream snapshot with attribution
Deploy Docs / deploy-docs (push) Failing after 1s
Conformance Tests / client-conformance (push) Failing after 3s
Conformance Tests / server-conformance (push) Failing after 1s
GitHub Actions Security Analysis / zizmor (push) Failing after 1s
CI / checks (push) Failing after 59m20s
CI / all-green (push) Waiting to run
Deploy Docs / deploy-docs (push) Failing after 1s
Conformance Tests / client-conformance (push) Failing after 3s
Conformance Tests / server-conformance (push) Failing after 1s
GitHub Actions Security Analysis / zizmor (push) Failing after 1s
CI / checks (push) Failing after 59m20s
CI / all-green (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"""MCPServer Example showing parameter descriptions"""
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from mcp.server.mcpserver import MCPServer
|
||||
|
||||
# Create server
|
||||
mcp = MCPServer("Parameter Descriptions Server")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def greet_user(
|
||||
name: str = Field(description="The name of the person to greet"),
|
||||
title: str = Field(description="Optional title like Mr/Ms/Dr", default=""),
|
||||
times: int = Field(description="Number of times to repeat the greeting", default=1),
|
||||
) -> str:
|
||||
"""Greet a user with optional title and repetition"""
|
||||
greeting = f"Hello {title + ' ' if title else ''}{name}!"
|
||||
return "\n".join([greeting] * times)
|
||||
Reference in New Issue
Block a user