alita-sdk 0.3.203__py3-none-any.whl → 0.3.203b1__py3-none-any.whl

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.
@@ -22,7 +22,13 @@ class McpServerTool(BaseTool):
22
22
  def create_pydantic_model_from_schema(schema: dict):
23
23
  fields = {}
24
24
  for field_name, field_info in schema['properties'].items():
25
- field_type = field_info['type']
25
+ field_type = None
26
+
27
+ if 'type' in field_info:
28
+ field_type = field_info['type']
29
+ elif 'allOf' in field_info or 'anyOf' in field_info: # ADO-MCP wit_update_work_item, testplan_add_test_cases_to_suite
30
+ field_type = 'array'
31
+
26
32
  field_description = field_info.get('description', '')
27
33
  if field_type == 'string':
28
34
  if 'enum' in field_info:
@@ -35,16 +41,22 @@ class McpServerTool(BaseTool):
35
41
  field_type = float
36
42
  elif field_type == 'boolean':
37
43
  field_type = bool
38
- elif field_type == 'object':#Dict[str, Any]
39
- nested_model = McpServerTool.create_pydantic_model_from_schema(field_info)
44
+ elif field_type == 'object': # Dict[str, Any] - for tool start_browser in selenium mcp
45
+ nested_model = McpServerTool.create_pydantic_model_from_schema(
46
+ field_info) if 'properties' in field_info else dict # for tool build_run_build in ADO-MCP
40
47
  field_type = nested_model
41
48
  elif field_type == 'array':
42
- item_schema = field_info['items']
43
- item_type = McpServerTool.create_pydantic_model_from_schema(item_schema) if item_schema['type'] == 'object' else (
44
- str if item_schema['type'] == 'string' else
49
+ item_schema = field_info['items'] if 'items' in field_info else (
50
+ field_info.get('allOf', field_info.get('anyOf', [{'type': None}]))[
51
+ -1]) # ADO-MCP wit_update_work_item, testplan_add_test_cases_to_suite
52
+ item_type = McpServerTool.create_pydantic_model_from_schema(item_schema) if item_schema[
53
+ 'type'] == 'object' else (
54
+ str if item_schema['type'] == 'string' else # support enum
45
55
  int if item_schema['type'] == 'integer' else
46
56
  float if item_schema['type'] == 'number' else
47
57
  bool if item_schema['type'] == 'boolean' else
58
+ list if item_schema['type'] == 'array' else # ADO-MCP testplan_add_test_cases_to_suite
59
+ str if item_schema['type'] == 'null' else # for mcp-atlassian
48
60
  None
49
61
  )
50
62
  if item_type is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.203
3
+ Version: 0.3.203b1
4
4
  Summary: SDK for building langchain agents using resources from Alita
5
5
  Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedjik@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -84,7 +84,7 @@ alita_sdk/runtime/tools/indexer_tool.py,sha256=whSLPevB4WD6dhh2JDXEivDmTvbjiMV1M
84
84
  alita_sdk/runtime/tools/llm.py,sha256=NsrsP-SblyxDdzgMCn9_OBUL0sUGDVS5yqer49V7ciE,15069
85
85
  alita_sdk/runtime/tools/loop.py,sha256=uds0WhZvwMxDVFI6MZHrcmMle637cQfBNg682iLxoJA,8335
86
86
  alita_sdk/runtime/tools/loop_output.py,sha256=U4hO9PCQgWlXwOq6jdmCGbegtAxGAPXObSxZQ3z38uk,8069
87
- alita_sdk/runtime/tools/mcp_server_tool.py,sha256=eI8QUt497xblwF4Zhbvi8wCg17yh2yoWjcw_AIzHwGE,2819
87
+ alita_sdk/runtime/tools/mcp_server_tool.py,sha256=yFboYcLIORMbSrSi8QkrHHUNZT5FwwBN-gmBYcym3bM,3715
88
88
  alita_sdk/runtime/tools/pgvector_search.py,sha256=NN2BGAnq4SsDHIhUcFZ8d_dbEOM8QwB0UwpsWCYruXU,11692
89
89
  alita_sdk/runtime/tools/prompt.py,sha256=nJafb_e5aOM1Rr3qGFCR-SKziU9uCsiP2okIMs9PppM,741
90
90
  alita_sdk/runtime/tools/router.py,sha256=wCvZjVkdXK9dMMeEerrgKf5M790RudH68pDortnHSz0,1517
@@ -297,8 +297,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=UHVQUVqcBc3SZvDfO78HSuBzwAsRw
297
297
  alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
298
298
  alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
299
299
  alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
300
- alita_sdk-0.3.203.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
301
- alita_sdk-0.3.203.dist-info/METADATA,sha256=5jKh4tiVrW5xNeR51J5Zsci1z6L2v0VtbBkhnfEPGYs,18804
302
- alita_sdk-0.3.203.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
303
- alita_sdk-0.3.203.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
304
- alita_sdk-0.3.203.dist-info/RECORD,,
300
+ alita_sdk-0.3.203b1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
301
+ alita_sdk-0.3.203b1.dist-info/METADATA,sha256=C8GQAab09i5o3skdjcxruSWPuxOl2qCg7ui1RvIZsjQ,18806
302
+ alita_sdk-0.3.203b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
303
+ alita_sdk-0.3.203b1.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
304
+ alita_sdk-0.3.203b1.dist-info/RECORD,,