init update

This commit is contained in:
tianyufan
2025-10-24 00:35:21 +08:00
commit df5c25c98d
205 changed files with 81998 additions and 0 deletions

20
agent_tools/tool_math.py Normal file
View File

@@ -0,0 +1,20 @@
from fastmcp import FastMCP
import os
from dotenv import load_dotenv
load_dotenv()
mcp = FastMCP("Math")
@mcp.tool()
def add(a: float, b: float) -> float:
"""Add two numbers (supports int and float)"""
return float(a) + float(b)
@mcp.tool()
def multiply(a: float, b: float) -> float:
"""Multiply two numbers (supports int and float)"""
return float(a) * float(b)
if __name__ == "__main__":
port = int(os.getenv("MATH_HTTP_PORT", "8000"))
mcp.run(transport="streamable-http", port=port)