Database map
dbTrace which code queries each table by mapping database schema, columns, keys and indexes from repo migrations or a read-only live connection.
Instructions
Map the database: tables, columns, primary and foreign keys, indexes, and the code that queries each table (file:line). By default it reads schema sources in the repo: SQL migrations, Prisma, Drizzle, SQLAlchemy, Diesel and Django models. To inspect a live Postgres, MySQL or SQLite database, pass url_env (the NAME of an environment variable holding the connection string). The connection is strictly read-only and the string is never stored or shown. Pass table for one table's full detail.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "db"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Connection string (prefer url_env so secrets stay out of transcripts). | |
| root | No | Repository root. Defaults to the client's workspace root or the server's working directory. | |
| table | No | Focus on one table: columns, indexes, who references it, and where the code queries it. | |
| format | No | text (default, compact, file:line cited) or json. | |
| url_env | No | Name of an env var with the connection string, e.g. DATABASE_URL. |