Skip to content

Commit 3a4e06d

Browse files
fix ressources and prompts list (#117)
1 parent 9becdb7 commit 3a4e06d

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

jupyter_mcp_server/jupyter_extension/handlers.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ async def post(self):
9595
"result": {
9696
"protocolVersion": "2024-11-05",
9797
"capabilities": {
98-
"tools": {}
98+
"tools": {},
99+
"prompts": {},
100+
"resources": {}
99101
},
100102
"serverInfo": {
101103
"name": "Jupyter MCP Server",
@@ -209,6 +211,26 @@ async def post(self):
209211
"message": f"Internal error calling tool: {str(e)}"
210212
}
211213
}
214+
elif method == "prompts/list":
215+
# List available prompts - return empty list if no prompts defined
216+
logger.info("Listing prompts...")
217+
response = {
218+
"jsonrpc": "2.0",
219+
"id": request_id,
220+
"result": {
221+
"prompts": []
222+
}
223+
}
224+
elif method == "resources/list":
225+
# List available resources - return empty list if no resources defined
226+
logger.info("Listing resources...")
227+
response = {
228+
"jsonrpc": "2.0",
229+
"id": request_id,
230+
"result": {
231+
"resources": []
232+
}
233+
}
212234
else:
213235
# Method not supported
214236
response = {

0 commit comments

Comments
 (0)