:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix: bk tools list (#108173)
Alex Vad87a331da66
diff --git a/products/business_knowledge/backend/sandbox.py b/products/business_knowledge/backend/sandbox.pyindex 21825c731d8f..8e79b61d1de1 100644--- a/products/business_knowledge/backend/sandbox.py+++ b/products/business_knowledge/backend/sandbox.py@@ -29,7 +29,9 @@ FINISHED_ACTIVITY_CACHE_SECONDS = 60 * 60BK_MCP_SCOPE = "business_knowledge:read"# The PostHog MCP server reads /api/users/@me/ to start a session, so without user:read it never connects.-BK_MCP_SCOPES = [BK_MCP_SCOPE, "user:read"]+# It reads the project to find its organization, and the business knowledge tools sit behind a flag+# targeted by organization, so without project:read the search tool is hidden.+BK_MCP_SCOPES = [BK_MCP_SCOPE, "user:read", "project:read"]BK_SEARCH_TOOL = "business-knowledge-documents-search"BK_WINDOW_TOOL = "business-knowledge-document-window-retrieve"DOCS_SEARCH_TOOL = "docs-search"@@ -43,11 +45,15 @@ BK_HIDDEN_TOOLS = ["llma-personal-spend","reminder-get","reminders-list",+ "project-get",+ "mcp-connections-list",+ "mcp-connection-tools-list","tasks-list","tasks-retrieve","tasks-runs-list","tasks-runs-retrieve","tasks-runs-session-logs-retrieve",+ "tasks-artifacts-list","tasks-config-list","tasks-me-config-list","tasks-models-retrieve",diff --git a/products/business_knowledge/backend/tests/test_sandbox.py b/products/business_knowledge/backend/tests/test_sandbox.pyindex 2083f0eb4149..ac890d4d01e2 100644--- a/products/business_knowledge/backend/tests/test_sandbox.py+++ b/products/business_knowledge/backend/tests/test_sandbox.py@@ -203,8 +203,20 @@ class TestSandboxAPI(APIBaseTest):assert task.internal is Trueassert task.repository is Noneassert task.created_by_id == self.user.id- assert run.state["pending_dispatch"]["posthog_mcp_scopes"] == ["business_knowledge:read", "user:read"]- assert {DOCS_SEARCH_TOOL, "user-get", "tasks-runs-session-logs-retrieve"} <= set(run.state["mcp_exclude_tools"])+ assert run.state["pending_dispatch"]["posthog_mcp_scopes"] == [+ "business_knowledge:read",+ "user:read",+ "project:read",+ ]+ assert {+ DOCS_SEARCH_TOOL,+ "user-get",+ "project-get",+ "mcp-connections-list",+ "mcp-connection-tools-list",+ "tasks-runs-session-logs-retrieve",+ "tasks-artifacts-list",+ } <= set(run.state["mcp_exclude_tools"])assert run.state["config_snapshot"]["connectors"]["mcp_installation_ids"] == []assert run.state["model"] == "claude-sonnet-5"assert run.state["runtime_adapter"] == "claude"