From 03c81cb556ef6bd73f3d8f1b78c19d2f68f83e89 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 13:12:26 +0000 Subject: [PATCH] docs: document route_agent MCP tool and AI Router over MCP --- guides/ai-agents/ai-router.mdx | 6 ++++++ references/integrations/lightdash-mcp.mdx | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/guides/ai-agents/ai-router.mdx b/guides/ai-agents/ai-router.mdx index 119dc942..1d685870 100644 --- a/guides/ai-agents/ai-router.mdx +++ b/guides/ai-agents/ai-router.mdx @@ -84,3 +84,9 @@ A few things to keep in mind: ## Router and Slack The same routing logic powers **multi-agent Slack channels**. In a multi-agent channel you mention the single Lightdash Slack app and Lightdash automatically picks the best agent for your question — no need to know which agent to address. See [Slack channels: single-agent vs. multi-agent](/guides/ai-agents/getting-started#slack-channels-single-agent-vs-multi-agent) for setup. + +## Router and MCP + +The router is also exposed to AI assistants over [Lightdash MCP](/references/integrations/lightdash-mcp) through the **`route_agent`** tool. After setting an active project, the assistant can pass the user's prompt to `route_agent` and Lightdash automatically activates the best-fit agent for the rest of the session — no manual `list_agents` / `set_agent` step required. + +Unlike the web experience, MCP routes directly to the best-fit agent even when only one agent is accessible (there's no picker in an MCP client). Routing instructions and access controls behave the same way as in the Lightdash app. diff --git a/references/integrations/lightdash-mcp.mdx b/references/integrations/lightdash-mcp.mdx index 636a2c45..50153cb5 100644 --- a/references/integrations/lightdash-mcp.mdx +++ b/references/integrations/lightdash-mcp.mdx @@ -391,8 +391,9 @@ The assistant will call `read_content` to fetch the source chart, modify the JSO #### Agent context +- **Route agent** - Automatically select and activate the best agent for a user prompt within the active project. This is the preferred way to pick an agent — it mirrors the [AI Router](/guides/ai-agents/ai-router) experience in the Lightdash app, so MCP sessions get the same automatic agent selection. - **List agents** - Discover available AI agents and their areas of expertise -- **Set agent** - Activate an agent to scope your session to its explores, instructions, and verified answers +- **Set agent** - Manually activate an agent to scope your session to its explores, instructions, and verified answers. Use this when you want to override automatic routing. - **Get current agent** - Check which agent is active and view its full context - **Clear agent** - Remove agent scoping and return to the full project context @@ -523,9 +524,12 @@ When you activate an agent in your MCP session, your AI assistant receives: ### Example workflow 1. **Set your project** with `set_project` -2. **Browse available agents** with `list_agents` (e.g., "Sales Analyst", "Marketing Metrics") -3. **Activate an agent** with `set_agent` to load its context -4. **Ask your questions** — the agent's context automatically guides queries +2. **Let the router pick an agent** with `route_agent` — pass the user's prompt and Lightdash activates the best-fit agent automatically. Use `list_agents` + `set_agent` only when you want to inspect candidates or override the choice manually. +3. **Ask your questions** — the agent's context automatically guides queries + + + `route_agent` chooses between agents the user can already access — it never widens permissions. If only one agent is accessible, it activates that agent directly; if none are accessible, it returns an error so the assistant can fall back to the unscoped project context. + **Prompt:** _"What AI agents are available?"_