Overview
Tool Name
Purpose
The data_connector_tools provide comprehensive connectivity and management for relational data systems. Set up secure connections, explore schemas, run parameterized SQL with safe limits, and pull detailed table information for documentation, modeling, or pipelines.Functions Available
_query_database: Execute SQL on a chosen connection with limits, params, and optional Google Sheets export._add_database_connection: Create or update a named connection with credentials, description, and access controls._delete_database_connection: Remove a connection that is no longer required._list_database_connections: List available connections with metadata for discovery and governance._search_metadata: Search databases, schemas, tables, and columns to locate relevant objects quickly._data_explorer: Browse objects by database and schema to refine scope and discover structures._get_full_table_details: Return detailed schema info for a table including columns, types, and constraints._run_sqlite_cli_commands: Run SQLite CLI commands for local prototyping and import or export tasks.
Key Features
Execute SQL
Run parameterized queries with row limits, overrides when required, and optional export to Google Sheets.
Manage Connections
Add, list, and delete named connections with access controls for specific data agents or all data agents.
Search Metadata
Find databases, schemas, tables, and columns with fast keyword search to cut down exploration time.
Table Insights
Retrieve full table definitions including types, keys, and constraints for modeling and documentation.
SQLite Passthrough
Use SQLite CLI commands for quick local workflows like importing CSVs or inspecting schemas.
Input Parameters for Each Function
_query_database
Parameters
| Name | Definition | Format |
|---|---|---|
| connection_id | Target connection identifier. | String |
| query | SQL text to execute. Optional if using note_id or note_name. | String |
| database_name | Database name required by some engines such as Postgres. | String |
| max_rows | Maximum rows to return. Default 20. | Integer |
| max_rows_override | If true, bypasses default row limit. Use with caution. | Boolean |
| params | Named parameters for parameterized queries. | Object |
| note_id | Execute a saved query by ID. | String |
| note_name | Execute a saved query by name. | String |
| export_to_google_sheet | If true, export results to Google Sheets. | Boolean |
| export_title | Title to use for the exported Google Sheet. | String |
Prefer parameterized SQL via params to improve safety and reuse, and set max_rows intentionally for large datasets.
2. _add_database_connection
Parameters
| Name | Definition | Format |
|---|---|---|
| connection_id | Unique name for this connection. | String |
| connection_string | SQLAlchemy compliant URI for the database engine. | String |
| description | Human readable description of purpose and scope. | String |
| allowed_bot_ids | Data agents allowed to use this connection. Use "*" for all or provide explicit IDs. | List |
3. _delete_database_connection
Parameters
| Name | Definition | Format |
|---|---|---|
| connection_id | Connection to remove from the registry. | String |
4. _list_database_connections
Parameters
(No parameters. Returns all visible connections with metadata.)
5. _search_metadata
Parameters
| Name | Definition | Format |
|---|---|---|
| search_string | Keyword or pattern to search in metadata. | String |
| connection_id | Restrict search to a specific connection. | String |
| database | Filter to a database. | String |
| schema | Filter to a schema. | String |
| table | Filter to a table name. | String |
| top_n | Maximum number of results to return. | Integer |
6. _data_explorer
Parameters
| Name | Definition | Format |
|---|---|---|
| search_string | Optional partial match string for quick exploration. | String |
| connection_id | Connection context for exploration. | String |
| database | Target database name. Not valid for SQLite. | String |
| schema | Target schema name. Not valid for SQLite. | String |
| table | Exact table name to locate. | String |
| top_n | Maximum number of results to return. | Integer |
7. _get_full_table_details
Parameters
| Name | Definition | Format |
|---|---|---|
| connection_id | Connection where the table lives. | String |
| database | Database containing the table. | String |
| schema | Schema containing the table. | String |
| table | Table name for which to retrieve details. | String |
8. _run_sqlite_cli_commands
Parameters
| Name | Definition | Format |
|---|---|---|
| connection_id | Must reference a SQLite connection. | String |
| commands | CLI commands such as .tables or .schema . | List |
SQLite only
The CLI passthrough is limited to SQLite connections. Avoid destructive commands in shared environments.
The CLI passthrough is limited to SQLite connections. Avoid destructive commands in shared environments.
Use Cases
- Cross database analytics Connect to Snowflake and Postgres, explore metadata, and run controlled SQL for KPIs with optional export to Google Sheets.
- Schema discovery
Use
_search_metadataand_data_explorerto identify the right tables and columns before writing joins. - Data documentation
Pull
_get_full_table_detailsfor core entities to build a lightweight data dictionary. - Prototyping with SQLite
Import CSVs and test SQL logic via
_run_sqlite_cli_commandsbefore promoting to a warehouse.
Start with metadata search to narrow scope, then fetch table details, then query. This lowers cost and reduces timeouts.
Workflow/How It Works
- Step 1: Add or verify a connection
Create with
_add_database_connectionor list with_list_database_connections. - Step 2: Explore and scope
Use
_search_metadataor_data_explorerto locate relevant objects. - Step 3: Inspect details
Call
_get_full_table_detailsfor types, keys, and constraints. - Step 4: Run SQL safely
Execute with
_query_database, setmax_rows, and preferparamsfor safety. Optionally export to Google Sheets. - Step 5: Maintain hygiene
Remove unused connections via
_delete_database_connectionand keep descriptions current.
Integration Relevance
- Snowflake workflows: Use alongside
snowflake_toolsfor staging and ingestion. - Harvesting: Feed
harvester_toolsto keep metadata fresh for search. - Collaboration: Export results with
google_drive_toolsand attach outputs viafile_manager_tools. - Project tracking: Link queries and docs in
project_manager_tools. - Versioning: Store reusable SQL with
git_action.
Configuration Details
- Provide valid SQLAlchemy URIs per engine and ensure network or VPN access is in place.
- Use
allowed_bot_idsfor access control."*"grants access to all data agents. - For engines that require it such as Postgres, provide
database_namewhen querying. - Result pagination and row limits help protect memory usage on large datasets.
Ensure the executing identity has the required database permissions for both metadata and data access. Missing grants will cause search or query failures.
Limitations or Notes
- Row limits
Default limit is 20 rows. Exactly 20 rows may indicate more data. Increase
max_rowsor paginate. - Engine differences Some parameters and behaviors vary by engine. SQLite CLI passthrough is exclusive to SQLite.
- Performance and timeouts Long running queries can time out. Filter and aggregate early and avoid cross joins.
- Security Never include credentials in logs or outputs. Use parameterized queries to reduce injection risk.
- Exports Google Sheets export requires valid Drive credentials and permissions.
Output
- Connection management Success or error messages when adding, deleting, or listing connections.
- Query results Rows with columns, row count, execution metadata, and optional Google Sheets export info.
- Metadata search Structured matches for databases, schemas, tables, and columns with relevance.
- Table details Column definitions, data types, keys, and constraints.
- SQLite CLI Raw command output and any error messages.

