Skip to content

Commit bd0c1ed

Browse files
committed
fix mysql/pgsql tool security issue
1 parent 3b4ea30 commit bd0c1ed

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Tools/Toolkits/MySQL/MySQLWriteTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MySQLWriteTool extends Tool
1818
public function __construct(protected PDO $pdo)
1919
{
2020
parent::__construct(
21-
'execute_write_query',
21+
'mysql_write_query',
2222
'Use this tool to perform write operations against the MySQL database (e.g. INSERT, UPDATE, DELETE).'
2323
);
2424
}

src/Tools/Toolkits/PGSQL/PGSQLSchemaTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(
1717
protected ?array $tables = null,
1818
) {
1919
parent::__construct(
20-
'analyze_postgresql_database_schema',
20+
'analyze_pgsql_database_schema',
2121
'Retrieves PostgreSQL database schema information including tables, columns, relationships, and indexes.
2222
Use this tool first to understand the database structure before writing any SQL queries.
2323
Essential for generating accurate queries with proper table/column names, JOIN conditions,

src/Tools/Toolkits/PGSQL/PGSQLSelectTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class PGSQLSelectTool extends Tool
4343
public function __construct(protected PDO $pdo)
4444
{
4545
parent::__construct(
46-
'execute_select_query',
46+
'pgsql_select_query',
4747
'Use this tool only to run SELECT query against the PostgreSQL database.
4848
This the tool to use only to gather information from the PostgreSQL database.'
4949
);

src/Tools/Toolkits/PGSQL/PGSQLWriteTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PGSQLWriteTool extends Tool
1818
public function __construct(protected PDO $pdo)
1919
{
2020
parent::__construct(
21-
'execute_write_query',
21+
'pgsql_write_query',
2222
'Use this tool to perform write operations against the PostgreSQL database (e.g. INSERT, UPDATE, DELETE).'
2323
);
2424
}

0 commit comments

Comments
 (0)