universal-mcp 0.1.7rc2__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.
- universal_mcp/__init__.py +0 -2
- universal_mcp/analytics.py +75 -0
- universal_mcp/applications/ahrefs/README.md +76 -0
- universal_mcp/applications/ahrefs/app.py +2291 -0
- universal_mcp/applications/application.py +95 -5
- universal_mcp/applications/calendly/README.md +78 -0
- universal_mcp/applications/calendly/__init__.py +0 -0
- universal_mcp/applications/calendly/app.py +1195 -0
- universal_mcp/applications/coda/README.md +133 -0
- universal_mcp/applications/coda/__init__.py +0 -0
- universal_mcp/applications/coda/app.py +3671 -0
- universal_mcp/applications/e2b/app.py +14 -35
- universal_mcp/applications/figma/README.md +74 -0
- universal_mcp/applications/figma/__init__.py +0 -0
- universal_mcp/applications/figma/app.py +1261 -0
- universal_mcp/applications/firecrawl/app.py +29 -32
- universal_mcp/applications/github/app.py +127 -85
- universal_mcp/applications/google_calendar/app.py +62 -138
- universal_mcp/applications/google_docs/app.py +47 -52
- universal_mcp/applications/google_drive/app.py +119 -113
- universal_mcp/applications/google_mail/app.py +124 -50
- universal_mcp/applications/google_sheet/app.py +89 -91
- universal_mcp/applications/markitdown/app.py +9 -8
- universal_mcp/applications/notion/app.py +254 -134
- universal_mcp/applications/perplexity/app.py +13 -45
- universal_mcp/applications/reddit/app.py +94 -85
- universal_mcp/applications/resend/app.py +12 -23
- universal_mcp/applications/{serp → serpapi}/app.py +14 -33
- universal_mcp/applications/tavily/app.py +11 -28
- universal_mcp/applications/wrike/README.md +71 -0
- universal_mcp/applications/wrike/__init__.py +0 -0
- universal_mcp/applications/wrike/app.py +1372 -0
- universal_mcp/applications/youtube/README.md +82 -0
- universal_mcp/applications/youtube/__init__.py +0 -0
- universal_mcp/applications/youtube/app.py +1428 -0
- universal_mcp/applications/zenquotes/app.py +12 -2
- universal_mcp/exceptions.py +9 -2
- universal_mcp/integrations/__init__.py +24 -1
- universal_mcp/integrations/agentr.py +27 -4
- universal_mcp/integrations/integration.py +143 -30
- universal_mcp/logger.py +3 -56
- universal_mcp/servers/__init__.py +6 -14
- universal_mcp/servers/server.py +201 -146
- universal_mcp/stores/__init__.py +7 -2
- universal_mcp/stores/store.py +103 -40
- universal_mcp/tools/__init__.py +3 -0
- universal_mcp/tools/adapters.py +43 -0
- universal_mcp/tools/func_metadata.py +213 -0
- universal_mcp/tools/tools.py +342 -0
- universal_mcp/utils/docgen.py +325 -119
- universal_mcp/utils/docstring_parser.py +179 -0
- universal_mcp/utils/dump_app_tools.py +33 -23
- universal_mcp/utils/installation.py +199 -8
- universal_mcp/utils/openapi.py +229 -46
- {universal_mcp-0.1.7rc2.dist-info → universal_mcp-0.1.8.dist-info}/METADATA +9 -5
- universal_mcp-0.1.8.dist-info/RECORD +81 -0
- universal_mcp-0.1.7rc2.dist-info/RECORD +0 -58
- /universal_mcp/{utils/bridge.py → applications/ahrefs/__init__.py} +0 -0
- /universal_mcp/applications/{serp → serpapi}/README.md +0 -0
- {universal_mcp-0.1.7rc2.dist-info → universal_mcp-0.1.8.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.7rc2.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:
|
41
|
-
|
22
|
+
title: String representing the desired title for the new spreadsheet
|
23
|
+
|
42
24
|
Returns:
|
43
|
-
|
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
|
-
|
58
|
-
|
41
|
+
Retrieves detailed information about a specific Google Spreadsheet using its ID.
|
42
|
+
|
59
43
|
Args:
|
60
|
-
spreadsheet_id: The
|
61
|
-
|
44
|
+
spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve (found in the spreadsheet's URL)
|
45
|
+
|
62
46
|
Returns:
|
63
|
-
|
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(
|
60
|
+
|
61
|
+
def batch_get_values(
|
62
|
+
self, spreadsheet_id: str, ranges: list[str] = None
|
63
|
+
) -> dict[str, Any]:
|
70
64
|
"""
|
71
|
-
|
72
|
-
|
65
|
+
Retrieves multiple ranges of values from a Google Spreadsheet in a single batch request.
|
66
|
+
|
73
67
|
Args:
|
74
|
-
spreadsheet_id: The
|
75
|
-
ranges: Optional list of A1 notation or R1C1 notation
|
76
|
-
|
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
|
-
|
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
|
93
|
-
|
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
|
97
|
-
range: The A1
|
98
|
-
|
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
|
-
|
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
|
-
|
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
|
120
|
-
range: The A1 notation
|
121
|
-
values:
|
122
|
-
value_input_option:
|
123
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
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
|
-
"""
|
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
|
-
|
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
|
-
|
35
|
-
|
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
|
|