BigQuery Validator
mcp-bigquery
Exploración segura de BigQuery a través de Model Context Protocol
Documentación | Inicio rápido | Ejemplos
Resumen
mcp-bigquery es un servidor de Model Context Protocol (MCP) que permite a los asistentes de IA (como Claude) interactuar de forma segura con Google BigQuery.
Características principales
Ejecución segura: Todas las operaciones están estrictamente limitadas a la verificación de dry-run. El servidor nunca ejecuta consultas que muten datos o incurran en costos de ejecución.
Transparencia de costos: Proporciona estimaciones de costos de consulta y bytes procesados antes de la ejecución.
Análisis estático: Analiza las dependencias de las consultas y valida la sintaxis SQL.
Exploración de esquemas: Navega por conjuntos de datos, tablas y columnas.
Valor para el negocio
Problema | Solución con mcp-bigquery |
Ejecución no intencional de consultas costosas | Estimación de costos antes de la ejecución |
Desarrollo retrasado debido a errores de sintaxis SQL | Detección temprana de errores de sintaxis |
Falta de visibilidad de las estructuras de esquema | Descubrimiento seguro de metadatos de esquema |
Riesgo de mutación no autorizada de datos por IA | Restricciones de dry-run aplicadas |
Related MCP server: BigQuery MCP Server
Inicio rápido
Paso 1: Instalación
Instale el paquete mediante pip:
pip install mcp-bigqueryPaso 2: Autenticación
Configure la autenticación de Google Cloud Platform:
# For user account authentication
gcloud auth application-default login
# For service account authentication
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.jsonPaso 3: Configuración de Claude Desktop
Configure el servidor en el archivo de configuración de Claude Desktop:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Añada la siguiente entrada:
{
"mcpServers": {
"mcp-bigquery": {
"command": "mcp-bigquery",
"env": {
"BQ_PROJECT": "your-gcp-project-id"
}
}
}
}Paso 4: Verificación
Reinicie Claude Desktop y ejecute las siguientes consultas para verificar la configuración:
"¿Qué conjuntos de datos están disponibles en mi proyecto de BigQuery?"
"¿Puedes estimar el costo de: SELECT * FROM dataset.table"
"Muéstrame el esquema de la tabla users"
Herramientas disponibles
Validación y análisis de SQL
Herramienta | Propósito | Caso de uso principal |
bq_validate_sql | Comprobar la sintaxis SQL | Verificación antes de la ejecución de consultas |
bq_dry_run_sql | Obtener estimaciones de costos y metadatos | Evaluación de costos antes de la ejecución |
bq_extract_dependencies | Mapear dependencias de tablas | Mapeo de linaje y dependencias |
bq_validate_query_syntax | Análisis detallado de sintaxis | Depuración de consultas SQL complejas |
Descubrimiento de esquemas
Herramienta | Propósito | Caso de uso principal |
bq_list_datasets | Listar todos los conjuntos de datos en el proyecto | Descubrimiento inicial del proyecto |
bq_list_tables | Listar tablas con metadatos de particionamiento | Exploración de la estructura del conjunto de datos |
bq_describe_table | Obtener detalles del esquema | Verificación a nivel de columna |
bq_get_table_info | Recuperar metadatos completos | Análisis de estadísticas de tablas |
bq_preview_table | Vista previa de datos de tabla (sin costo) | Comprobación de registros de muestra sin costos de escaneo de datos |
[!IMPORTANTE] La herramienta bq_preview_table utiliza
client.list_rows(API:tabledata.list) para recuperar filas de muestra directamente, lo que resulta en cero bytes escaneados y sin costos de ejecución. Para evitar la exposición no intencional de información sensible (como PII) al LLM, esta herramienta está deshabilitada por defecto. Debe optar explícitamente configurandoMCP_BQ_ENABLE_PREVIEW=trueen su configuración de entorno.
Configuración
Variables de entorno
Variable | Propósito | Valor predeterminado |
| ID del proyecto de GCP objetivo | Determinado mediante ADC |
| Región de BigQuery objetivo | No establecido |
| Precio por TiB para la estimación de costos | 5.0 |
| Verbosidad del registro (DEBUG, INFO, WARNING, ERROR, CRITICAL) | WARNING |
| Habilitar la herramienta bq_preview_table (true/false) | false |
Ejemplo de archivo .env
Para entornos de prueba locales o de desarrollo, puede definir estas variables en un archivo .env:
BQ_PROJECT=your-gcp-project-id
BQ_LOCATION=asia-northeast1
SAFE_PRICE_PER_TIB=5.0
LOG_LEVEL=WARNING
MCP_BQ_ENABLE_PREVIEW=trueEjemplo completo de configuración de Claude Desktop
{
"mcpServers": {
"mcp-bigquery": {
"command": "mcp-bigquery",
"env": {
"BQ_PROJECT": "my-production-project",
"BQ_LOCATION": "asia-northeast1",
"SAFE_PRICE_PER_TIB": "6.0",
"LOG_LEVEL": "WARNING",
"MCP_BQ_ENABLE_PREVIEW": "true"
}
}
}
}Solución de problemas
Errores mapeados y soluciones
Error de autenticación
Error: Could not automatically determine credentialsSolución: Vuelva a autenticarse usando la línea de comandos:
gcloud auth application-default login
Permiso denegado
Error: User does not have bigquery.tables.get permissionSolución: Otorgue el rol
BigQuery Data Viewera la identidad objetivo:gcloud projects add-iam-policy-binding YOUR_PROJECT \ --member="user:your-email@example.com" \ --role="roles/bigquery.dataViewer"
Falta el ID del proyecto
Error: Project ID is requiredSolución: Asegúrese de que la variable
BQ_PROJECTesté configurada correctamente en su configuración.
Ejemplos de uso
Ejemplo 1: Verificar costos antes de ejecutar
# Before running an expensive query...
query = "SELECT * FROM `bigquery-public-data.github_repos.commits`"
# First, check the cost
result = bq_dry_run_sql(sql=query)
print(f"Estimated cost: ${result['usdEstimate']}")
print(f"Data processed: {result['totalBytesProcessed'] / 1e9:.2f} GB")
# Output:
# Estimated cost: $12.50
# Data processed: 2500.00 GBEjemplo 2: Comprender la estructura de la tabla
# Check table schema
result = bq_describe_table(
dataset_id="your_dataset",
table_id="users"
)
# Output:
# ├── user_id (INTEGER, REQUIRED)
# ├── email (STRING, NULLABLE)
# ├── created_at (TIMESTAMP, REQUIRED)
# └── profile (RECORD, REPEATED)
# ├── name (STRING)
# └── age (INTEGER)Ejemplo 3: Rastrear dependencias de datos
# Understand query dependencies
query = """
WITH user_stats AS (
SELECT user_id, COUNT(*) as order_count
FROM orders
GROUP BY user_id
)
SELECT u.name, s.order_count
FROM users u
JOIN user_stats s ON u.id = s.user_id
"""
result = bq_extract_dependencies(sql=query)
# Output:
# Tables: ['orders', 'users']
# Columns: ['user_id', 'name', 'id']
# Dependency Graph:
# orders → user_stats → final_result
# users → final_resultEstado del proyecto e historial de versiones
Versión | Fecha de lanzamiento | Resumen de cambios |
v0.7.1 | 2026-08-17 | Restricciones de dependencia de mcp refinadas y documentación wiki simplificada |
v0.7.0 | 2026-06-21 | Se añadió la herramienta de vista previa de tabla sin costo ( |
v0.6.0 | 2026-06-21 | Caché segura para subprocesos, consultas AST recursivas, reintentos con backoff y mapeo de excepciones de Google API |
v0.5.0 | 2026-01-02 | Formateadores consolidados, caché de cliente y controles de registro unificados |
v0.4.2 | 2025-12-08 | Explorador de esquemas modular y controles unificados de cliente/registro |
v0.4.1 | 2025-01-22 | Mejoras en el manejo de errores y registro de depuración |
v0.4.0 | 2025-01-22 | Se añadieron herramientas de descubrimiento de esquemas |
v0.3.0 | 2025-01-17 | Motor de análisis estático SQL integrado |
v0.2.0 | 2025-01-16 | Versión inicial que admite consultas básicas de validación y dry-run |
Desarrollo y contribución
Para obtener instrucciones sobre la configuración de desarrollo local y las políticas de contribución, consulte la guía CONTRIBUTING.md.
# Clone the repository
git clone https://github.com/caron14/mcp-bigquery.git
cd mcp-bigquery
# Install development dependencies
pip install -e ".[dev]"
# Execute the test suite
pytest tests/Licencia
Este proyecto está licenciado bajo la Licencia MIT. Consulte LICENSE para obtener más detalles.
Available Tools
9 toolsbq_describe_tableB
Get table schema, metadata, and statistics
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | The table ID | |
| dataset_id | Yes | The dataset ID | |
| project_id | No | GCP project ID (uses default if not provided) | |
| format_output | No | Whether to format schema as table string |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It correctly implies a read-only operation ('Get') and lists output categories (schema, metadata, statistics), but does not disclose permissions, latency, or data freshness. Adequate but not detailed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the verb and resource. Every word contributes meaning with zero waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with a well-documented input schema and no output schema, the description gives a high-level summary but lacks specifics on the return format, field details, or how it differs from similar siblings. It meets minimum viability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 4 parameters are fully documented in the input schema (100% coverage). The description adds no extra parameter semantics beyond the schema descriptions, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'table schema, metadata, and statistics'. However, it does not differentiate from sibling tool 'bq_get_table_info', which likely has overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'bq_get_table_info' or 'bq_list_tables'. It lacks when-not-to-use or context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_dry_run_sqlB
Perform a dry-run of a BigQuery SQL query to get cost estimates and metadata
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to dry-run | |
| params | No | Optional query parameters (key-value pairs) | |
| pricePerTiB | No | Price per TiB for cost estimation (defaults to env var or 5.0) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears full responsibility for behavioral disclosure. It only states the tool performs a dry-run and returns cost estimates and metadata, but fails to mention key aspects such as idempotency (safe to call multiple times), required permissions, rate limits, or what exactly 'metadata' includes. The non-destructive nature is implied but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the tool's purpose. It is front-loaded and contains no unnecessary words or information, earning its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 parameters (one nested object) and no output schema, the description is minimal. It outlines the goal but omits details on return values, error handling, and edge cases. While the tool is straightforward, the lack of output schema means the description should provide more context on what the agent can expect from the dry-run results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with each parameter described in the input schema. The description itself adds no additional semantic meaning beyond what the schema provides. Baseline is 3 because the schema does the heavy lifting; the description does not compensate for any gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs a dry-run of a BigQuery SQL query to get cost estimates and metadata. It uses a specific verb (dry-run) and resource (BigQuery SQL query). However, it does not distinguish from the sibling tool 'bq_validate_sql', which may also involve checking queries, reducing clarity on when to use each.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like bq_validate_sql. There is no mention of prerequisites, context, or situations where this tool is appropriate or not, leaving the agent with no decision support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_extract_dependenciesC
Extract table and column dependencies from BigQuery SQL
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to analyze | |
| params | No | Optional query parameters (key-value pairs) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must fully disclose behavioral traits. It does not mention whether the tool executes the query, is read-only, requires permissions, or has side effects. 'Extract' implies reading but it is not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no redundant information. Every word is necessary.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool extracts dependencies but provides no output schema, leaving the agent uninformed about the return format. Given the complexity of dependencies (tables, columns), the description is too sparse.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes both parameters. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Extract' and the resource 'table and column dependencies from BigQuery SQL', making the action clear. It implicitly distinguishes from siblings like bq_validate_query_syntax, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., bq_validate_sql). The description lacks any context about appropriate use cases or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_get_table_infoB
Get comprehensive table information including partitioning and clustering
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | The table ID | |
| dataset_id | Yes | The dataset ID | |
| project_id | No | GCP project ID (uses default if not provided) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full burden of behavioral transparency. It mentions the tool is a 'get' operation but does not disclose auth requirements, error handling, or whether it is read-only. The inclusion of partitioning and clustering adds some output context but not behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that states the tool's purpose without any wasted words. It is maximally concise while still conveying essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple information-retrieval tool with three parameters and no output schema, the description provides the core purpose and hints at output content (partitioning, clustering). However, it lacks details on error behavior, output format, and differentiation from siblings, making it adequate but incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% description coverage, so baseline is 3. The description does not add any extra meaning to the parameters beyond the schema, as it focuses on the output instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves comprehensive table information including partitioning and clustering. However, it does not explicitly distinguish itself from the sibling tool bq_describe_table, which likely has overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like bq_describe_table. The description lacks any usage context or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_list_datasetsB
List all datasets in the BigQuery project
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | GCP project ID (uses default if not provided) | |
| max_results | No | Maximum number of datasets to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. The description lacks behavioral details such as pagination, rate limits, or error handling. The claim 'List all datasets' is contradicted by the max_results parameter, which limits results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence without fluff, but could be more informative about behavior. It is efficient but slightly under-specified.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, so description should explain return format. It does not. Lacks context on when to use vs siblings like bq_list_tables. Insufficient for an agent to fully understand the tool's role.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions cover 100% of parameters with clear meanings. The description adds no extra value beyond the schema, meeting the baseline but not exceeding it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'datasets in the BigQuery project', distinguishing it from siblings like bq_list_tables which list tables instead.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives (e.g., bq_list_tables for tables). Missing context on prerequisites or suitable scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_list_tablesA
List all tables in a BigQuery dataset with metadata
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | The dataset ID | |
| project_id | No | GCP project ID (uses default if not provided) | |
| max_results | No | Maximum number of tables | |
| table_type_filter | No | Filter by table types (TABLE, VIEW, EXTERNAL, MATERIALIZED_VIEW) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description bears full burden. It states the operation is a listing with metadata but omits behavioral details like pagination, rate limits, or whether it requires specific permissions. It is not misleading but leaves gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence of 8 words, front-loaded with purpose. Every word earns its place; no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no output schema. Description says 'with metadata' but does not specify what metadata fields are returned. For a list operation, this is adequate but not complete. Parameters are well-documented, but return value details are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% coverage with descriptions for all 4 parameters. The description adds no extra meaning beyond 'with metadata', which hints at return content. Baseline is 3 since schema already provides clarity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all tables in a BigQuery dataset with metadata', specifying the verb 'list', resource 'tables', and scope 'in a BigQuery dataset'. It distinguishes itself from siblings like bq_describe_table and bq_get_table_info effectively.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives (e.g., bq_list_datasets lists datasets, not tables). The description implies usage for listing tables with metadata but doesn't provide when-not or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_preview_tableB
Get a preview of table data without running a query job (cost-free)
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | The table ID | |
| dataset_id | Yes | The dataset ID | |
| project_id | No | GCP project ID (uses default if not provided) | |
| max_results | No | Maximum number of rows to preview (default: 5, hard limit: 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must fully disclose behavior. It mentions cost-free and no query job, but fails to describe return format (e.g., rows), ordering (first rows?), or the hard limit of 10 from the schema. This omission leaves significant behavioral unknowns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with zero wasted words. It efficiently conveys purpose and key differentiator.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description should explain return values (e.g., 'returns first N rows as JSON') but does not. It also omits details like permission requirements or that preview uses the first rows. The tool is simple, but the description is incomplete for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with all parameters described in the schema. The description adds no extra meaning beyond summarizing the schema. Thus baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('preview table data') and key benefit ('cost-free, without running a query job'). It distinguishes from siblings like bq_describe_table (schema) and bq_run_query (costly query). This provides a specific verb+resource with differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for quick, cost-free previews but lacks explicit when-not or alternative tools. With siblings including bq_get_table_info and bq_dry_run_sql, no comparison or exclusion is provided, leaving guidance implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_validate_query_syntaxC
Enhanced syntax validation with detailed error reporting
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to validate | |
| params | No | Optional query parameters (key-value pairs) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It claims 'detailed error reporting' but does not explain what constitutes enhanced behavior, side effects, or limitations. Lacks any behavioral context beyond a vague promise.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (one phrase), but it is front-loaded with functionality. However, it sacrifices necessary detail for brevity, making it less helpful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and two parameters, the description should explain what 'enhanced' validation entails, expected error messages, or usage examples. It fails to provide sufficient context for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with adequate parameter descriptions. The tool description adds no additional parameter-specific meaning, achieving only baseline value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'syntax validation' which implies validating SQL syntax, but does not explicitly mention SQL queries. The phrase 'enhanced...with detailed error reporting' adds some clarity but fails to distinguish from sibling tool 'bq_validate_sql'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus the similar sibling 'bq_validate_sql'. The description offers no context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bq_validate_sqlA
Validate BigQuery SQL syntax without executing the query
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to validate | |
| params | No | Optional query parameters (key-value pairs) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only states the tool validates without executing. It does not disclose what happens on invalid syntax, auth requirements, or whether it checks table existence, leaving significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single 8-word sentence with no extraneous information, achieving maximum conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no output schema, no annotations), the description is minimally adequate but lacks details about return values or behavior on errors, which would help agents understand the output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%; both parameters have clear descriptions in the schema. The tool description adds no extra parameter information beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the verb 'validate' and the resource 'BigQuery SQL syntax', and clearly states it does not execute the query, distinguishing it from bq_dry_run_sql which executes a dry run.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for syntax checking only, not execution. It contrasts with 'without executing', but does not explicitly name when not to use or mention bq_dry_run_sql as an alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.7.0- Added
bq_preview_table
4 tool updates
v0.2.1- Removed
bq_analyze_query_performance - Removed
bq_analyze_query_structure - Changed
bq_list_tables1 field changed- changed
Input schema / properties / max_results / descriptionPrevious value: -"Maximum number of tables to return"New value: +"Maximum number of tables"
- Removed
bq_query_info_schema
9 tool updates
v1.0.0- Added
bq_analyze_query_performance - Added
bq_analyze_query_structure - Added
bq_describe_table - Added
bq_extract_dependencies - Added
bq_get_table_info - Added
bq_list_datasets - Added
bq_list_tables - Added
bq_query_info_schema - Added
bq_validate_query_syntax
2 tool updates
- First observed
bq_dry_run_sql - First observed
bq_validate_sql
TDQS
Scored across 9 tools
Several tools have overlapping purposes: bq_validate_sql and bq_validate_query_syntax both validate syntax, while bq_describe_table and bq_get_table_info both return table metadata. Agents could easily confuse these and pick the wrong tool.
Naming is mostly consistent with a clear bq_ prefix and snake_case verb_noun pattern. The main inconsistency is validate_sql versus validate_query_syntax, which are different names for the same kind of operation.
Nine tools is a reasonable count for a BigQuery exploration and validation server, but at least two pairs are redundant. Trimming the duplicates would make the set tighter without losing any real capability.
The server covers dataset/table discovery, schemas, partitioning/clustering metadata, data previews, SQL syntax validation, dry-run cost estimation, and dependency extraction. Minor gaps exist, such as no way to list columns independently or execute queries, but these are outside the validator scope.
Maintenance
Related MCP Connectors
Query OneLens cloud-cost data in natural language: breakdowns, trends, cost centers. Read-only.
DBRE-grade SQL analysis inside any MCP client. No connection. No install. Paste a query.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Check SQL against your Vericto rules before it runs: blocks destructive or risky statements.
Related MCP Servers
- AlicenseAqualityFmaintenanceValidates BigQuery SQL syntax and performs dry-run analysis without executing queries, providing cost estimates, referenced tables, and schema previews.2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables read-only interaction with Google BigQuery, including SQL queries, dataset/table listing, schema retrieval, table preview, and metadata access via service account authentication.-
- FlicenseNot gradedqualityDmaintenanceEnables reviewing BigQuery SQL queries for performance issues, cost estimation, and suggested rewrites via an MCP interface.1-
- FlicenseNot gradedqualityCmaintenanceEnables secure read-only interaction with Google BigQuery through natural language, including listing datasets, listing tables, retrieving metadata, and executing queries with cost controls.-