#!/usr/bin/env bash
set -euo pipefail

VENV="/root/.openclaw/.venv-db"
TOOL="/root/.openclaw/workspace/sqlserver/company_db_tool.py"

if [ ! -x "$VENV/bin/python" ]; then
  echo "missing python runtime: $VENV/bin/python" >&2
  exit 1
fi

if [ ! -f "$TOOL" ]; then
  echo "missing tool script: $TOOL" >&2
  exit 1
fi

exec "$VENV/bin/python" "$TOOL" "$@"
