Databot
Retired
Databot is retired and no longer running. This page is kept for reference.
A Slack app that answers business questions in natural language. It turns a question into Snowflake SQL using the dbt schema, LookML measures and Claude, runs it, and replies with a table or chart.
- Code: databot
- Open in Slack
- Business rules injected into every prompt:
business_context.md. Add rules there when the bot makes wrong assumptions. Changes apply after a restart
Routes
| Route | Triggered by | Result |
|---|---|---|
| Single query | Values, tables, charts | One SQL query, chart or table |
| Definition | "how is X calculated?" | Explained from dbt YAML and compiled SQL, no live query |
| Analytical | "why", "explain", "trend", "compare" | Up to 10 queries synthesised into a written answer (1-5 minutes) |
| Non-data | Greetings, off-topic | Polite reply |
Slack usage
- Mention
@Databotin a public channel, or DM it (no mention needed) - Follow-ups: reply in the thread with
@Databot. In a DM the whole conversation is one session - Add "as a table", "show as text" or "raw data" to get a table instead of a chart
- Ask "show me the SQL you ran" to see the query. You can also paste your own SQL to run
- Be specific about metric, time range, grouping and filters. Without dates it uses the last 30 days for daily data and 90 for weekly or monthly
- Read-only,
Snowflakeonly, max 10,000 rows per response. It cannot join private channels unless invited
REST API
Base URL https://rebtel-databot.com, interactive docs at /docs.
Authentication
All requests except /health need Authorization: Bearer <token>.
| Token | For | Lifetime | How to get one |
|---|---|---|---|
| User access token | Humans scripting against the API | 1 day, refreshed with a 30 day refresh token | Run databot-login locally, sign in with your @rebtel.com Google account. Stored in ~/.databot/token.json |
| Service token | CI, internal services, vendors | 1 year, no refresh | Ask the data team in #team-data. They run databot-issue-token <service-name> --years 1 and share it via 1Password |
Token hygiene
- Keep tokens in environment variables or a secrets manager
- Never paste a token into an AI assistant, Slack or email
- Never log the
Authorizationheader - If compromised, tell the data team: they revoke the
jtiwithdatabot-revoke <jti>, effective on the next request
POST /v1/query
{ "query": "What was our calling revenue by country last month for the top 10 countries?", "thread_id": null }
| Field | Description |
|---|---|
query |
Natural language question, max 2000 characters |
thread_id |
Optional. Pass the returned value for follow-ups (up to 10 turns per thread) |
The response has answer, data (columns and rows, for the data route only), route, thread_id and error. A 200 can still carry an error when the generated SQL failed, so always check it.
Limits
- 30 requests per minute per user token, 300 for service tokens (
429beyond that) - 3 concurrent questions across the service (
503when busy, retry shortly) - Response times: data 8-15s (up to 60s), definition 5-10s, analytical 1-5 minutes
MCP server (for AI agents)
Backend: https://rebtel-databot.com/mcp/. Sign in with a @rebtel.com Google account. Tools:
| Tool | Use when |
|---|---|
ask_databot |
Specific values, tables or charts |
analyze |
Investigating why something happened (1-5 minutes, set the tool-call timeout to at least 5 minutes) |
explain_metric |
How a metric is defined |
Claude Code
Then run /mcp in a session, select databot and complete the browser sign-in. Tokens refresh automatically for about 30 days.
If you have the legacy local databot entry, remove it first with claude mcp remove databot.
Cursor
Claude Desktop
Needs Node.js (npx). Add to ~/Library/Application Support/Claude/claude_desktop_config.json and restart with ⌘Q:
{
"mcpServers": {
"databot": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://rebtel-databot.com/mcp/"]
}
}
}
Leave other keys such as preferences untouched, and avoid trailing commas.
Services
Service callers use a service-token JWT, either directly against /v1/query or through mcp-remote with --header Authorization:Bearer <service-jwt>.
Known limitations
- Claude Desktop does not support the
url:shortcut yet, use themcp-remoteconfig analyzetimes out at about 60 seconds in the Claude Desktop Cowork agent. Use Claude Code or Cursor, or ask Cowork to run one grouping per call- A browser sign-in on every question means a stale OAuth bridge. Remove and re-add the
databotentry, restart the client, and as a last resortrm -rf ~/.mcp-auth/