universal-mcp-applications 0.1.10__py3-none-any.whl → 0.1.11__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.

Potentially problematic release.


This version of universal-mcp-applications might be problematic. Click here for more details.

@@ -3,7 +3,7 @@ import io
3
3
  import os
4
4
  import uuid
5
5
  import wave
6
- from typing import Annotated # Added Literal for type hinting
6
+ from typing import Annotated
7
7
 
8
8
  from google import genai
9
9
  from google.genai import types
@@ -55,11 +55,13 @@ class GoogleGeminiApp(APIApplication):
55
55
 
56
56
  Example:
57
57
  response = app.generate_text("Tell me a joke.")
58
-
58
+
59
59
  Tags:
60
60
  important
61
61
  """
62
- response = self.genai_client.generate_content(prompt, model=model)
62
+ response = self.genai_client.models.generate_content(
63
+ contents=prompt, model=model
64
+ )
63
65
  return response.text
64
66
 
65
67
  async def generate_image(
@@ -80,15 +82,16 @@ class GoogleGeminiApp(APIApplication):
80
82
 
81
83
  Returns:
82
84
  list: A list of dicts, each containing either 'text' or 'image_bytes'.
83
-
85
+
84
86
  Tags:
85
87
  important
86
88
  """
87
89
  # The Gemini API is synchronous, so run in a thread
88
90
  contents = [prompt]
89
91
  if image:
90
- if image.startswith(('http://', 'https://')):
92
+ if image.startswith(("http://", "https://")):
91
93
  import requests
94
+
92
95
  response = requests.get(image)
93
96
  response.raise_for_status()
94
97
  image = Image.open(io.BytesIO(response.content))
@@ -108,12 +111,17 @@ class GoogleGeminiApp(APIApplication):
108
111
  # Return the raw image bytes
109
112
  image_bytes = part.inline_data.data
110
113
 
111
-
112
114
  img_base64 = base64.b64encode(image_bytes).decode("utf-8")
113
115
 
114
116
  file_name = f"{uuid.uuid4()}.png"
115
117
 
116
- return {"type": "image", "data": img_base64, "mime_type": "image/png", "file_name": file_name, "text": text}
118
+ return {
119
+ "type": "image",
120
+ "data": img_base64,
121
+ "mime_type": "image/png",
122
+ "file_name": file_name,
123
+ "text": text,
124
+ }
117
125
 
118
126
  async def generate_audio(
119
127
  self,
@@ -128,7 +136,7 @@ class GoogleGeminiApp(APIApplication):
128
136
 
129
137
  Returns:
130
138
  str: The URL of the uploaded audio file.
131
-
139
+
132
140
  Tags:
133
141
  important
134
142
  """
@@ -164,15 +172,21 @@ class GoogleGeminiApp(APIApplication):
164
172
  # read the file
165
173
  with open(file_name, "rb") as f:
166
174
  data = f.read()
167
-
175
+
168
176
  # delete the file
169
177
  os.remove(file_name)
170
178
 
171
179
  # Convert to base64
172
180
  import base64
173
- audio_base64 = base64.b64encode(data).decode('utf-8')
174
181
 
175
- return {"type": "audio", "data": audio_base64, "mime_type": "audio/wav", "file_name": file_name}
182
+ audio_base64 = base64.b64encode(data).decode("utf-8")
183
+
184
+ return {
185
+ "type": "audio",
186
+ "data": audio_base64,
187
+ "mime_type": "audio/wav",
188
+ "file_name": file_name,
189
+ }
176
190
 
177
191
  def list_tools(self):
178
192
  return [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp-applications
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: A Universal MCP Application: universal_mcp_applications
5
5
  Project-URL: Homepage, https://github.com/universal-mcp/applications
6
6
  Project-URL: Repository, https://github.com/universal-mcp/applications
@@ -106,7 +106,7 @@ universal_mcp/applications/google_drive/__init__.py,sha256=DTyed4ADcCmALSyPT8whj
106
106
  universal_mcp/applications/google_drive/app.py,sha256=IlYwUxGRo7ISKGeWzWpc_0r4ewDo-rXLPChyMOxAc_Q,248993
107
107
  universal_mcp/applications/google_gemini/README.md,sha256=o5cWenioUnNhn7L2fxwPLasBXzQ7mNmYp-aLLj9bHzY,2042
108
108
  universal_mcp/applications/google_gemini/__init__.py,sha256=KZWdPU74VKBBabLpAcPNEPRPLFk8v2i0ULnT4wVHM9U,33
109
- universal_mcp/applications/google_gemini/app.py,sha256=9wLuCvpdIwB5kHH2tLBgPiVkZcqgYK5mitVCPqAgWxA,6548
109
+ universal_mcp/applications/google_gemini/app.py,sha256=E8TLYAEUKfjQUmkeZ_bS9Jutj4mdVOJd-EepT1ndVFg,6687
110
110
  universal_mcp/applications/google_mail/README.md,sha256=TVLbil9-qjjp9kZziuWWhkiVNR1tf5XJ_q37xd6iUsg,2422
111
111
  universal_mcp/applications/google_mail/__init__.py,sha256=_VpJPPBAJvPX3urxUD2_kiQmld91tkVFSvAcdt5XbmI,31
112
112
  universal_mcp/applications/google_mail/app.py,sha256=vT3Lg2qZNX98PPjJ-nDkA4VtZvofu_nkXuqRo4w2Xpo,54892
@@ -267,7 +267,7 @@ universal_mcp/applications/youtube/app.py,sha256=hhKqnbXvMAyOW3LOqp-ODPdIuQorr1n
267
267
  universal_mcp/applications/zenquotes/README.md,sha256=x1mZHjNKD4WOgsIhedcbbaR1nvbt794GSrKud1tSLD0,296
268
268
  universal_mcp/applications/zenquotes/__init__.py,sha256=IkASLYaZiHJXlkGwEMk1HgIq5GwEZp5GhAIiJyjBd3g,30
269
269
  universal_mcp/applications/zenquotes/app.py,sha256=6v8trNWjxbixdlEyaM-gJbfY8z9ZAmkIzSUks_fbsT4,1076
270
- universal_mcp_applications-0.1.10.dist-info/METADATA,sha256=hzfvZju9HSY-HVpgXq5G8A5NRqVZBL5TKni4wcLZHAE,3919
271
- universal_mcp_applications-0.1.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
272
- universal_mcp_applications-0.1.10.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
273
- universal_mcp_applications-0.1.10.dist-info/RECORD,,
270
+ universal_mcp_applications-0.1.11.dist-info/METADATA,sha256=f3U8xhBwHvPOx5fOEZ3vz-6uwHyhxQGf5w_mdjRMpeI,3919
271
+ universal_mcp_applications-0.1.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
272
+ universal_mcp_applications-0.1.11.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
273
+ universal_mcp_applications-0.1.11.dist-info/RECORD,,