aeonshift commited on
Commit
107bdd1
·
verified ·
1 Parent(s): a9e823d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
app.py CHANGED
@@ -61,19 +61,7 @@ async def create_record_tool(request: mcp_types.CallToolRequest):
61
  }
62
 
63
  # Create MCP server and transport
64
- mcp_server = Server(
65
- tools=[
66
- mcp_types.Tool( # Changed to Tool
67
- name="list_airtable_records",
68
- description="Lists all records in the specified Airtable table",
69
- inputSchema={}
70
- ),
71
- mcp_types.Tool( # Changed to Tool
72
- name="create_airtable_record",
73
- description="Creates a new record in the specified Airtable table",
74
- inputSchema={"record_data": {"type": "object"}}
75
- )
76
- ],
77
  tool_handlers={
78
  "list_airtable_records": list_records_tool,
79
  "create_airtable_record": create_record_tool
@@ -81,6 +69,20 @@ mcp_server = Server(
81
  notification_options=NotificationOptions()
82
  )
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  # Initialize SseServerTransport
85
  transport = SseServerTransport("/airtable/mcp")
86
 
 
61
  }
62
 
63
  # Create MCP server and transport
64
+ mcp_server = Server( # Removed 'tools' argument
 
 
 
 
 
 
 
 
 
 
 
 
65
  tool_handlers={
66
  "list_airtable_records": list_records_tool,
67
  "create_airtable_record": create_record_tool
 
69
  notification_options=NotificationOptions()
70
  )
71
 
72
+ # Define tools separately (for Deep Agent to discover them)
73
+ tools = [
74
+ mcp_types.Tool(
75
+ name="list_airtable_records",
76
+ description="Lists all records in the specified Airtable table",
77
+ inputSchema={}
78
+ ),
79
+ mcp_types.Tool(
80
+ name="create_airtable_record",
81
+ description="Creates a new record in the specified Airtable table",
82
+ inputSchema={"record_data": {"type": "object"}}
83
+ )
84
+ ]
85
+
86
  # Initialize SseServerTransport
87
  transport = SseServerTransport("/airtable/mcp")
88