universal-mcp 0.1.24rc23__py3-none-any.whl → 0.1.24rc24__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.
@@ -161,8 +161,6 @@ class AgentrRegistry(ToolRegistry):
161
161
  from langchain_core.tools import StructuredTool
162
162
 
163
163
  try:
164
- # Clear tools from tool manager before loading new tools
165
- self.tool_manager.clear_tools()
166
164
  logger.info(f"Exporting tools to {format.value} format")
167
165
  if isinstance(tools, dict):
168
166
  self._load_tools_from_tool_config(tools)
@@ -237,3 +235,15 @@ class AgentrRegistry(ToolRegistry):
237
235
  async def list_connected_apps(self) -> list[dict[str, Any]]:
238
236
  """List all apps that the user has connected."""
239
237
  return self.client.list_my_connections()
238
+
239
+ async def authorise_app(self, app_id: str) -> str:
240
+ """Authorise an app to connect to the user's account.
241
+
242
+ Args:
243
+ app_id: The ID of the app to authorise
244
+
245
+ Returns:
246
+ String containing authorisation url
247
+ """
248
+ url = self.client.get_authorization_url(app_id=app_id)
249
+ return url
universal_mcp/cli.py CHANGED
@@ -3,8 +3,8 @@ from pathlib import Path
3
3
  import typer
4
4
  from rich.console import Console
5
5
  from rich.panel import Panel
6
-
7
6
  from universal_mcp.agents.cli import app as client_app
