Tools and prompts
An MCP server can offer three kinds of things: tools the assistant can call, resources it can read, and prompts you can pick. This server uses all three.
Database tools
| Tool | What it does |
|---|---|
list_databases | Shows the databases you can explore. |
use_database | Picks a default database for the rest of the chat (not on a locked connection). |
describe_database | Lists tables and views, row counts, and the exact name to use in queries. |
describe_table | Columns, types, primary and foreign keys. |
sample_rows | The first few rows of a table. |
run_query | Runs one read-only SELECT and returns the result. |
check_query | Says whether a query is allowed and points out common mistakes, without running it. |
Every database tool takes an engine option: sqlserver (default) or mariadb. They hold the same data, with different SQL dialects.
Knowledge tools: DAX, SQL, Power Query M and Power BI
| Tool | What it does |
|---|---|
search_dax_knowledge | Finds how to do something in DAX, SQL, Power Query M, Power Pivot or Power BI, with working code. |
get_dax_guide | Reads a topic or one section in full. |
list_dax_topics | Lists the topics and their sections. |
lint_dax | Checks a formula for common mistakes. |
The same guides are plain Markdown for any tool: llms.txt (index), llms-full.txt (everything in one file) and agents.md (how an agent should use LearnSQL). See also Help with DAX and Power BI.
Resources
learnsql://guide: what this server is and how to use it.learnsql://schema/<engine>/<database>: every table and column of a database.
In many apps you can attach a resource to a chat so the assistant has the schema up front.
Prompts
- explore_database: a guided tour with five questions to try.
- teach_concept: learn one SQL idea with live examples, then an exercise.
- query_coach: show your query and your goal, get one improvement at a time.
In most apps, prompts appear as slash commands or in a "+" menu.