run-kql-template
Execute pre-built KQL queries from templates with parameter replacements to query Azure Resource Graph and retrieve resource information.
Instructions
Execute a KQL template from kql/ by name, with optional {{param}} replacements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | Optional key/value replacements for {{key}} placeholders in the template | |
| subscription_ids | No | Optional explicit subscription IDs | |
| template_name | Yes | Template filename without extension (looks for .md or .kql in kql folder) | |
| tenant_name | No | Optional configured tenant name | |
| top | No | Max rows to return (default: 100) | |
| use_all_subscriptions | No | If no subscriptions are provided, attempt to auto-discover all accessible subscriptions (default: true) |
Input Schema (JSON Schema)
{
"properties": {
"params": {
"description": "Optional key/value replacements for {{key}} placeholders in the template",
"type": "object"
},
"subscription_ids": {
"description": "Optional explicit subscription IDs",
"items": {
"type": "string"
},
"type": "array"
},
"template_name": {
"description": "Template filename without extension (looks for .md or .kql in kql folder)",
"type": "string"
},
"tenant_name": {
"description": "Optional configured tenant name",
"type": "string"
},
"top": {
"default": 100,
"description": "Max rows to return (default: 100)",
"type": "integer"
},
"use_all_subscriptions": {
"default": true,
"description": "If no subscriptions are provided, attempt to auto-discover all accessible subscriptions (default: true)",
"type": "boolean"
}
},
"required": [
"template_name"
],
"type": "object"
}