Spaces:
Running
Running
Gleb Tsyganov commited on
Commit ·
1e7bbcf
1
Parent(s): 0cf6d6b
Add logging
Browse files
server.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
from mcp.server.mcpserver import MCPServer
|
| 2 |
import json
|
|
|
|
| 3 |
|
| 4 |
mcp = MCPServer("text-processor")
|
|
|
|
| 5 |
|
| 6 |
@mcp.tool()
|
| 7 |
def analyze_text(text: str) -> str:
|
|
@@ -13,6 +15,7 @@ def analyze_text(text: str) -> str:
|
|
| 13 |
Returns:
|
| 14 |
JSON string with analysis results
|
| 15 |
"""
|
|
|
|
| 16 |
words = text.split()
|
| 17 |
chars = len(text)
|
| 18 |
chars_no_spaces = len(text.replace(" ", ""))
|
|
|
|
| 1 |
from mcp.server.mcpserver import MCPServer
|
| 2 |
import json
|
| 3 |
+
import logging
|
| 4 |
|
| 5 |
mcp = MCPServer("text-processor")
|
| 6 |
+
logging.basicConfig(level=logging.INFO)
|
| 7 |
|
| 8 |
@mcp.tool()
|
| 9 |
def analyze_text(text: str) -> str:
|
|
|
|
| 15 |
Returns:
|
| 16 |
JSON string with analysis results
|
| 17 |
"""
|
| 18 |
+
logging.info("MCP request received, called analyze text tool")
|
| 19 |
words = text.split()
|
| 20 |
chars = len(text)
|
| 21 |
chars_no_spaces = len(text.replace(" ", ""))
|