Skip to content

Commit 397890b

Browse files
authored
(fix) Added missing prompts/get (#748)
Signed-off-by: Ian Molloy <[email protected]>
1 parent 4516fc0 commit 397890b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mcpgateway/cache/session_registry.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,6 @@ async def generate_response(self, message: Dict[str, Any], transport: SSETranspo
12761276
>>> # Response: {}
12771277
"""
12781278
result = {}
1279-
12801279
if "method" in message and "id" in message:
12811280
method = message["method"]
12821281
params = message.get("params", {})
@@ -1328,6 +1327,9 @@ async def generate_response(self, message: Dict[str, Any], transport: SSETranspo
13281327
else:
13291328
prompts = await prompt_service.list_prompts(db)
13301329
result = {"prompts": [p.model_dump(by_alias=True, exclude_none=True) for p in prompts]}
1330+
elif method == "prompts/get":
1331+
prompts = await prompt_service.get_prompt(db, name=params.get("name"), arguments=params.get("arguments", {}))
1332+
result = prompts.model_dump(by_alias=True, exclude_none=True)
13311333
elif method == "ping":
13321334
result = {}
13331335
elif method == "tools/call":

0 commit comments

Comments
 (0)