MCP Tools
When you connect your IDE to DYPAI via MCP, your AI assistant gains access to a specialized set of tools. These tools allow the AI to understand your project's structure and perform actions on your behalf.
Available Capabilities
You don't need to call these tools by name; simply describe what you want to do in natural language. The AI will select the appropriate tool to fulfill your request.
Database Management
Manage your PostgreSQL schema and data without writing SQL.
| Capability | What you can ask the AI |
|---|---|
| Create Tables | "Create a 'users' table with email, name, and role columns." |
| Modify Schema | "Add a 'status' column to the 'orders' table." |
| Inspect Schema | "Show me the structure of the 'products' table." |
| Delete Tables | "Remove the 'test_data' table." |
| List Tables | "What tables do I have in my database?" |
API & Endpoints
Build and manage your REST API layer directly from your editor.
| Capability | What you can ask the AI |
|---|---|
| Create Endpoints | "Create a GET endpoint at /api/v1/profile that returns user data." |
| Update Logic | "Modify the /api/login endpoint to include a last_login timestamp." |
| Manage Groups | "Organize all payment-related endpoints into a 'Payments' group." |
| Validate Workflows | "Check if my 'checkout' workflow has any errors." |
| Search Endpoints | "Find all endpoints that interact with the 'inventory' table." |
Integrations & Credentials
Connect your backend to external services.
| Capability | What you can ask the AI |
|---|---|
| Configure Nodes | "Set up a WhatsApp notification node in my 'new-order' flow." |
| Manage Credentials | "Add my Stripe API keys to the project credentials." |
| Setup Integrations | "Configure an Email integration using SendGrid." |
Storage & Files
Handle file uploads and bucket management.
| Capability | What you can ask the AI |
|---|---|
| Manage Buckets | "Create a private bucket named 'user-documents'." |
| Create Storage Endpoint | "Create a storage endpoint for my 'documents' bucket." |
| List Files | "List all files in the 'avatars' folder." |
System & History
Monitor and understand your project's activity.
| Capability | What you can ask the AI |
|---|---|
| Execution History | "Show me the last 5 actions you performed on my backend." |
| Project Context | "Read the project documentation to understand how the auth flow works." |
How the AI uses these tools
The AI uses these tools as "building blocks". For a single request like "Create a full checkout system", the AI might:
- Inspect your current database schema.
- Create necessary tables (orders, line_items).
- Define REST endpoints for the checkout process.
- Configure a Stripe integration for payments.
- Setup a WhatsApp notification flow for order confirmation.
Best Practices for Building Workflows with MCP
1) Node preflight
Before creating or updating endpoints:
- Run
search_nodesto discover availablenode_typevalues. - Use
search_nodeswithnode_idto inspect node parameters and schemas. - Never invent
node_type. If a node is missing, choose a supported alternative.
2) Single placeholder contract
Use only these formats:
${input.field}${vars.<variable>.field}(recommended when the node definesvariable)${nodes.<node_id>.field}(also supported for direct node references)${current_user.field}${current_user_id}
Avoid flat placeholders (${name}, ${email}, ${id}), as they cause validation or runtime failures.
Custom Query (SQL): In the dypai_database node with operation = custom_query, the query field uses ${variable} just like the rest of the workflow. Example: WHERE user_id = ${current_user_id} AND name ILIKE '%' || ${input.search} || '%'. Do not wrap placeholders in quotes: WHERE id = ${current_user_id} (correct), not WHERE id = '${current_user_id}' (incorrect). Available variables: ${input.field}, ${params.field}, ${current_user_id}, ${record_id}, ${limit}, ${offset}.
3) Validate before saving
Always validate workflows before persisting them. This catches:
- unknown
node_type - invalid operations
- placeholders outside the contract
- required-parameter inconsistencies
4) Credentials in integration nodes
For nodes that call external services (e.g., agent, slack, resend, whatsapp, telegram, google_sheets, stripe), include a valid credential_id in parameters.
Recommended pattern:
credential_id = "${input.<provider>_credential_id}"- Keep credentials in the project credentials vault; never hardcode API keys in workflow JSON.
5) Storage setup pattern
When a user asks to "add file storage" or "set up uploads", the correct flow is:
- Create the bucket (if it doesn't exist) via the storage tool.
- Create one endpoint named
storage_{bucket}(e.g.storage_documents) with a singledypai_storagenode:operation = "${input.operation}"β routes upload, download, read, list, and delete automaticallybucket = "documents"β the bucket name
- Tell the user to call
dypai.storage.from('documents')from the SDK β the endpoint name and operation are sent automatically.
Do not create separate endpoints for upload, download, list, and delete. One endpoint per bucket handles everything.