wenjin272 commented on code in PR #434:
URL: https://github.com/apache/flink-agents/pull/434#discussion_r2699063449
##########
python/flink_agents/integrations/mcp/mcp.py:
##########
@@ -79,7 +79,7 @@ class MCPPrompt(Prompt):
description: str | None = None
prompt_arguments: list[PromptArgument] = Field(default_factory=list)
mcp_server: "MCPServer" = Field(default=None, exclude=True)
Review Comment:
Should we also remove the exclude here?
##########
python/flink_agents/integrations/mcp/mcp.py:
##########
@@ -256,6 +267,8 @@ def get_tool_metadata(self, name: str) -> ToolMetadata:
def list_prompts(self) -> List[MCPPrompt]:
"""List available prompts from the MCP server."""
+ if self.prompts is not None:
+ return self.prompts
return asyncio.run(self._list_prompts_async())
Review Comment:
If self.prompts is None, mcp will still list prompts from server. In this
case, if server doesn't support list prompt, it will cause the same issue this
pr want to resolve.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]