forked from googleapis/mcp-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlooker.yaml
More file actions
1205 lines (1044 loc) · 53.7 KB
/
looker.yaml
File metadata and controls
1205 lines (1044 loc) · 53.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
sources:
looker-source:
kind: looker
base_url: ${LOOKER_BASE_URL}
client_id: ${LOOKER_CLIENT_ID:}
client_secret: ${LOOKER_CLIENT_SECRET:}
verify_ssl: ${LOOKER_VERIFY_SSL:true}
timeout: 600s
use_client_oauth: ${LOOKER_USE_CLIENT_OAUTH:false}
show_hidden_models: ${LOOKER_SHOW_HIDDEN_MODELS:true}
show_hidden_explores: ${LOOKER_SHOW_HIDDEN_EXPLORES:true}
show_hidden_fields: ${LOOKER_SHOW_HIDDEN_FIELDS:true}
tools:
get_models:
kind: looker-get-models
source: looker-source
description: |
This tool retrieves a list of available LookML models in the Looker instance.
LookML models define the data structure and relationships that users can query.
The output includes details like the model's `name` and `label`, which are
essential for subsequent calls to tools like `get_explores` or `query`.
This tool takes no parameters.
get_explores:
kind: looker-get-explores
source: looker-source
description: |
This tool retrieves a list of explores defined within a specific LookML model.
Explores represent a curated view of your data, typically joining several
tables together to allow for focused analysis on a particular subject area.
The output provides details like the explore's `name` and `label`.
Parameters:
- model_name (required): The name of the LookML model, obtained from `get_models`.
get_dimensions:
kind: looker-get-dimensions
source: looker-source
description: |
This tool retrieves a list of dimensions defined within a specific Looker explore.
Dimensions are non-aggregatable attributes or characteristics of your data
(e.g., product name, order date, customer city) that can be used for grouping,
filtering, or segmenting query results.
Parameters:
- model_name (required): The name of the LookML model, obtained from `get_models`.
- explore_name (required): The name of the explore within the model, obtained from `get_explores`.
Output Details:
- If a dimension includes a `suggestions` field, its contents are valid values
that can be used directly as filters for that dimension.
- If a `suggest_explore` and `suggest_dimension` are provided, you can query
that specified explore and dimension to retrieve a list of valid filter values.
get_measures:
kind: looker-get-measures
source: looker-source
description: |
This tool retrieves a list of measures defined within a specific Looker explore.
Measures are aggregatable metrics (e.g., total sales, average price, count of users)
that are used for calculations and quantitative analysis in your queries.
Parameters:
- model_name (required): The name of the LookML model, obtained from `get_models`.
- explore_name (required): The name of the explore within the model, obtained from `get_explores`.
Output Details:
- If a measure includes a `suggestions` field, its contents are valid values
that can be used directly as filters for that measure.
- If a `suggest_explore` and `suggest_dimension` are provided, you can query
that specified explore and dimension to retrieve a list of valid filter values.
get_filters:
kind: looker-get-filters
source: looker-source
description: |
This tool retrieves a list of "filter-only fields" defined within a specific
Looker explore. These are special fields defined in LookML specifically to
create user-facing filter controls that do not directly affect the `GROUP BY`
clause of the SQL query. They are often used in conjunction with liquid templating
to create dynamic queries.
Note: Regular dimensions and measures can also be used as filters in a query.
This tool *only* returns fields explicitly defined as `filter:` in LookML.
Parameters:
- model_name (required): The name of the LookML model, obtained from `get_models`.
- explore_name (required): The name of the explore within the model, obtained from `get_explores`.
get_parameters:
kind: looker-get-parameters
source: looker-source
description: |
This tool retrieves a list of parameters defined within a specific Looker explore.
LookML parameters are dynamic input fields that allow users to influence query
behavior without directly modifying the underlying LookML. They are often used
with `liquid` templating to create flexible dashboards and reports, enabling
users to choose dimensions, measures, or other query components at runtime.
Parameters:
- model_name (required): The name of the LookML model, obtained from `get_models`.
- explore_name (required): The name of the explore within the model, obtained from `get_explores`.
query:
kind: looker-query
source: looker-source
description: |
This tool runs a query against a LookML model and returns the results in JSON format.
Required Parameters:
- model_name: The name of the LookML model (from `get_models`).
- explore_name: The name of the explore (from `get_explores`).
- fields: A list of field names (dimensions, measures, filters, or parameters) to include in the query.
Optional Parameters:
- pivots: A list of fields to pivot the results by. These fields must also be included in the `fields` list.
- filters: A map of filter expressions, e.g., `{"view.field": "value", "view.date": "7 days"}`.
- Do not quote field names.
- Use `not null` instead of `-NULL`.
- If a value contains a comma, enclose it in single quotes (e.g., "'New York, NY'").
- sorts: A list of fields to sort by, optionally including direction (e.g., `["view.field desc"]`).
- limit: Row limit (default 500). Use "-1" for unlimited.
- query_timezone: specific timezone for the query (e.g. `America/Los_Angeles`).
Note: Use `get_dimensions`, `get_measures`, `get_filters`, and `get_parameters` to find valid fields.
query_sql:
kind: looker-query-sql
source: looker-source
description: |
This tool generates the underlying SQL query that Looker would execute
against the database for a given set of parameters. It is useful for
understanding how Looker translates a request into SQL.
Parameters:
All parameters for this tool are identical to those of the `query` tool.
This includes `model_name`, `explore_name`, `fields` (required),
and optional parameters like `pivots`, `filters`, `sorts`, `limit`, and `query_timezone`.
Output:
The result of this tool is the raw SQL text.
query_url:
kind: looker-query-url
source: looker-source
description: |
This tool generates a shareable URL for a Looker query, allowing users to
explore the query further within the Looker UI. It returns the generated URL,
along with the `query_id` and `slug`.
Parameters:
All query parameters (e.g., `model_name`, `explore_name`, `fields`, `pivots`,
`filters`, `sorts`, `limit`, `query_timezone`) are the same as the `query` tool.
Additionally, it accepts an optional `vis_config` parameter:
- vis_config (optional): A JSON object that controls the default visualization
settings for the generated query.
vis_config Details:
The `vis_config` object supports a wide range of properties for various chart types.
Here are some notes on making visualizations.
### Cartesian Charts (Area, Bar, Column, Line, Scatter)
These chart types share a large number of configuration options.
**General**
* `type`: The type of visualization (`looker_area`, `looker_bar`, `looker_column`, `looker_line`, `looker_scatter`).
* `series_types`: Override the chart type for individual series.
* `show_view_names`: Display view names in labels and tooltips (`true`/`false`).
* `series_labels`: Provide custom names for series.
**Styling & Colors**
* `colors`: An array of color values to be used for the chart series.
* `series_colors`: A mapping of series names to specific color values.
* `color_application`: Advanced controls for color palette application (collection, palette, reverse, etc.).
* `font_size`: Font size for labels (e.g., '12px').
**Legend**
* `hide_legend`: Show or hide the chart legend (`true`/`false`).
* `legend_position`: Placement of the legend (`'center'`, `'left'`, `'right'`).
**Axes**
* `swap_axes`: Swap the X and Y axes (`true`/`false`).
* `x_axis_scale`: Scale of the x-axis (`'auto'`, `'ordinal'`, `'linear'`, `'time'`).
* `x_axis_reversed`, `y_axis_reversed`: Reverse the direction of an axis (`true`/`false`).
* `x_axis_gridlines`, `y_axis_gridlines`: Display gridlines for an axis (`true`/`false`).
* `show_x_axis_label`, `show_y_axis_label`: Show or hide the axis title (`true`/`false`).
* `show_x_axis_ticks`, `show_y_axis_ticks`: Show or hide axis tick marks (`true`/`false`).
* `x_axis_label`, `y_axis_label`: Set a custom title for an axis.
* `x_axis_datetime_label`: A format string for datetime labels on the x-axis (e.g., `'%Y-%m'`).
* `x_padding_left`, `x_padding_right`: Adjust padding on the ends of the x-axis.
* `x_axis_label_rotation`, `x_axis_label_rotation_bar`: Set rotation for x-axis labels.
* `x_axis_zoom`, `y_axis_zoom`: Enable zooming on an axis (`true`/`false`).
* `y_axes`: An array of configuration objects for multiple y-axes.
**Data & Series**
* `stacking`: How to stack series (`''` for none, `'normal'`, `'percent'`).
* `ordering`: Order of series in a stack (`'none'`, etc.).
* `limit_displayed_rows`: Enable or disable limiting the number of rows displayed (`true`/`false`).
* `limit_displayed_rows_values`: Configuration for the row limit (e.g., `{ "first_last": "first", "show_hide": "show", "num_rows": 10 }`).
* `discontinuous_nulls`: How to render null values in line charts (`true`/`false`).
* `point_style`: Style for points on line and area charts (`'none'`, `'circle'`, `'circle_outline'`).
* `series_point_styles`: Override point styles for individual series.
* `interpolation`: Line interpolation style (`'linear'`, `'monotone'`, `'step'`, etc.).
* `show_value_labels`: Display values on data points (`true`/`false`).
* `label_value_format`: A format string for value labels.
* `show_totals_labels`: Display total labels on stacked charts (`true`/`false`).
* `totals_color`: Color for total labels.
* `show_silhouette`: Display a "silhouette" of hidden series in stacked charts (`true`/`false`).
* `hidden_series`: An array of series names to hide from the visualization.
**Scatter/Bubble Specific**
* `size_by_field`: The field used to determine the size of bubbles.
* `color_by_field`: The field used to determine the color of bubbles.
* `plot_size_by_field`: Whether to display the size-by field in the legend.
* `cluster_points`: Group nearby points into clusters (`true`/`false`).
* `quadrants_enabled`: Display quadrants on the chart (`true`/`false`).
* `quadrant_properties`: Configuration for quadrant labels and colors.
* `custom_quadrant_value_x`, `custom_quadrant_value_y`: Set quadrant boundaries as a percentage.
* `custom_quadrant_point_x`, `custom_quadrant_point_y`: Set quadrant boundaries to a specific value.
**Miscellaneous**
* `reference_lines`: Configuration for displaying reference lines.
* `trend_lines`: Configuration for displaying trend lines.
* `trellis`: Configuration for creating trellis (small multiple) charts.
* `crossfilterEnabled`, `crossfilters`: Configuration for cross-filtering interactions.
### Boxplot
* Inherits most of the Cartesian chart options.
* `type`: Must be `looker_boxplot`.
### Funnel
* `type`: Must be `looker_funnel`.
* `orientation`: How data is read (`'automatic'`, `'dataInRows'`, `'dataInColumns'`).
* `percentType`: How percentages are calculated (`'percentOfMaxValue'`, `'percentOfPriorRow'`).
* `labelPosition`, `valuePosition`, `percentPosition`: Placement of labels (`'left'`, `'right'`, `'inline'`, `'hidden'`).
* `labelColor`, `labelColorEnabled`: Set a custom color for labels.
* `labelOverlap`: Allow labels to overlap (`true`/`false`).
* `barColors`: An array of colors for the funnel steps.
* `color_application`: Advanced color palette controls.
* `crossfilterEnabled`, `crossfilters`: Configuration for cross-filtering.
### Pie / Donut
* Pie charts must have exactly one dimension and one numerical measure.
* `type`: Must be `looker_pie`.
* `value_labels`: Where to display values (`'legend'`, `'labels'`).
* `label_type`: The format of data labels (`'labPer'`, `'labVal'`, `'lab'`, `'val'`, `'per'`).
* `start_angle`, `end_angle`: The start and end angles of the pie chart.
* `inner_radius`: The inner radius, used to create a donut chart.
* `series_colors`, `series_labels`: Override colors and labels for specific slices.
* `color_application`: Advanced color palette controls.
* `crossfilterEnabled`, `crossfilters`: Configuration for cross-filtering.
* `advanced_vis_config`: A string containing JSON for advanced Highcharts configuration.
### Waterfall
* Inherits most of the Cartesian chart options.
* `type`: Must be `looker_waterfall`.
* `up_color`: Color for positive (increasing) values.
* `down_color`: Color for negative (decreasing) values.
* `total_color`: Color for the total bar.
### Word Cloud
* `type`: Must be `looker_wordcloud`.
* `rotation`: Enable random word rotation (`true`/`false`).
* `colors`: An array of colors for the words.
* `color_application`: Advanced color palette controls.
* `crossfilterEnabled`, `crossfilters`: Configuration for cross-filtering.
These are some sample vis_config settings.
A bar chart -
{{
"defaults_version": 1,
"label_density": 25,
"legend_position": "center",
"limit_displayed_rows": false,
"ordering": "none",
"plot_size_by_field": false,
"point_style": "none",
"show_null_labels": false,
"show_silhouette": false,
"show_totals_labels": false,
"show_value_labels": false,
"show_view_names": false,
"show_x_axis_label": true,
"show_x_axis_ticks": true,
"show_y_axis_labels": true,
"show_y_axis_ticks": true,
"stacking": "normal",
"totals_color": "#808080",
"trellis": "",
"type": "looker_bar",
"x_axis_gridlines": false,
"x_axis_reversed": false,
"x_axis_scale": "auto",
"x_axis_zoom": true,
"y_axis_combined": true,
"y_axis_gridlines": true,
"y_axis_reversed": false,
"y_axis_scale_mode": "linear",
"y_axis_tick_density": "default",
"y_axis_tick_density_custom": 5,
"y_axis_zoom": true
}}
A column chart with an option advanced_vis_config -
{{
"advanced_vis_config": "{ chart: { type: 'pie', spacingBottom: 50, spacingLeft: 50, spacingRight: 50, spacingTop: 50, }, legend: { enabled: false, }, plotOptions: { pie: { dataLabels: { enabled: true, format: '\u003cb\u003e{key}\u003c/b\u003e\u003cspan style=\"font-weight: normal\"\u003e - {percentage:.2f}%\u003c/span\u003e', }, showInLegend: false, }, }, series: [], }",
"colors": [
"grey"
],
"defaults_version": 1,
"hidden_fields": [],
"label_density": 25,
"legend_position": "center",
"limit_displayed_rows": false,
"note_display": "below",
"note_state": "collapsed",
"note_text": "Unsold inventory only",
"ordering": "none",
"plot_size_by_field": false,
"point_style": "none",
"series_colors": {},
"show_null_labels": false,
"show_silhouette": false,
"show_totals_labels": false,
"show_value_labels": true,
"show_view_names": false,
"show_x_axis_label": true,
"show_x_axis_ticks": true,
"show_y_axis_labels": true,
"show_y_axis_ticks": true,
"stacking": "normal",
"totals_color": "#808080",
"trellis": "",
"type": "looker_column",
"x_axis_gridlines": false,
"x_axis_reversed": false,
"x_axis_scale": "auto",
"x_axis_zoom": true,
"y_axes": [],
"y_axis_combined": true,
"y_axis_gridlines": true,
"y_axis_reversed": false,
"y_axis_scale_mode": "linear",
"y_axis_tick_density": "default",
"y_axis_tick_density_custom": 5,
"y_axis_zoom": true
}}
A line chart -
{{
"defaults_version": 1,
"hidden_pivots": {},
"hidden_series": [],
"interpolation": "linear",
"label_density": 25,
"legend_position": "center",
"limit_displayed_rows": false,
"plot_size_by_field": false,
"point_style": "none",
"series_types": {},
"show_null_points": true,
"show_value_labels": false,
"show_view_names": false,
"show_x_axis_label": true,
"show_x_axis_ticks": true,
"show_y_axis_labels": true,
"show_y_axis_ticks": true,
"stacking": "",
"trellis": "",
"type": "looker_line",
"x_axis_gridlines": false,
"x_axis_reversed": false,
"x_axis_scale": "auto",
"y_axis_combined": true,
"y_axis_gridlines": true,
"y_axis_reversed": false,
"y_axis_scale_mode": "linear",
"y_axis_tick_density": "default",
"y_axis_tick_density_custom": 5
}}
An area chart -
{{
"defaults_version": 1,
"interpolation": "linear",
"label_density": 25,
"legend_position": "center",
"limit_displayed_rows": false,
"plot_size_by_field": false,
"point_style": "none",
"series_types": {},
"show_null_points": true,
"show_silhouette": false,
"show_totals_labels": false,
"show_value_labels": false,
"show_view_names": false,
"show_x_axis_label": true,
"show_x_axis_ticks": true,
"show_y_axis_labels": true,
"show_y_axis_ticks": true,
"stacking": "normal",
"totals_color": "#808080",
"trellis": "",
"type": "looker_area",
"x_axis_gridlines": false,
"x_axis_reversed": false,
"x_axis_scale": "auto",
"x_axis_zoom": true,
"y_axis_combined": true,
"y_axis_gridlines": true,
"y_axis_reversed": false,
"y_axis_scale_mode": "linear",
"y_axis_tick_density": "default",
"y_axis_tick_density_custom": 5,
"y_axis_zoom": true
}}
A scatter plot -
{{
"cluster_points": false,
"custom_quadrant_point_x": 5,
"custom_quadrant_point_y": 5,
"custom_value_label_column": "",
"custom_x_column": "",
"custom_y_column": "",
"defaults_version": 1,
"hidden_fields": [],
"hidden_pivots": {},
"hidden_points_if_no": [],
"hidden_series": [],
"interpolation": "linear",
"label_density": 25,
"legend_position": "center",
"limit_displayed_rows": false,
"limit_displayed_rows_values": {
"first_last": "first",
"num_rows": 0,
"show_hide": "hide"
},
"plot_size_by_field": false,
"point_style": "circle",
"quadrant_properties": {
"0": {
"color": "",
"label": "Quadrant 1"
},
"1": {
"color": "",
"label": "Quadrant 2"
},
"2": {
"color": "",
"label": "Quadrant 3"
},
"3": {
"color": "",
"label": "Quadrant 4"
}
},
"quadrants_enabled": false,
"series_labels": {},
"series_types": {},
"show_null_points": false,
"show_value_labels": false,
"show_view_names": true,
"show_x_axis_label": true,
"show_x_axis_ticks": true,
"show_y_axis_labels": true,
"show_y_axis_ticks": true,
"size_by_field": "roi",
"stacking": "normal",
"swap_axes": true,
"trellis": "",
"type": "looker_scatter",
"x_axis_gridlines": false,
"x_axis_reversed": false,
"x_axis_scale": "auto",
"x_axis_zoom": true,
"y_axes": [
{
"label": "",
"orientation": "bottom",
"series": [
{
"axisId": "Channel_0 - average_of_roi_first",
"id": "Channel_0 - average_of_roi_first",
"name": "Channel_0"
},
{
"axisId": "Channel_1 - average_of_roi_first",
"id": "Channel_1 - average_of_roi_first",
"name": "Channel_1"
},
{
"axisId": "Channel_2 - average_of_roi_first",
"id": "Channel_2 - average_of_roi_first",
"name": "Channel_2"
},
{
"axisId": "Channel_3 - average_of_roi_first",
"id": "Channel_3 - average_of_roi_first",
"name": "Channel_3"
},
{
"axisId": "Channel_4 - average_of_roi_first",
"id": "Channel_4 - average_of_roi_first",
"name": "Channel_4"
}
],
"showLabels": true,
"showValues": true,
"tickDensity": "custom",
"tickDensityCustom": 100,
"type": "linear",
"unpinAxis": false
}
],
"y_axis_combined": true,
"y_axis_gridlines": true,
"y_axis_reversed": false,
"y_axis_scale_mode": "linear",
"y_axis_tick_density": "default",
"y_axis_tick_density_custom": 5,
"y_axis_zoom": true
}}
A single record visualization -
{{
"defaults_version": 1,
"show_view_names": false,
"type": "looker_single_record"
}}
A single value visualization -
{{
"comparison_reverse_colors": false,
"comparison_type": "value", "conditional_formatting_include_nulls": false, "conditional_formatting_include_totals": false,
"custom_color": "#1A73E8",
"custom_color_enabled": true,
"defaults_version": 1,
"enable_conditional_formatting": false,
"series_types": {},
"show_comparison": false,
"show_comparison_label": true,
"show_single_value_title": true,
"single_value_title": "Total Clicks",
"type": "single_value"
}}
A Pie chart -
{{
"defaults_version": 1,
"label_density": 25,
"label_type": "labPer",
"legend_position": "center",
"limit_displayed_rows": false,
"ordering": "none",
"plot_size_by_field": false,
"point_style": "none",
"series_types": {},
"show_null_labels": false,
"show_silhouette": false,
"show_totals_labels": false,
"show_value_labels": false,
"show_view_names": false,
"show_x_axis_label": true,
"show_x_axis_ticks": true,
"show_y_axis_labels": true,
"show_y_axis_ticks": true,
"stacking": "",
"totals_color": "#808080",
"trellis": "",
"type": "looker_pie",
"value_labels": "legend",
"x_axis_gridlines": false,
"x_axis_reversed": false,
"x_axis_scale": "auto",
"y_axis_combined": true,
"y_axis_gridlines": true,
"y_axis_reversed": false,
"y_axis_scale_mode": "linear",
"y_axis_tick_density": "default",
"y_axis_tick_density_custom": 5
}}
The result is a JSON object with the id, slug, the url, and
the long_url.
get_looks:
kind: looker-get-looks
source: looker-source
description: |
This tool searches for saved Looks (pre-defined queries and visualizations)
in a Looker instance. It returns a list of JSON objects, each representing a Look.
Search Parameters:
- title (optional): Filter by Look title (supports wildcards).
- folder_id (optional): Filter by the ID of the folder where the Look is saved.
- user_id (optional): Filter by the ID of the user who created the Look.
- description (optional): Filter by description content (supports wildcards).
- id (optional): Filter by specific Look ID.
- limit (optional): Maximum number of results to return. Defaults to a system limit.
- offset (optional): Starting point for pagination.
String Search Behavior:
- Case-insensitive matching.
- Supports SQL LIKE pattern match wildcards:
- `%`: Matches any sequence of zero or more characters. (e.g., `"dan%"` matches "danger", "Danzig")
- `_`: Matches any single character. (e.g., `"D_m%"` matches "Damage", "dump")
- Special expressions for null checks:
- `"IS NULL"`: Matches Looks where the field is null.
- `"NOT NULL"`: Excludes Looks where the field is null.
run_look:
kind: looker-run-look
source: looker-source
description: |
This tool executes the query associated with a saved Look and
returns the resulting data in a JSON structure.
Parameters:
- look_id (required): The unique identifier of the Look to run,
typically obtained from the `get_looks` tool.
Output:
The query results are returned as a JSON object.
make_look:
kind: looker-make-look
source: looker-source
description: |
This tool creates a new Look (saved query with visualization) in Looker.
The Look will be saved in the user's personal folder, and its name must be unique.
Required Parameters:
- title: A unique title for the new Look.
- description: A brief description of the Look's purpose.
- model_name: The name of the LookML model (from `get_models`).
- explore_name: The name of the explore (from `get_explores`).
- fields: A list of field names (dimensions, measures, filters, or parameters) to include in the query.
Optional Parameters:
- pivots, filters, sorts, limit, query_timezone: These parameters are identical
to those described for the `query` tool.
- vis_config: A JSON object defining the visualization settings for the Look.
The structure and options are the same as for the `query_url` tool's `vis_config`.
Output:
A JSON object containing a link (`url`) to the newly created Look, along with its `id` and `slug`.
get_dashboards:
kind: looker-get-dashboards
source: looker-source
description: |
This tool searches for saved dashboards in a Looker instance. It returns a list of JSON objects, each representing a dashboard.
Search Parameters:
- title (optional): Filter by dashboard title (supports wildcards).
- folder_id (optional): Filter by the ID of the folder where the dashboard is saved.
- user_id (optional): Filter by the ID of the user who created the dashboard.
- description (optional): Filter by description content (supports wildcards).
- id (optional): Filter by specific dashboard ID.
- limit (optional): Maximum number of results to return. Defaults to a system limit.
- offset (optional): Starting point for pagination.
String Search Behavior:
- Case-insensitive matching.
- Supports SQL LIKE pattern match wildcards:
- `%`: Matches any sequence of zero or more characters. (e.g., `"finan%"` matches "financial", "finance")
- `_`: Matches any single character. (e.g., `"s_les"` matches "sales")
- Special expressions for null checks:
- `"IS NULL"`: Matches dashboards where the field is null.
- `"NOT NULL"`: Excludes dashboards where the field is null.
run_dashboard:
kind: looker-run-dashboard
source: looker-source
description: |
This tool executes the queries associated with each tile in a specified dashboard
and returns the aggregated data in a JSON structure.
Parameters:
- dashboard_id (required): The unique identifier of the dashboard to run,
typically obtained from the `get_dashboards` tool.
Output:
The data from all dashboard tiles is returned as a JSON object.
make_dashboard:
kind: looker-make-dashboard
source: looker-source
description: |
This tool creates a new, empty dashboard in Looker. Dashboards are stored
in the user's personal folder, and the dashboard name must be unique.
After creation, use `add_dashboard_filter` to add filters and
`add_dashboard_element` to add content tiles.
Required Parameters:
- title (required): A unique title for the new dashboard.
- description (required): A brief description of the dashboard's purpose.
Output:
A JSON object containing a link (`url`) to the newly created dashboard and
its unique `id`. This `dashboard_id` is crucial for subsequent calls to
`add_dashboard_filter` and `add_dashboard_element`.
add_dashboard_element:
kind: looker-add-dashboard-element
source: looker-source
description: |
This tool creates a new tile (element) within an existing Looker dashboard.
Tiles are added in the order this tool is called for a given `dashboard_id`.
CRITICAL ORDER OF OPERATIONS:
1. Create the dashboard using `make_dashboard`.
2. Add any dashboard-level filters using `add_dashboard_filter`.
3. Then, add elements (tiles) using this tool.
Required Parameters:
- dashboard_id: The ID of the target dashboard, obtained from `make_dashboard`.
- model_name, explore_name, fields: These query parameters are inherited
from the `query` tool and are required to define the data for the tile.
Optional Parameters:
- title: An optional title for the dashboard tile.
- pivots, filters, sorts, limit, query_timezone: These query parameters are
inherited from the `query` tool and can be used to customize the tile's query.
- vis_config: A JSON object defining the visualization settings for this tile.
The structure and options are the same as for the `query_url` tool's `vis_config`.
Connecting to Dashboard Filters:
A dashboard element can be connected to one or more dashboard filters (created with
`add_dashboard_filter`). To do this, specify the `name` of the dashboard filter
and the `field` from the element's query that the filter should apply to.
The format for specifying the field is `view_name.field_name`.
add_dashboard_filter:
kind: looker-add-dashboard-filter
source: looker-source
description: |
This tool adds a filter to a Looker dashboard.
CRITICAL ORDER OF OPERATIONS:
1. Create a dashboard using `make_dashboard`.
2. Add all desired filters using this tool (`add_dashboard_filter`).
3. Finally, add dashboard elements (tiles) using `add_dashboard_element`.
Parameters:
- dashboard_id (required): The ID from `make_dashboard`.
- name (required): A unique internal identifier for the filter. You will use this `name` later in `add_dashboard_element` to bind tiles to this filter.
- title (required): The label displayed to users in the UI.
- flter_type (required): One of `date_filter`, `number_filter`, `string_filter`, or `field_filter`.
- default_value (optional): The initial value for the filter.
Field Filters (`flter_type: field_filter`):
If creating a field filter, you must also provide:
- model
- explore
- dimension
The filter will inherit suggestions and type information from this LookML field.
generate_embed_url:
kind: looker-generate-embed-url
source: looker-source
description: |
This tool generates a signed, private embed URL for specific Looker content,
allowing users to access it directly.
Parameters:
- type (required): The type of content to embed. Common values include:
- `dashboards`
- `looks`
- `explore`
- id (required): The unique identifier for the content.
- For dashboards and looks, use the numeric ID (e.g., "123").
- For explores, use the format "model_name/explore_name".
health_pulse:
kind: looker-health-pulse
source: looker-source
description: |
This tool performs various health checks on a Looker instance.
Parameters:
- action (required): Specifies the type of health check to perform.
Choose one of the following:
- `check_db_connections`: Verifies database connectivity.
- `check_dashboard_performance`: Assesses dashboard loading performance.
- `check_dashboard_errors`: Identifies errors within dashboards.
- `check_explore_performance`: Evaluates explore query performance.
- `check_schedule_failures`: Reports on failed scheduled deliveries.
- `check_legacy_features`: Checks for the usage of legacy features.
Note on `check_legacy_features`:
This action is exclusively available in Looker Core instances. If invoked
on a non-Looker Core instance, it will return a notice rather than an error.
This notice should be considered normal behavior and not an indication of an issue.
health_analyze:
kind: looker-health-analyze
source: looker-source
description: |
This tool calculates the usage statistics for Looker projects, models, and explores.
Parameters:
- action (required): The type of resource to analyze. Can be `"projects"`, `"models"`, or `"explores"`.
- project (optional): The specific project ID to analyze.
- model (optional): The specific model name to analyze. Requires `project` if used without `explore`.
- explore (optional): The specific explore name to analyze. Requires `model` if used.
- timeframe (optional): The lookback period in days for usage data. Defaults to `90` days.
- min_queries (optional): The minimum number of queries for a resource to be considered active. Defaults to `1`.
Output:
The result is a JSON object containing usage metrics for the specified resources.
health_vacuum:
kind: looker-health-vacuum
source: looker-source
description: |
This tool identifies and suggests LookML models or explores that can be
safely removed due to inactivity or low usage.
Parameters:
- action (required): The type of resource to analyze for removal candidates. Can be `"models"` or `"explores"`.
- project (optional): The specific project ID to consider.
- model (optional): The specific model name to consider. Requires `project` if used without `explore`.
- explore (optional): The specific explore name to consider. Requires `model` if used.
- timeframe (optional): The lookback period in days to assess usage. Defaults to `90` days.
- min_queries (optional): The minimum number of queries for a resource to be considered active. Defaults to `1`.
Output:
A JSON array of objects, each representing a model or explore that is a candidate for deletion due to low usage.
dev_mode:
kind: looker-dev-mode
source: looker-source
description: |
This tool allows toggling the Looker IDE session between Development Mode and Production Mode.
Development Mode enables making and testing changes to LookML projects.
Parameters:
- enable (required): A boolean value.
- `true`: Switches the current session to Development Mode.
- `false`: Switches the current session to Production Mode.
get_projects:
kind: looker-get-projects
source: looker-source
description: |
This tool retrieves a list of all LookML projects available on the Looker instance.
It is useful for identifying projects before performing actions like retrieving
project files or making modifications.
Parameters:
This tool takes no parameters.
Output:
A JSON array of objects, each containing the `project_id` and `project_name`
for a LookML project.
get_project_files:
kind: looker-get-project-files
source: looker-source
description: |
This tool retrieves a list of all LookML files within a specified project,
providing details about each file.
Parameters:
- project_id (required): The unique ID of the LookML project, obtained from `get_projects`.
Output:
A JSON array of objects, each representing a LookML file and containing
details such as `path`, `id`, `type`, and `git_status`.
get_project_file:
kind: looker-get-project-file
source: looker-source
description: |
This tool retrieves the raw content of a specific LookML file from within a project.
Parameters:
- project_id (required): The unique ID of the LookML project, obtained from `get_projects`.
- file_path (required): The path to the LookML file within the project,
typically obtained from `get_project_files`.
Output:
The raw text content of the specified LookML file.
create_project_file:
kind: looker-create-project-file
source: looker-source
description: |
This tool creates a new LookML file within a specified project, populating
it with the provided content.
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
Parameters:
- project_id (required): The unique ID of the LookML project.
- file_path (required): The desired path and filename for the new file within the project.
- content (required): The full LookML content to write into the new file.
Output:
A confirmation message upon successful file creation.
update_project_file:
kind: looker-update-project-file
source: looker-source
description: |
This tool modifies the content of an existing LookML file within a specified project.
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
Parameters:
- project_id (required): The unique ID of the LookML project.
- file_path (required): The exact path to the LookML file to modify within the project.
- content (required): The new, complete LookML content to overwrite the existing file.
Output:
A confirmation message upon successful file modification.
delete_project_file:
kind: looker-delete-project-file
source: looker-source
description: |
This tool permanently deletes a specified LookML file from within a project.
Use with caution, as this action cannot be undone through the API.
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
Parameters:
- project_id (required): The unique ID of the LookML project.
- file_path (required): The exact path to the LookML file to delete within the project.
Output:
A confirmation message upon successful file deletion.
get_project_directories:
kind: looker-get-project-directories
source: looker-source
description: |
This tool retrieves the list of directories within a specified LookML project.
Parameters:
- project_id (required): The unique ID of the LookML project.
Output:
A JSON array of strings, where each string is the name of a directory within the project.
create_project_directory:
kind: looker-create-project-directory
source: looker-source
description: |
This tool creates a new directory within a specified LookML project.
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
Parameters:
- project_id (required): The unique ID of the LookML project.
- directory_path (required): The path to the new directory within the project.
Output:
A confirmation message upon successful directory creation.
delete_project_directory:
kind: looker-delete-project-directory
source: looker-source
description: |
This tool permanently deletes a specified directory within a LookML project.
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
Parameters:
- project_id (required): The unique ID of the LookML project.
- directory_path (required): The path to the directory within the project.