query_workspace
Run bounded, read-only KQL queries against a single Log Analytics workspace to retrieve telemetry, logs, events, metrics, and time-series data. Use it for workspace analytics, not Azure resource inventory.
Instructions
Use for telemetry, logs, events, metrics, and time-series data stored in a Log Analytics workspace. Run bounded, read-only KQL against one workspace. Do not use for Azure resource inventory or configuration; use query_azure_resources for those.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspaceId": "<workspaceId>",
"query": "<query>",
"timespan": "<timespan>"
},
"name": "query_workspace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Read-only KQL with a result-limiting operator. | |
| timespan | Yes | ISO 8601 duration back from now (P7D, PT12H), or an interval: start/end (2026-10-01T00:00:00Z/2026-10-02T00:00:00Z) or start/duration (2026-10-01T08:00:00Z/PT6H). Times need Z or an offset. | |
| workspaceId | Yes | Workspace ID (GUID) or the workspace's full ARM resource ID; list_workspaces returns both. |