7
+
8
8
  from universal_mcp.utils.installation import (
9
9
  get_supported_apps,
10
10
  install_app,
@@ -1,3 +1,4 @@
1
+ import inspect
1
2
  from typing import Any
2
3
 
3
4
  from loguru import logger
@@ -90,6 +91,7 @@ def convert_tool_to_langchain_tool(
90
91
  """
91
92
 
92
93
  logger.debug(f"Converting tool '{tool.name}' to LangChain format")
94
+ full_docstring = inspect.getdoc(tool.fn)
93
95
 
94
96
  async def call_tool(
95
97
  **arguments: dict[str, Any],
@@ -101,7 +103,7 @@ def convert_tool_to_langchain_tool(
101
103
 
102
104
  langchain_tool = StructuredTool(
103
105
  name=tool.name,
104
- description=tool.description or "",
106
+ description=full_docstring or tool.description or "",
105
107
  coroutine=call_tool,
106
108
  response_format="content",
107
109
  args_schema=tool.parameters,
@@ -16,6 +16,7 @@ class ToolRegistry(ABC):
16
16
 
17
17
  def __init__(self):
18
18
  """Initializes the registry and its internal tool manager."""
19
+ self._app_instances = {}
19
20
  self.tool_manager = ToolManager()
20
21
  logger.debug(f"{self.__class__.__name__} initialized.")
21
22
 
@@ -75,7 +76,9 @@ class ToolRegistry(ABC):
75
76
  """Helper method to load and register tools for an app."""
76
77
  logger.info(f"Loading tools for app '{app_name}' (tools: {tool_names or 'default'})")
77
78
  try:
78
- app_instance = self._create_app_instance(app_name)
79
+ if app_name not in self._app_instances:
80
+ self._app_instances[app_name] = self._create_app_instance(app_name)
81
+ app_instance = self._app_instances[app_name]
79
82
  self.tool_manager.register_tools_from_app(app_instance, tool_names=tool_names)
80
83
  logger.info(f"Successfully registered tools for app: {app_name}")
81
84
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp
3
- Version: 0.1.24rc23
3
+ Version: 0.1.24rc24
4
4
  Summary: Universal MCP acts as a middle ware for your API applications. It can store your credentials, authorize, enable disable apps on the fly and much more.
5
5
  Author-email: Manoj Bajaj <manojbajaj95@gmail.com>
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- universal_mcp/cli.py,sha256=pPnIWLhSrLV9ukI8YAg2znehCR3VovhEkmh8XkRT3MU,2505
1
+ universal_mcp/cli.py,sha256=OOK4inp5SYqno-99m-GXofVOeux36mx9BueoMMOjEhA,2505
2
2
  universal_mcp/config.py,sha256=lOlDAgQMT7f6VymmsuCP9sYLlxGKj0hDF3hFcJ2nzS4,8135
3
3
  universal_mcp/exceptions.py,sha256=Uen8UFgLHGlSwXgRUyF-nhqTwdiBuL3okgBVRV2AgtA,2150
4
4
  universal_mcp/logger.py,sha256=VmH_83efpErLEDTJqz55Dp0dioTXfGvMBLZUx5smOLc,2116
@@ -8,7 +8,7 @@ universal_mcp/agentr/README.md,sha256=ypsA_jD4Fgdg0wQ8bLFIFPmpFwYCCCv-29pNizJDCk
8
8
  universal_mcp/agentr/__init__.py,sha256=fv1ZnOCduIUiJ9oN4e6Ya_hA2oWQvcEuDU3Ek1vEufI,180
9
9
  universal_mcp/agentr/client.py,sha256=og1kfnOxtSTVtgYXg4AMcitX0nSX0t_r5D7A_HrcAG8,8054
10
10
  universal_mcp/agentr/integration.py,sha256=V5GjqocqS02tRoI8MeV9PL6m-BzejwBzgJhOHo4MxAE,4212
11
- universal_mcp/agentr/registry.py,sha256=KBChYv7QkT9J7i-Xks9AN4vc_8NGQCI5hqMRRXdKYOc,8961
11
+ universal_mcp/agentr/registry.py,sha256=uXK-PnS4SfF_navJ3AcG0CxS9cgco2z2uJY6Xe-LPCQ,9192
12
12
  universal_mcp/agentr/server.py,sha256=d_UaxCGTOzdOsIMiHiILgAjeZLbUASCyQkUqhd1x9wA,1911
13
13
  universal_mcp/applications/application.py,sha256=Zxgrr0LVNUTnKxqnX11ScTd5IWEUPCsNYZO2URL6mbQ,23838
14
14
  universal_mcp/applications/utils.py,sha256=8Pp9lZU6IPt9z9BnuJ-vpv-NGuzryt1c4e4-ShDd2XI,1450
@@ -23,12 +23,12 @@ universal_mcp/servers/server.py,sha256=OUze-imwZxfQdqaRtsoT4DOAbjRK42qfO7k13TpiK
23
23
  universal_mcp/stores/__init__.py,sha256=quvuwhZnpiSLuojf0NfmBx2xpaCulv3fbKtKaSCEmuM,603
24
24
  universal_mcp/stores/store.py,sha256=yWbEGZb53z3fpVyqGWbes63z1CtIzC_IuM49OXy__UY,10137
25
25
  universal_mcp/tools/__init__.py,sha256=jC8hsqfTdtn32yU57AVFUXiU3ZmUOCfCERSCaNEIH7E,395
26
- universal_mcp/tools/adapters.py,sha256=LmI5J6e-3TPVuyeDki7uHeZVeCES52y7TRcLpUurzNQ,4591
26
+ universal_mcp/tools/adapters.py,sha256=lea_qVULaUlzBtTo2hxn45BaD8hliIntGmKkt-tTg6c,4669
27
27
  universal_mcp/tools/docstring_parser.py,sha256=efEOE-ME7G5Jbbzpn7pN2xNuyu2M5zfZ1Tqu1lRB0Gk,8392
28
28
  universal_mcp/tools/func_metadata.py,sha256=F4jd--hoZWKPBbZihVtluYKUsIdXdq4a0VWRgMl5k-Q,10838
29
29
  universal_mcp/tools/local_registry.py,sha256=Gp3bXwLwJ1SBzS1ZSDXa5pHU6kapwAYx5lU41NfRKx4,4247
30
30
  universal_mcp/tools/manager.py,sha256=73x5RB5Sgew1hNqCOMmoxHZN2DYjiE7pjsytfi0Gj0g,8213
31
- universal_mcp/tools/registry.py,sha256=5gXIcLy_ggCMF8RZ3gRyvqS6S9ERS6Vytp_iXdyUcr8,3959
31
+ universal_mcp/tools/registry.py,sha256=XDdkuYAE5LnUQvPVNOhFvWo_hsgyONjJNK9ldnQvev4,4122
32
32
  universal_mcp/tools/tools.py,sha256=Lk-wUO3rfhwdxaRANtC7lQr5fXi7nclf0oHzxNAb79Q,4927
33
33
  universal_mcp/utils/__init__.py,sha256=8wi4PGWu-SrFjNJ8U7fr2iFJ1ktqlDmSKj1xYd7KSDc,41
34
34
  universal_mcp/utils/installation.py,sha256=PU_GfHPqzkumKk-xG4L9CkBzSmABxmchwblZkx-zY-I,7204
@@ -48,8 +48,8 @@ universal_mcp/utils/openapi/readme.py,sha256=R2Jp7DUXYNsXPDV6eFTkLiy7MXbSULUj1vH
48
48
  universal_mcp/utils/openapi/test_generator.py,sha256=vucBh9klWmQOUA740TFwfM9ry2nkwKWQiNRcsiZ9HbY,12229
49
49
  universal_mcp/utils/templates/README.md.j2,sha256=Mrm181YX-o_-WEfKs01Bi2RJy43rBiq2j6fTtbWgbTA,401
50
50
  universal_mcp/utils/templates/api_client.py.j2,sha256=DS1nczOOD8YkMexVSGpUGeyc0nYGKKTPadL_x1_if7k,900
51
- universal_mcp-0.1.24rc23.dist-info/METADATA,sha256=qZ4Rn4X_q_pg17d70czju8sIFdwho5diOPgC6XmhVeg,3255
52
- universal_mcp-0.1.24rc23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
- universal_mcp-0.1.24rc23.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
54
- universal_mcp-0.1.24rc23.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
55
- universal_mcp-0.1.24rc23.dist-info/RECORD,,
51
+ universal_mcp-0.1.24rc24.dist-info/METADATA,sha256=9hBB17p9MIhsK_N7MGGBhGtmhtvlHmh5Zoya0Lgjz3A,3255
52
+ universal_mcp-0.1.24rc24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
+ universal_mcp-0.1.24rc24.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
54
+ universal_mcp-0.1.24rc24.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
55
+ universal_mcp-0.1.24rc24.dist-info/RECORD,,