langchain-mcp-tools 0.1.7__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langchain_mcp_tools-0.1.7/src/langchain_mcp_tools.egg-info → langchain_mcp_tools-0.1.8}/PKG-INFO +1 -1
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/pyproject.toml +1 -1
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools/langchain_mcp_tools.py +12 -1
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8/src/langchain_mcp_tools.egg-info}/PKG-INFO +1 -1
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/LICENSE +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/README.md +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/setup.cfg +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools/__init__.py +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools/py.typed +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools.egg-info/SOURCES.txt +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools.egg-info/dependency_links.txt +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools.egg-info/requires.txt +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools.egg-info/top_level.txt +0 -0
- {langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/tests/test_langchain_mcp_tools.py +0 -0
{langchain_mcp_tools-0.1.7/src/langchain_mcp_tools.egg-info → langchain_mcp_tools-0.1.8}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: langchain-mcp-tools
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
4
4
|
Summary: Model Context Protocol (MCP) To LangChain Tools Conversion Utility
|
5
5
|
Project-URL: Bug Tracker, https://github.com/hideya/langchain-mcp-tools-py/issues
|
6
6
|
Project-URL: Source Code, https://github.com/hideya/langchain-mcp-tools-py
|
@@ -35,6 +35,17 @@ except ImportError as e:
|
|
35
35
|
sys.exit(1)
|
36
36
|
|
37
37
|
|
38
|
+
def fix_schema(schema: dict) -> dict:
|
39
|
+
"""Converts JSON Schema 'type': ['string', 'null'] to 'anyOf' format"""
|
40
|
+
if isinstance(schema, dict):
|
41
|
+
if 'type' in schema and isinstance(schema['type'], list):
|
42
|
+
schema['anyOf'] = [{'type': t} for t in schema['type']]
|
43
|
+
del schema['type'] # Remove 'type' and standardize to 'anyOf'
|
44
|
+
for key, value in schema.items():
|
45
|
+
schema[key] = fix_schema(value) # Apply recursively
|
46
|
+
return schema
|
47
|
+
|
48
|
+
|
38
49
|
# Type alias for the bidirectional communication channels with the MCP server
|
39
50
|
# FIXME: not defined in mcp.types, really?
|
40
51
|
StdioTransport: TypeAlias = tuple[
|
@@ -151,7 +162,7 @@ async def get_mcp_server_tools(
|
|
151
162
|
description: str = tool.description or ''
|
152
163
|
# Convert JSON schema to Pydantic model for argument validation
|
153
164
|
args_schema: Type[BaseModel] = jsonschema_to_pydantic(
|
154
|
-
tool.inputSchema
|
165
|
+
fix_schema(tool.inputSchema) # Apply schema conversion
|
155
166
|
)
|
156
167
|
session: Optional[ClientSession] = None
|
157
168
|
|
{langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8/src/langchain_mcp_tools.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: langchain-mcp-tools
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
4
4
|
Summary: Model Context Protocol (MCP) To LangChain Tools Conversion Utility
|
5
5
|
Project-URL: Bug Tracker, https://github.com/hideya/langchain-mcp-tools-py/issues
|
6
6
|
Project-URL: Source Code, https://github.com/hideya/langchain-mcp-tools-py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langchain_mcp_tools-0.1.7 → langchain_mcp_tools-0.1.8}/src/langchain_mcp_tools.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|