Copilot Tools
What are Copilot Tools?
Section titled “What are Copilot Tools?”Copilot Tools in DBCode allow you to interact with your databases using simple natural language. Instead of writing complex SQL queries or remembering connection details, you can simply ask questions about your data and get immediate results.
With DBCode’s Copilot Tools integration, you can:
- Find connections - Copilot can discover your available database connections automatically
- Read database schemas - Ask about tables, columns, and relationships without memorizing your schema. On document databases like MongoDB, the same tools return collections and their fields
- Execute queries - Ask questions about your data in plain English and get the query written and executed for you
- Make changes - Data updates and schema changes run through separate tools, so read-only questions stay read-only
- Copy data between connections - Run a query on one connection and insert the results into a table on another, like pulling a slice of production data into your dev database. Uses Import Data, a Pro feature
- Interpret results - Get insights and explanations of query results in natural language
Get Started
Section titled “Get Started”Simply use the agent mode in Copilot to enable the tools in your Copilot chat window. Once activated, you can start asking questions about your data in natural language.
Not using Copilot? The same tools are available to other AI assistants through DBCode’s MCP server.
Working with Schema Context
Section titled “Working with Schema Context”In agent mode, Copilot chains the tools on its own: it lists your connections, reads the schema for the database you’re asking about, then writes and runs the query against your real table and column names. You don’t need to feed it the schema first.
Two things still help:
- Name the connection and database when you have more than one: “on my PostgreSQL Dev connection” saves Copilot from guessing which to use.
- Set a default connection for the workspace and you can skip even that. Copilot picks up the default automatically when you don’t mention a connection.
Example Prompts
Section titled “Example Prompts”Here are some examples of what you can ask:
Schema exploration:
- “What tables exist in the sales_db database on my PostgreSQL connection?”
- “Show me the schema of the users table in the sales_db database on my MariaDB Dev connection”
- “List all tables and their columns from my_database on my SQL Server connection”
Queries:
- “Find all records created in the last 30 days in sales_db on my PostgreSQL connection”
- “Calculate the total count grouped by status”
- “Show me the top 10 items by revenue”
- “Write a query to find inactive accounts”
Copying data:
- “Copy last week’s orders from my Production connection into the orders table on my Dev connection”
- “Pull 500 rows of the customers table from staging into my local Postgres so I can test against real shapes”
Connection management:
- “Find connections to my PostgreSQL database”
- “What databases are available on my MySQL connection?”
Privacy and Security
Section titled “Privacy and Security”Copilot Tools share information with GitHub Copilot when you explicitly request it:
- Database schema (table/column names) when asking about database structure
- Actual data values when asking Copilot to execute queries and return results
Important: Unlike inline completion (which only sends schema), Copilot Tools can access and share actual data from your database when you ask it to run queries. Only use Copilot Tools with databases containing data you’re comfortable sharing with GitHub Copilot.
One exception: the copy data tool moves rows directly between your connections and reports only row counts back to Copilot. The copied rows themselves never pass through the model.
See AI Privacy and Security for detailed information on what data is shared and security considerations.