Skip to content

Commit ed68111

Browse files
authored
Document create, update, and delete detection rule MCP tools (#37687)
* [NOJIRA][docs] Document create, update, and delete detection rule MCP tools Add three new write tools to the security MCP toolset docs: - create_datadog_security_detection_rule - update_datadog_security_detection_rule - delete_datadog_security_detection_rules Updated in both security/mcp_server.md and mcp_server/tools.md. Also updated the use cases section to reflect write capabilities. * [docs] Remove datadog_mcp:created/updated tag mentions from detection rule tool docs * [docs] Add enable/disable examples to update detection rule tool docs * Fix wording * Remove em dash.
1 parent 2e6d814 commit ed68111

2 files changed

Lines changed: 43 additions & 3 deletions

File tree

content/en/mcp_server/tools.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,34 @@ Retrieves security detection rules. Supports two modes: provide `rule_id` to get
11931193
- Get the full definition of detection rule `abc-123-def`.
11941194
- What thresholds and group-by fields does this detection rule use?
11951195

1196+
### `create_datadog_security_detection_rule`
1197+
*Toolset: **security***\
1198+
*Permissions Required: `Security Monitoring Rules Write`*\
1199+
Creates a new detection rule. Call `get_datadog_security_detection_rules_schema` first to fetch the payload grammar, then supply a complete rule payload. On success, returns the full rule including its server-assigned ID.
1200+
1201+
- Create a threshold detection rule that fires when more than 10 failed logins occur from the same IP in 5 minutes.
1202+
- Author a new log detection rule for CloudTrail that alerts on IAM privilege escalation.
1203+
- Create a detection rule for `source:nginx` that generates a signal when error rate exceeds 100 per minute.
1204+
1205+
### `update_datadog_security_detection_rule`
1206+
*Toolset: **security***\
1207+
*Permissions Required: `Security Monitoring Rules Write`*\
1208+
Updates an existing custom detection rule by replacing it entirely. Call `get_datadog_security_detection_rules` first to fetch the current rule body, modify the fields you need, and submit the full updated object. Cannot update Datadog-shipped default rules.
1209+
1210+
- Enable detection rule `abc-123-def`.
1211+
- Disable the brute force detection rule.
1212+
- Update the threshold on my brute force detection rule from 10 to 20 failed logins.
1213+
- Add a new case to detection rule `abc-123-def` that fires at critical severity.
1214+
- Change the group-by field on this rule from `@usr.ip` to `@network.client.ip`.
1215+
1216+
### `delete_datadog_security_detection_rules`
1217+
*Toolset: **security***\
1218+
*Permissions Required: `Security Monitoring Rules Write`*\
1219+
Deletes one or more custom detection rules by ID. Only custom (non-default) rules can be deleted. Default rules return 403. Each rule is authorized individually; failures appear in `failed_rules` without aborting the batch.
1220+
1221+
- Delete detection rule `abc-123-def`.
1222+
- Remove these three test detection rules I created earlier.
1223+
11961224
### `get_datadog_security_suppressions`
11971225
*Toolset: **security***\
11981226
*Permissions Required: `Security Monitoring Suppressions Read`*\
@@ -1377,7 +1405,7 @@ Fetches aggregated code coverage summary metrics for a repository commit, includ
13771405
### `get_datadog_code_coverage_pr_summary`
13781406
*Toolset: **software-delivery***\
13791407
*Permissions Required: `Code Coverage read`*\
1380-
Fetches aggregated code coverage summary metrics for a pull request, including total coverage, patch coverage, and service or codeowner breakdowns.
1408+
Fetches aggregated code coverage summary metrics for a pull request, including total coverage, patch coverage, and service or codeowner breakdowns.
13811409

13821410
- Show me the code coverage for PR #123 in `github.com/my-org/my-repo`.
13831411
- What's the patch coverage for pull request #456 in `github.com/my-org/my-repo`?
@@ -1389,7 +1417,7 @@ Fetches per-file code coverage line data for a repository commit, branch, or pul
13891417

13901418
- Show me per-file coverage for PR #123 in `github.com/my-org/my-repo`.
13911419
- Get changed-file coverage for commit `abc123abc123abc123abc123abc123abc123abcd` in `github.com/my-org/my-repo`.
1392-
- Show coverage for the `main` branch of `github.com/my-org/my-repo`, filtered by codeowner `@my-org/my-team`.`
1420+
- Show coverage for the `main` branch of `github.com/my-org/my-repo`, filtered by codeowner `@my-org/my-team`.`
13931421

13941422
### `get_datadog_test_optimization_settings`
13951423
*Toolset: **software-delivery***\

content/en/security/mcp_server.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You can use the `security` toolset to:
4040
- **Investigate specific findings**: Retrieve full details for a set of findings to understand scope, affected resources, and remediation context.
4141
- **Triage security findings**: Create Jira issues, ServiceNow tickets, or Case Management cases for findings. Assign findings to team members, or mute false positives and accepted risks.
4242
- **Correlate signals and findings**: Cross-reference active security signals with open findings to determine whether an alert is tied to a known posture issue.
43-
- **Inspect and manage detection rules**: List and retrieve detection rule definitions to understand what logic is generating signals.
43+
- **Inspect and manage detection rules**: List, retrieve, create, update, and delete detection rules to understand and manage the logic generating signals.
4444
- **Manage suppressions**: Create, update, and delete suppressions to silence noisy rules for specific conditions without disabling them entirely.
4545
- **Remediate vulnerabilities with an AI agent**: Pull library vulnerability findings, including code location and remediation guidance, and pass them to your AI agent to apply patches directly in your codebase.
4646

@@ -126,6 +126,18 @@ The `security` toolset exposes the following tools to your AI client. Each tool
126126
: Retrieves security detection rules. Supports two modes: provide `rule_id` to get the full definition of a single rule by ID, or omit `rule_id` to list rules (optionally filtered with `query` and token-limited with `max_tokens`). The two modes are mutually exclusive.
127127
: *Permissions required: `Security Monitoring Rules Read`*
128128

129+
`create_datadog_security_detection_rule`
130+
: Creates a new detection rule. Call `get_datadog_security_detection_rules_schema` first to fetch the required payload grammar, then supply a complete rule payload. On success, returns the full rule including its server-assigned ID.
131+
: *Permissions required: `Security Monitoring Rules Write`*
132+
133+
`update_datadog_security_detection_rule`
134+
: Updates an existing custom detection rule by replacing it entirely. Use this to enable or disable a rule, change thresholds, add cases, and more. Call `get_datadog_security_detection_rules` first to fetch the current rule body, modify the fields you need to change, and submit the full updated object. Cannot update Datadog-shipped default rules. On success, returns the full updated rule.
135+
: *Permissions required: `Security Monitoring Rules Write`*
136+
137+
`delete_datadog_security_detection_rules`
138+
: Deletes one or more custom detection rules by ID. Only custom (non-default) rules can be deleted. Each rule is authorized individually; rules that cannot be deleted appear in `failed_rules` without aborting the batch. Returns `deleted_rules` and `failed_rules`.
139+
: *Permissions required: `Security Monitoring Rules Write`*
140+
129141
### Suppressions
130142

131143
`get_datadog_security_suppressions`

0 commit comments

Comments
 (0)