From 40f51c9bad7b5c3f67cd4096f9a771a2426b7d77 Mon Sep 17 00:00:00 2001 From: Joan Reyero Date: Tue, 4 Aug 2026 16:00:15 +0100 Subject: [PATCH] feat(tools): route social listening questions to query_lfx_lens The Lens MCP agent gains a social listening semantic model (linuxfoundation/lfx-lens#29, backed by linuxfoundation/lf-dbt#2713) covering Octolens mentions: volume, sentiment, platform share of voice, and author follower reach. The semantic layer has no social listening data, so add it to the 'always use this tool' list in the query_lfx_lens description and to the input field guidance so client LLMs route those questions here. Co-Authored-By: Claude Fable 5 Signed-off-by: Joan Reyero --- internal/tools/lens.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/tools/lens.go b/internal/tools/lens.go index 22e084f..156b306 100644 --- a/internal/tools/lens.go +++ b/internal/tools/lens.go @@ -46,6 +46,10 @@ Always use this tool for: IMPORTANT: activities data (contributors, PRs, code contributions etc) not involving maintainers should use query_lfx_semantic_layer. - Maintainer time series and trends (the maintainer model lacks good time granularity) - Event sponsorships (the semantic layer should be used for events and event registration data not related to sponsorships) +- Social listening: mentions of a project on social media and the web (Twitter/X, Bluesky, Reddit, Hacker News, DEV, + Podcasts, YouTube, LinkedIn, TikTok), sentiment, share of voice by platform, and author reach/followers + (e.g. "how is Kubernetes trending on social media?", "sentiment split of our mentions last month"). + The semantic layer has no social listening data. Also use this tool for: - Open-ended or exploratory analysis (e.g. "which projects need attention?", "contribution overview") @@ -70,7 +74,7 @@ Tips: // QueryLFXLensArgs defines the input for query_lfx_lens. type QueryLFXLensArgs struct { ProjectSlug string `json:"project_slug" jsonschema:"Project slug from search_projects (e.g. 'cncf') (required)"` - Input string `json:"input" jsonschema:"Natural language question. Use for maintainer names/trends, open-ended analysis, subproject questions, cross-domain joins, and exploratory questions. Contributor, activity and membership questions belong to the semantic layer. Takes 15-30s. (required)"` + Input string `json:"input" jsonschema:"Natural language question. Use for maintainer names/trends, social listening (mentions/sentiment/reach), open-ended analysis, subproject questions, cross-domain joins, and exploratory questions. Contributor, activity and membership questions belong to the semantic layer. Takes 15-30s. (required)"` } type lensWorkflowAdditional struct {