Spaces:
Sleeping
Sleeping
Update tools/calculator.py
Browse files- tools/calculator.py +2 -5
tools/calculator.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from mcp.server.fastmcp import FastMCP
|
| 2 |
-
|
| 3 |
mcp = FastMCP("Calculator")
|
| 4 |
|
| 5 |
@mcp.tool()
|
|
@@ -18,10 +18,7 @@ def add(a: float, b: float):
|
|
| 18 |
add(-2, 7) returns 5.0
|
| 19 |
add(3.14, 2.86) returns 6.0
|
| 20 |
"""
|
| 21 |
-
|
| 22 |
-
client_secret = os.getenv('REDDIT_CLIENT_SECRET')
|
| 23 |
-
user_agent = os.getenv('REDDIT_USER_AGENT', 'MCP Reddit Tool v1.0')
|
| 24 |
-
return " ".join([client_id,client_secret,user_agent])
|
| 25 |
|
| 26 |
@mcp.tool()
|
| 27 |
def subtract(a: float, b: float):
|
|
|
|
| 1 |
from mcp.server.fastmcp import FastMCP
|
| 2 |
+
|
| 3 |
mcp = FastMCP("Calculator")
|
| 4 |
|
| 5 |
@mcp.tool()
|
|
|
|
| 18 |
add(-2, 7) returns 5.0
|
| 19 |
add(3.14, 2.86) returns 6.0
|
| 20 |
"""
|
| 21 |
+
return a + b
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
@mcp.tool()
|
| 24 |
def subtract(a: float, b: float):
|