MCPcopy Create free account
hub / github.com/bytebase/dbhub / createReadonlyViolationMessage

Function createReadonlyViolationMessage

src/utils/tool-handler-helpers.ts:45–51  ·  view source on GitHub ↗
(
  toolName: string,
  sourceId: string,
  connectorType: ConnectorType
)

Source from the content-addressed store, hash-verified

43 * @returns Formatted error message
44 */
45export function createReadonlyViolationMessage(
46 toolName: string,
47 sourceId: string,
48 connectorType: ConnectorType
49): string {
50 return `Tool '${toolName}' cannot execute in readonly mode for source '${sourceId}'. Only read-only SQL operations are allowed: ${allowedKeywords[connectorType]?.join(", ") || "none"}`;
51}
52
53/**
54 * Track a tool request in the request store

Callers 1

createCustomToolHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected