Skip to content

Commit 649d4ad

Browse files
drstrangelookerhiracky16gemini-code-assist[bot]
authored
feat(tools/looker): Looker agent management from MCP (googleapis#2830)
## Description Looker agent management from MCP ## 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/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-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 🛠️ Fixes googleapis#2827 --------- Co-authored-by: hiracky16 <h.piiice16@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 070e939 commit 649d4ad

File tree

17 files changed

+2699
-18
lines changed

17 files changed

+2699
-18
lines changed

cmd/internal/imports.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,16 @@ import (
113113
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookeradddashboardelement"
114114
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookeradddashboardfilter"
115115
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerconversationalanalytics"
116+
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookercreateagent"
116117
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookercreateprojectdirectory"
117118
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookercreateprojectfile"
118119
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookercreateviewfromtable"
120+
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerdeleteagent"
119121
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerdeleteprojectdirectory"
120122
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerdeleteprojectfile"
121123
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerdevmode"
122124
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookergenerateembedurl"
125+
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookergetagent"
123126
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookergetconnectiondatabases"
124127
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookergetconnections"
125128
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookergetconnectionschemas"
@@ -142,6 +145,7 @@ import (
142145
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerhealthanalyze"
143146
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerhealthpulse"
144147
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerhealthvacuum"
148+
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerlistagents"
145149
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookermakedashboard"
146150
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookermakelook"
147151
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerquery"
@@ -150,6 +154,7 @@ import (
150154
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerrundashboard"
151155
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerrunlook"
152156
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerrunlookmltests"
157+
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerupdateagent"
153158
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerupdateprojectfile"
154159
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookervalidateproject"
155160
_ "github.com/googleapis/genai-toolbox/internal/tools/mindsdb/mindsdbexecutesql"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "looker-create-agent Tool"
3+
type: docs
4+
weight: 1
5+
description: >
6+
"looker-create-agent" creates a Looker Conversation Analytics agent.
7+
---
8+
9+
## About
10+
11+
The `looker-create-agent` tool allows LLMs to create a Looker Agent using the Looker Go SDK.
12+
13+
```json
14+
{
15+
"name": "looker-create-agent",
16+
"parameters": {
17+
"name": "My Agent",
18+
"instructions": "You are a helpful assistant.",
19+
"sources": [{"model": "my_model", "explore": "my_explore"}],
20+
"code_interpreter": true
21+
}
22+
}
23+
```
24+
25+
## Compatible Sources
26+
27+
{{< compatible-sources >}}
28+
29+
## Example
30+
31+
```yaml
32+
kind: tool
33+
name: create_agent
34+
type: looker-create-agent
35+
source: my-looker-instance
36+
description: |
37+
Create a new Looker agent.
38+
- `name` (string): The name of the agent.
39+
- `description` (string): The description of the agent.
40+
- `instructions` (string): The instructions (system prompt) for the agent.
41+
- `sources` (array): Optional. A list of JSON-encoded data sources for the agent (e.g., `[{"model": "my_model", "explore": "my_explore"}]`).
42+
- `code_interpreter` (boolean): Optional. Enables Code Interpreter for this Agent.
43+
```
44+
45+
## Reference
46+
47+
| **field** | **type** | **required** | **description** |
48+
|-------------|:--------:|:------------:|----------------------------------------------------|
49+
| type | string | true | Must be "looker-create-agent". |
50+
| source | string | true | Name of the Looker source. |
51+
| description | string | true | Description of the tool that is passed to the LLM. |
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "looker-delete-agent Tool"
3+
type: docs
4+
weight: 1
5+
description: >
6+
"looker-delete-agent" deletes a Looker Conversation Analytics agent.
7+
---
8+
9+
## About
10+
11+
The `looker-delete-agent` tool allows LLMs to delete a Looker Agent using the Looker Go SDK.
12+
13+
```json
14+
{
15+
"name": "looker-delete-agent",
16+
"parameters": {
17+
"agent_id": "123"
18+
}
19+
}
20+
```
21+
22+
## Compatible Sources
23+
24+
{{< compatible-sources >}}
25+
26+
## Example
27+
28+
To use the `looker-delete-agent` tool, you must define it in your `server.yaml` file.
29+
30+
```yaml
31+
kind: tool
32+
name: delete_agent
33+
type: looker-delete-agent
34+
source: my-looker-instance
35+
description: |
36+
Delete a Looker agent.
37+
- `agent_id` (string): The ID of the agent.
38+
```
39+
40+
## Reference
41+
42+
| **field** | **type** | **required** | **description** |
43+
|-------------|:--------:|:------------:|----------------------------------------------------|
44+
| type | string | true | Must be "looker-delete-agent". |
45+
| source | string | true | Name of the Looker source. |
46+
| description | string | true | Description of the tool that is passed to the LLM. |
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "looker-get-agent Tool"
3+
type: docs
4+
weight: 1
5+
description: >
6+
"looker-get-agent" retrieves a Looker Conversation Analytics agent.
7+
---
8+
9+
## About
10+
11+
The `looker-get-agent` tool allows LLMs to retrieve a specific Looker Agent by ID using the Looker Go SDK.
12+
13+
To use the `looker-get-agent` tool, you must define it in your `server.yaml` file.
14+
15+
```json
16+
{
17+
"name": "looker-get-agent",
18+
"parameters": {
19+
"agent_id": "123"
20+
}
21+
}
22+
```
23+
24+
## Compatible Sources
25+
26+
{{< compatible-sources >}}
27+
28+
## Example
29+
30+
```yaml
31+
kind: tool
32+
name: get_agent
33+
type: looker-get-agent
34+
source: my-looker-instance
35+
description: |
36+
Retrieve a Looker agent.
37+
- `agent_id` (string): The ID of the agent.
38+
```
39+
40+
## Reference
41+
42+
| **field** | **type** | **required** | **description** |
43+
|-------------|:--------:|:------------:|----------------------------------------------------|
44+
| type | string | true | Must be "looker-get-agent". |
45+
| source | string | true | Name of the Looker source. |
46+
| description | string | true | Description of the tool that is passed to the LLM. |
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "looker-list-agents Tool"
3+
type: docs
4+
weight: 1
5+
description: >
6+
"looker-list-agents" retrieves the list of Looker Conversation Analytics agents.
7+
---
8+
9+
## About
10+
11+
The `looker-list-agents` tool allows LLMs to list Looker Agents using the Looker Go SDK.
12+
13+
```json
14+
{
15+
"name": "looker-list-agents"
16+
}
17+
```
18+
19+
## Compatible Sources
20+
21+
{{< compatible-sources >}}
22+
23+
## Example
24+
25+
To use the `looker-list-agents` tool, you must define it in your `server.yaml` file.
26+
27+
```yaml
28+
kind: tool
29+
name: list_agents
30+
type: looker-list-agents
31+
source: my-looker-instance
32+
description: |
33+
List all Looker agents.
34+
This tool takes no parameters.
35+
```
36+
37+
## Reference
38+
39+
| **field** | **type** | **required** | **description** |
40+
|-------------|:--------:|:------------:|----------------------------------------------------|
41+
| type | string | true | Must be "looker-list-agents". |
42+
| source | string | true | Name of the Looker source. |
43+
| description | string | true | Description of the tool that is passed to the LLM. |
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "looker-update-agent Tool"
3+
type: docs
4+
weight: 1
5+
description: >
6+
"looker-update-agent" updates a Looker Conversation Analytics agent.
7+
---
8+
9+
## About
10+
11+
The `looker-update-agent` tool allows LLMs to update an existing Looker Agent using the Looker Go SDK.
12+
13+
```json
14+
{
15+
"name": "looker-update-agent",
16+
"parameters": {
17+
"agent_id": "123",
18+
"name": "Updated Agent Name"
19+
}
20+
}
21+
```
22+
23+
## Compatible Sources
24+
25+
{{< compatible-sources >}}
26+
27+
## Example
28+
29+
To use the `looker-update-agent` tool, you must define it in your `server.yaml` file.
30+
31+
```yaml
32+
kind: tool
33+
name: update_agent
34+
type: looker-update-agent
35+
source: my-looker-instance
36+
description: |
37+
Update a Looker agent.
38+
- `agent_id` (string): The ID of the agent.
39+
- `name` (string): The name of the agent.
40+
- `description` (string): The description of the agent.
41+
- `instructions` (string): The instructions (system prompt) for the agent.
42+
- `sources` (array): Optional. A list of JSON-encoded data sources for the agent (e.g., `[{"model": "my_model", "explore": "my_explore"}]`).
43+
- `code_interpreter` (boolean): Optional. Enables Code Interpreter for this Agent.
44+
```
45+
46+
## Reference
47+
48+
| **field** | **type** | **required** | **description** |
49+
|-------------|:--------:|:------------:|----------------------------------------------------|
50+
| type | string | true | Must be "looker-update-agent". |
51+
| source | string | true | Name of the Looker source. |
52+
| description | string | true | Description of the tool that is passed to the LLM. |

0 commit comments

Comments
 (0)