fyodorov-llm-agents 0.4.9__py3-none-any.whl → 0.4.10__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.
@@ -70,7 +70,9 @@ class MCPTool(BaseModel):
70
70
  if not isinstance(tool_dict, dict):
71
71
  raise ValueError('YAML string must represent a dictionary')
72
72
  tool = MCPTool(**tool_dict)
73
- tool.validate()
73
+ if not tool.validate():
74
+ print(f"Invalid tool data: {tool_dict}")
75
+ return None
74
76
  return tool
75
77
 
76
78
  def get_function(self) -> dict:
@@ -3,6 +3,15 @@ from fyodorov_utils.config.supabase import get_supabase
3
3
  from .mcp_tool_model import MCPTool as ToolModel
4
4
 
5
5
  class MCPTool():
6
+
7
+ @staticmethod
8
+ def create_or_update_in_db(access_token: str, tool: ToolModel, user_id: str) -> str:
9
+ tool_w_id = MCPTool.get_by_name_and_user_id(access_token, tool.handle, user_id)
10
+ if tool_w_id:
11
+ return MCPTool.update_in_db(access_token, tool_w_id.id, tool)
12
+ else:
13
+ return MCPTool.create_in_db(access_token, tool, user_id)
14
+
6
15
  @staticmethod
7
16
  def create_in_db(access_token: str, tool: ToolModel, user_id: str) -> str:
8
17
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fyodorov_llm_agents
3
- Version: 0.4.9
3
+ Version: 0.4.10
4
4
  Summary: LLM agents for the Fyodorov AI suite
5
5
  Author-email: Daniel Ransom <02masseur.alibis@icloud.com>
6
6
  Project-URL: Homepage, https://github.com/FyodorovAI/fyodorov-llm-agents
@@ -7,10 +7,10 @@ fyodorov_llm_agents/models/llm_model.py,sha256=aQtXtB7kRpnVdbPu-nmTGAaflbtKz3DPk
7
7
  fyodorov_llm_agents/models/llm_service.py,sha256=35bS0RFXJhJUSjge-v4u5cftn_MT-CmcDuWnC2kCnJo,4008
8
8
  fyodorov_llm_agents/providers/provider_model.py,sha256=OyCK6WMRhyElsp88gILg0wso-OPHI7f55gEeypsJ7O0,957
9
9
  fyodorov_llm_agents/providers/provider_service.py,sha256=GST-NLV8aLPsvapQEvgT_qHGYu7IpS5Xsut60XFmD-g,5865
10
- fyodorov_llm_agents/tools/mcp_tool_model.py,sha256=LuQE-mu5zKmiMmWOOKETAVkjwGsHSbcDbB57piEAACU,5025
11
- fyodorov_llm_agents/tools/mcp_tool_service.py,sha256=uA2xskCqNlibcaG0xLzSP4LuH6OMvgEo3VTSoCV98Po,5744
10
+ fyodorov_llm_agents/tools/mcp_tool_model.py,sha256=nGdPmqSkA7hqDUTPbNCZAHNSVJCgVOs5dzJfPntLidI,5110
11
+ fyodorov_llm_agents/tools/mcp_tool_service.py,sha256=9WG1gZB0mVYnwXwDSLPLyLbKkScMNJ9x36MP8dqyd18,6120
12
12
  fyodorov_llm_agents/tools/tool.py,sha256=HyOk0X_3XE23sa8J-8UZx657tJ0sxwZWMbA4OPxXU6E,7940
13
- fyodorov_llm_agents-0.4.9.dist-info/METADATA,sha256=4jmrBJLO6ec_v7sp8inq5ZozkUY17xUyF9oeh_pDQNM,550
14
- fyodorov_llm_agents-0.4.9.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
15
- fyodorov_llm_agents-0.4.9.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
16
- fyodorov_llm_agents-0.4.9.dist-info/RECORD,,
13
+ fyodorov_llm_agents-0.4.10.dist-info/METADATA,sha256=lC9bHRaqAOldZSgn-Ee-CyRA0tHzxHkKPDA1oYZ5TFQ,551
14
+ fyodorov_llm_agents-0.4.10.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
15
+ fyodorov_llm_agents-0.4.10.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
16
+ fyodorov_llm_agents-0.4.10.dist-info/RECORD,,