StarRocks MCP Server
OfficialServidor MCP oficial de StarRocks
El servidor MCP de StarRocks actúa como puente entre los asistentes de IA y las bases de datos de StarRocks. Permite la ejecución directa de SQL, la exploración de bases de datos, la visualización de datos mediante gráficos y la recuperación de esquemas/datos detallados sin necesidad de una configuración compleja del lado del cliente.
Características
Ejecución directa de SQL: ejecutar consultas
SELECT(read_query) y comandos DDL/DML (write_query).Exploración de bases de datos: enumerar bases de datos y tablas, recuperar esquemas de tablas (recursos
starrocks://).Información del sistema: acceda a las métricas y estados internos de StarRocks a través de la ruta de recursos
proc://.Resúmenes detallados: obtenga resúmenes completos de tablas (
table_overview) o bases de datos completas (db_overview), incluidas definiciones de columnas, recuentos de filas y datos de muestra.Visualización de datos: ejecute una consulta y genere un gráfico Plotly directamente a partir de los resultados (
query_and_plotly_chart).Almacenamiento en caché inteligente: Las vistas generales de tablas y bases de datos se almacenan en caché para agilizar las solicitudes repetidas. Es posible omitir el caché cuando sea necesario.
Configuración flexible: establezca los detalles de la conexión y el comportamiento a través de variables de entorno.
Related MCP server: starrocks-mcp
Configuración
El servidor MCP se ejecuta normalmente a través de un host MCP. La configuración se envía al host, especificando cómo iniciar el proceso del servidor MCP de StarRocks.
Usando uv con el paquete instalado:
{
"mcpServers": {
"mcp-server-starrocks": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-server-starrocks",
"mcp-server-starrocks"
],
"env": {
"STARROCKS_HOST": "default localhost",
"STARROCKS_PORT": "default 9030",
"STARROCKS_USER": "default root",
"STARROCKS_PASSWORD": "default empty",
"STARROCKS_DB": "default empty",
"STARROCKS_OVERVIEW_LIMIT": "default 20000"
}
}
}
}Usando uv con directorio local (para desarrollo):
{
"mcpServers": {
"mcp-server-starrocks": {
"command": "uv",
"args": [
"--directory",
"path/to/mcp-server-starrocks", // <-- Update this path
"run",
"mcp-server-starrocks"
],
"env": {
"STARROCKS_HOST": "default localhost",
"STARROCKS_PORT": "default 9030",
"STARROCKS_USER": "default root",
"STARROCKS_PASSWORD": "default empty",
"STARROCKS_DB": "default empty",
"STARROCKS_OVERVIEW_LIMIT": "default 20000"
}
}
}
}Variables de entorno:
STARROCKS_HOST: (Opcional) Nombre de host o dirección IP del servicio StarRocks FE. El valor predeterminado eslocalhost.STARROCKS_PORT: (Opcional) Puerto del protocolo MySQL del servicio StarRocks FE. El valor predeterminado es9030.STARROCKS_USER: (Opcional) Nombre de usuario de StarRocks. El valor predeterminado esroot.STARROCKS_PASSWORD: (Opcional) Contraseña de StarRocks. El valor predeterminado es una cadena vacía.STARROCKS_DB: (Opcional) Base de datos predeterminada que se usará si no se especifica en los argumentos de la herramienta ni en las URI de recursos. Si se configura, la conexión intentaráUSEesta base de datos. Herramientas comotable_overviewydb_overviewla usarán si se omite la parte de la base de datos en sus argumentos. El valor predeterminado es vacío (sin base de datos predeterminada).STARROCKS_OVERVIEW_LIMIT: (Opcional) Un límite aproximado de caracteres para el texto total generado por las herramientas de vista general (table_overview,db_overview) al obtener datos para llenar la caché. Esto ayuda a evitar el uso excesivo de memoria para esquemas muy grandes o numerosas tablas. El valor predeterminado es20000.
Componentes
Herramientas
read_queryDescripción: Ejecuta una consulta SELECT u otros comandos que devuelven un ResultSet (por ejemplo,
SHOW,DESCRIBE).Entrada:
{ "query": "SQL query string" }Salida: Contenido de texto con los resultados de la consulta en formato CSV, incluyendo una fila de encabezado y un resumen del recuento de filas. Devuelve un mensaje de error en caso de error.
write_queryDescripción: Ejecuta un DDL (
CREATE,ALTER,DROP), DML (INSERT,UPDATE,DELETE) u otro comando de StarRocks que no devuelva un ResultSet.Entrada:
{ "query": "SQL command string" }Salida: Texto que confirma el éxito (p. ej., "Consulta correcta, X filas afectadas") o informa de un error. Los cambios se aplican automáticamente si la consulta se realiza correctamente.
query_and_plotly_chartDescripción: Ejecuta una consulta SQL, carga los resultados en un DataFrame de Pandas y genera un gráfico de Plotly mediante una expresión de Python proporcionada. Diseñado para la visualización en interfaces de usuario compatibles.
Aporte:
{ "query": "SQL query to fetch data", "plotly_expr": "Python expression string using 'px' (Plotly Express) and 'df' (DataFrame). Example: 'px.scatter(df, x=\"col1\", y=\"col2\")'" }Salida: Una lista que contiene:
TextContent: una representación de texto del DataFrame y una nota que indica que el gráfico es para visualización en la interfaz de usuario.ImageContent: El gráfico de Plotly generado, codificado como imagen PNG base64 (image/png). Devuelve un mensaje de error de texto si falla o si la consulta no genera datos.
table_overviewDescripción: Obtiene una descripción general de una tabla específica: columnas (de
DESCRIBE), recuento total de filas y filas de muestra (LIMIT 3). Utiliza una caché en memoria a menos querefreshsea verdadera.Aporte:
{ "table": "Table name, optionally prefixed with database name (e.g., 'db_name.table_name' or 'table_name'). If database is omitted, uses STARROCKS_DB environment variable if set.", "refresh": false // Optional, boolean. Set to true to bypass the cache. Defaults to false. }Salida: Contenido de texto con la descripción general formateada (columnas, recuento de filas, datos de muestra) o un mensaje de error. Los resultados en caché incluyen errores previos, si corresponde.
db_overviewDescripción: Obtiene una visión general (columnas, recuento de filas, filas de muestra) de todas las tablas de una base de datos específica. Utiliza la caché de tabla para cada tabla, a menos que
refreshsea verdadera.Aporte:
{ "db": "database_name", // Optional if STARROCKS_DB env var is set. "refresh": false // Optional, boolean. Set to true to bypass the cache for all tables in the DB. Defaults to false. }Salida: Contenido de texto con resúmenes concatenados de todas las tablas de la base de datos, separados por encabezados. Devuelve un mensaje de error si no se puede acceder a la base de datos o si no contiene tablas.
Recursos
Recursos directos
starrocks:///databasesDescripción: Enumera todas las bases de datos accesibles para el usuario configurado.
Consulta equivalente:
SHOW DATABASESTipo MIME:
text/plain
Plantillas de recursos
starrocks:///{db}/{table}/schemaDescripción: Obtiene la definición del esquema de una tabla específica.
Consulta equivalente:
SHOW CREATE TABLE {db}.{table}Tipo MIME:
text/plain
starrocks:///{db}/tablesDescripción: Enumera todas las tablas dentro de una base de datos específica.
Consulta equivalente:
SHOW TABLES FROM {db}Tipo MIME:
text/plain
proc:///{+path}Descripción: Accede a la información interna del sistema de StarRocks, similar a la instrucción
/procde Linux. El parámetropathespecifica el nodo de información deseado.Consulta equivalente:
SHOW PROC '/{path}'Tipo MIME:
text/plainCaminos comunes:
/frontends- Información sobre los nodos FE./backends: información sobre los nodos BE (para implementaciones no nativas de la nube)./compute_nodes: información sobre los nodos CN (para implementaciones nativas de la nube)./dbs- Información sobre las bases de datos./dbs/<DB_ID>- Información sobre una base de datos específica por ID./dbs/<DB_ID>/<TABLE_ID>- Información sobre una tabla específica por ID./dbs/<DB_ID>/<TABLE_ID>/partitions: información de partición de una tabla./transactions- Información de transacciones agrupada por base de datos./transactions/<DB_ID>- Información de transacción para un ID de base de datos específico./transactions/<DB_ID>/running: ejecución de transacciones para un ID de base de datos./transactions/<DB_ID>/finished: transacciones finalizadas para un ID de base de datos./jobs- Información sobre trabajos asincrónicos (cambio de esquema, acumulación, etc.)./statistic- Estadísticas para cada base de datos./tasks- Información sobre las tareas del agente./cluster_balance- Información sobre el estado del equilibrio de carga./routine_loads- Información sobre trabajos de carga de rutina./colocation_group- Información sobre la unión de grupos de colocation./catalog- Información sobre catálogos configurados (por ejemplo, Hive, Iceberg).
Indicaciones
Ninguno definido por este servidor.
Comportamiento del almacenamiento en caché
Las herramientas
table_overviewydb_overviewutilizan un caché en memoria para almacenar el texto de descripción general generado.La clave de caché es una tupla de
(database_name, table_name).Al llamar
table_overview, primero se revisa la caché. Si existe un resultado y el parámetrorefreshesfalse(predeterminado), el resultado almacenado en caché se devuelve inmediatamente. De lo contrario, se obtienen los datos de StarRocks, se almacenan en la caché y luego se devuelven.Al llamar
db_overview, se listan todas las tablas de la base de datos y se intenta obtener la vista general de cada tabla utilizando la misma lógica de caché quetable_overview(primero se revisa la caché, se recupera si es necesario yrefreshsi esfalseo se produce un error de caché). Sirefreshestrueparadb_overview, se fuerza una actualización de todas las tablas de esa base de datos.La variable de entorno
STARROCKS_OVERVIEW_LIMITproporciona un objetivo flexible para la longitud máxima de la cadena de descripción general generada por tabla al completar la memoria caché, lo que ayuda a administrar el uso de la memoria.Los resultados almacenados en caché, incluidos los mensajes de error encontrados durante la búsqueda original, se almacenan y se devuelven en los accesos de caché posteriores.
Manifestación

Available Tools
8 toolsanalyze_queryB
Analyze a query and get analyze result using query profile. Use set_session_db to set a per-session default database
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | database | |
| sql | No | Query SQL | |
| uuid | No | Query ID, a string composed of 32 hexadecimal digits formatted as 8-4-4-4-12 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions 'using query profile' but does not disclose whether the tool is read-only, requires authentication, has side effects, or what state (e.g., query must be previously executed) is needed. The behavioral traits are minimal.
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 two sentences, front-loaded with the purpose, and includes a concise usage hint. Every sentence adds value without unnecessary words or repetition.
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 presence of an output schema and the moderate complexity (3 parameters), the description covers the basic purpose and provides a hint about the database parameter. However, it does not clarify the difference between analyzing by SQL vs. UUID, or that the query may need to have been executed first. It is adequate but leaves gaps.
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%, providing baseline parameter descriptions. The description adds value by explaining that 'set_session_db' can set a per-session default database, indirectly clarifying that the 'db' parameter may be omitted if a default is set. This goes beyond the schema's simple 'database' label.
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 the action ('analyze a query') and the resource ('query'), and mentions using 'query profile', which indicates the tool's specific function. However, the phrasing 'get analyze result' is slightly redundant, and it doesn't clearly distinguish from sibling tools like 'db_summary' or 'read_query'.
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 includes a hint to use 'set_session_db' for setting a default database, but provides no guidance on when to use this tool versus alternatives (e.g., 'read_query' or 'query_and_plotly_chart'). There is no mention of prerequisites, exclusions, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
collect_query_dump_and_profileB
Run a query to get it's query dump and profile, output very large, need special tools to do further processing
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | database | |
| query | Yes | query to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the output is very large and needs special tools, which is useful. However, it does not mention other behavioral traits like destructiveness, permissions, or side effects, leaving some 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 sentence, front-loaded with the action. It is concise and to the point, though a bit more structure could improve readability.
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 has 2 parameters, no output schema, and no nested objects, the description provides adequate context but does not explain what 'query dump' and 'profile' entail or the return format. It is minimally complete for a simple tool.
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 descriptions: 'database' and 'query to execute'). The description adds no additional meaning beyond the schema, so 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 states 'Run a query to get it's query dump and profile', which clearly identifies the verb (run) and resource (query dump and profile). It also mentions the output is very large, adding context. However, it does not differentiate from sibling tools like 'query_and_plotly_chart' or 'read_query'.
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 usage context by stating 'need special tools to do further processing', suggesting this tool is for large outputs requiring post-processing. However, it does not explicitly state when to use this tool versus alternatives, nor provide conditions to avoid.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_summaryA
Quickly get summary of a database with tables' schema and size information. Use set_session_db to set a per-session default database
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | Database name. Optional: uses current database by default. | |
| limit | No | Output length limit in characters. Defaults to 10000. Higher values show more tables and details. | |
| refresh | No | Set to true to force refresh, ignoring cache. Defaults to false. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided; the description does not disclose if the tool is read-only, cached, or has side effects. It mentions the refresh parameter but does not explain caching behavior in text, leaving agents without key safety cues.
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 an additional useful hint. It is front-loaded and contains no filler, efficiently conveying purpose and context.
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 three parameters and no annotations, the description covers the main use case but falls short on behavioral transparency. The presence of an output schema reduces the need to describe return values. Overall adequate but with gaps.
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?
The input schema has 100% description coverage for all parameters. The description adds some value by linking the 'db' parameter to set_session_db, but does not significantly expand on parameter meaning beyond the schema.
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 a database summary including table schema and size, with a specific verb and resource. It distinguishes from siblings by mentioning set_session_db for default database context.
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 indicates when to use (quickly get summary) and references set_session_db for setting a default database. However, it does not explicitly state when not to use or compare to siblings like read_query or table_overview.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_and_plotly_chartB
using sql query to extract data from database, then using python plotly_expr to generate a chart for UI to display. Use set_session_db to set a per-session default database
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | database | |
| query | Yes | SQL query to execute | |
| format | No | chart output format, json|png|jpeg | jpeg |
| plotly_expr | Yes | a one function call expression, with 2 vars binded: `px` as `import plotly.express as px`, and `df` as dataframe generated by query `plotly_expr` example: `px.scatter(df, x="sepal_width", y="sepal_length", color="species", marginal_y="violin", marginal_x="box", trendline="ols", template="simple_white")` |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It explains the two-step process (query then chart) but does not mention side effects, errors, rate limits, or output format details. The description is simple but lacks depth.
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 concise with two sentences, the first clearly stating the main function. The second sentence provides a related tip but is somewhat tangential. It is well-structured and front-loaded.
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 and no annotations, the description is fairly complete for a combined query-chart tool. It explains the process and mentions a prerequisite. However, it lacks details on output format or error handling, leaving some gaps.
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 descriptions, so baseline is 3. The description adds context about the overall workflow but does not elaborate on individual parameters beyond the schema. The mention of set_session_db is peripheral.
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 it uses SQL query to extract data and then generates a chart with plotly_expr. It distinguishes from siblings like read_query (which only returns data) by explicitly mentioning chart generation. However, it could be more precise by contrasting with other query tools.
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 mentions using set_session_db to set a default database, which is helpful but does not provide guidance on when to use this tool over its siblings (e.g., read_query for data only, analyze_query for analysis). No explicit exclusions or alternatives are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_queryA
Execute a SELECT query or commands that return a ResultSet. Set output_file to write the full result to disk instead of returning it inline (useful for large results).. Use set_session_db to set a per-session default database
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | database | |
| query | Yes | SQL query to execute | |
| output_file | No | If set, write the full result to this file and return only a summary + small preview inline. Relative paths resolve against STARROCKS_MCP_OUTPUT_DIR (default: ~/.mcp-server-starrocks/output/). Absolute paths (and ~) are used as-is. Format is inferred from the file extension (.csv, .tsv, .json, .jsonl, .ndjson) unless output_format is given. NOTE: the file is written on the server's filesystem, which may not be the client machine in remote/http deployments. | |
| output_format | No | Override file format: csv|tsv|json|jsonl. If omitted, inferred from output_file extension; defaults to csv. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavioral traits. It explains the output_file feature and notes that files are written on the server's filesystem, which is important for remote deployments. However, it does not explicitly state that the tool is read-only or discuss error handling or authentication.
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 concise, with the purpose stated first. It includes two sentences plus a minor note, and every part adds value. The only flaw is an extra period after 'inline'.
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 description lacks details about the return structure when output_file is not used. It mentions returning 'inline' but does not specify the format or content (e.g., rows, columns). Given there is no output schema, this information is crucial for correct usage.
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 baseline is 3. The description adds significant value beyond the schema for output_file and output_format, explaining path resolution, environment variables, and format inference. For db, it adds no extra meaning.
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 explicitly states 'Execute a SELECT query or commands that return a ResultSet', which provides a specific verb and resource. It distinguishes this tool from siblings like write_query and analyze_query by focusing on read-only queries that produce a result set.
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 versus alternatives (e.g., write_query for modifications, analyze_query for explaining). The only instruction is to use set_session_db for default database, which is a side note, not a usage guideline for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_session_dbA
Set or clear the default database for THIS MCP session. Subsequent tool calls without an explicit db argument will use this database. Pass an empty string or null to clear and fall back to the server's global default. Returns the new effective default for this session.
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | Database name to set as the per-session default. Empty/null clears the override. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully carries the burden. It discloses that setting affects subsequent calls without explicit db argument, clarifies clearing behavior, and states the return value. No behavioral contradictions.
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?
Two sentences, front-loaded with purpose, no redundant words. Every sentence adds critical 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?
Given the single parameter and no annotations, the description is fully complete. It explains purpose, usage, parameter semantics, and return value. No gaps.
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%, but the description adds value by explaining that empty string or null clears the override, which is not explicitly in the schema. It clarifies the parameter's effect beyond the bare description.
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 sets or clears the default database for the MCP session, using specific verbs ('set', 'clear', 'fall back'). It distinguishes from sibling query tools by focusing on session state management.
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 explains when to use (set default) and how to clear (empty/null). While it doesn't explicitly state when not to use or list alternatives, the context of sibling tools makes the usage clear. The guidance is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
table_overviewA
Get an overview of a specific table: columns, sample rows (up to 3), and total row count. Uses cache unless refresh=true. Use set_session_db to set a per-session default database
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name, optionally prefixed with database name (e.g., 'db_name.table_name'). If database is omitted, uses the default database. | |
| refresh | No | Set to true to force refresh, ignoring cache. Defaults to false. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses caching behavior and refresh option, which is important for understanding tool behavior. No destructive actions are implied.
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?
Two sentences, no fluff. First sentence clearly states the tool's action and output, second provides important context about caching and database setup. Every word earns 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?
Given the simplicity (2 params, output schema exists), the description covers key aspects: output components, caching, default database. Minor omission like error behavior or limit on sample rows is compensated by output schema.
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%, and the description does not add semantic meaning beyond the schema descriptions. The parameter details are fully covered by the schema, so description adds no extra 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 clearly states it provides an overview of a table including columns, sample rows, and row count. However, it does not explicitly differentiate from sibling tools like read_query or analyze_query, which are for querying rather than generating a summary.
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 gives context on caching and default database setup via set_session_db, but lacks explicit guidance on when to use this tool versus alternatives (e.g., read_query for raw data).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_queryA
Execute a DDL/DML or other StarRocks command that do not have a ResultSet. Use set_session_db to set a per-session default database
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | database | |
| query | Yes | SQL to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description covers non-ResultSet nature but lacks details on side effects, permissions, or error behavior.
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, front-loaded with core purpose, no unnecessary words.
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?
Missing output schema; description doesn't specify return format or error handling, but purpose and parameters are adequately covered.
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 covers both parameters; description adds value by suggesting set_session_db for default database, enhancing understanding of db parameter.
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?
Description clearly states it executes DDL/DML commands without ResultSet, distinguishing it from sibling tools like read_query which returns results.
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?
Mentions using set_session_db for default database but does not explicitly state when to use vs alternatives or when not to use.
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.
2 tool updates
v0.4.0- Changed
read_query2 fields changed- added
Input schema / properties / output_fileAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If set, write the full result to this file and return only a summary + small preview inline. Relative paths resolve against STARROCKS_MCP_OUTPUT_DIR (default: ~/.mcp-server-starrocks/output/). Absolute paths (and ~) are used as-is. Format is inferred from the file extension (.csv, .tsv, .json, .jsonl, .ndjson) unless output_format is given. NOTE: the file is written on the server's filesystem, which may not be the client machine in remote/http deployments." +} - added
Input schema / properties / output_formatAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Override file format: csv|tsv|json|jsonl. If omitted, inferred from output_file extension; defaults to csv." +}
- Added
set_session_db
8 tool updates
v0.3.0- Changed
analyze_query12 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / dbAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "database" +} - added
Input schema / properties / sql / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / sql / defaultAdded value: +null - removed
Input schema / properties / sql / titleRemoved value: -"Sql" - removed
Input schema / properties / sql / typeRemoved value: -"string" - added
Input schema / properties / uuid / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / uuid / defaultAdded value: +null - removed
Input schema / properties / uuid / titleRemoved value: -"Uuid" - removed
Input schema / properties / uuid / typeRemoved value: -"string" - removed
Input schema / requiredRemoved value: -[ - "uuid", - "sql" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ], + "type": "object", + "x-fastmcp-wrap-result": true +}
- Added
collect_query_dump_and_profile - Removed
db_overview - Added
db_summary - Changed
query_and_plotly_chart5 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / dbAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "database" +} - added
Input schema / properties / formatAdded value: +{ + "default": "jpeg", + "description": "chart output format, json|png|jpeg", + "type": "string" +} - removed
Input schema / properties / plotly_expr / titleRemoved value: -"Plotly Expr" - removed
Input schema / properties / query / titleRemoved value: -"Query"
- Changed
read_query3 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / dbAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "database" +} - removed
Input schema / properties / query / titleRemoved value: -"Query"
- Changed
table_overview4 fields changed- added
Input schema / additionalPropertiesAdded value: +false - removed
Input schema / properties / refresh / titleRemoved value: -"Refresh" - removed
Input schema / properties / table / titleRemoved value: -"Table" - changed
Output schema / (root)Previous value: -nullNew value: +{ + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ], + "type": "object", + "x-fastmcp-wrap-result": true +}
- Changed
write_query3 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / dbAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "database" +} - removed
Input schema / properties / query / titleRemoved value: -"Query"
6 tool updates
v1.0.0- First observed
analyze_query - First observed
db_overview - First observed
query_and_plotly_chart - First observed
read_query - First observed
table_overview - First observed
write_query
TDQS
Scored across 8 tools
Each tool targets a distinct function: query execution, analysis, chart generation, schema summary, etc. There is slight overlap between read_query and query_and_plotly_chart, but their outputs differ (raw data vs chart), and descriptions clarify the distinction. No major confusion.
Tool names follow no consistent pattern: some are verb_noun (e.g., read_query), some are noun_verb (e.g., db_summary), some include conjunctions (query_and_plotly_chart), and verbs vary (analyze, collect, set, write). This inconsistency may confuse an agent trying to infer tool purposes from naming.
With 8 tools, the server is well-scoped for a database MCP server covering querying, analysis, schema browsing, and charting. Each tool serves a clear purpose without being excessive or minimal.
The tool set covers core database interactions: query (read and write), analysis, schema overview, and charting. A minor gap is the absence of a tool to list all databases, but db_summary and set_session_db partially address this. Overall, the surface is reasonably complete for the stated purpose.
Maintenance
Related MCP Connectors
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn implementation of the Model Context Protocol that provides AI clients with intelligent diagnosis and analysis capabilities for StarRocks databases. It enables users to execute SQL queries, monitor storage health, and analyze performance issues through natural language interfaces.12-
- AlicenseAqualityDmaintenanceA read-only MCP server that enables users to query and explore StarRocks databases through AI assistants like Claude. It supports SQL execution, schema discovery, and secure LDAP authentication for data analysis and metadata exploration.41MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to query databases using natural language, with automatic schema discovery and SQL compilation.451 npm3,173Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI assistants to connect to and interact with PostgreSQL, MySQL, SQLite, and MongoDB databases through natural language, supporting schema exploration, query execution, data export, and more.13MIT