Docs
Pour les agents et les développeurs
La référence technique : le point d’accès MCP, ses outils et la forme d’une proposition.
Point d’accès
- Adresse :
https://jilliondb.com/mcp(HTTP streamable, JSON-RPC 2.0). - Authentification :
Authorization: Bearer dbk_…avec une clé des Paramètres. - Limites : 240 requêtes par minute et par clé, 50 propositions en attente par projet.
Outils
list_projectsLists the JillionDB projects this key can see, with their database engine and table count.
get_schemaReturns the current schema of a project as SQL for its database engine (default) or as JillionDB JSON.
list_issuesLists design problems in the current schema: missing keys, unindexed relationships, type mismatches and engine limits.
propose_changeProposes a schema change for the user to review in JillionDB.
get_proposalReturns a proposal’s status.
list_proposalsLists recent proposals for a project, newest first.
Proposer un changement
Envoyez exactement l’un de operations ou sql, avec un summary d’une phrase pour la personne qui examine. Préférez operations : elles disent exactement ce qui change, donc un renommage reste un renommage. sql est le schéma complet souhaité, et JillionDB calcule la différence.
{
"project_id": "…",
"summary": "Add a timezone to users so reminders go out at local time",
"operations": [
{ "op": "add_column", "table": "users",
"column": { "name": "timezone", "type": "varchar(64)", "nullable": false, "default": "UTC" } }
]
}Opérations
Each operation is an object with "op" and the fields below. Names are table and column names as they appear in get_schema.
- create_table: table, columns [{name, type, nullable?, default?, unique?, primary_key?, comment?, references?}], primary_key? [names], comment?
- drop_table: table
- rename_table: table, to
- add_column: table, column {name, type, nullable?, default?, unique?, comment?, references?}
- drop_column: table, column
- rename_column: table, column, to
- alter_column: table, column, type?, nullable?, default?, unique?, comment?
- add_index: table, columns [names], unique?, name?
- drop_index: table, name or columns
- add_foreign_key: table, columns [names], references {table, columns? (defaults to its primary key), on_delete?}
- drop_foreign_key: table, columns or name
- set_primary_key: table, columns
- add_check: table, expression, name?
- drop_check: table, name or expression
- set_comment: table, column?, comment
Types: uuid, text, varchar(n), char(n), smallint, integer, bigint, serial, bigserial, decimal(p,s), float, double, boolean, date, time, timestamp, timestamptz, json, binary, enum('a','b').
Defaults: a value (string, number, true/false), "now", "uuid", "autoincrement", {"value": ...} for literal text that looks like a keyword, or {"sql": "..."} for a raw expression.
references: {table, column?, on_delete?: cascade | restrict | set null | set default | no action}.Après l’approbation
get_proposal renvoie migration_up et migration_down pour la base du projet. Écrivez le SQL up tel quel dans les migrations du projet, et le down comme annulation si votre outil de migration le permet. Si la personne qui examine a modifié la proposition, edited_by_reviewer vaut true.