Jofthomas commited on
Commit
71821f7
·
verified ·
1 Parent(s): 1285829

Update echo_server.py

Browse files
Files changed (1) hide show
  1. echo_server.py +2 -2
echo_server.py CHANGED
@@ -6,7 +6,7 @@ mcp = FastMCP(name="EchoServer", stateless_http=True)
6
  def echo(message: str) -> str:
7
  return f"Echo: {message}"
8
 
9
- @mcp.tool
10
  def greet() -> str:
11
  headers = get_http_headers()
12
  print(f"Received headers: {headers}")
@@ -14,7 +14,7 @@ def greet() -> str:
14
  return f"Hello, {name}!"
15
 
16
 
17
- @mcp.tool
18
  def safe_header_info() -> dict:
19
  """Safely get header information without raising errors."""
20
  # Get headers (returns empty dict if no request context)
 
6
  def echo(message: str) -> str:
7
  return f"Echo: {message}"
8
 
9
+ @mcp.tool(description="A simple greeting")
10
  def greet() -> str:
11
  headers = get_http_headers()
12
  print(f"Received headers: {headers}")
 
14
  return f"Hello, {name}!"
15
 
16
 
17
+ @mcp.tool(description="A simple tool to check token is passed correctly")
18
  def safe_header_info() -> dict:
19
  """Safely get header information without raising errors."""
20
  # Get headers (returns empty dict if no request context)