/install mssql
MSSQL
Run SQL Server queries using scripts/mssql_query.sh.
Quick start
- Ensure credentials exist at:
~/.openclaw/credentials/mssql.env - Run a query:
bash skills/mssql/scripts/mssql_query.sh --query "SELECT TOP 20 name FROM sys.tables" - Save to file:
bash skills/mssql/scripts/mssql_query.sh --query "SELECT TOP 100 * FROM dbo.MyTable" --out /tmp/mytable.dsv
Credentials format
Expected env vars in ~/.openclaw/credentials/mssql.env:
MSSQL_HOSTMSSQL_DBMSSQL_USERMSSQL_PASSWORD- Optional:
MSSQL_PORT(default1433),MSSQL_ENCRYPT(yes/no, defaultyes),MSSQL_TRUST_CERT(yes/no, defaultno),SQLCMD_BIN
The credential file path can be overridden with the MSSQL_ENV_FILE environment variable.
Permissions
Query permissions are controlled entirely at the SQL Server user level. The script does not impose any restrictions on query type — the database user's grants determine what is allowed.
Database reference map
Place your database map at references/DB_MAP.md inside this skill folder. This file tells the agent which databases, schemas, and tables to use and how they relate to each other.
See references/DB_MAP.example.md for the expected format.
Useful patterns
- Run long query from file:
bash skills/mssql/scripts/mssql_query.sh --file /path/query.sql --out /tmp/out.dsv - Override database:
bash skills/mssql/scripts/mssql_query.sh --db OtherDB --query "SELECT TOP 10 * FROM dbo.Users" - Change delimiter:
bash skills/mssql/scripts/mssql_query.sh --query "SELECT ..." --delim "," - Increase timeout:
bash skills/mssql/scripts/mssql_query.sh --query "SELECT ..." --timeout 180
Output format
Output is delimiter-separated text, not RFC 4180 CSV. Fields are not quoted or escaped. This works well for structured numeric and short-text data. If your columns contain embedded delimiters, quotes, or newlines, the output may be malformed — choose a delimiter that does not appear in the data, or post-process the output.
Best practices
- Prefer explicit columns over
SELECT *. - Use
TOPfor exploratory samples. - Keep queries scoped to the user request.
- Answer in business language by default; provide SQL details when requested.
- Never print or expose credentials in responses.
Troubleshooting
sqlcmd not found-> install sqlcmd v18+ or setSQLCMD_BIN.- TLS/certificate issues on internal networks -> set
MSSQL_TRUST_CERT=yesin your credentials file. The default isno(certificate validation enabled).
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mssql - 安装完成后,直接呼叫该 Skill 的名称或使用
/mssql触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
MSSQL 是什么?
Execute SQL Server queries and export results as delimiter-separated text. Use when the user asks to fetch, insert, update, or manage data in Microsoft SQL S... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 209 次。
如何安装 MSSQL?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mssql」即可一键安装,无需额外配置。
MSSQL 是免费的吗?
是的,MSSQL 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
MSSQL 支持哪些平台?
MSSQL 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 MSSQL?
由 Umbra(@mohamed-hammane)开发并维护,当前版本 v1.0.2。