Skip to main content
Glama
dann26parr69

aifordatabase-mcp

by dann26parr69

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AFD_API_KEYYesYour afd_ Bearer key
AFD_API_BASENoAPI base URL overridehttps://app.aifordatabase.com/api/v1

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_connectionsA

List the database connections available to this API key. Returns id, name, type (POSTGRES/MYSQL/MARIADB/MSSQL/MONGODB/SQLITE), host, database, isActive. Use the returned id as connectionId in other tools.

get_schemaA

Get the cached schema (tables, columns, relationships) of a database connection. Call this once before writing SQL — no discovery queries needed.

run_queryA

Run a SQL query directly against a database connection. Deterministic, no AI in the loop, no credits consumed. Returns columns, rows, rowCount, executionTime. On a SQL error the database's own message is returned — fix the SQL and retry. Rows cap at 500, so aggregate in SQL rather than pulling raw tables.

askA

Ask a question about a database in plain English. The API's own agent translates it to SQL, runs it, and returns the answer (content), the SQL used (sqlQuery), and the results (queryResult). For follow-up questions, pass the conversationId from the previous response. Consumes AI credits — for repeated/known queries prefer run_query.

list_workflowsA

List workflows (scheduled database alerts / reports). Returns each workflow with its trigger type and step/action counts.

create_workflowA

Create a workflow: SQL steps + EMAIL/WEBHOOK actions, run manually or on a cron schedule. To make an alert, write a step query that only returns rows when the condition fires and set stopIfEmpty=true — actions then run only when rows come back. Step results are auto-appended to the email/webhook payload. Point a WEBHOOK at a Slack incoming-webhook URL for Slack alerts. Free plan allows 3 workflows.

run_workflowA

Run a workflow immediately (regardless of its schedule) and return the run record with its status.

list_dashboardsB

List dashboards. Dashboards re-run their widget queries on schedule server-side. To create one, the fastest path is the ask tool: 'create a dashboard showing revenue by month' with a connectionId.

get_usageA

Get the current AI-credit budget: included, topUp, used, and remaining (in cents) for the current billing period. Check this to self-throttle ask calls before hitting a 402.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dann26parr69/aifordatabase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server