执行SQL查询 Args: sql: SQL查询语句 db_type: 数据库类型(sqlite) Returns: JSON格式的查询结果
(sql: str)
| 22 | |
| 23 | @mcp.tool() |
| 24 | def execute_sql(sql: str) -> str: |
| 25 | """执行SQL查询 |
| 26 | |
| 27 | Args: |
| 28 | sql: SQL查询语句 |
| 29 | db_type: 数据库类型(sqlite) |
| 30 | |
| 31 | Returns: |
| 32 | JSON格式的查询结果 |
| 33 | """ |
| 34 | return _execute_sqlite(sql) |
| 35 | |
| 36 | |
| 37 | def _execute_sqlite(sql: str) -> str: |
nothing calls this directly
no test coverage detected