Merge pull request #8 from alephpiece/fix/drop-none-args

fix: drop none arguments
This commit is contained in:
Timothy Jaeryang Baek 2025-04-01 13:03:24 -07:00 committed by GitHub
commit 9bf7986f65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ async def create_dynamic_endpoints(app: FastAPI):
def make_endpoint_func(endpoint_name: str, FormModel, session: ClientSession):
async def tool_endpoint(form_data: FormModel):
args = form_data.model_dump()
args = form_data.model_dump(exclude_none=True)
print(f"Calling {endpoint_name} with arguments:", args)
result = await session.call_tool(endpoint_name, arguments=args)
response = []