Skip to content

feat(tool/looker): add conversation CRUD tools#3032

Open
hiracky16 wants to merge 1 commit intogoogleapis:mainfrom
hiracky16:feat/add-looker-conversation-crud
Open

feat(tool/looker): add conversation CRUD tools#3032
hiracky16 wants to merge 1 commit intogoogleapis:mainfrom
hiracky16:feat/add-looker-conversation-crud

Conversation

@hiracky16
Copy link
Copy Markdown
Contributor

1. Description

This PR implements the Phase 1 of Looker's Conversational Analytics API integration by adding five tools for Conversation CRUD management. These tools follow the established patterns and the strict security/annotation guidelines established in PR #2830.

New Tools Added:

  • looker-create-conversation: Starts a new session with an AI agent.
  • looker-list-conversations: Searches and lists existing conversation sessions.
  • looker-get-conversation: Retrieves detailed metadata for a specific session.
  • looker-update-conversation: Modifies conversation attributes (e.g., name).
  • looker-delete-conversation: Deletes a conversation session (marked with DestructiveHint).

Key Highlights:

  • Annotation Protection: Strictly adheres to PR feat(tools/looker): Looker agent management from MCP #2830 patterns by forcing ReadOnlyHint and DestructiveHint in the Initialize method to ensure safe LLM interaction.
  • Documentation: Added CI-compliant markdown files in docs/en/integrations/looker/tools/ with correct H2 ordering and required shortcodes.
  • Testing: Unit tests verify correct configuration parsing for all new tools.

2. PR Checklist

  • Make sure to open an issue as a bug/issue before writing your code!
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated
  • Make sure to add ! if this involves a breaking change (N/A, additive only)

3. Issue Reference

Related to the work on Looker Conversational Analytics integration. 🦕

@hiracky16 hiracky16 marked this pull request as ready for review April 11, 2026 22:11
@hiracky16 hiracky16 requested review from a team as code owners April 11, 2026 22:11
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces five new Looker tools for managing conversation sessions: looker-create-conversation, looker-delete-conversation, looker-get-conversation, looker-list-conversations, and looker-update-conversation. The implementation includes the necessary Go logic, unit tests, and documentation for each tool. Several issues were identified regarding logging practices, specifically the use of ErrorContext for informational messages and the lack of structured key-value pairs. Additionally, the documentation titles need to be updated to follow the repository's naming convention, and mutating tools like 'create' and 'update' should include the DestructiveHint annotation for consistency. Finally, the imports in cmd/internal/imports.go should be reordered alphabetically.

if err != nil {
return nil, util.ProcessGeneralError(err)
}
logger.ErrorContext(ctx, "Got response %v", resp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Use InfoContext instead of ErrorContext for successful response logging, and provide arguments as key-value pairs.

Suggested change
logger.ErrorContext(ctx, "Got response %v", resp)
logger.InfoContext(ctx, "Got response", "response", resp)

req.AgentId = &agentId
}

logger.ErrorContext(ctx, "Making SearchConversations request: %v", req)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logging level ErrorContext is inappropriate for an informational message. Please use InfoContext and provide arguments as key-value pairs.

Suggested change
logger.ErrorContext(ctx, "Making SearchConversations request: %v", req)
logger.InfoContext(ctx, "Making SearchConversations request", "request", req)

if err != nil {
return nil, util.ProcessGeneralError(err)
}
logger.ErrorContext(ctx, "Got response %v", resp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Use InfoContext instead of ErrorContext for successful response logging, and provide arguments as key-value pairs.

Suggested change
logger.ErrorContext(ctx, "Got response %v", resp)
logger.InfoContext(ctx, "Got response", "response", resp)

Name: &name,
}

logger.ErrorContext(ctx, "Making UpdateConversation request for conversation ID: %s", conversationId)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logging level ErrorContext is inappropriate for an informational message. Please use InfoContext and provide arguments as key-value pairs.

Suggested change
logger.ErrorContext(ctx, "Making UpdateConversation request for conversation ID: %s", conversationId)
logger.InfoContext(ctx, "Making UpdateConversation request", "conversation_id", conversationId)

if err != nil {
return nil, util.ProcessGeneralError(err)
}
logger.ErrorContext(ctx, "Got response %v", resp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Use InfoContext instead of ErrorContext for successful response logging, and provide arguments as key-value pairs.

Suggested change
logger.ErrorContext(ctx, "Got response %v", resp)
logger.InfoContext(ctx, "Got response", "response", resp)

@@ -0,0 +1,46 @@
---
title: "looker-update-conversation"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title in the YAML frontmatter should include the ' Tool' suffix to adhere to the repository's documentation standards.

Suggested change
title: "looker-update-conversation"
title: "looker-update-conversation Tool"
References
  1. For tool documentation files, the title in the YAML frontmatter should use kebab-case for the tool name, followed by ' Tool'.

@@ -0,0 +1,49 @@
---
title: "looker-list-conversations"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title in the YAML frontmatter should include the ' Tool' suffix to adhere to the repository's documentation standards.

Suggested change
title: "looker-list-conversations"
title: "looker-list-conversations Tool"
References
  1. For tool documentation files, the title in the YAML frontmatter should use kebab-case for the tool name, followed by ' Tool'.

Comment on lines +79 to +82
readOnlyHint := false
annotations := &tools.ToolAnnotations{
ReadOnlyHint: &readOnlyHint,
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This tool performs an 'Update' operation which modifies state. Please include the DestructiveHint annotation to ensure consistency with the PR's stated goals and other mutating tools.

Suggested change
readOnlyHint := false
annotations := &tools.ToolAnnotations{
ReadOnlyHint: &readOnlyHint,
}
readOnlyHint := false
destructiveHint := true
annotations := &tools.ToolAnnotations{
ReadOnlyHint: &readOnlyHint,
DestructiveHint: &destructiveHint,
}

@@ -0,0 +1,45 @@
---
title: "looker-get-conversation"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title in the YAML frontmatter should include the ' Tool' suffix to adhere to the repository's documentation standards.

Suggested change
title: "looker-get-conversation"
title: "looker-get-conversation Tool"
References
  1. For tool documentation files, the title in the YAML frontmatter should use kebab-case for the tool name, followed by ' Tool'.

@@ -0,0 +1,44 @@
---
title: "looker-delete-conversation"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title in the YAML frontmatter should include the ' Tool' suffix to adhere to the repository's documentation standards.

Suggested change
title: "looker-delete-conversation"
title: "looker-delete-conversation Tool"
References
  1. For tool documentation files, the title in the YAML frontmatter should use kebab-case for the tool name, followed by ' Tool'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants