OppaAI commited on
Commit
826029c
·
verified ·
1 Parent(s): 85a3319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,8 +30,8 @@ async def search_jobs_tool(query: str, location: str, date_created: str = None,
30
  return {"error": str(e)}
31
 
32
  def search_jobs_ui(query, location, date_created=None, salary=None, job_type=None):
33
- # NOTE: mcp.run() is synchronous, do NOT await it to avoid runtime error
34
- result = mcp.run("search_jobs", inputs={
35
  "query": query,
36
  "location": location,
37
  "date_created": date_created,
 
30
  return {"error": str(e)}
31
 
32
  def search_jobs_ui(query, location, date_created=None, salary=None, job_type=None):
33
+ # Use call_tool to call the async MCP tool synchronously
34
+ result = mcp.call_tool("search_jobs", {
35
  "query": query,
36
  "location": location,
37
  "date_created": date_created,