universal-mcp 0.1.24rc27__py3-none-any.whl → 0.1.24rc29__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.
@@ -39,6 +39,24 @@ class BaseApplication(ABC):
39
39
  self.name = name
40
40
  logger.debug(f"Initializing Application '{name}' with kwargs: {kwargs}")
41
41
 
42
+ def __getstate__(self) -> dict[str, Any]:
43
+ """Returns the state of the application for pickling.
44
+
45
+ Returns:
46
+ dict[str, Any]: An empty dictionary because the application cannot be pickled.
47
+ """
48
+ logger.debug("Application cannot be pickled because it contains a httpx.Client instance")
49
+ return {}
50
+
51
+ def __setstate__(self, state: dict[str, Any]) -> None:
52
+ """Sets the state of the application for unpickling.
53
+
54
+ Args:
55
+ state (dict[str, Any]): The state of the application.
56
+ """
57
+ logger.debug("Application cannot be unpickled because it contains a httpx.Client instance")
58
+ pass
59
+
42
60
  @abstractmethod
43
61
  def list_tools(self) -> list[Callable]:
44
62
  """Lists all tools provided by this application.
@@ -28,9 +28,14 @@ def convert_to_native_tool(tool: Tool) -> Callable[..., Any]:
28
28
  """Decorator to convert a Tool object to a native tool."""
29
29
 
30
30
  def decorator(func):
31
- @wraps(func)
32
- def wrapper(*args, **kwargs):
33
- return func(*args, **kwargs)
31
+ if inspect.iscoroutinefunction(func):
32
+ @wraps(func)
33
+ async def wrapper(*args, **kwargs):
34
+ return await func(*args, **kwargs)
35
+ else:
36
+ @wraps(func)
37
+ def wrapper(*args, **kwargs):
38
+ return func(*args, **kwargs)
34
39
 
35
40
  wrapper.__name__ = tool.name
36
41
  wrapper.__doc__ = tool.fn.__doc__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp
3
- Version: 0.1.24rc27
3
+ Version: 0.1.24rc29
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
@@ -10,7 +10,7 @@ universal_mcp/agentr/client.py,sha256=MnHYwD5V9UgmqcmTcOcOIZoYZ289cPkWBGRBAB4GJC
10
10
  universal_mcp/agentr/integration.py,sha256=V5GjqocqS02tRoI8MeV9PL6m-BzejwBzgJhOHo4MxAE,4212
11
11
  universal_mcp/agentr/registry.py,sha256=Oz35KNeaUWuWxGCkpEU_1Zyg0q-1Qh66rUorZP_GySM,7098
12
12
  universal_mcp/agentr/server.py,sha256=d_UaxCGTOzdOsIMiHiILgAjeZLbUASCyQkUqhd1x9wA,1911
13
- universal_mcp/applications/application.py,sha256=Zxgrr0LVNUTnKxqnX11ScTd5IWEUPCsNYZO2URL6mbQ,23838
13
+ universal_mcp/applications/application.py,sha256=NYTkQZPi0PsINs-z8lGtwRo2Kp5MT9gVzfjEKbhvpBI,24511
14
14
  universal_mcp/applications/utils.py,sha256=8Pp9lZU6IPt9z9BnuJ-vpv-NGuzryt1c4e4-ShDd2XI,1450
15
15
  universal_mcp/applications/sample/app.py,sha256=D9zPezC13xXVMlfO2A0fHgJQD_I-bnpf9UOOHveHMek,10537
16
16
  universal_mcp/client/oauth.py,sha256=O00zOUfQxINaruFU2zt-64DIR1_mAqrY8ykLQo-teJU,8679
@@ -23,7 +23,7 @@ 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=JffIZlIQijeU1dZb2VH0Aov4i0OSHMl706HK5JBKPLg,5054
26
+ universal_mcp/tools/adapters.py,sha256=Qxi6WdSSMlvp1mKOukUOlpBdqCUPqmdm897Rqypm7Rk,5250
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
@@ -49,8 +49,8 @@ universal_mcp/utils/openapi/readme.py,sha256=R2Jp7DUXYNsXPDV6eFTkLiy7MXbSULUj1vH
49
49
  universal_mcp/utils/openapi/test_generator.py,sha256=vucBh9klWmQOUA740TFwfM9ry2nkwKWQiNRcsiZ9HbY,12229
50
50
  universal_mcp/utils/templates/README.md.j2,sha256=Mrm181YX-o_-WEfKs01Bi2RJy43rBiq2j6fTtbWgbTA,401
51
51
  universal_mcp/utils/templates/api_client.py.j2,sha256=DS1nczOOD8YkMexVSGpUGeyc0nYGKKTPadL_x1_if7k,900
52
- universal_mcp-0.1.24rc27.dist-info/METADATA,sha256=vtEpLsfmhnWdbwr35e1cJ0Gw1XgIavr-a3CUdcdw1dE,3255
53
- universal_mcp-0.1.24rc27.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
54
- universal_mcp-0.1.24rc27.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
55
- universal_mcp-0.1.24rc27.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
56
- universal_mcp-0.1.24rc27.dist-info/RECORD,,
52
+ universal_mcp-0.1.24rc29.dist-info/METADATA,sha256=YjBcLOm551WHlr6MZgW7spc0ouVawMZqZsTmsvhjA44,3255
53
+ universal_mcp-0.1.24rc29.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
54
+ universal_mcp-0.1.24rc29.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
55
+ universal_mcp-0.1.24rc29.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
56
+ universal_mcp-0.1.24rc29.dist-info/RECORD,,