universal-mcp-applications 0.1.11__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.

@@ -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.
@@ -60,3 +60,12 @@ class MarkitdownApp(BaseApplication):
60
60
  return [
61
61
  self.convert_to_markdown,
62
62
  ]
63
+
64
+ async def main():
65
+ app = MarkitdownApp()
66
+ result = await app.convert_to_markdown("https://www.youtube.com/watch?v=Cr9B6yyLZSk")
67
+ print(result)
68
+
69
+ if __name__ == "__main__":
70
+ import asyncio
71
+ asyncio.run(main())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp-applications
3
- Version: 0.1.11
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[all]>=0.1.1
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
@@ -35,6 +35,7 @@ Requires-Dist: requests>=2.31.0
35
35
  Requires-Dist: resend>=2.10.0
36
36
  Requires-Dist: twilio>=9.8.0
37
37
  Requires-Dist: universal-mcp>=0.1.24rc19
38
+ Requires-Dist: youtube-transcript-api==1.2.2
38
39
  Provides-Extra: dev
39
40
  Requires-Dist: pre-commit; extra == 'dev'
40
41
  Requires-Dist: ruff; extra == 'dev'
@@ -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=vT3Lg2qZNX98PPjJ-nDkA4VtZvofu_nkXuqRo4w2Xpo,54892
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
@@ -143,7 +143,7 @@ universal_mcp/applications/mailchimp/__init__.py,sha256=wmXVl-NJyTNkFT5db29OZmei
143
143
  universal_mcp/applications/mailchimp/app.py,sha256=_a6iByjDK1SuM3UoT5lTokptdEryUzrS8JsYNLCTwi4,466723
144
144
  universal_mcp/applications/markitdown/README.md,sha256=rikIKv97pE_gKw3-xs5B-UmDTHCFHyUV3MX0ugAmyxI,315
145
145
  universal_mcp/applications/markitdown/__init__.py,sha256=hWz8PzvmnG9ZtNUbWlkZaOZeNdi_ewlpcXtEW2P5pf0,31
146
- universal_mcp/applications/markitdown/app.py,sha256=V4bMkS2odKTaf8mG7Q1WXNW9n6AnlNsl1N1S_QDYxsI,2470
146
+ universal_mcp/applications/markitdown/app.py,sha256=IPjSTxULuDaVLx0QN3BWlYXjhj7yOmPcMbZDo2Fl2OA,2697
147
147
  universal_mcp/applications/miro/README.md,sha256=FM-K7FcSAe-6niWaYge4Vdi91EaE2Qz3KdRvH0ngdLQ,18707
148
148
  universal_mcp/applications/miro/__init__.py,sha256=60-PalZbgF6QF506qaaGRkMNNzkiyyFc7Ez37fqS-qM,25
149
149
  universal_mcp/applications/miro/app.py,sha256=Jvghd4TRBUubHaG-IEniSVdd7LwlrULpUEepjWzHC7I,198132
@@ -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.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,,
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,,