MCP_TOOLS.md
April 8, 2025 ยท View on GitHub
Available MCP Tools
-
execute_query
- Execute custom SQL queries with optional parameters
- Supports both read (SELECT) and write (INSERT/UPDATE/DELETE) operations
-
get_item
- Retrieve a single row from any table using a specified column
- Usage:
get_item(table_name, value, column)
-
update_item
- Update an existing row in a specified table
- Usage:
update_item(table_name, value, data, column) - Updates specified columns with new values
-
delete_item
- Delete a row from a specified table
- Usage:
delete_item(table_name, value, column) - Removes the specified row from the table
-
create_item
- Create a new row in a specified table
- Usage:
create_item(table_name, data) - Returns the ID of the newly created row
-
get_all_items
- Retrieve all rows from a specified table
- Usage:
get_all_items(table_name)
-
get_all_tables
- Get a list of all tables in the database
- Usage:
get_all_tables()
-
create_table
- Create a new table in the database
- Usage:
create_table(table_name, columns) - Columns should be a dictionary defining column properties
-
drop_table
- Drop (delete) a table from the database
- Usage:
drop_table(table_name, check_exists)
-
alter_table
- Modify the structure of an existing table
- Usage:
alter_table(table_name, operation, column_name, column_type, new_column_name) - Supports operations: add_column, drop_column, rename_column
-
backup_database
- Create a backup of the SQLite database
- Usage:
backup_database(backup_filename) - Creates a backup file in the same directory as the main database
-
get_db_version
- Get version of the database
- Usage:
get_db_version()
-
extract_to_json
- Extract data from a table and save it as a JSON file
- Usage:
extract_to_json(table_name, output_filename) - Saves the table's data to a JSON file. If
output_filenameis not provided, a timestamp-based name is used.