rootly-mcp-server 2.0.12__py3-none-any.whl → 2.0.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.
- rootly_mcp_server/server.py +69 -2
- {rootly_mcp_server-2.0.12.dist-info → rootly_mcp_server-2.0.13.dist-info}/METADATA +1 -1
- {rootly_mcp_server-2.0.12.dist-info → rootly_mcp_server-2.0.13.dist-info}/RECORD +6 -6
- {rootly_mcp_server-2.0.12.dist-info → rootly_mcp_server-2.0.13.dist-info}/WHEEL +0 -0
- {rootly_mcp_server-2.0.12.dist-info → rootly_mcp_server-2.0.13.dist-info}/entry_points.txt +0 -0
- {rootly_mcp_server-2.0.12.dist-info → rootly_mcp_server-2.0.13.dist-info}/licenses/LICENSE +0 -0
rootly_mcp_server/server.py
CHANGED
|
@@ -391,7 +391,7 @@ def create_rootly_mcp_server(
|
|
|
391
391
|
# Single page mode
|
|
392
392
|
if page_number > 0:
|
|
393
393
|
params = {
|
|
394
|
-
"page[size]":
|
|
394
|
+
"page[size]": page_size, # Use requested page size (already limited to max 20)
|
|
395
395
|
"page[number]": page_number,
|
|
396
396
|
"include": "",
|
|
397
397
|
}
|
|
@@ -409,7 +409,7 @@ def create_rootly_mcp_server(
|
|
|
409
409
|
# Multi-page mode (page_number = 0)
|
|
410
410
|
all_incidents = []
|
|
411
411
|
current_page = 1
|
|
412
|
-
effective_page_size =
|
|
412
|
+
effective_page_size = page_size # Use requested page size (already limited to max 20)
|
|
413
413
|
max_pages = 10 # Safety limit to prevent infinite loops
|
|
414
414
|
|
|
415
415
|
try:
|
|
@@ -922,6 +922,73 @@ def _filter_openapi_spec(spec: Dict[str, Any], allowed_paths: List[str]) -> Dict
|
|
|
922
922
|
"description": param.get("description", "Parameter value")
|
|
923
923
|
}
|
|
924
924
|
|
|
925
|
+
# Add/modify pagination limits to alerts and incident-related endpoints to prevent infinite loops
|
|
926
|
+
if method.lower() == "get" and ("alerts" in path.lower() or "incident" in path.lower()):
|
|
927
|
+
if "parameters" not in operation:
|
|
928
|
+
operation["parameters"] = []
|
|
929
|
+
|
|
930
|
+
# Find existing pagination parameters and update them with limits
|
|
931
|
+
page_size_param = None
|
|
932
|
+
page_number_param = None
|
|
933
|
+
|
|
934
|
+
for param in operation["parameters"]:
|
|
935
|
+
if param.get("name") == "page[size]":
|
|
936
|
+
page_size_param = param
|
|
937
|
+
elif param.get("name") == "page[number]":
|
|
938
|
+
page_number_param = param
|
|
939
|
+
|
|
940
|
+
# Update or add page[size] parameter with limits
|
|
941
|
+
if page_size_param:
|
|
942
|
+
# Update existing parameter with limits
|
|
943
|
+
if "schema" not in page_size_param:
|
|
944
|
+
page_size_param["schema"] = {}
|
|
945
|
+
page_size_param["schema"].update({
|
|
946
|
+
"type": "integer",
|
|
947
|
+
"default": 10,
|
|
948
|
+
"minimum": 1,
|
|
949
|
+
"maximum": 20,
|
|
950
|
+
"description": "Number of results per page (max: 20)"
|
|
951
|
+
})
|
|
952
|
+
else:
|
|
953
|
+
# Add new parameter
|
|
954
|
+
operation["parameters"].append({
|
|
955
|
+
"name": "page[size]",
|
|
956
|
+
"in": "query",
|
|
957
|
+
"required": False,
|
|
958
|
+
"schema": {
|
|
959
|
+
"type": "integer",
|
|
960
|
+
"default": 10,
|
|
961
|
+
"minimum": 1,
|
|
962
|
+
"maximum": 20,
|
|
963
|
+
"description": "Number of results per page (max: 20)"
|
|
964
|
+
}
|
|
965
|
+
})
|
|
966
|
+
|
|
967
|
+
# Update or add page[number] parameter with defaults
|
|
968
|
+
if page_number_param:
|
|
969
|
+
# Update existing parameter
|
|
970
|
+
if "schema" not in page_number_param:
|
|
971
|
+
page_number_param["schema"] = {}
|
|
972
|
+
page_number_param["schema"].update({
|
|
973
|
+
"type": "integer",
|
|
974
|
+
"default": 1,
|
|
975
|
+
"minimum": 1,
|
|
976
|
+
"description": "Page number to retrieve"
|
|
977
|
+
})
|
|
978
|
+
else:
|
|
979
|
+
# Add new parameter
|
|
980
|
+
operation["parameters"].append({
|
|
981
|
+
"name": "page[number]",
|
|
982
|
+
"in": "query",
|
|
983
|
+
"required": False,
|
|
984
|
+
"schema": {
|
|
985
|
+
"type": "integer",
|
|
986
|
+
"default": 1,
|
|
987
|
+
"minimum": 1,
|
|
988
|
+
"description": "Page number to retrieve"
|
|
989
|
+
}
|
|
990
|
+
})
|
|
991
|
+
|
|
925
992
|
# Also clean up any remaining broken references in components
|
|
926
993
|
if "components" in filtered_spec and "schemas" in filtered_spec["components"]:
|
|
927
994
|
schemas = filtered_spec["components"]["schemas"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rootly-mcp-server
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.13
|
|
4
4
|
Summary: A Model Context Protocol server for Rootly APIs using OpenAPI spec
|
|
5
5
|
Project-URL: Homepage, https://github.com/Rootly-AI-Labs/Rootly-MCP-server
|
|
6
6
|
Project-URL: Issues, https://github.com/Rootly-AI-Labs/Rootly-MCP-server/issues
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
rootly_mcp_server/__init__.py,sha256=rvIuqIyuzgC7b9qSnylrdDP2zPO-7Ou9AoblR6re1co,629
|
|
2
2
|
rootly_mcp_server/__main__.py,sha256=_F4p65_VjnN84RtmEdESVLLH0tO5tL9qBfb2Xdvbj2E,6480
|
|
3
3
|
rootly_mcp_server/client.py,sha256=uit-YijR7OAJtysBoclqnublEDVkFfcb29wSzhpBv44,4686
|
|
4
|
-
rootly_mcp_server/server.py,sha256=
|
|
4
|
+
rootly_mcp_server/server.py,sha256=BX4bRTlzUBI0xNha-owy9FRSmBCpVRM2qgSv5m5SHzE,44413
|
|
5
5
|
rootly_mcp_server/smart_utils.py,sha256=lvGN9ITyJjBkm7ejpYagd8VWodLKnC6FmwECfCOcGwM,22973
|
|
6
6
|
rootly_mcp_server/utils.py,sha256=NyxdcDiFGlV2a8eBO4lKgZg0D7Gxr6xUIB0YyJGgpPA,4165
|
|
7
7
|
rootly_mcp_server/data/__init__.py,sha256=fO8a0bQnRVEoRMHKvhFzj10bhoaw7VsI51czc2MsUm4,143
|
|
8
|
-
rootly_mcp_server-2.0.
|
|
9
|
-
rootly_mcp_server-2.0.
|
|
10
|
-
rootly_mcp_server-2.0.
|
|
11
|
-
rootly_mcp_server-2.0.
|
|
12
|
-
rootly_mcp_server-2.0.
|
|
8
|
+
rootly_mcp_server-2.0.13.dist-info/METADATA,sha256=86--37XF6dDVqGyzqdmNGbaq0gEzRtGC_gJrtoduQXY,8722
|
|
9
|
+
rootly_mcp_server-2.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
+
rootly_mcp_server-2.0.13.dist-info/entry_points.txt,sha256=NE33b8VgigVPGBkboyo6pvN1Vz35HZtLybxMO4Q03PI,70
|
|
11
|
+
rootly_mcp_server-2.0.13.dist-info/licenses/LICENSE,sha256=c9w9ZZGl14r54tsP40oaq5adTVX_HMNHozPIH2ymzmw,11341
|
|
12
|
+
rootly_mcp_server-2.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|