Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AF_DB_HOST | Yes | The database host | |
| AF_DB_NAME | Yes | The database name | |
| AF_DB_PORT | No | The database port | 5432 |
| AF_DB_USER | Yes | The database username | |
| AF_DB_PASSWORD | Yes | The database password |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query | Execute a read-only SQL query against the database. Only SELECT queries are allowed. Use this to explore data,
debug issues, or validate assumptions about the data.
Args:
sql: A SELECT query to execute
Returns:
JSON array of results, or error message |
| list_tables | List all tables in the database. Returns tables from all schemas (excluding system schemas).
Use this to discover what data is available.
Returns:
JSON array of tables with schema, name, and type |
| describe_table | Get detailed schema information for a table. Returns column names, types, nullability, and defaults.
Use this to understand table structure before querying.
Args:
table_name: Name of the table
schema_name: Schema name (default: public)
Returns:
JSON with columns, primary keys, and foreign keys |
| sample_data | Get sample rows from a table. Useful for understanding what data looks like without
writing a full query.
Args:
table_name: Name of the table
schema_name: Schema name (default: public)
limit: Number of rows to return (default: 10, max: 100)
Returns:
JSON array of sample rows |
| count_rows | Count rows in a table, optionally with a WHERE clause. Args:
table_name: Name of the table
schema_name: Schema name (default: public)
where: Optional WHERE clause (without 'WHERE' keyword)
Returns:
JSON with count |
| search_columns | Search for columns by name across all tables. Useful when you know a column name but not which table it's in.
Args:
search_term: Partial column name to search for (case-insensitive)
Returns:
JSON array of matching columns with their tables |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |