different-ai/openwork · error · Error
Only a single SQL statement is allowed
Error message
Only a single SQL statement is allowed
What it means
Error "Only a single SQL statement is allowed" thrown in different-ai/openwork.
Source
Thrown at ee/packages/den-admin-mcp/index.mjs:188
membershipsByUser(ids),
]);
return userRows.map((row) => ({
name: row.name,
email: row.email,
signedUpAt: row.created_at,
lastActiveAt: lastActive.get(row.id) ?? null,
organizations: memberships.get(row.id) ?? [],
}));
}
// --- read-only guard for den_query ---
const FORBIDDEN_SQL =
/\b(insert|update|delete|drop|alter|create|truncate|rename|replace|grant|revoke|call|load|handler|lock|unlock|set|use|outfile|dumpfile|for\s+update)\b/i;
function assertReadOnly(input) {
const sqlText = input.trim().replace(/;+\s*$/, "");
if (sqlText.includes(";")) throw new Error("Only a single SQL statement is allowed");
if (!/^(select|with|show|describe|explain)\b/i.test(sqlText)) {
throw new Error("Only SELECT/WITH/SHOW/DESCRIBE/EXPLAIN statements are allowed");
}
if (FORBIDDEN_SQL.test(sqlText)) {
throw new Error("Statement contains a forbidden keyword (read-only access)");
}
return sqlText;
}
// --- MCP server ---
// Keep in sync with package.json. The hosted admin MCP may expose additional
// admin-only write tools while this break-glass stdio variant remains read-only.
const DEN_ADMIN_MCP_VERSION = "0.4.0";
const server = new McpServer({ name: "den-admin", version: DEN_ADMIN_MCP_VERSION });
server.tool(View on GitHub (pinned to 2b7df46e8a)
When it happens
Trigger: Thrown at ee/packages/den-admin-mcp/index.mjs:188 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/887d0504201bd9d2.
Report an issue: GitHub.