Tool: list_rules
List security detection rules configured in Chronicle SIEM, with support for pagination and filtering.
Retrieves the definitions of detection rules currently active or configured within the Chronicle SIEM instance.
Workflow Integration: - Useful for understanding the detection capabilities currently deployed in the SIEM. - Can help identify the specific rule that generated a SIEM alert (obtained via SIEM alert tools or from case management/SOAR system details). - Provides context for rule tuning, development, or understanding alert logic.
Use Cases: - Review the logic or scope of a specific detection rule identified from an alert. - Audit the set of active detection rules within the SIEM. - Understand which rules might be relevant to a particular threat scenario or TTP. - Filter rules based on reference lists, data tables, or display name.
Args: project_id (str): Google Cloud project ID (required). customer_id (str): Chronicle customer ID (required). region (str): Chronicle region (e.g., "us", "europe") (required). page_size (int): Maximum number of rules to return. Defaults to 100. Max is 1000. page_token (str | None): Page token for pagination. filter (str | None): An optional filter string to apply to the list of rules. Supported filters (using the "has" operator, e.g., 'display_name:"foo"'): - 'reference_lists:"{full_resource_name}"' - 'data_tables:"{full_resource_name}"' - 'display_name:"{display_name}"' Note: For 'reference_lists' and 'data_tables', you must provide the full resource name, e.g., 'projects/my-project/locations/us/instances/my-customer/dataTables/my_table'.
Returns: Dict[str, Any]: Raw response from the Chronicle API, typically containing a list of rule objects with their definitions and metadata. Returns an error structure if the API call fails.
Example Usage: # List rules with a display name containing "suspicious" list_rules( project_id="my-project", customer_id="my-customer", region="us", filter='display_name:"suspicious"' )
# List rules using a specific data table by its full resource name
list_rules(
project_id="my-project",
customer_id="my-customer",
region="us",
filter='data_tables:"projects/my-project/locations/us/instances/my-customer/dataTables/my_table"'
)
Next Steps (using MCP-enabled tools): - Analyze the rule definition (e.g., the YARA-L code) to understand its trigger conditions. - Correlate rule details with specific alerts retrieved from the SIEM or case management system. - Use insights for rule optimization, false positive analysis, or developing related detections. - Document relevant rule information in associated cases using a case management tool. - Use 'get_rule' to fetch the full details of a specific rule.
The following sample demonstrate how to use curl to invoke the list_rules MCP tool.
| Curl Request |
|---|
curl --location 'https://chronicle.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_rules", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for ListRules.
ListRulesRequest
| JSON representation |
|---|
{ "projectId": string, "customerId": string, "region": string, "pageSize": integer, "pageToken": string, "filter": string } |
| Fields | |
|---|---|
projectId |
Project ID of the customer. |
customerId |
Customer ID of the customer. |
region |
Region of the customer. |
pageSize |
The maximum number of rules to return. |
pageToken |
A page token, received from a previous |
filter |
A filter string to apply to the list of rules. |
Output Schema
Response message for ListRules method.
ListRulesResponse
| JSON representation |
|---|
{
"rules": [
{
object ( |
| Fields | |
|---|---|
rules[] |
The rules from the specified instance. |
nextPageToken |
A token, which can be sent as |
Rule
| JSON representation |
|---|
{ "name": string, "revisionId": string, "displayName": string, "text": string, "author": string, "severity": { object ( |
| Fields | |
|---|---|
name |
Identifier. Full resource name for the rule. Format: |
revisionId |
Output only. The revision ID of the rule. A new revision is created whenever the rule text is changed in any way. Format: |
displayName |
Output only. Display name of the rule. Populated in BASIC view and FULL view. |
text |
The YARA-L content of the rule. Populated in FULL view. |
author |
Output only. The author of the rule. Extracted from the meta section of text. Populated in BASIC view and FULL view. |
severity |
Output only. The severity of the rule as specified in the meta section of text. Populated in BASIC view and FULL view. |
metadata |
Output only. Additional metadata specified in the meta section of text. Populated in FULL view. An object containing a list of |
createTime |
Output only. The timestamp of when the rule was created. Populated in FULL view. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
revisionCreateTime |
Output only. The timestamp of when the rule revision was created. Populated in FULL, REVISION_METADATA_ONLY views. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
compilationState |
Output only. The current compilation state of the rule. Populated in FULL view. |
type |
Output only. User-facing type of the rule. Extracted from the events section of rule text. Populated in BASIC view and FULL view. |
referenceLists[] |
Output only. Resource names of the reference lists used in this rule. Populated in FULL view. |
allowedRunFrequencies[] |
Output only. The run frequencies that are allowed for the rule. Populated in BASIC view and FULL view. |
etag |
The etag for this rule. If this is provided on update, the request will succeed if and only if it matches the server-computed value, and will fail with an ABORTED error otherwise. Populated in BASIC view and FULL view. |
scope |
Resource name of the DataAccessScope bound to this rule. Populated in BASIC view and FULL view. If reference lists are used in the rule, validations will be performed against this scope to ensure that the reference lists are compatible with both the user's and the rule's scopes. The scope should be in the format: |
compilationDiagnostics[] |
Output only. A list of a rule's corresponding compilation diagnostic messages such as compilation errors and compilation warnings. Populated in FULL view. |
nearRealTimeLiveRuleEligible |
Output only. Indicate the rule can run in near real time live rule. If this is true, the rule uses the near real time live rule when the run frequency is set to LIVE. |
dataTables[] |
Output only. Resource names of the data tables used in this rule. |
inputsUsed |
Output only. The set of inputs used in the rule. For example, if the rule uses $e.principal.hostname, then the uses_udm field will be true. |
ruleOwner |
Output only. The rule owner (i.e., whether the rule is customer or Google-authored). |
tags[] |
Output only. Resource names of the tags used in this rule. Example: [ "projects/{project}/locations/{location}/instances/{instance}/ tags/google.mitre.TA000", "projects/{project}/locations/{location}/instances/{instance}/ "tags/google.CloudThreats", ] |
alertingEnabled |
Output only. Alerting status for the rule. |
liveModeEnabled |
Output only. Live Status for the rule. |
archived |
Output only. The archive state of the rule deployment. Cannot be set to true unless enabled is set to false. If set to true, alerting will automatically be set to false. If currently set to true, enabled, alerting, and run_frequency cannot be updated. |
runFrequency |
Output only. The chosen run frequencies for the rule. |
currentDayDetectionCount |
Output only. The number of matched events for the current day in UTC time. |
executionState |
Output only. The execution state of the rule. |
Severity
| JSON representation |
|---|
{ "displayName": string } |
| Fields | |
|---|---|
displayName |
The display name of the severity level. Extracted from the meta section of the rule text. |
MetadataEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
CompilationDiagnostic
| JSON representation |
|---|
{ "message": string, "position": { object ( |
| Fields | |
|---|---|
message |
Output only. The diagnostic message. |
position |
Output only. The approximate position in the rule text associated with the compilation diagnostic. Compilation Position may be empty. |
severity |
Output only. The severity of a rule's compilation diagnostic. |
uri |
Output only. Link to documentation that describes a diagnostic in more detail. |
CompilationPosition
| JSON representation |
|---|
{ "startLine": integer, "startColumn": integer, "endLine": integer, "endColumn": integer } |
| Fields | |
|---|---|
startLine |
Output only. Start line number, beginning at 1. |
startColumn |
Output only. Start column number, beginning at 1. |
endLine |
Output only. End line number, beginning at 1. |
endColumn |
Output only. End column number, beginning at 1. |
InputsUsed
| JSON representation |
|---|
{ "usesUdm": boolean, "usesEntity": boolean, "usesDetection": boolean } |
| Fields | |
|---|---|
usesUdm |
Optional. Whether the rule queries UDM events. |
usesEntity |
Optional. Whether the rule queries entity events. |
usesDetection |
Optional. Whether the rule queries detections. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