query_postgres and query_mongodb MCP tools, making the same retrieval capabilities available to developers and applications via HTTP.
Query PostgreSQL
Execute a read-only SQL SELECT query against PostgreSQL.Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
sql | string | Yes | SQL SELECT query to execute | |
database | string | No | datris | PostgreSQL database name to connect to |
limit | integer | No | 100 | Maximum rows to return (max 1000) |
Example
Response
Safety
The endpoint enforces multiple layers of protection:- SELECT-only — only queries starting with
SELECTare allowed - Read-only connection — the JDBC connection is set to read-only mode
- Statement blocklist — queries containing
INSERT,UPDATE,DELETE,DROP,ALTER,CREATE,TRUNCATE,GRANT,REVOKE,COPY,CALL,EXECUTE, orEXECare rejected - No stacked queries — semicolons are not allowed
- No SQL comments —
--and/* */are rejected to prevent obfuscation - LIMIT enforcement — if no
LIMITis present, one is appended automatically (max 1000)
Query MongoDB
Query a MongoDB collection with optional filter and projection.Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
collection | string | Yes | MongoDB collection name | |
filter | object | No | {} | MongoDB query filter |
projection | object | No | all fields | Fields to include/exclude |
limit | integer | No | 20 | Maximum documents to return (max 1000) |
Example
Response
Safety
- Blocked operators — filters containing
$where,$function, or$accumulatorare rejected, as these allow arbitrary JavaScript execution - Standard MongoDB query operators (
$eq,$gt,$in,$regex, etc.) are safe and fully supported
Kill Job
Kill a running pipeline job by its pipeline token. The job thread is interrupted and the job is marked as cancelled.Request
| Field | Type | Required | Description |
|---|---|---|---|
pipelineToken | string | Yes | Pipeline token of the running job to kill |
Example
Response
Error Cases
- Job not found for the given pipeline token
- Job is not in
PROCESSINGstate (already completed or cancelled) - Job thread is no longer alive