universal-mcp 0.1.8rc2__py3-none-any.whl → 0.1.8rc4__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.
Files changed (53) hide show
  1. universal_mcp/__init__.py +0 -2
  2. universal_mcp/analytics.py +75 -0
  3. universal_mcp/applications/ahrefs/README.md +76 -0
  4. universal_mcp/applications/ahrefs/__init__.py +0 -0
  5. universal_mcp/applications/ahrefs/app.py +2291 -0
  6. universal_mcp/applications/application.py +94 -5
  7. universal_mcp/applications/calendly/app.py +412 -171
  8. universal_mcp/applications/coda/README.md +133 -0
  9. universal_mcp/applications/coda/__init__.py +0 -0
  10. universal_mcp/applications/coda/app.py +3671 -0
  11. universal_mcp/applications/e2b/app.py +8 -35
  12. universal_mcp/applications/figma/README.md +74 -0
  13. universal_mcp/applications/figma/__init__.py +0 -0
  14. universal_mcp/applications/figma/app.py +1261 -0
  15. universal_mcp/applications/firecrawl/app.py +3 -33
  16. universal_mcp/applications/github/app.py +41 -42
  17. universal_mcp/applications/google_calendar/app.py +20 -31
  18. universal_mcp/applications/google_docs/app.py +21 -46
  19. universal_mcp/applications/google_drive/app.py +53 -76
  20. universal_mcp/applications/google_mail/app.py +40 -56
  21. universal_mcp/applications/google_sheet/app.py +43 -68
  22. universal_mcp/applications/markitdown/app.py +4 -4
  23. universal_mcp/applications/notion/app.py +93 -83
  24. universal_mcp/applications/perplexity/app.py +4 -38
  25. universal_mcp/applications/reddit/app.py +32 -32
  26. universal_mcp/applications/resend/app.py +4 -22
  27. universal_mcp/applications/serpapi/app.py +6 -32
  28. universal_mcp/applications/tavily/app.py +4 -24
  29. universal_mcp/applications/wrike/app.py +565 -237
  30. universal_mcp/applications/youtube/app.py +625 -183
  31. universal_mcp/applications/zenquotes/app.py +3 -3
  32. universal_mcp/exceptions.py +1 -0
  33. universal_mcp/integrations/__init__.py +11 -2
  34. universal_mcp/integrations/agentr.py +27 -4
  35. universal_mcp/integrations/integration.py +14 -6
  36. universal_mcp/logger.py +3 -56
  37. universal_mcp/servers/__init__.py +2 -1
  38. universal_mcp/servers/server.py +73 -77
  39. universal_mcp/stores/store.py +5 -3
  40. universal_mcp/tools/__init__.py +1 -1
  41. universal_mcp/tools/adapters.py +4 -1
  42. universal_mcp/tools/func_metadata.py +5 -6
  43. universal_mcp/tools/tools.py +108 -51
  44. universal_mcp/utils/docgen.py +121 -69
  45. universal_mcp/utils/docstring_parser.py +44 -21
  46. universal_mcp/utils/dump_app_tools.py +33 -23
  47. universal_mcp/utils/installation.py +199 -8
  48. universal_mcp/utils/openapi.py +121 -47
  49. {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/METADATA +2 -2
  50. universal_mcp-0.1.8rc4.dist-info/RECORD +81 -0
  51. universal_mcp-0.1.8rc2.dist-info/RECORD +0 -71
  52. {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/WHEEL +0 -0
  53. {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/entry_points.txt +0 -0
@@ -1,9 +1,6 @@
1
1
  from typing import Any
2
2
 
3
- from loguru import logger
4
-
5
3
  from universal_mcp.applications.application import APIApplication
6
- from universal_mcp.exceptions import NotAuthorizedError
7
4
  from universal_mcp.integrations import Integration
8
5
 
9
6
 
@@ -12,89 +9,72 @@ class GoogleSheetApp(APIApplication):
12
9
  Application for interacting with Google Sheets API.
13
10
  Provides tools to create and manage Google Spreadsheets.
14
11
  """
15
-
12
+
16
13
  def __init__(self, integration: Integration | None = None) -> None:
17
14
  super().__init__(name="google-sheet", integration=integration)
18
15
  self.base_api_url = "https://sheets.googleapis.com/v4/spreadsheets"
19
-
20
- def _get_headers(self):
21
- if not self.integration:
22
- raise ValueError("Integration not configured for GoogleSheetsApp")
23
- credentials = self.integration.get_credentials()
24
- if not credentials:
25
- logger.warning("No Google credentials found via integration.")
26
- action = self.integration.authorize()
27
- raise NotAuthorizedError(action)
28
- if "headers" in credentials:
29
- return credentials["headers"]
30
- return {
31
- "Authorization": f"Bearer {credentials['access_token']}",
32
- "Content-Type": "application/json",
33
- }
34
-
16
+
35
17
  def create_spreadsheet(self, title: str) -> dict[str, Any]:
36
18
  """
37
19
  Creates a new blank Google Spreadsheet with the specified title and returns the API response.
38
-
20
+
39
21
  Args:
40
22
  title: String representing the desired title for the new spreadsheet
41
-
23
+
42
24
  Returns:
43
25
  Dictionary containing the full response from the Google Sheets API, including the spreadsheet's metadata and properties
44
-
26
+
45
27
  Raises:
46
28
  HTTPError: When the API request fails due to invalid authentication, network issues, or API limitations
47
29
  ValueError: When the title parameter is empty or contains invalid characters
48
-
30
+
49
31
  Tags:
50
32
  create, spreadsheet, google-sheets, api, important
51
33
  """
52
34
  url = self.base_api_url
53
- spreadsheet_data = {
54
- "properties": {
55
- "title": title
56
- }
57
- }
35
+ spreadsheet_data = {"properties": {"title": title}}
58
36
  response = self._post(url, data=spreadsheet_data)
59
37
  return response.json()
60
-
38
+
61
39
  def get_spreadsheet(self, spreadsheet_id: str) -> dict[str, Any]:
62
40
  """
63
41
  Retrieves detailed information about a specific Google Spreadsheet using its ID.
64
-
42
+
65
43
  Args:
66
44
  spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve (found in the spreadsheet's URL)
67
-
45
+
68
46
  Returns:
69
47
  A dictionary containing the full spreadsheet metadata and contents, including properties, sheets, named ranges, and other spreadsheet-specific information from the Google Sheets API
70
-
48
+
71
49
  Raises:
72
50
  HTTPError: When the API request fails due to invalid spreadsheet_id or insufficient permissions
73
51
  ConnectionError: When there's a network connectivity issue
74
52
  ValueError: When the response cannot be parsed as JSON
75
-
53
+
76
54
  Tags:
77
55
  get, retrieve, spreadsheet, api, metadata, read, important
78
56
  """
79
57
  url = f"{self.base_api_url}/{spreadsheet_id}"
80
58
  response = self._get(url)
81
59
  return response.json()
82
-
83
- def batch_get_values(self, spreadsheet_id: str, ranges: list[str] = None) -> dict[str, Any]:
60
+
61
+ def batch_get_values(
62
+ self, spreadsheet_id: str, ranges: list[str] = None
63
+ ) -> dict[str, Any]:
84
64
  """
85
65
  Retrieves multiple ranges of values from a Google Spreadsheet in a single batch request.
86
-
66
+
87
67
  Args:
88
68
  spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve values from
89
69
  ranges: Optional list of A1 notation or R1C1 notation range strings (e.g., ['Sheet1!A1:B2', 'Sheet2!C3:D4']). If None, returns values from the entire spreadsheet
90
-
70
+
91
71
  Returns:
92
72
  A dictionary containing the API response with the requested spreadsheet values and metadata
93
-
73
+
94
74
  Raises:
95
75
  HTTPError: If the API request fails due to invalid spreadsheet_id, insufficient permissions, or invalid range format
96
76
  ValueError: If the spreadsheet_id is empty or invalid
97
-
77
+
98
78
  Tags:
99
79
  get, batch, read, spreadsheet, values, important
100
80
  """
@@ -104,72 +84,67 @@ class GoogleSheetApp(APIApplication):
104
84
  params["ranges"] = ranges
105
85
  response = self._get(url, params=params)
106
86
  return response.json()
107
-
87
+
108
88
  def clear_values(self, spreadsheet_id: str, range: str) -> dict[str, Any]:
109
89
  """
110
90
  Clears all values from a specified range in a Google Spreadsheet while preserving cell formatting and other properties
111
-
91
+
112
92
  Args:
113
93
  spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
114
94
  range: The A1 or R1C1 notation range of cells to clear (e.g., 'Sheet1!A1:B2')
115
-
95
+
116
96
  Returns:
117
97
  A dictionary containing the Google Sheets API response
118
-
98
+
119
99
  Raises:
120
100
  HttpError: When the API request fails due to invalid spreadsheet_id, invalid range format, or insufficient permissions
121
101
  ValueError: When spreadsheet_id is empty or range is in invalid format
122
-
102
+
123
103
  Tags:
124
104
  clear, modify, spreadsheet, api, sheets, data-management, important
125
105
  """
126
106
  url = f"{self.base_api_url}/{spreadsheet_id}/values/{range}:clear"
127
107
  response = self._post(url, data={})
128
108
  return response.json()
129
-
109
+
130
110
  def update_values(
131
- self,
132
- spreadsheet_id: str,
133
- range: str,
134
- values: list[list[Any]],
135
- value_input_option: str = "RAW"
111
+ self,
112
+ spreadsheet_id: str,
113
+ range: str,
114
+ values: list[list[Any]],
115
+ value_input_option: str = "RAW",
136
116
  ) -> dict[str, Any]:
137
117
  """
138
118
  Updates cell values in a specified range of a Google Spreadsheet using the Sheets API
139
-
119
+
140
120
  Args:
141
121
  spreadsheet_id: The unique identifier of the target Google Spreadsheet
142
122
  range: The A1 notation range where values will be updated (e.g., 'Sheet1!A1:B2')
143
123
  values: A list of lists containing the data to write, where each inner list represents a row of values
144
124
  value_input_option: Determines how input data should be interpreted: 'RAW' (as-is) or 'USER_ENTERED' (parsed as UI input). Defaults to 'RAW'
145
-
125
+
146
126
  Returns:
147
127
  A dictionary containing the Google Sheets API response with update details
148
-
128
+
149
129
  Raises:
150
130
  RequestError: When the API request fails due to invalid parameters or network issues
151
131
  AuthenticationError: When authentication with the Google Sheets API fails
152
-
132
+
153
133
  Tags:
154
134
  update, write, sheets, api, important, data-modification, google-sheets
155
135
  """
156
136
  url = f"{self.base_api_url}/{spreadsheet_id}/values/{range}"
157
- params = {
158
- "valueInputOption": value_input_option
159
- }
160
- data = {
161
- "range": range,
162
- "values": values
163
- }
137
+ params = {"valueInputOption": value_input_option}
138
+ data = {"range": range, "values": values}
164
139
  response = self._put(url, data=data, params=params)
165
140
  return response.json()
166
-
141
+
167
142
  def list_tools(self):
168
143
  """Returns a list of methods exposed as tools."""
169
144
  return [
170
- self.create_spreadsheet,
171
- self.get_spreadsheet,
172
- self.batch_get_values,
173
- self.clear_values,
174
- self.update_values
145
+ self.create_spreadsheet,
146
+ self.get_spreadsheet,
147
+ self.batch_get_values,
148
+ self.clear_values,
149
+ self.update_values,
175
150
  ]
@@ -11,7 +11,7 @@ class MarkitdownApp(Application):
11
11
  async def convert_to_markdown(self, uri: str) -> str:
12
12
  """
13
13
  Asynchronously converts a URI to markdown format using the markitdown converter.
14
-
14
+
15
15
  This tool aims to extract the main text content from various sources. It supports:
16
16
  - Web Pages: General HTML, specific handlers for RSS/Atom feeds, Wikipedia articles (main content), YouTube (transcripts if available), Bing SERPs.
17
17
  - Documents: PDF (attempts OCR), DOCX, XLSX, PPTX, XLS, EPUB, Outlook MSG, IPYNB notebooks.
@@ -25,14 +25,14 @@ class MarkitdownApp(Application):
25
25
  - http:// or https:// (Web pages, feeds, APIs)
26
26
  - file:// (Local or accessible network files)
27
27
  - data: (Embedded data)
28
-
28
+
29
29
  Returns:
30
30
  A string containing the markdown representation of the content at the specified URI
31
-
31
+
32
32
  Raises:
33
33
  ValueError: If the URI is invalid or empty
34
34
  ConnectionError: If the URI cannot be accessed or content cannot be retrieved
35
-
35
+
36
36
  Tags:
37
37
  convert, markdown, async, uri, transform, document
38
38
  """