rootly-mcp-server 2.3.0__tar.gz → 2.3.2__tar.gz
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-2.3.0 → rootly_mcp_server-2.3.2}/CHANGELOG.md +23 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/PKG-INFO +1 -1
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/pyproject.toml +1 -1
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/server_defaults.py +75 -29
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/transport.py +19 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_server.py +3 -9
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_transport_module.py +71 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/uv.lock +1 -1
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.dockerignore +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.gitattributes +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/dependabot.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/openapi-audit-remote-baseline.json +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/workflows/ci.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/workflows/dependency-review.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/workflows/openapi-audit.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/workflows/pypi-release.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.gitignore +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.semaphore/deploy-staging.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.semaphore/deploy.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.semaphore/semaphore.yml +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.semaphore/update-task-definition.sh +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/CONTRIBUTING.md +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/Dockerfile +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/LICENSE +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/README.md +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/examples/skills/README.md +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/gemini-extension.json +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/rootly-mcp-server-demo.gif +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/rootly_openapi.json +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/scripts/audit_openapi.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/scripts/setup-hooks.sh +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/server.json +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/__init__.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/__main__.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/audit.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/client.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/code_mode.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/data/__init__.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/exceptions.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/legacy_server.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/mcp_error.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/monitoring.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/och_client.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/pagination.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/payload_stripping.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/security.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/server.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/smart_utils.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/spec_transform.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/__init__.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/alerts.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/incidents.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/oncall.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/resources.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/utils.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/validators.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/README.md +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/conftest.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/local/test_basic.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/local/test_smart_tools.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/local/test_tool_allowlists.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/remote/test_essential.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/test_client.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_alert_stripping.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_authentication.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_code_mode_module.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_exceptions.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_http_headers.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_legacy_server_module.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_main_transport.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_mcp_error_module.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_och_client.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_oncall_handoff.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_oncall_metrics.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_oncall_new_tools.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_oncall_severity_normalization.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_payload_stripping_module.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_security.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_server_defaults_module.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_smart_utils.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_tools.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_utils.py +0 -0
- {rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_validators.py +0 -0
|
@@ -5,6 +5,29 @@ All notable changes to the Rootly MCP Server will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.3.2] - Released 2026-04-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Generated Write Payload Forwarding**: Normalized generated OpenAPI write-tool payloads to unwrap top-level `body` envelopes before forwarding to the Rootly API, fixing failures such as `createWorkflow` returning `Invalid payload ({data: "Expected hash"})`
|
|
13
|
+
|
|
14
|
+
### Testing
|
|
15
|
+
|
|
16
|
+
- **Request-Path Regression Coverage**: Added transport regression tests that assert write requests forward unwrapped JSON payloads and preserve already-correct non-envelope payloads
|
|
17
|
+
|
|
18
|
+
## [2.3.1] - Released 2026-04-23
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Create Operations Restored**: Restored missing create operations for workflows, schedules, and configuration resources by expanding `DEFAULT_WRITE_ALLOWED_PATHS` to include collection/base paths (not only `/{id}` update paths)
|
|
23
|
+
- **Write Surface Completeness**: Re-enabled create + update parity across key families including workflows, workflow groups, schedules, escalation policies, services, teams, environments, dashboards, playbooks, monitoring, retrospectives, communications, causes, and catalogs
|
|
24
|
+
- **Test Accuracy**: Corrected alert source tool-name assertions in unit tests (`createAlertSource` / `updateAlertSource`) to prevent false confidence
|
|
25
|
+
|
|
26
|
+
### Notes
|
|
27
|
+
|
|
28
|
+
- `createWorkflow` remains the correct tool name (singular), not `createWorkflows`
|
|
29
|
+
- Security exclusions for sensitive families remain unchanged
|
|
30
|
+
|
|
8
31
|
## [2.3.0] - Released 2026-04-23
|
|
9
32
|
|
|
10
33
|
### Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rootly-mcp-server
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: Secure Model Context Protocol server for Rootly APIs with AI SRE capabilities, comprehensive error handling, and input validation
|
|
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,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "rootly-mcp-server"
|
|
3
|
-
version = "2.3.
|
|
3
|
+
version = "2.3.2"
|
|
4
4
|
description = "Secure Model Context Protocol server for Rootly APIs with AI SRE capabilities, comprehensive error handling, and input validation"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/server_defaults.py
RENAMED
|
@@ -333,52 +333,98 @@ SECURITY_EXCLUDED_PATHS = [
|
|
|
333
333
|
# write tools are explicitly enabled. This keeps the default surface focused on
|
|
334
334
|
# read-only workflows and avoids exposing broader admin/config writes.
|
|
335
335
|
DEFAULT_WRITE_ALLOWED_PATHS = [
|
|
336
|
-
# Core incident and infrastructure
|
|
337
|
-
"/
|
|
336
|
+
# Core incident and infrastructure - create + update
|
|
337
|
+
"/environments",
|
|
338
338
|
"/environments/{environment_id}",
|
|
339
|
-
"/
|
|
340
|
-
"/escalation_paths/{escalation_policy_path_id}",
|
|
341
|
-
"/escalation_policies/{escalation_policy_id}",
|
|
339
|
+
"/functionalities",
|
|
342
340
|
"/functionalities/{functionality_id}",
|
|
341
|
+
"/incident_types",
|
|
342
|
+
"/incident_types/{incident_type_id}",
|
|
343
|
+
"/services",
|
|
344
|
+
"/services/{service_id}",
|
|
345
|
+
"/severities",
|
|
346
|
+
"/severities/{severity_id}",
|
|
347
|
+
"/teams",
|
|
348
|
+
"/teams/{team_id}",
|
|
349
|
+
# Incident mutations
|
|
350
|
+
"/alert_events/{id}",
|
|
343
351
|
"/incidents/{incident_id}/action_items",
|
|
344
352
|
"/incidents/{incident_id}/form_field_selections",
|
|
345
353
|
"/incident_form_field_selections/{id}",
|
|
346
|
-
|
|
347
|
-
"/
|
|
348
|
-
"/on_call_shadows/{on_call_shadow_id}",
|
|
349
|
-
"/override_shifts/{override_shift_id}",
|
|
354
|
+
# On-call schedules - create + update
|
|
355
|
+
"/schedules",
|
|
350
356
|
"/schedules/{schedule_id}",
|
|
357
|
+
"/schedules/{schedule_id}/schedule_rotations",
|
|
351
358
|
"/schedule_rotations/{schedule_rotation_id}",
|
|
352
|
-
"/
|
|
353
|
-
"/
|
|
354
|
-
"/
|
|
359
|
+
"/schedules/{schedule_id}/override_shifts",
|
|
360
|
+
"/override_shifts/{override_shift_id}",
|
|
361
|
+
"/schedules/{schedule_id}/on_call_shadows",
|
|
362
|
+
"/on_call_shadows/{on_call_shadow_id}",
|
|
363
|
+
"/on_call_roles",
|
|
364
|
+
"/on_call_roles/{on_call_role_id}",
|
|
365
|
+
# Escalation policies - create + update
|
|
366
|
+
"/escalation_policies",
|
|
367
|
+
"/escalation_policies/{escalation_policy_id}",
|
|
368
|
+
"/escalation_policies/{escalation_policy_id}/escalation_paths",
|
|
369
|
+
"/escalation_paths/{escalation_policy_path_id}",
|
|
370
|
+
"/escalation_paths/{escalation_policy_path_id}/escalation_levels",
|
|
371
|
+
"/escalation_levels/{escalation_level_id}",
|
|
372
|
+
# Workflows - create + update
|
|
373
|
+
"/workflows",
|
|
355
374
|
"/workflows/{workflow_id}",
|
|
375
|
+
"/workflow_groups",
|
|
356
376
|
"/workflows/{workflow_id}/workflow_tasks",
|
|
357
377
|
"/workflow_tasks/{id}",
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
"/
|
|
361
|
-
"/communications_templates/{id}",
|
|
362
|
-
"/communications_types/{id}",
|
|
363
|
-
# Dashboards and analytics
|
|
378
|
+
"/workflows/{workflow_id}/form_field_conditions",
|
|
379
|
+
# Dashboards - create + update
|
|
380
|
+
"/dashboards",
|
|
364
381
|
"/dashboards/{id}",
|
|
382
|
+
"/dashboards/{dashboard_id}/panels",
|
|
365
383
|
"/dashboard_panels/{id}",
|
|
366
|
-
# Playbooks
|
|
384
|
+
# Playbooks - create + update
|
|
385
|
+
"/playbooks",
|
|
367
386
|
"/playbooks/{id}",
|
|
387
|
+
"/playbooks/{playbook_id}/playbook_tasks",
|
|
368
388
|
"/playbook_tasks/{id}",
|
|
369
|
-
#
|
|
389
|
+
# Monitoring - create + update
|
|
390
|
+
"/heartbeats",
|
|
391
|
+
"/heartbeats/{id}",
|
|
392
|
+
"/pulses",
|
|
393
|
+
"/pulses/{id}",
|
|
394
|
+
"/live_call_routers",
|
|
395
|
+
"/live_call_routers/{id}",
|
|
396
|
+
# Post-incident and retrospectives - create + update
|
|
370
397
|
"/post_incident_reviews/{id}",
|
|
398
|
+
"/retrospective_processes",
|
|
371
399
|
"/retrospective_processes/{id}",
|
|
400
|
+
"/retrospective_processes/{retrospective_process_id}/groups",
|
|
372
401
|
"/retrospective_process_groups/{id}",
|
|
402
|
+
"/retrospective_processes/{retrospective_process_id}/retrospective_steps",
|
|
373
403
|
"/retrospective_steps/{id}",
|
|
374
404
|
"/postmortem_templates/{id}",
|
|
375
|
-
#
|
|
376
|
-
"/
|
|
377
|
-
"/
|
|
378
|
-
"/
|
|
379
|
-
|
|
405
|
+
# Communications - create + update
|
|
406
|
+
"/communications_groups",
|
|
407
|
+
"/communications_groups/{id}",
|
|
408
|
+
"/communications_stages",
|
|
409
|
+
"/communications_stages/{id}",
|
|
410
|
+
"/communications_templates",
|
|
411
|
+
"/communications_templates/{id}",
|
|
412
|
+
"/communications_types",
|
|
413
|
+
"/communications_types/{id}",
|
|
414
|
+
# Causes and catalog - create + update
|
|
415
|
+
"/causes",
|
|
416
|
+
"/catalogs",
|
|
417
|
+
"/catalogs/{catalog_id}/entities",
|
|
418
|
+
# Sub-statuses - create + update
|
|
419
|
+
"/sub_statuses",
|
|
420
|
+
"/sub_statuses/{id}",
|
|
421
|
+
"/incident_sub_statuses/{id}",
|
|
422
|
+
# User notification preferences - create + update
|
|
423
|
+
"/users/{user_id}/notification_rules",
|
|
380
424
|
"/user_notification_rules/{id}",
|
|
425
|
+
"/users/{user_id}/email_addresses",
|
|
381
426
|
"/user_email_addresses/{id}",
|
|
427
|
+
"/users/{user_id}/phone_numbers",
|
|
382
428
|
"/user_phone_numbers/{id}",
|
|
383
429
|
# Extended incident management
|
|
384
430
|
"/incident_events/{id}",
|
|
@@ -386,17 +432,17 @@ DEFAULT_WRITE_ALLOWED_PATHS = [
|
|
|
386
432
|
"/incident_postmortems/{id}",
|
|
387
433
|
"/incident_retrospective_steps/{id}",
|
|
388
434
|
"/incident_status_pages/{id}",
|
|
389
|
-
#
|
|
435
|
+
# Form and field management - create + update
|
|
436
|
+
"/custom_fields",
|
|
390
437
|
"/custom_fields/{id}",
|
|
391
438
|
"/custom_field_options/{id}",
|
|
439
|
+
"/form_sets",
|
|
392
440
|
"/form_sets/{id}",
|
|
393
441
|
"/form_field_placements/{id}",
|
|
394
442
|
"/form_field_placement_conditions/{id}",
|
|
395
443
|
"/form_set_conditions/{id}",
|
|
396
|
-
# Status
|
|
444
|
+
# Status page templates
|
|
397
445
|
"/status_page_templates/{id}",
|
|
398
|
-
"/sub_statuses/{id}",
|
|
399
|
-
"/incident_sub_statuses/{id}",
|
|
400
446
|
]
|
|
401
447
|
|
|
402
448
|
# DELETE operations are only exposed for these high-priority screenshot families.
|
|
@@ -651,6 +651,8 @@ class AuthenticatedHTTPXClient:
|
|
|
651
651
|
# Transform query parameters
|
|
652
652
|
if "params" in kwargs:
|
|
653
653
|
kwargs["params"] = self._transform_params(kwargs["params"])
|
|
654
|
+
if "json" in kwargs:
|
|
655
|
+
kwargs["json"] = self._normalize_request_json_payload(method, kwargs["json"])
|
|
654
656
|
|
|
655
657
|
# Log incoming headers for debugging (before transformation)
|
|
656
658
|
incoming_headers = kwargs.get("headers", {})
|
|
@@ -723,6 +725,23 @@ class AuthenticatedHTTPXClient:
|
|
|
723
725
|
|
|
724
726
|
return response
|
|
725
727
|
|
|
728
|
+
@staticmethod
|
|
729
|
+
def _normalize_request_json_payload(method: str, payload: Any) -> Any:
|
|
730
|
+
"""Normalize JSON payloads forwarded by generated tools.
|
|
731
|
+
|
|
732
|
+
Some generated write tools expose a top-level `body` parameter, which can
|
|
733
|
+
result in JSON payloads of shape `{"body": {...}}`. Rootly API write
|
|
734
|
+
endpoints expect the inner object as the actual request body.
|
|
735
|
+
"""
|
|
736
|
+
if method.upper() not in {"POST", "PUT", "PATCH"}:
|
|
737
|
+
return payload
|
|
738
|
+
if not isinstance(payload, dict):
|
|
739
|
+
return payload
|
|
740
|
+
body = payload.get("body")
|
|
741
|
+
if len(payload) == 1 and isinstance(body, dict):
|
|
742
|
+
return body
|
|
743
|
+
return payload
|
|
744
|
+
|
|
726
745
|
@staticmethod
|
|
727
746
|
def _is_alert_endpoint(url: str) -> bool:
|
|
728
747
|
"""Check if a URL is an alert endpoint (but not alert sub-resources like events)."""
|
|
@@ -371,14 +371,9 @@ class TestBundledIncidentFormFieldSelectionTools:
|
|
|
371
371
|
assert "listCauses" in tool_names
|
|
372
372
|
assert "getCause" in tool_names
|
|
373
373
|
|
|
374
|
-
#
|
|
374
|
+
# Workflow creates now enabled, but workflow runs remain excluded
|
|
375
375
|
assert "createWorkflowRun" not in tool_names
|
|
376
|
-
|
|
377
|
-
assert "updateWorkflowGroup" not in tool_names
|
|
378
|
-
assert "createStatusPage" not in tool_names
|
|
379
|
-
assert "updateStatusPage" not in tool_names
|
|
380
|
-
assert "createStatusPageTemplate" not in tool_names
|
|
381
|
-
assert "updateStatusPageTemplate" not in tool_names
|
|
376
|
+
# Alert configuration writes remain excluded (connects to external systems)
|
|
382
377
|
assert "createAlertGroup" not in tool_names
|
|
383
378
|
assert "updateAlertGroup" not in tool_names
|
|
384
379
|
assert "createAlertRoutingRule" not in tool_names
|
|
@@ -387,12 +382,11 @@ class TestBundledIncidentFormFieldSelectionTools:
|
|
|
387
382
|
assert "updateAlertSource" not in tool_names
|
|
388
383
|
assert "createAlertUrgency" not in tool_names
|
|
389
384
|
assert "updateAlertUrgency" not in tool_names
|
|
385
|
+
# Custom form/field creation excluded (schema-level configuration)
|
|
390
386
|
assert "createCustomForm" not in tool_names
|
|
391
387
|
assert "updateCustomForm" not in tool_names
|
|
392
388
|
assert "createFormField" not in tool_names
|
|
393
389
|
assert "updateFormField" not in tool_names
|
|
394
|
-
assert "createCatalog" not in tool_names
|
|
395
|
-
assert "updateCatalog" not in tool_names
|
|
396
390
|
|
|
397
391
|
async def test_enable_write_tools_exposes_curated_generated_write_tools(
|
|
398
392
|
self, mock_environment_token
|
|
@@ -523,6 +523,54 @@ class TestTransportModule:
|
|
|
523
523
|
assert error_context["upstream_path"] == "/v1/alerts"
|
|
524
524
|
assert error_context["upstream_log_level"] == "error"
|
|
525
525
|
|
|
526
|
+
@pytest.mark.asyncio
|
|
527
|
+
async def test_authenticated_client_unwraps_body_envelope_on_write_requests(self):
|
|
528
|
+
response = httpx.Response(
|
|
529
|
+
200,
|
|
530
|
+
request=httpx.Request("POST", "https://api.rootly.com/v1/workflows"),
|
|
531
|
+
content=b'{"data":{"id":"wf-1"}}',
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
with patch.object(
|
|
535
|
+
transport.AuthenticatedHTTPXClient, "_get_api_token", return_value="token"
|
|
536
|
+
):
|
|
537
|
+
client = transport.AuthenticatedHTTPXClient(hosted=False, transport="stdio")
|
|
538
|
+
client.client.request = AsyncMock(return_value=response)
|
|
539
|
+
|
|
540
|
+
await client.request(
|
|
541
|
+
"POST",
|
|
542
|
+
"/v1/workflows",
|
|
543
|
+
json={"body": {"genius_workflow": {"name": "MCP verification workflow"}}},
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
_, kwargs = client.client.request.call_args
|
|
547
|
+
assert kwargs["json"] == {"genius_workflow": {"name": "MCP verification workflow"}}
|
|
548
|
+
|
|
549
|
+
@pytest.mark.asyncio
|
|
550
|
+
async def test_authenticated_client_preserves_non_envelope_payload_on_update_requests(self):
|
|
551
|
+
response = httpx.Response(
|
|
552
|
+
200,
|
|
553
|
+
request=httpx.Request("PATCH", "https://api.rootly.com/v1/workflows/wf-1"),
|
|
554
|
+
content=b'{"data":{"id":"wf-1"}}',
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
with patch.object(
|
|
558
|
+
transport.AuthenticatedHTTPXClient, "_get_api_token", return_value="token"
|
|
559
|
+
):
|
|
560
|
+
client = transport.AuthenticatedHTTPXClient(hosted=False, transport="stdio")
|
|
561
|
+
client.client.request = AsyncMock(return_value=response)
|
|
562
|
+
|
|
563
|
+
await client.request(
|
|
564
|
+
"PATCH",
|
|
565
|
+
"/v1/workflows/wf-1",
|
|
566
|
+
json={"data": {"type": "workflows", "attributes": {"name": "Updated"}}},
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
_, kwargs = client.client.request.call_args
|
|
570
|
+
assert kwargs["json"] == {
|
|
571
|
+
"data": {"type": "workflows", "attributes": {"name": "Updated"}}
|
|
572
|
+
}
|
|
573
|
+
|
|
526
574
|
def test_sanitize_log_excerpt_redacts_tokens_and_paths(self):
|
|
527
575
|
excerpt = transport._sanitize_log_excerpt(
|
|
528
576
|
'Bearer rootly_1234567890 File "/Users/spencercheng/app.py" failed'
|
|
@@ -560,6 +608,29 @@ class TestTransportModule:
|
|
|
560
608
|
assert result["data"][0]["relationships"]["alerts"] == {"count": 2}
|
|
561
609
|
assert "included" not in result
|
|
562
610
|
|
|
611
|
+
def test_normalize_request_json_payload_unwraps_body_for_write_methods(self):
|
|
612
|
+
payload = {"body": {"genius_workflow": {"name": "workflow-name"}}}
|
|
613
|
+
|
|
614
|
+
result = transport.AuthenticatedHTTPXClient._normalize_request_json_payload("POST", payload)
|
|
615
|
+
|
|
616
|
+
assert result == {"genius_workflow": {"name": "workflow-name"}}
|
|
617
|
+
|
|
618
|
+
def test_normalize_request_json_payload_does_not_unwrap_for_get(self):
|
|
619
|
+
payload = {"body": {"query": "database timeout"}}
|
|
620
|
+
|
|
621
|
+
result = transport.AuthenticatedHTTPXClient._normalize_request_json_payload("GET", payload)
|
|
622
|
+
|
|
623
|
+
assert result == payload
|
|
624
|
+
|
|
625
|
+
def test_normalize_request_json_payload_keeps_non_envelope_dict(self):
|
|
626
|
+
payload = {"data": {"type": "incidents"}, "body": {"ignored": True}}
|
|
627
|
+
|
|
628
|
+
result = transport.AuthenticatedHTTPXClient._normalize_request_json_payload(
|
|
629
|
+
"PATCH", payload
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
assert result == payload
|
|
633
|
+
|
|
563
634
|
def test_strip_heavy_user_data_keeps_profile_essentials(self):
|
|
564
635
|
data = {
|
|
565
636
|
"data": [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/.github/openapi-audit-remote-baseline.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/payload_stripping.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/incidents.py
RENAMED
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/src/rootly_mcp_server/tools/resources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/local/test_smart_tools.py
RENAMED
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/local/test_tool_allowlists.py
RENAMED
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/integration/remote/test_essential.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_oncall_severity_normalization.py
RENAMED
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_payload_stripping_module.py
RENAMED
|
File without changes
|
|
File without changes
|
{rootly_mcp_server-2.3.0 → rootly_mcp_server-2.3.2}/tests/unit/test_server_defaults_module.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|