Eddyhzd commited on
Commit
662ab90
·
1 Parent(s): fb13585

reformat tools

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -46,11 +46,14 @@ class MCPClientWrapper:
46
  await self.session.initialize()
47
 
48
  response = await self.session.list_tools()
49
- self.tools = [{
50
- "name": tool.name,
51
- "description": tool.description,
52
- "input_schema": tool.inputSchema
53
- } for tool in response.tools]
 
 
 
54
 
55
  tool_names = [tool["name"] for tool in self.tools]
56
  return f"Connected to MCP server. Available tools: {', '.join(tool_names)}"
 
46
  await self.session.initialize()
47
 
48
  response = await self.session.list_tools()
49
+ self.tools = [{
50
+ "type": "function",
51
+ "function":{
52
+ "name": tool.name,
53
+ "description": tool.description,
54
+ "input_schema": tool.inputSchema
55
+ }
56
+ } for tool in response.tools]
57
 
58
  tool_names = [tool["name"] for tool in self.tools]
59
  return f"Connected to MCP server. Available tools: {', '.join(tool_names)}"