universal-mcp-applications 0.1.12__py3-none-any.whl → 0.1.13__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.
- universal_mcp/applications/google_mail/app.py +47 -1
- {universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/RECORD +5 -5
- {universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -230,7 +230,7 @@ class GoogleMailApp(APIApplication):
|
|
|
230
230
|
A dictionary containing the cleaned message details (serializable as JSON)
|
|
231
231
|
|
|
232
232
|
Tags:
|
|
233
|
-
retrieve, email, format, api, gmail, message, important, body, content
|
|
233
|
+
retrieve, email, format, api, gmail, message, important, body, content, attachments
|
|
234
234
|
"""
|
|
235
235
|
url = f"{self.base_api_url}/messages/{message_id}"
|
|
236
236
|
response = self._get(url)
|
|
@@ -251,6 +251,9 @@ class GoogleMailApp(APIApplication):
|
|
|
251
251
|
else:
|
|
252
252
|
body_content = "No content available"
|
|
253
253
|
|
|
254
|
+
# Extract attachments
|
|
255
|
+
attachments = self._extract_attachments(raw_data.get("payload", {}))
|
|
256
|
+
|
|
254
257
|
return {
|
|
255
258
|
"message_id": message_id,
|
|
256
259
|
"from_addr": headers.get("From", "Unknown sender"),
|
|
@@ -259,8 +262,11 @@ class GoogleMailApp(APIApplication):
|
|
|
259
262
|
"subject": headers.get("Subject", "No subject"),
|
|
260
263
|
"body_content": body_content,
|
|
261
264
|
"thread_id": raw_data.get("threadId"),
|
|
265
|
+
"attachments": attachments,
|
|
262
266
|
}
|
|
263
267
|
|
|
268
|
+
|
|
269
|
+
|
|
264
270
|
def _extract_email_body(self, payload):
|
|
265
271
|
"""
|
|
266
272
|
Extracts the email body content from the Gmail API payload.
|
|
@@ -315,6 +321,46 @@ class GoogleMailApp(APIApplication):
|
|
|
315
321
|
logger.error(f"Error extracting email body: {str(e)}")
|
|
316
322
|
return ""
|
|
317
323
|
|
|
324
|
+
def _extract_attachments(self, payload):
|
|
325
|
+
"""
|
|
326
|
+
Extracts attachment information from the Gmail API payload.
|
|
327
|
+
|
|
328
|
+
Args:
|
|
329
|
+
payload: The payload section from Gmail API response
|
|
330
|
+
|
|
331
|
+
Returns:
|
|
332
|
+
list: List of attachment dictionaries with attachment_id, filename, mime_type, and size
|
|
333
|
+
"""
|
|
334
|
+
attachments = []
|
|
335
|
+
|
|
336
|
+
try:
|
|
337
|
+
if payload.get("filename") and payload.get("body", {}).get("attachmentId"):
|
|
338
|
+
attachments.append({
|
|
339
|
+
"attachment_id": payload["body"]["attachmentId"],
|
|
340
|
+
"filename": payload["filename"],
|
|
341
|
+
"mime_type": payload.get("mimeType", ""),
|
|
342
|
+
"size": payload.get("body", {}).get("size", 0)
|
|
343
|
+
})
|
|
344
|
+
|
|
345
|
+
parts = payload.get("parts", [])
|
|
346
|
+
for part in parts:
|
|
347
|
+
if part.get("filename") and part.get("body", {}).get("attachmentId"):
|
|
348
|
+
attachments.append({
|
|
349
|
+
"attachment_id": part["body"]["attachmentId"],
|
|
350
|
+
"filename": part["filename"],
|
|
351
|
+
"mime_type": part.get("mimeType", ""),
|
|
352
|
+
"size": part.get("body", {}).get("size", 0)
|
|
353
|
+
})
|
|
354
|
+
|
|
355
|
+
elif part.get("parts"):
|
|
356
|
+
nested_attachments = self._extract_attachments(part)
|
|
357
|
+
attachments.extend(nested_attachments)
|
|
358
|
+
|
|
359
|
+
except Exception as e:
|
|
360
|
+
logger.error(f"Error extracting attachments: {str(e)}")
|
|
361
|
+
|
|
362
|
+
return attachments
|
|
363
|
+
|
|
318
364
|
def _decode_base64(self, data):
|
|
319
365
|
"""
|
|
320
366
|
Decodes base64 URL-safe encoded data from Gmail API.
|
{universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: universal-mcp-applications
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
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
|
|
@@ -22,7 +22,7 @@ Requires-Dist: google-genai>=1.33.0
|
|
|
22
22
|
Requires-Dist: google-search-results>=2.4.2
|
|
23
23
|
Requires-Dist: gql[all]>=3.5.2
|
|
24
24
|
Requires-Dist: httpx-aiohttp>=0.1.8
|
|
25
|
-
Requires-Dist: markitdown[audio-transcription,az-doc-intel,docx,outlook,pdf,pptx,xls,xlsx]
|
|
25
|
+
Requires-Dist: markitdown[audio-transcription,az-doc-intel,docx,outlook,pdf,pptx,xls,xlsx]>=0.1.3
|
|
26
26
|
Requires-Dist: office365-rest-python-client>=2.6.2
|
|
27
27
|
Requires-Dist: openai>=1.75.0
|
|
28
28
|
Requires-Dist: pyairtable>=3.1.1
|
{universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/RECORD
RENAMED
|
@@ -109,7 +109,7 @@ universal_mcp/applications/google_gemini/__init__.py,sha256=KZWdPU74VKBBabLpAcPN
|
|
|
109
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
|
-
universal_mcp/applications/google_mail/app.py,sha256=
|
|
112
|
+
universal_mcp/applications/google_mail/app.py,sha256=tajmcyU2d3lSwsb49Tf7WoTsReWGTM6qnW4a2vGeHCk,56634
|
|
113
113
|
universal_mcp/applications/google_searchconsole/README.md,sha256=LIrDGFYmTHwRso014DNMyhOSgCOVybeTBejQpxeQIQ0,1129
|
|
114
114
|
universal_mcp/applications/google_searchconsole/__init__.py,sha256=PHuwQFk0_a-jbnAUNkAq3ODarxHIcu3z3AZXfwPhdbQ,40
|
|
115
115
|
universal_mcp/applications/google_searchconsole/app.py,sha256=BkNirgmEFlyhs_-G0XUI0jONsX4oVjwFzzhN7XYKDPk,12327
|
|
@@ -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.
|
|
271
|
-
universal_mcp_applications-0.1.
|
|
272
|
-
universal_mcp_applications-0.1.
|
|
273
|
-
universal_mcp_applications-0.1.
|
|
270
|
+
universal_mcp_applications-0.1.13.dist-info/METADATA,sha256=Y1amodE6qFF9uVxT4HaJ3GeAUCyAQWUCTHW1lrkBlqw,4024
|
|
271
|
+
universal_mcp_applications-0.1.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
272
|
+
universal_mcp_applications-0.1.13.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
|
|
273
|
+
universal_mcp_applications-0.1.13.dist-info/RECORD,,
|
{universal_mcp_applications-0.1.12.dist-info → universal_mcp_applications-0.1.13.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|