Skip to content

docs(mcp): Document connectionId parameter for direct Postgres/DuckDB queries#16661

Open
inkeep[bot] wants to merge 1 commit intomasterfrom
docs-writer-ai-update-2026-04-29T21-01-17-428Z-lyebp6
Open

docs(mcp): Document connectionId parameter for direct Postgres/DuckDB queries#16661
inkeep[bot] wants to merge 1 commit intomasterfrom
docs-writer-ai-update-2026-04-29T21-01-17-428Z-lyebp6

Conversation

@inkeep
Copy link
Copy Markdown
Contributor

@inkeep inkeep Bot commented Apr 29, 2026

Changes

This PR updates the MCP SQL documentation to reflect the new connectionId parameter added in PostHog/posthog#56720, which enables AI agents to query external data sources (Postgres/DuckDB direct-query connections) instead of defaulting to ClickHouse.

Updates made:

  1. "How it works" section – Added a new capability bullet for querying external databases directly via Postgres or DuckDB connections without syncing data into PostHog.

  2. SQL tools table – Updated with three changes:

    • Updated query-run description to mention the optional connectionId parameter
    • Added query-validate tool documentation (validates queries before running, also supports connectionId)
    • Added hogql-schema tool documentation (schema introspection, supports connectionId for external source schemas)
  3. New "Query external data sources directly" section – Explains how to use the connectionId parameter across the three HogQL-shaped tools, and how to discover available connection IDs using external-data-sources-list.

  4. Example prompts – Added a new "For querying external data sources directly" section with example prompts showing how to list sources, view schemas, and run/validate queries against external connections.

Related PR


This PR was created by the Inkeep Content Writer agent, which is maintained by the Docs and Wizard team. Please reach out on Slack for help if needed.

…ces via MCP

Reflects PostHog/posthog#56720 which exposes connectionId on query-run,
query-validate, and hogql-schema MCP tools for Postgres/DuckDB direct queries.
@inkeep inkeep Bot requested a review from georgemunyoro April 29, 2026 21:03
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Apr 29, 2026 09:10PM

@github-actions
Copy link
Copy Markdown
Contributor

Vale prose linter → found 0 errors, 6 warnings, 0 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/data-warehouse/run-sql-mcp.mdx — 0 errors, 6 warnings, 0 suggestions
Line Severity Message Rule
5:252 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
19:59 warning Capitalize 'Data Warehouse' for PostHog's product. Use 'data warehouse' for the general industry concept. PostHogBase.ProductNames
27:135 warning 'subqueries' is a possible misspelling. PostHogBase.Spelling
48:64 warning 'Upserts' is a possible misspelling. PostHogBase.Spelling
69:121 warning 'OAuth' is a possible misspelling. PostHogBase.Spelling
73:54 warning Capitalize 'Data Warehouse' for PostHog's product. Use 'data warehouse' for the general industry concept. PostHogBase.ProductNames

@github-actions
Copy link
Copy Markdown
Contributor

Hey @georgemunyoro! This docs PR was generated for you by an agent. You're responsible for reviewing and merging it into production.

  1. Review and approve the PR
  2. Merge the PR
    a. Check the preview env and CI build and merge it yourself
    b. Enable auto-merge if you're confident in the changes

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.

0 participants