You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tools/looker): add support for pulse, vacuum and analyze audit and performance functions on a Looker instance (googleapis#1581)
This pull request adds 3 new tools, looker-health-pulse,
looker-health-vacuum, and looker-health-analyze, as capabilities to the
Looker MCP Toolbox. These tools are designed to provide health checks
and auditing analytical insights for a Looker instance (they come from
the popular [Looker CLI tool
Henry](https://github.com/looker-open-source/henry)).
**looker-health-pulse**
This tool performs various health checks on a Looker instance. It can be
used to:
- Check database connection status.
- Identify dashboards with slow-running or erroring queries.
- List slow explores and failed schedules.
- Find enabled legacy features.
**looker-health-analyze**
This tool performs analytical tasks on Looker projects, models, and
explores. It can be used to:
- Analyze projects to check Git status and validation.
- Analyze models to count explores and identify unused ones.
- Analyze explores to find unused joins and fields. *Unused is defined
as not being queried in the last 90 days.*
**looker-health-vacuum**
This tool finds unnused explores, joins, and fields based on user
defined search conditions (namely, timeframe and min query #):
- Identify unnused explores for specific or all models
- Identify unnused fields or joins for specific explores or all explores
within a model
This update targets Looker administrators, as it provides new
capabilities to monitor the health and efficiency of their Looker
instances and connect those capabilities to MCP Clients.
🛠️ Fixesgoogleapis#1415
---------
Co-authored-by: Luka Fontanilla <maluka@google.com>
"looker-health-analyze" provides a set of analytical commands for a Looker instance, allowing users to analyze projects, models, and explores.
7
+
aliases:
8
+
- /resources/tools/looker-health-analyze
9
+
---
10
+
11
+
## About
12
+
13
+
The `looker-health-analyze` tool performs various analysis tasks on a Looker instance. The `action` parameter selects the type of analysis to perform:
14
+
15
+
-`projects`: Analyzes all projects or a specified project, reporting on the number of models and view files, as well as Git connection and validation status.
16
+
-`models`: Analyzes all models or a specified model, providing a count of explores, unused explores, and total query counts.
17
+
-`explores`: Analyzes all explores or a specified explore, reporting on the number of joins, unused joins, fields, unused fields, and query counts. Being classified as **Unused** is determined by whether a field has been used as a field or filter within the past 90 days in production.
18
+
19
+
## Parameters
20
+
21
+
|**field**|**type**|**required**|**description**|
22
+
| :--- | :--- | :--- | :--- |
23
+
| kind | string | true | Must be "looker-health-analyze" |
24
+
| source | string | true | Looker source name |
25
+
| action | string | true | The analysis to perform: `projects`, `models`, or `explores`. |
26
+
| project | string | false | The name of the Looker project to analyze. |
27
+
| model | string | false | The name of the Looker model to analyze. Required for `explores` actions. |
28
+
| explore | string | false | The name of the Looker explore to analyze. Required for the `explores` action. |
29
+
| timeframe | int | false | The timeframe in days to analyze. Defaults to 90. |
30
+
| min_queries | int | false | The minimum number of queries for a model or explore to be considered used. Defaults to 1. |
31
+
32
+
## Example
33
+
34
+
Analyze all models in `thelook` project.
35
+
36
+
```yaml
37
+
tools:
38
+
analyze-tool:
39
+
kind: looker-health-analyze
40
+
source: looker-source
41
+
description: |
42
+
Analyzes Looker projects, models, and explores.
43
+
Specify the `action` parameter to select the type of analysis.
44
+
parameters:
45
+
action: models
46
+
project: "thelook"
47
+
48
+
Analyze all the explores in the `ecomm` model of `thelook` project. Specifically look at usage within the past 20 days. Usage minimum should be at least 10 queries.
49
+
50
+
```yaml
51
+
tools:
52
+
analyze-tool:
53
+
kind: looker-health-analyze
54
+
source: looker-source
55
+
description: |
56
+
Analyzes Looker projects, models, and explores.
57
+
Specify the `action` parameter to select the type of analysis.
"looker-health-pulse" performs health checks on a Looker instance, with multiple actions available (e.g., checking database connections, dashboard performance, etc).
7
+
aliases:
8
+
- /resources/tools/looker-health-pulse
9
+
---
10
+
11
+
## About
12
+
13
+
The `looker-health-pulse` tool performs health checks on a Looker instance. The `action` parameter selects the type of check to perform:
14
+
15
+
-`check_db_connections`: Checks all database connections, runs supported tests, and reports query counts.
16
+
-`check_dashboard_performance`: Finds dashboards with slow running queries in the last 7 days.
17
+
-`check_dashboard_errors`: Lists dashboards with erroring queries in the last 7 days.
18
+
-`check_explore_performance`: Lists the slowest explores in the last 7 days and reports average query runtime.
19
+
-`check_schedule_failures`: Lists schedules that have failed in the last 7 days.
20
+
-`check_legacy_features`: Lists enabled legacy features. (*To note, this function is not available in Looker Core. You will get an error running this command with a Core instance configured.*)
"looker-health-vacuum" provides a set of commands to audit and identify unused LookML objects in a Looker instance.
7
+
aliases:
8
+
- /resources/tools/looker-health-vacuum
9
+
---
10
+
11
+
## About
12
+
13
+
The `looker-health-vacuum` tool helps you identify unused LookML objects such as models, explores, joins, and fields. The `action` parameter selects the type of vacuum to perform:
14
+
15
+
-`models`: Identifies unused explores within a model.
16
+
-`explores`: Identifies unused joins and fields within an explore.
17
+
18
+
## Parameters
19
+
20
+
|**field**|**type**|**required**|**description**|
21
+
| :--- | :--- | :--- | :--- |
22
+
| kind | string | true | Must be "looker-health-vacuum" |
23
+
| source | string | true | Looker source name |
24
+
| action | string | true | The vacuum to perform: `models`, or `explores`. |
25
+
| project | string | false | The name of the Looker project to vacuum. |
26
+
| model | string | false | The name of the Looker model to vacuum. |
27
+
| explore | string | false | The name of the Looker explore to vacuum. |
28
+
| timeframe | int | false | The timeframe in days to analyze for usage. Defaults to 90. |
29
+
| min_queries | int | false | The minimum number of queries for an object to be considered used. Defaults to 1. |
30
+
31
+
## Example
32
+
33
+
Identify unnused fields (*in this case, less than 1 query in the last 20 days*) and joins in the `order_items` explore and `thelook` model
34
+
35
+
```yaml
36
+
tools:
37
+
vacuum-tool:
38
+
kind: looker-health-vacuum
39
+
source: looker-source
40
+
description: |
41
+
Vacuums the Looker instance by identifying unused explores, fields, and joins.
42
+
parameters:
43
+
action: explores
44
+
project: "thelook_core"
45
+
model: "thelook"
46
+
explore: "order_items"
47
+
timeframe: 20
48
+
min_queries: 1
49
+
```
50
+
51
+
Identify unnused explores across all models in `thelook_core` project.
52
+
53
+
```yaml
54
+
tools:
55
+
vacuum-tool:
56
+
kind: looker-health-vacuum
57
+
source: looker-source
58
+
description: |
59
+
Vacuums the Looker instance by identifying unused explores, fields, and joins.
0 commit comments