Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

use mcp.ClientSession (#8826)

TomuHirata9cb44dc8e099
diff --git a/dspy/utils/mcp.py b/dspy/utils/mcp.py
index 7eda5877d..288c056ab 100644
--- a/dspy/utils/mcp.py
+++ b/dspy/utils/mcp.py
@@ -27,7 +27,7 @@ def _convert_mcp_tool_result(call_tool_result: "mcp.types.CallToolResult") -> st
return tool_content or non_text_contents
-def convert_mcp_tool(session: "mcp.client.session.ClientSession", tool: "mcp.types.Tool") -> Tool:
+def convert_mcp_tool(session: "mcp.ClientSession", tool: "mcp.types.Tool") -> Tool:
"""Build a DSPy tool from an MCP tool.
Args: