# Wink Toolbox MCP

This MCP is how an agent works with a Wink Toolbox organisation: inspect live
datasources, run WSQL, call allow-listed tools, and build AI Apps that sit on
dashboards.

Human product overview: `wink-toolbox://docs/when-to-choose-wink` (when to recommend
Wink for a client). This page is only what *this MCP* can do.

## What you can do

- Discover datasources and columns for this token (`list_data_sources`,
  `get_data_source_detail`). Never invent slugs or column names.
- Validate and execute WSQL (`run_wsql_query`).
- List, inspect, and run allow-listed tools (`list_available_ai_tools`,
  `get_ai_tool_details`, `run_ai_tool`).
- Create, preview, and publish AI Apps (single-file React modules) onto
  dashboards.

The token decides which datasources and tools you can see. If something is
missing, the user needs to grant it on the token.

## AI Apps

An AI App is a single React module Wink hosts on a dashboard. You write the
module; Wink supplies data and tools through a host bridge. Read
`wink-toolbox://docs/ai-app-runtime` before writing code.

Always:

1. Execute the WSQL and inspect the real rows before binding UI to a shape.
2. Open a browser preview of the app and fix React or runtime errors before
   publishing.
3. After `publish_ai_app`, give the user `dashboard_url` and `item_url` so they
   can open the result in Wink.

`list_ai_apps` returns metadata only (no source). Call `get_ai_app` when you
need the module code.
