db_annotate
Persist semantic annotations for database tables and columns. Annotations survive sessions and merge into schema responses, preventing the AI from re-discovering meanings.
Instructions
Persist semantic annotations for a table or column — survives across sessions.
This is the core of amnesic's persistent memory. Every annotation saved here
is automatically merged into future db_get_schema() responses, so the AI
never has to rediscover what a status code means or what a table is for.
Call this after discovering: what an enum value means, what a column represents,
how a table relates to another, or what a table is used for.
Args:
table: Table name, optionally schema-qualified to match your
DB — e.g. "users", "public.users" (Postgres),
"dbo.Orders" (MSSQL), "mydb.orders" (MySQL).
connection: Connection name. Defaults to first defined.
table_description: Human-readable description of the table's purpose.
table_aliases: Alternative names the table is known by.
column: Column to annotate (required for column-level args below).
column_description: What this column represents in the business domain.
enum_values: Dict mapping stored values to labels {"1": "active", "2": "inactive"}.
foreign_key: FK reference as "other_table.column_name".
example_values: Representative sample values from this column.
Returns:
{table, connection, updated: {table_knowledge?, column_knowledge?}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| connection | No | ||
| table_description | No | ||
| table_aliases | No | ||
| column | No | ||
| column_description | No | ||
| enum_values | No | ||
| foreign_key | No | ||
| example_values | No |