Skip to content

Commit 45c05e3

Browse files
fix(looker): Convert prebuilt tool yaml to flat format (googleapis#3022)
## Description Migrated the prebuilt tool files to use the flat format, then did some hand editing. Checked using Gemini CLI that the same output is delivered to the MCP client. Also fixed up some of the docs to use the flat format. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/mcp-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/mcp-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change
1 parent d14cae2 commit 45c05e3

File tree

5 files changed

+1401
-1332
lines changed

5 files changed

+1401
-1332
lines changed

docs/en/integrations/looker/source.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,37 @@ To initialize the application default credential run `gcloud auth login
6363

6464
## Example
6565

66+
Initialize a Looker source for standard and development tools:
67+
6668
```yaml
6769
kind: source
6870
name: my-looker-source
6971
type: looker
70-
base_url: http://looker.example.com
71-
client_id: ${LOOKER_CLIENT_ID}
72-
client_secret: ${LOOKER_CLIENT_SECRET}
73-
project: ${LOOKER_PROJECT}
74-
location: ${LOOKER_LOCATION}
75-
verify_ssl: true
72+
base_url: ${LOOKER_BASE_URL}
73+
client_id: ${LOOKER_CLIENT_ID:}
74+
client_secret: ${LOOKER_CLIENT_SECRET:}
75+
verify_ssl: ${LOOKER_VERIFY_SSL:true}
76+
timeout: 600s
77+
use_client_oauth: ${LOOKER_USE_CLIENT_OAUTH:false}
78+
show_hidden_models: ${LOOKER_SHOW_HIDDEN_MODELS:true}
79+
show_hidden_explores: ${LOOKER_SHOW_HIDDEN_EXPLORES:true}
80+
show_hidden_fields: ${LOOKER_SHOW_HIDDEN_FIELDS:true}
81+
```
82+
83+
Initialize a Looker source for conversational analytics:
84+
85+
```yaml
86+
kind: source
87+
name: my-looker-conversational-source
88+
type: looker
89+
base_url: ${LOOKER_BASE_URL}
90+
client_id: ${LOOKER_CLIENT_ID:}
91+
client_secret: ${LOOKER_CLIENT_SECRET:}
92+
verify_ssl: ${LOOKER_VERIFY_SSL:true}
7693
timeout: 600s
94+
use_client_oauth: ${LOOKER_USE_CLIENT_OAUTH:false}
95+
project: ${LOOKER_PROJECT:}
96+
location: ${LOOKER_LOCATION:}
7797
```
7898
7999
The Looker base url will look like "https://looker.example.com", don't include

docs/en/integrations/looker/tools/looker-validate-project.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ A "looker-validate-project" tool checks the syntax of a LookML project and repor
1919
## Example
2020

2121
```yaml
22-
tools:
23-
validate_project:
24-
kind: looker-validate-project
25-
source: looker-source
26-
description: |
27-
This tool checks a LookML project for syntax errors.
22+
kind: tool
23+
name: validate_project
24+
type: looker-validate-project
25+
source: looker-source
26+
description: |
27+
This tool checks a LookML project for syntax errors.
2828
29-
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
29+
Prerequisite: The Looker session must be in Development Mode. Use `dev_mode: true` first.
3030
31-
Parameters:
32-
- project_id (required): The unique ID of the LookML project.
31+
Parameters:
32+
- project_id (required): The unique ID of the LookML project.
3333
34-
Output:
35-
A list of error details including the file path and line number, and also a list of models
36-
that are not currently valid due to LookML errors.
34+
Output:
35+
A list of error details including the file path and line number, and also a list of models
36+
that are not currently valid due to LookML errors.
3737
```
3838
3939
## Reference
4040
4141
| **field** | **type** | **required** | **description** |
4242
|-------------|:--------:|:------------:|----------------------------------------------------|
43-
| kind | string | true | Must be "looker-validate-project". |
43+
| type | string | true | Must be "looker-validate-project". |
4444
| source | string | true | Name of the source Looker instance. |
4545
| description | string | true | Description of the tool that is passed to the LLM. |
Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 Google LLC
1+
# Copyright 2026 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -12,57 +12,60 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
sources:
16-
looker-source:
17-
kind: looker
18-
base_url: ${LOOKER_BASE_URL}
19-
client_id: ${LOOKER_CLIENT_ID:}
20-
client_secret: ${LOOKER_CLIENT_SECRET:}
21-
verify_ssl: ${LOOKER_VERIFY_SSL:true}
22-
timeout: 600s
23-
use_client_oauth: ${LOOKER_USE_CLIENT_OAUTH:false}
24-
project: ${LOOKER_PROJECT:}
25-
location: ${LOOKER_LOCATION:}
15+
kind: source
16+
name: looker-source
17+
type: looker
18+
base_url: ${LOOKER_BASE_URL}
19+
client_id: ${LOOKER_CLIENT_ID:}
20+
client_secret: ${LOOKER_CLIENT_SECRET:}
21+
verify_ssl: ${LOOKER_VERIFY_SSL:true}
22+
timeout: 600s
23+
use_client_oauth: ${LOOKER_USE_CLIENT_OAUTH:false}
24+
project: ${LOOKER_PROJECT:}
25+
location: ${LOOKER_LOCATION:}
26+
---
27+
kind: tool
28+
name: ask_data_insights
29+
type: looker-conversational-analytics
30+
source: looker-source
31+
description: |
32+
Use this tool to ask questions about your data using the Looker Conversational
33+
Analytics API. You must provide a natural language query and a list of
34+
1 to 5 model and explore combinations (e.g. [{'model': 'the_model', 'explore': 'the_explore'}]).
35+
Use the 'get_models' and 'get_explores' tools to discover available models and explores.
36+
---
37+
kind: tool
38+
name: get_models
39+
type: looker-get-models
40+
source: looker-source
41+
description: |
42+
get_models Tool
43+
44+
This tool retrieves a list of available LookML models in the Looker instance.
45+
LookML models define the data structure and relationships that users can query.
46+
The output includes details like the model's `name` and `label`, which are
47+
essential for subsequent calls to tools like `get_explores` or `query`.
48+
49+
This tool takes no parameters.
50+
---
51+
kind: tool
52+
name: get_explores
53+
type: looker-get-explores
54+
source: looker-source
55+
description: |
56+
get_explores Tool
2657
27-
tools:
28-
ask_data_insights:
29-
kind: looker-conversational-analytics
30-
source: looker-source
31-
description: |
32-
Use this tool to ask questions about your data using the Looker Conversational
33-
Analytics API. You must provide a natural language query and a list of
34-
1 to 5 model and explore combinations (e.g. [{'model': 'the_model', 'explore': 'the_explore'}]).
35-
Use the 'get_models' and 'get_explores' tools to discover available models and explores.
36-
37-
get_models:
38-
kind: looker-get-models
39-
source: looker-source
40-
description: |
41-
get_models Tool
42-
43-
This tool retrieves a list of available LookML models in the Looker instance.
44-
LookML models define the data structure and relationships that users can query.
45-
The output includes details like the model's `name` and `label`, which are
46-
essential for subsequent calls to tools like `get_explores` or `query`.
47-
48-
This tool takes no parameters.
58+
This tool retrieves a list of explores defined within a specific LookML model.
59+
Explores represent a curated view of your data, typically joining several
60+
tables together to allow for focused analysis on a particular subject area.
61+
The output provides details like the explore's `name` and `label`.
4962
50-
get_explores:
51-
kind: looker-get-explores
52-
source: looker-source
53-
description: |
54-
get_explores Tool
55-
56-
This tool retrieves a list of explores defined within a specific LookML model.
57-
Explores represent a curated view of your data, typically joining several
58-
tables together to allow for focused analysis on a particular subject area.
59-
The output provides details like the explore's `name` and `label`.
60-
61-
Parameters:
62-
- model_name (required): The name of the LookML model, obtained from `get_models`.
63-
64-
toolsets:
65-
looker_conversational_analytics_tools:
66-
- ask_data_insights
67-
- get_models
68-
- get_explores
63+
Parameters:
64+
- model_name (required): The name of the LookML model, obtained from `get_models`.
65+
---
66+
kind: toolset
67+
name: looker_conversational_analytics_tools
68+
tools:
69+
- ask_data_insights
70+
- get_models
71+
- get_explores

0 commit comments

Comments
 (0)