We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12dc720 commit 0cfe249Copy full SHA for 0cfe249
fastapi_mcp/http_tools.py
@@ -12,6 +12,7 @@
12
from fastapi import FastAPI
13
from fastapi.openapi.utils import get_openapi
14
from mcp.server.fastmcp import FastMCP
15
+from pydantic import Field
16
17
logger = logging.getLogger("fastapi_mcp")
18
@@ -435,7 +436,7 @@ def create_http_tool(
435
436
required_props.append(param_name)
437
438
# Function to dynamically call the API endpoint
- async def http_tool_function(**kwargs):
439
+ async def http_tool_function(kwargs: Dict[str, Any] = Field(default_factory=dict)):
440
# Prepare URL with path parameters
441
url = f"{base_url}{path}"
442
for param_name, _ in path_params:
0 commit comments