universal-mcp 0.1.7rc1__py3-none-any.whl → 0.1.8__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 (61) 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/app.py +2291 -0
  5. universal_mcp/applications/application.py +95 -5
  6. universal_mcp/applications/calendly/README.md +78 -0
  7. universal_mcp/applications/calendly/__init__.py +0 -0
  8. universal_mcp/applications/calendly/app.py +1195 -0
  9. universal_mcp/applications/coda/README.md +133 -0
  10. universal_mcp/applications/coda/__init__.py +0 -0
  11. universal_mcp/applications/coda/app.py +3671 -0
  12. universal_mcp/applications/e2b/app.py +14 -28
  13. universal_mcp/applications/figma/README.md +74 -0
  14. universal_mcp/applications/figma/__init__.py +0 -0
  15. universal_mcp/applications/figma/app.py +1261 -0
  16. universal_mcp/applications/firecrawl/app.py +38 -35
  17. universal_mcp/applications/github/app.py +127 -85
  18. universal_mcp/applications/google_calendar/app.py +62 -138
  19. universal_mcp/applications/google_docs/app.py +47 -52
  20. universal_mcp/applications/google_drive/app.py +119 -113
  21. universal_mcp/applications/google_mail/app.py +124 -50
  22. universal_mcp/applications/google_sheet/app.py +89 -91
  23. universal_mcp/applications/markitdown/app.py +9 -8
  24. universal_mcp/applications/notion/app.py +254 -134
  25. universal_mcp/applications/perplexity/app.py +13 -41
  26. universal_mcp/applications/reddit/app.py +94 -85
  27. universal_mcp/applications/resend/app.py +12 -13
  28. universal_mcp/applications/{serp → serpapi}/app.py +14 -25
  29. universal_mcp/applications/tavily/app.py +11 -18
  30. universal_mcp/applications/wrike/README.md +71 -0
  31. universal_mcp/applications/wrike/__init__.py +0 -0
  32. universal_mcp/applications/wrike/app.py +1372 -0
  33. universal_mcp/applications/youtube/README.md +82 -0
  34. universal_mcp/applications/youtube/__init__.py +0 -0
  35. universal_mcp/applications/youtube/app.py +1428 -0
  36. universal_mcp/applications/zenquotes/app.py +12 -2
  37. universal_mcp/exceptions.py +9 -2
  38. universal_mcp/integrations/__init__.py +24 -1
  39. universal_mcp/integrations/agentr.py +27 -4
  40. universal_mcp/integrations/integration.py +146 -32
  41. universal_mcp/logger.py +3 -56
  42. universal_mcp/servers/__init__.py +6 -14
  43. universal_mcp/servers/server.py +201 -146
  44. universal_mcp/stores/__init__.py +7 -2
  45. universal_mcp/stores/store.py +103 -40
  46. universal_mcp/tools/__init__.py +3 -0
  47. universal_mcp/tools/adapters.py +43 -0
  48. universal_mcp/tools/func_metadata.py +213 -0
  49. universal_mcp/tools/tools.py +342 -0
  50. universal_mcp/utils/docgen.py +325 -119
  51. universal_mcp/utils/docstring_parser.py +179 -0
  52. universal_mcp/utils/dump_app_tools.py +33 -23
  53. universal_mcp/utils/installation.py +201 -10
  54. universal_mcp/utils/openapi.py +229 -46
  55. {universal_mcp-0.1.7rc1.dist-info → universal_mcp-0.1.8.dist-info}/METADATA +9 -5
  56. universal_mcp-0.1.8.dist-info/RECORD +81 -0
  57. universal_mcp-0.1.7rc1.dist-info/RECORD +0 -58
  58. /universal_mcp/{utils/bridge.py → applications/ahrefs/__init__.py} +0 -0
  59. /universal_mcp/applications/{serp → serpapi}/README.md +0 -0
  60. {universal_mcp-0.1.7rc1.dist-info → universal_mcp-0.1.8.dist-info}/WHEEL +0 -0
  61. {universal_mcp-0.1.7rc1.dist-info → universal_mcp-0.1.8.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,141 +9,142 @@ 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
- Creates a new blank Google Spreadsheet with the specified title.
38
-
19
+ Creates a new blank Google Spreadsheet with the specified title and returns the API response.
20
+
39
21
  Args:
40
- title: The title of the spreadsheet to create required , which is provided by the user
41
-
22
+ title: String representing the desired title for the new spreadsheet
23
+
42
24
  Returns:
43
- The response from the Google Sheets API
25
+ Dictionary containing the full response from the Google Sheets API, including the spreadsheet's metadata and properties
26
+
27
+ Raises:
28
+ HTTPError: When the API request fails due to invalid authentication, network issues, or API limitations
29
+ ValueError: When the title parameter is empty or contains invalid characters
30
+
31
+ Tags:
32
+ create, spreadsheet, google-sheets, api, important
44
33
  """
45
34
  url = self.base_api_url
46
- spreadsheet_data = {
47
- "properties": {
48
- "title": title
49
- }
50
- }
51
-
35
+ spreadsheet_data = {"properties": {"title": title}}
52
36
  response = self._post(url, data=spreadsheet_data)
53
37
  return response.json()
54
-
38
+
55
39
  def get_spreadsheet(self, spreadsheet_id: str) -> dict[str, Any]:
56
40
  """
57
- Returns the spreadsheet details.
58
-
41
+ Retrieves detailed information about a specific Google Spreadsheet using its ID.
42
+
59
43
  Args:
60
- spreadsheet_id: The ID of the spreadsheet to retrieve
61
-
44
+ spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve (found in the spreadsheet's URL)
45
+
62
46
  Returns:
63
- The response from the Google Sheets API containing the spreadsheet data and details
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
48
+
49
+ Raises:
50
+ HTTPError: When the API request fails due to invalid spreadsheet_id or insufficient permissions
51
+ ConnectionError: When there's a network connectivity issue
52
+ ValueError: When the response cannot be parsed as JSON
53
+
54
+ Tags:
55
+ get, retrieve, spreadsheet, api, metadata, read, important
64
56
  """
65
57
  url = f"{self.base_api_url}/{spreadsheet_id}"
66
58
  response = self._get(url)
67
59
  return response.json()
68
-
69
- 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]:
70
64
  """
71
- Returns one or more ranges of values from a spreadsheet.
72
-
65
+ Retrieves multiple ranges of values from a Google Spreadsheet in a single batch request.
66
+
73
67
  Args:
74
- spreadsheet_id: The ID of the spreadsheet to retrieve values from
75
- ranges: Optional list of A1 notation or R1C1 notation ranges to retrieve values from
76
- (e.g. ['Sheet1!A1:B2', 'Sheet2!C3:D4'])
77
-
68
+ spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve values from
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
70
+
78
71
  Returns:
79
- The response from the Google Sheets API containing the requested values
72
+ A dictionary containing the API response with the requested spreadsheet values and metadata
73
+
74
+ Raises:
75
+ HTTPError: If the API request fails due to invalid spreadsheet_id, insufficient permissions, or invalid range format
76
+ ValueError: If the spreadsheet_id is empty or invalid
77
+
78
+ Tags:
79
+ get, batch, read, spreadsheet, values, important
80
80
  """
81
81
  url = f"{self.base_api_url}/{spreadsheet_id}/values:batchGet"
82
-
83
82
  params = {}
84
83
  if ranges:
85
84
  params["ranges"] = ranges
86
-
87
85
  response = self._get(url, params=params)
88
86
  return response.json()
89
-
87
+
90
88
  def clear_values(self, spreadsheet_id: str, range: str) -> dict[str, Any]:
91
89
  """
92
- Clears values from a spreadsheet. Only values are cleared -- all other properties
93
- of the cell (such as formatting, data validation, etc.) are kept.
94
-
90
+ Clears all values from a specified range in a Google Spreadsheet while preserving cell formatting and other properties
91
+
95
92
  Args:
96
- spreadsheet_id: The ID of the spreadsheet to update
97
- range: The A1 notation or R1C1 notation of the values to clear
98
- (e.g. 'Sheet1!A1:B2')
99
-
93
+ spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
94
+ range: The A1 or R1C1 notation range of cells to clear (e.g., 'Sheet1!A1:B2')
95
+
100
96
  Returns:
101
- The response from the Google Sheets API
97
+ A dictionary containing the Google Sheets API response
98
+
99
+ Raises:
100
+ HttpError: When the API request fails due to invalid spreadsheet_id, invalid range format, or insufficient permissions
101
+ ValueError: When spreadsheet_id is empty or range is in invalid format
102
+
103
+ Tags:
104
+ clear, modify, spreadsheet, api, sheets, data-management, important
102
105
  """
103
106
  url = f"{self.base_api_url}/{spreadsheet_id}/values/{range}:clear"
104
-
105
107
  response = self._post(url, data={})
106
108
  return response.json()
107
-
109
+
108
110
  def update_values(
109
- self,
110
- spreadsheet_id: str,
111
- range: str,
112
- values: list[list[Any]],
113
- 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",
114
116
  ) -> dict[str, Any]:
115
117
  """
116
- Sets values in a range of a spreadsheet.
117
-
118
+ Updates cell values in a specified range of a Google Spreadsheet using the Sheets API
119
+
118
120
  Args:
119
- spreadsheet_id: The ID of the spreadsheet to update
120
- range: The A1 notation of the values to update (e.g. 'Sheet1!A1:B2')
121
- values: The data to write, as a list of lists (rows of values)
122
- value_input_option: How the input data should be interpreted.
123
- Accepted values are:
124
- - "RAW": The values will be stored as-is
125
- - "USER_ENTERED": The values will be parsed as if the user typed them into the UI
126
-
121
+ spreadsheet_id: The unique identifier of the target Google Spreadsheet
122
+ range: The A1 notation range where values will be updated (e.g., 'Sheet1!A1:B2')
123
+ values: A list of lists containing the data to write, where each inner list represents a row of values
124
+ value_input_option: Determines how input data should be interpreted: 'RAW' (as-is) or 'USER_ENTERED' (parsed as UI input). Defaults to 'RAW'
125
+
127
126
  Returns:
128
- The response from the Google Sheets API
127
+ A dictionary containing the Google Sheets API response with update details
128
+
129
+ Raises:
130
+ RequestError: When the API request fails due to invalid parameters or network issues
131
+ AuthenticationError: When authentication with the Google Sheets API fails
132
+
133
+ Tags:
134
+ update, write, sheets, api, important, data-modification, google-sheets
129
135
  """
130
136
  url = f"{self.base_api_url}/{spreadsheet_id}/values/{range}"
131
-
132
- params = {
133
- "valueInputOption": value_input_option
134
- }
135
-
136
- data = {
137
- "range": range,
138
- "values": values
139
- }
140
-
137
+ params = {"valueInputOption": value_input_option}
138
+ data = {"range": range, "values": values}
141
139
  response = self._put(url, data=data, params=params)
142
140
  return response.json()
143
-
141
+
144
142
  def list_tools(self):
145
143
  """Returns a list of methods exposed as tools."""
146
144
  return [
147
- self.create_spreadsheet,
148
- self.get_spreadsheet,
149
- self.batch_get_values,
150
- self.clear_values,
151
- self.update_values
145
+ self.create_spreadsheet,
146
+ self.get_spreadsheet,
147
+ self.batch_get_values,
148
+ self.clear_values,
149
+ self.update_values,
152
150
  ]
@@ -9,7 +9,8 @@ class MarkitdownApp(Application):
9
9
  self.markitdown = MarkItDown()
10
10
 
11
11
  async def convert_to_markdown(self, uri: str) -> str:
12
- """Fetches content from a URI and converts its primary textual representation into Markdown.
12
+ """
13
+ Asynchronously converts a URI to markdown format using the markitdown converter.
13
14
 
14
15
  This tool aims to extract the main text content from various sources. It supports:
15
16
  - Web Pages: General HTML, specific handlers for RSS/Atom feeds, Wikipedia articles (main content), YouTube (transcripts if available), Bing SERPs.
@@ -19,9 +20,6 @@ class MarkitdownApp(Application):
19
20
  - Audio: Extracts metadata and attempts transcription to get text.
20
21
  - Archives: ZIP (extracts and attempts to convert supported files within, concatenating results).
21
22
 
22
- Note: Conversion quality depends on the source format. Complex layouts, encrypted files, or missing transcripts/OCR data may limit output.
23
- Enhanced PDF/Image processing via Azure Document Intelligence may be active if configured server-side.
24
-
25
23
  Args:
26
24
  uri (str): The URI pointing to the resource. Supported schemes:
27
25
  - http:// or https:// (Web pages, feeds, APIs)
@@ -29,11 +27,14 @@ class MarkitdownApp(Application):
29
27
  - data: (Embedded data)
30
28
 
31
29
  Returns:
32
- str: The extracted content converted to Markdown format.
30
+ A string containing the markdown representation of the content at the specified URI
31
+
32
+ Raises:
33
+ ValueError: If the URI is invalid or empty
34
+ ConnectionError: If the URI cannot be accessed or content cannot be retrieved
33
35
 
34
- Example:
35
- >>> await convert_to_markdown("https://example.com")
36
- "# Example Domain\n\nThis domain is for use in illustrative examples..."
36
+ Tags:
37
+ convert, markdown, async, uri, transform, document
37
38
  """
38
39
  return self.markitdown.convert_uri(uri).markdown
39
40