Generic JDBC MCP server
Prebuilt SnapLogic agentic-tool pipelines that let an LLM read from and act on Generic JDBC, callable as MCP tools via Pipeline Execute. Published in the SnapLogic pattern catalog.
Overview
This tool pack lets an agent query and modify any JDBC-connected database, including Postgres, MySQL, SQL Server, Oracle, and others. It provides raw SQL tools for reads and writes, plus structured insert and update operations that accept table names and record objects directly.
For setup instructions, see SnapLogic MCP Server quickstart.
Example Prompts
- What tables exist in this database?
- Show me the 20 most recent orders with their customer name and total
- How many customers do we have per country?
- List the columns and data types on the invoices table
- Find every account with a balance over 10,000 and no activity since January
- Delete every customer record created before 2024
- Mark all orders older than 90 days as archived
- Set the status to 'inactive' for accounts with no logins in the last year
- Create a staging table with the same columns as orders
- Copy last month's transactions into the transactions_archive table
Tools
| Tool Name | Functions |
|---|---|
| GenericJDBCExecuteRead | Run a read-only SQL query and return the result rows. |
| GenericJDBCExecuteWrite | Execute a write SQL statement (INSERT/UPDATE/DELETE/DDL). |
| GenericJDBCInsertRows | Insert a row into a named table from a record object. |
| GenericJDBCInsertRowsChild | Generic JDBC Insert Rows Child |
| GenericJDBCUpdateRows | Update rows in a named table using a record and a WHERE condition. |
| GenericJDBCUpdateRowsChild | Generic JDBC Update Rows Child |
Set up the MCP Server tools
- Download genericjdbc_tools.zip.
- In SnapLogic Designer, open the target project space (or create one), then choose Import Project / Import Pipelines and select the downloaded genericjdbc_tools.zip. Designer unpacks each pipeline into the project.
- Attach the required account to the connectivity snaps (see Connection Setup).
- Expose the project as an MCP server — each pipeline becomes a tool named after its label. New to this? Start with the MCP quickstart, then use the MCP Server Pipeline Builder to generate the server from the imported pipelines.
Configure account
Attach a Generic JDBC account (driver JAR, JDBC URL, credentials) to the JDBC snaps in Designer after import.
These pipelines ship without credentials by design — attach a valid account in Designer before the tools will execute.
See the SnapLogic account documentation for this connector: Jdbc Account.
GenericJDBCExecuteRead
Runs any read-only SQL statement against the connected JDBC database and returns the result rows. Use it for joins, aggregates, filters, and schema discovery queries that the structured tools cannot express.
| Parameter | Type | Default | Description |
|---|---|---|---|
| sql_statement* | string | — | The full read SQL statement to execute, e.g. SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES. |
* Required parameter.
Try asking:
- What tables exist in this database?
- Show me the 20 most recent orders with their customer name and total
- How many customers do we have per country?
- List the columns and data types on the invoices table
- Find every account with a balance over 10,000 and no activity since January
GenericJDBCExecuteWrite
Executes any data-changing SQL statement, including INSERT, UPDATE, DELETE, and DDL, against the connected JDBC database. Use it for complex writes, such as multi-table deletes, subquery-driven updates, or schema changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
| sql_statement* | string | — | The full write SQL statement to execute, e.g. DELETE FROM customers WHERE created_date < '2024-01-01'. |
* Required parameter.
Try asking:
- Delete every customer record created before 2024
- Mark all orders older than 90 days as archived
- Set the status to 'inactive' for accounts with no logins in the last year
- Create a staging table with the same columns as orders
- Copy last month's transactions into the transactions_archive table
GenericJDBCInsertRows
Inserts a row into a named table by accepting a record object of column names and values, without requiring the agent to write SQL. Use it when you know the target table and want to add a single row cleanly.
| Parameter | Type | Default | Description |
|---|---|---|---|
| table_name* | string | — | Table to insert into, e.g. customers. |
| schema_name | string | — | Schema containing the table, e.g. public. Omit or leave blank to use the account's default schema. |
| record* | object | — | Column/value map for the new row, e.g. {name, email, balance}. |
* Required parameter.
Try asking:
- Add a new customer called Acme Corp with email [email protected] and a 5000 balance
- Insert a row into public.products for SKU-4471, price 29.99
- Create an employee record for Maria Santos in the hr schema
- Log a new entry in the audit_events table with today's date and action 'manual review'
GenericJDBCInsertRowsChild
Lets the LLM generic jdbc insert rows child, exposed as an MCP tool callable via Pipeline Execute.
| Parameter | Type | Default | Description |
|---|---|---|---|
| table_name | string | customers |
— |
| schema_name | string | — | — |
GenericJDBCUpdateRows
Updates rows in a named table using a record object of column changes and a WHERE condition, without requiring the agent to write SQL. Use it for targeted edits where you know the table and the identifying condition.
| Parameter | Type | Default | Description |
|---|---|---|---|
| table_name* | string | — | Table to update, e.g. customers. |
| schema_name | string | — | Schema containing the table, e.g. public. Omit or leave blank to use the account's default schema. |
| update_condition* | string | — | WHERE clause identifying the rows to update, e.g. id = 42. |
| record* | object | — | Column/value map of the changes to apply, e.g. {balance: 7500, status: 'premium'}. |
* Required parameter.
Try asking:
- Set customer 42's balance to 7500 and status to premium
- Update the shipping address on order 10093
- Mark every row in public.customers with status 'trial' as 'expired'
- Change the owner of the account where id = 118 to Jordan
GenericJDBCUpdateRowsChild
Lets the LLM generic jdbc update rows child, exposed as an MCP tool callable via Pipeline Execute.
| Parameter | Type | Default | Description |
|---|---|---|---|
| table_name | string | customers |
— |
| schema_name | string | — | — |
| update_condition | string | id = 1 |
— |