Doris MCP Server
OfficialServidor Doris MCP
El servidor Doris MCP (Panel de Control de Modelos) es un servicio backend desarrollado con Python y FastAPI. Implementa el protocolo MCP (Panel de Control de Modelos), lo que permite a los clientes interactuar con él mediante herramientas definidas. Está diseñado principalmente para conectarse a bases de datos Apache Doris, aprovechando potencialmente los Modelos de Lenguaje Grandes (LLM) para tareas como la conversión de consultas de lenguaje natural a SQL (NL2SQL), la ejecución de consultas y la gestión y el análisis de metadatos.
Características principales
Implementación del protocolo MCP : proporciona interfaces MCP estándar, admite llamadas de herramientas, gestión de recursos e interacciones rápidas.
Múltiples modos de comunicación :
SSE (eventos enviados por el servidor) : se sirven a través de los puntos finales
/sse(inicialización) y/mcp/messages(comunicación) (src/sse_server.py).HTTP transmisible : se sirve a través del punto final unificado
/mcp, que admite solicitud/respuesta y transmisión (src/streamable_server.py).(Opcional) Stdio : interacción posible a través de entrada/salida estándar (
src/stdio_server.py), requiere configuración de inicio específica.
Interfaz basada en herramientas : Las funcionalidades principales se encapsulan como herramientas MCP que los clientes pueden usar según sea necesario. Las herramientas clave disponibles actualmente se centran en la interacción directa con la base de datos:
Ejecución de SQL (
mcp_doris_exec_query)Listado de bases de datos y tablas (
mcp_doris_get_db_list,mcp_doris_get_db_table_list)Recuperación de metadatos (
mcp_doris_get_table_schema,mcp_doris_get_table_comment,mcp_doris_get_table_column_comments,mcp_doris_get_table_indexes)Recuperación del registro de auditoría (
mcp_doris_get_recent_audit_logs) Nota: Las herramientas actuales se centran principalmente en operaciones directas de la base de datos.
Interacción con la base de datos : proporciona funcionalidad para conectarse a Apache Doris (u otras bases de datos compatibles) y ejecutar consultas (
src/utils/db.py).Configuración flexible : se configura a través de un archivo
.env, que admite configuraciones para conexiones de bases de datos, proveedores/modelos LLM, claves API, niveles de registro, etc.Extracción de metadatos : capaz de extraer información de metadatos de la base de datos (
src/utils/schema_extractor.py).
Related MCP server: Superset MCP Server
Requisitos del sistema
Python 3.12+
Detalles de conexión a la base de datos (por ejemplo, Doris Host, Puerto, Usuario, Contraseña, Base de datos)
Inicio rápido
1. Clonar el repositorio
# Replace with the actual repository URL if different
git clone https://github.com/apache/doris-mcp-server.git
cd doris-mcp-server2. Instalar dependencias
pip install -r requirements.txt3. Configurar variables de entorno
Copie el archivo .env.example a .env y modifique la configuración según su entorno:
cp env.example .envVariables ambientales clave:
Conexión a la base de datos :
DB_HOST: Nombre de host de la base de datosDB_PORT: Puerto de base de datos (predeterminado 9030)DB_USER: Nombre de usuario de la base de datosDB_PASSWORD: Contraseña de la base de datosDB_DATABASE: Nombre de la base de datos predeterminada
Configuración del servidor :
SERVER_HOST: Dirección de host en la que escucha el servidor (valor predeterminado0.0.0.0)SERVER_PORT: Puerto en el que escucha el servidor (predeterminado3000)ALLOWED_ORIGINS: Orígenes permitidos por CORS (separados por comas,*permite todos)MCP_ALLOW_CREDENTIALS: Si se permiten credenciales CORS (valor predeterminado:false)
Configuración de registro :
LOG_DIR: Directorio para archivos de registro (predeterminado./logs)LOG_LEVEL: Nivel de registro (por ejemplo,INFO,DEBUG,WARNING,ERROR, predeterminadoINFO)CONSOLE_LOGGING: Si desea enviar registros a la consola (predeterminado:false)
Herramientas MCP disponibles
La siguiente tabla enumera las principales herramientas actualmente disponibles para la invocación a través de un cliente MCP:
Nombre de la herramienta | Descripción | Parámetros | Estado |
| Obtenga una lista de todos los nombres de bases de datos en el servidor. |
| ✅ Activo |
| Obtenga una lista de todos los nombres de tablas en la base de datos especificada. |
| ✅ Activo |
| Obtenga la estructura detallada de la tabla especificada. |
| ✅ Activo |
| Obtener el comentario para la tabla especificada. |
| ✅ Activo |
| Obtener comentarios para todas las columnas de la tabla especificada. |
| ✅ Activo |
| Obtener información del índice para la tabla especificada. |
| ✅ Activo |
| Ejecutar consulta SQL y devolver el comando de resultado. |
| ✅ Activo |
| Obtenga registros de registro de auditoría de un período reciente. |
| ✅ Activo |
Nota: Todas las herramientas requieren un parámetro random_string como identificador de llamada, que normalmente gestiona automáticamente el cliente MCP. "Opcional" y "Obligatorio" se refieren a la lógica interna de la herramienta; el cliente podría necesitar proporcionar valores para todos los parámetros según su implementación. Los nombres de las herramientas que se muestran aquí son los nombres base; los clientes podrían verlos con un prefijo (p. ej., mcp_doris_stdio3_get_db_list ) según el modo de conexión.
4. Ejecutar el servicio
Si utiliza el modo SSE, ejecute el siguiente comando:
./start_server.shEste comando inicia la aplicación FastAPI, que proporciona servicios SSE y Streamable HTTP MCP de forma predeterminada.
Puntos finales del servicio:
Inicialización de SSE :
http://<host>:<port>/sseComunicación SSE :
http://<host>:<port>/mcp/messages(POST)HTTP transmisible :
http://<host>:<port>/mcp(admite GET, POST, DELETE, OPCIONES)Comprobación de estado :
http://<host>:<port>/health(Potencial) Comprobación de estado :
http://<host>:<port>/status(Confirmar si está implementado enmain.py)
Uso
La interacción con el servidor Doris MCP requiere un cliente MCP . El cliente se conecta a los puntos finales HTTP SSE o Streamable del servidor y envía solicitudes (como tool_call ) según la especificación MCP para invocar las herramientas del servidor.
Flujo de interacción principal:
Inicialización del cliente : Conéctese a
/sse(SSE) o envíe una llamada al métodoinitializea/mcp(transmisible).(Opcional) Descubrir herramientas : el cliente puede llamar a
mcp/listToolsomcp/listOfferingspara obtener la lista de herramientas compatibles, sus descripciones y esquemas de parámetros.Herramienta de llamada : el cliente envía un mensaje/solicitud
tool_call, especificando eltool_nameyarguments.Ejemplo: Obtener el esquema de la tabla
tool_name:mcp_doris_get_table_schema(o el nombre específico del modo)arguments: incluyerandom_string,table_name,db_name.
Respuesta del manejador :
Sin transmisión : el cliente recibe una respuesta que contiene
resultoerror.Transmisión : el cliente recibe una serie de
tools/progress, seguidas de una respuesta final que contiene elresultoerror.
Los nombres y parámetros de herramientas específicos deben referenciarse desde el código src/tools/ u obtenerse mediante mecanismos de descubrimiento de MCP.
Conectando con el cursor
Puede conectar Cursor a este servidor MCP usando el modo Stdio o SSE.
Modo estudio
El modo Stdio permite a Cursor gestionar directamente el proceso del servidor. La configuración se realiza en el archivo de configuración del servidor MCP de Cursor (normalmente ~/.cursor/mcp.json o similar).
Si usa el modo stdio, ejecute el siguiente comando para descargar y compilar el paquete de dependencia del entorno, pero tenga en cuenta que debe cambiar la ruta del proyecto a la dirección de ruta correcta :
uv --project /your/path/doris-mcp-server run doris-mcpConfigurar cursor: agregue una entrada como la siguiente a su configuración de Cursor MCP:
{ "mcpServers": { "doris-stdio": { "command": "uv", "args": ["--project", "/path/to/your/doris-mcp-server", "run", "doris-mcp"], "env": { "DB_HOST": "127.0.0.1", "DB_PORT": "9030", "DB_USER": "root", "DB_PASSWORD": "your_db_password", "DB_DATABASE": "your_default_db" } }, // ... other server configurations ... } }Puntos clave:
Reemplace
/path/to/your/doris-mcpcon la ruta absoluta al directorio raíz del proyecto en su sistema. El argumento--projectes crucial para queuvencuentre elpyproject.tomly ejecute el comando correcto.El
commandse establece enuv(suponiendo que se usauvpara la gestión de paquetes, como se indica enuv.lock). Losargsincluyen--project, la ruta,runymcp-doris(que debería corresponder a un script definido enpyproject.toml).Los detalles de conexión a la base de datos (
DB_HOST,DB_PORT,DB_USER,DB_PASSWORD,DB_DATABASE) se configuran directamente en el bloqueenvdel archivo de configuración. Cursor los pasará al proceso del servidor. No se necesita el archivo.envpara este modo cuando se configura mediante Cursor.
Modo SSE
El modo SSE requiere que primero ejecutes el servidor MCP de forma independiente y luego le digas a Cursor cómo conectarse a él.
Configurar
.env: asegúrese de que las credenciales de su base de datos y cualquier otra configuración necesaria (comoSERVER_PORTsi no usa el valor predeterminado 3000) estén configuradas correctamente en el archivo.envdentro del directorio del proyecto.Iniciar el servidor: Ejecute el servidor desde su terminal en el directorio raíz del proyecto:
./start_server.shEste script suele leer el archivo
.enve iniciar el servidor FastAPI en modo SSE (consulte el script ysse_server.pypara obtener más información). Anotemain.pyhost y el puerto en los que escucha el servidor (el valor predeterminado es0.0.0.0:3000).Configurar cursor: agregue una entrada como la siguiente a su configuración de MCP de Cursor, que apunte al punto final SSE del servidor en ejecución:
{ "mcpServers": { "doris-sse": { "url": "http://127.0.0.1:3000/sse" // Adjust host/port if your server runs elsewhere }, // ... other server configurations ... } }Nota: El ejemplo utiliza el puerto predeterminado
3000Si su servidor está configurado para ejecutarse en un puerto diferente (como3010en el ejemplo del usuario), ajuste la URL según corresponda.
Después de configurar cualquiera de los modos en Cursor, debería poder seleccionar el servidor (por ejemplo, doris-stdio o doris-sse ) y utilizar sus herramientas.
Estructura del directorio
doris-mcp-server/
├── doris_mcp_server/ # Source code for the MCP server
│ ├── main.py # Main entry point, FastAPI app definition
│ ├── mcp_core.py # Core MCP tool registration and Stdio handling
│ ├── sse_server.py # SSE server implementation
│ ├── streamable_server.py # Streamable HTTP server implementation
│ ├── config.py # Configuration loading
│ ├── tools/ # MCP tool definitions
│ │ ├── mcp_doris_tools.py # Main Doris-related MCP tools
│ │ ├── tool_initializer.py # Tool registration helper (used by mcp_core.py)
│ │ └── __init__.py
│ ├── utils/ # Utility classes and helper functions
│ │ ├── db.py # Database connection and operations
│ │ ├── logger.py # Logging configuration
│ │ ├── schema_extractor.py # Doris metadata/schema extraction logic
│ │ ├── sql_executor_tools.py # SQL execution helper (might be legacy)
│ │ └── __init__.py
│ └── __init__.py
├── logs/ # Log file directory (if file logging enabled)
├── README.md # This file
├── .env.example # Example environment variable file
├── requirements.txt # Python dependencies for pip
├── pyproject.toml # Project metadata and build system configuration (PEP 518)
├── uv.lock # Lock file for 'uv' package manager (alternative to pip)
├── start_server.sh # Script to start the server
└── restart_server.sh # Script to restart the serverDesarrollo de nuevas herramientas
Esta sección describe el proceso para agregar nuevas herramientas MCP al servidor Doris MCP, considerando la estructura actual del proyecto.
1. Aproveche los módulos de utilidad
Antes de escribir una nueva lógica de interacción con la base de datos desde cero, verifique los módulos de utilidad existentes:
doris_mcp_server/utils/db.py: proporciona funciones básicas para obtener conexiones de base de datos (get_db_connection) y ejecutar consultas sin procesar (execute_query,execute_query_df).doris_mcp_server/utils/schema_extractor.py(claseMetadataExtractor) : Ofrece métodos avanzados para recuperar metadatos de bases de datos, como listar bases de datos/tablas (get_all_databases,get_database_tables), obtener esquemas/comentarios/índices de tablas (get_table_schema,get_table_comment,get_column_comments,get_table_indexes) y acceder a registros de auditoría (get_recent_audit_logs). Incluye mecanismos de almacenamiento en caché.doris_mcp_server/utils/sql_executor_tools.py(funciónexecute_sql_query) : Proporciona un contenedor paradb.execute_queryque incluye comprobaciones de seguridad (opcionales, controladas por la variable de entornoENABLE_SQL_SECURITY_CHECK), añadeLIMITautomático a las consultas SELECT, gestiona la serialización de resultados (fechas, decimales) y formatea la salida según la estructura estándar de éxito/error de MCP. Se recomienda su uso para ejecutar SQL proporcionado o generado por el usuario.
Puede importar y combinar funcionalidades de estos módulos para crear su nueva herramienta.
2. Implementar la lógica de la herramienta
Implemente la lógica principal de su nueva herramienta como una función async dentro de doris_mcp_server/tools/mcp_doris_tools.py . Esto mantiene centralizadas las implementaciones principales de la herramienta. Asegúrese de que su función devuelva datos en un formato que se pueda integrar fácilmente en la estructura de respuesta estándar de MCP (consulte _format_response en el mismo archivo como referencia).
Ejemplo: Creemos una herramienta simple get_server_time .
# In doris_mcp_server/tools/mcp_doris_tools.py
import datetime
# ... other imports ...
from doris_mcp_server.tools.mcp_doris_tools import _format_response # Reuse formatter
# ... existing tools ...
async def mcp_doris_get_server_time() -> Dict[str, Any]:
"""Gets the current server time."""
logger.info(f"MCP Tool Call: mcp_doris_get_server_time")
try:
current_time = datetime.datetime.now().isoformat()
# Use the existing formatter for consistency
return _format_response(success=True, result={"server_time": current_time})
except Exception as e:
logger.error(f"MCP tool execution failed mcp_doris_get_server_time: {str(e)}", exc_info=True)
return _format_response(success=False, error=str(e), message="Error getting server time")
3. Registrar la herramienta (registro dual)
Debido al manejo separado de los modos SSE/Streamable y Stdio, debe registrar la herramienta en dos lugares:
A. Registro SSE/Transmitible ( tool_initializer.py )
Importe su nueva función de herramienta desde
mcp_doris_tools.py.Dentro de la función
register_mcp_tools, agregue una nueva función contenedora decorada con@mcp.tool().La función envolvente debe llamar a la función de su herramienta principal.
Define el nombre de la herramienta y proporciona una descripción detallada (incluyendo los parámetros, si los hay) en el decorador. Recuerda incluir la descripción obligatoria del parámetro
random_stringpara compatibilidad con el cliente, incluso si tu wrapper no la usa explícitamente.
Ejemplo ( tool_initializer.py ):
# In doris_mcp_server/tools/tool_initializer.py
# ... other imports ...
from doris_mcp_server.tools.mcp_doris_tools import (
# ... existing tool imports ...
mcp_doris_get_server_time # <-- Import the new tool
)
async def register_mcp_tools(mcp):
# ... existing tool registrations ...
# Register Tool: Get Server Time
@mcp.tool("get_server_time", description="""[Function Description]: Get the current time of the MCP server.\n
[Parameter Content]:\n
- random_string (string) [Required] - Unique identifier for the tool call\n""")
async def get_server_time_tool() -> Dict[str, Any]:
"""Wrapper: Get server time"""
# Note: No parameters needed for the core function call here
return await mcp_doris_get_server_time()
# ... logging registration count ...B. Registro de Stdio ( mcp_core.py )
De manera similar a SSE, agregue una nueva función contenedora decorada con
@stdio_mcp.tool().Importante: Importe la función de su herramienta principal (
mcp_doris_get_server_time) dentro de la función contenedora (patrón de importación retrasada utilizado en este archivo).El contenedor llama a la función principal de la herramienta. El contenedor podría necesitar una
async defsegún cómoFastMCPgestione las herramientas en modo Stdio, incluso si la función subyacente es simple (como se observa en la estructura del archivo actual). Asegúrese de que la llamada coincida (por ejemplo, useawaitsi se llama a una función asíncrona).
Ejemplo ( mcp_core.py ):
# In doris_mcp_server/mcp_core.py
# ... other imports and setup ...
# ... existing Stdio tool registrations ...
# Register Tool: Get Server Time (for Stdio)
@stdio_mcp.tool("get_server_time", description="""[Function Description]: Get the current time of the MCP server.\n
[Parameter Content]:\n
- random_string (string) [Required] - Unique identifier for the tool call\n""")
async def get_server_time_tool_stdio() -> Dict[str, Any]: # Using a slightly different wrapper name for clarity if needed
"""Wrapper: Get server time (Stdio)"""
from doris_mcp_server.tools.mcp_doris_tools import mcp_doris_get_server_time # <-- Delayed import
# Assuming the Stdio runner handles async wrappers correctly
return await mcp_doris_get_server_time()
# --- Register Tools --- (Or wherever the registrations are finalized)4. Reiniciar y probar
Después de implementar y registrar la herramienta en ambos archivos, reinicie el servidor MCP (ambos modos SSE a través de ./start_server.sh y asegúrese de que el comando Stdio utilizado por Cursor se actualice si es necesario) y pruebe la nueva herramienta usando su cliente MCP (como Cursor) en ambos modos de conexión.
Contribuyendo
Las contribuciones son bienvenidas a través de problemas o solicitudes de extracción.
Licencia
Este proyecto está licenciado bajo la licencia Apache 2.0. Consulte el archivo de licencia (si existe) para obtener más información.
Available Tools
8 toolsexec_queryB
[Function Description]: Execute SQL query and return result command (executed by the client).
[Parameter Content]:
sql (string) [Required] - SQL statement to execute
db_name (string) [Optional] - Target database name, defaults to the current database
max_rows (integer) [Optional] - Maximum number of rows to return, default 100
timeout (integer) [Optional] - Query timeout in seconds, default 30
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No | ||
| max_rows | No | ||
| sql | Yes | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that results are 'returned' and 'executed by the client,' but lacks critical details: whether queries are read-only or can modify data, authentication requirements, error handling, result format, or any rate limits. For a SQL execution tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.
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 well-structured with clear sections ([Function Description] and [Parameter Content]) and uses bullet points efficiently. Every sentence earns its place by providing essential information. It could be slightly more concise by integrating the sections more fluidly, but overall it's appropriately sized and front-loaded with the core purpose.
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 complexity of a SQL execution tool, no annotations, and no output schema, the description is moderately complete. It covers parameters thoroughly but lacks behavioral context (safety, permissions, result format) and doesn't explain what 'return result command' means or how results are structured. For a tool that could potentially modify data, this leaves important gaps despite good parameter documentation.
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 0%, so the description must fully compensate. It does this excellently by providing clear semantics for all 4 parameters: sql (required SQL statement), db_name (optional target database with default behavior), max_rows (optional row limit with default), and timeout (optional timeout with default). Each parameter's purpose, optionality, and defaults are clearly explained beyond what the bare schema 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 clearly states the tool's purpose: 'Execute SQL query and return result command (executed by the client).' This specifies the verb ('Execute SQL query') and resource ('SQL query'), distinguishing it from sibling tools that are all read-only metadata retrieval functions (like get_db_list, get_table_schema). However, it doesn't explicitly contrast with those siblings beyond the different action.
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. It doesn't mention that siblings are for metadata retrieval while this is for actual query execution, nor does it discuss prerequisites like database connectivity or permissions. The only implicit usage context is that it executes SQL, but no explicit when/when-not instructions are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_db_listC
[Function Description]: Get a list of all database names on the server.
[Parameter Content]:
random_string (string) [Required] - Unique identifier for the tool call
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't mention any behavioral traits such as permissions required, rate limits, whether it's read-only or has side effects, or what the return format looks like. This is a significant gap for a tool with zero annotation coverage.
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 structured with sections for Function Description and Parameter Content, which is organized but includes unnecessary and incorrect parameter information. The Function Description sentence is clear, but the Parameter Content adds verbosity without value, reducing efficiency.
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 complexity (simple list operation) but lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value includes (e.g., format, pagination) or address behavioral aspects like error handling. For a tool with no structured support, more context is needed to be fully helpful.
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 0 parameters with 100% coverage, so the schema fully documents the lack of parameters. The description incorrectly includes a parameter 'random_string' in the Parameter Content section, which contradicts the schema. However, since the baseline for 0 parameters is 4, and the description's error doesn't severely mislead about parameter usage (as the schema overrides it), it scores slightly above minimum.
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's purpose with a specific verb ('Get') and resource ('list of all database names on the server'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_db_table_list' or 'exec_query', which prevents a perfect score.
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 'get_db_table_list' (which might list tables within a database) or other siblings. It lacks any context about prerequisites, exclusions, or comparative use cases, leaving the agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_db_table_listB
[Function Description]: Get a list of all table names in the specified database.
[Parameter Content]:
db_name (string) [Optional] - Target database name, defaults to the current database
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No |
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 of behavioral disclosure. It states the tool 'Get[s] a list' but doesn't clarify if this is a read-only operation, whether it requires specific permissions, how it handles errors, or what the return format looks like. For a tool with zero annotation coverage, this is a significant gap in behavioral context.
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 appropriately sized and structured with clear sections for function and parameters. It uses bullet points efficiently and avoids redundancy. However, the formatting with brackets like '[Function Description]' is slightly verbose, and the content could be more front-loaded with key usage 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 tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the purpose and parameter semantics but lacks behavioral details, usage guidelines, and output information. For a simple read operation, this is borderline viable but leaves gaps in completeness.
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?
With 0% schema description coverage, the description compensates well by explaining the single parameter's semantics. It specifies that 'db_name' is the 'Target database name' and defaults to 'the current database', adding meaningful context beyond the schema's basic type and title. This is sufficient for the one parameter, though more detail on format or constraints could be helpful.
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's purpose with a specific verb ('Get') and resource ('list of all table names in the specified database'). It distinguishes itself from siblings like get_db_list (which lists databases) and get_table_schema (which provides schema details), though it doesn't explicitly name these alternatives. The purpose is unambiguous but could be slightly more specific about 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 provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like get_db_list for listing databases or get_table_schema for detailed table information, nor does it specify prerequisites or contexts for usage. This leaves the agent without clear direction on tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_recent_audit_logsC
[Function Description]: Get audit log records for a recent period.
[Parameter Content]:
days (integer) [Optional] - Number of recent days of logs to retrieve, default is 7
limit (integer) [Optional] - Maximum number of records to return, default is 100
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions retrieving logs for a 'recent period' with defaults, but doesn't cover critical aspects like whether this requires specific permissions, what format the logs are returned in, if there are rate limits, or how the tool handles errors. For a read operation with zero annotation coverage, this leaves significant 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 uses a structured format with sections, which is helpful, but includes redundant labeling like '[Function Description]' and '[Parameter Content]' that add little value. The content itself is reasonably concise, but the formatting could be more streamlined without sacrificing clarity.
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 2 parameters, no annotations, and no output schema, the description is incomplete. It covers basic parameter semantics but lacks information about return format, error handling, authentication requirements, and how it differs from sibling tools. Given the complexity of audit logs and the absence of structured metadata, more contextual guidance is needed.
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 description provides meaningful semantic context for both parameters ('days' as 'Number of recent days of logs to retrieve' and 'limit' as 'Maximum number of records to return'), including their defaults. With 0% schema description coverage, this fully compensates by explaining what each parameter controls beyond just their types, though it doesn't specify constraints like minimum/maximum values.
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's purpose with a specific verb ('Get') and resource ('audit log records for a recent period'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'exec_query' or 'get_db_list', which could also potentially retrieve audit data, so it doesn't reach the highest score.
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 'exec_query' for custom queries or other sibling tools for database metadata. It only describes what the tool does, not when it's the appropriate choice, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_column_commentsC
[Function Description]: Get comment information for all columns in the specified table.
[Parameter Content]:
table_name (string) [Required] - Name of the table to query
db_name (string) [Optional] - Target database name, defaults to the current database
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No | ||
| table_name | 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 for behavioral disclosure. It states this is a 'Get' operation (implying read-only), but doesn't mention authentication requirements, rate limits, error conditions, or what format the comment information returns. For a tool with no annotation coverage, this leaves 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 uses a structured format with sections, which helps organization. However, the '[Function Description]' and '[Parameter Content]' labels add unnecessary verbosity. The content itself is reasonably concise, but the formatting could be more streamlined without losing clarity.
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 annotations, no output schema, and 0% schema description coverage, the description is incomplete. It covers basic purpose and parameters but lacks crucial information about return format, error handling, and behavioral constraints. For a database query tool with siblings providing related functionality, more context is needed 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 description coverage is 0%, so the description must compensate. It provides parameter information in the '[Parameter Content]' section, explaining what 'table_name' and 'db_name' represent. However, it doesn't clarify format expectations (e.g., case sensitivity, quoting requirements) or provide examples. The description adds meaningful semantics but doesn't fully compensate for the 0% schema coverage.
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's purpose: 'Get comment information for all columns in the specified table.' This is a specific verb ('Get') + resource ('comment information for all columns') combination. However, it doesn't explicitly distinguish this from its sibling 'get_table_comment' (which presumably gets table-level rather than column-level comments), so it misses the highest score.
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. With siblings like 'get_table_schema' and 'get_table_comment' that might provide related information, there's no indication of when column comments specifically are needed or when other tools might be more appropriate. The only implicit context is the parameter descriptions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_commentC
[Function Description]: Get the comment information for the specified table.
[Parameter Content]:
table_name (string) [Required] - Name of the table to query
db_name (string) [Optional] - Target database name, defaults to the current database
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No | ||
| table_name | 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 of behavioral disclosure. It states the tool retrieves comment information, implying a read-only operation, but doesn't clarify permissions, rate limits, error handling, or output format. For a tool with zero annotation coverage, this is a significant gap in transparency.
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 structured with labeled sections ('[Function Description]' and '[Parameter Content]'), which aids readability. However, it includes redundant formatting (e.g., brackets) and could be more streamlined. The content is front-loaded with the core purpose, but the parameter section adds necessary detail without being overly verbose.
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 complexity (2 parameters, no annotations, no output schema), the description is incomplete. It explains what the tool does and the parameters, but lacks critical context: it doesn't describe the return value (e.g., comment text format), error conditions, or how it differs from siblings. This leaves gaps for effective agent 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?
The description includes a '[Parameter Content]' section that lists both parameters with brief explanations: 'table_name' as required for the table to query, and 'db_name' as optional with a default. However, schema description coverage is 0%, so the schema provides no additional details. The description compensates somewhat by explaining parameter roles, but lacks depth on formats or constraints.
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's purpose: 'Get the comment information for the specified table.' It uses a specific verb ('Get') and resource ('comment information for the specified table'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_table_column_comments' or 'get_table_schema', which reduces it from a perfect score.
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. It doesn't mention sibling tools like 'get_table_column_comments' (for column-level comments) or 'get_table_schema' (for schema details), nor does it specify prerequisites or exclusions. This leaves the agent without context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_indexesB
[Function Description]: Get index information for the specified table. [Parameter Content]:
table_name (string) [Required] - Name of the table to query
db_name (string) [Optional] - Target database name, defaults to the current database
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No | ||
| table_name | 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 of behavioral disclosure. It states the tool 'queries' index information, implying a read-only operation, but doesn't clarify permissions, rate limits, error conditions, or what the output format looks like. This is a significant gap for a tool with no annotation coverage.
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 appropriately sized and front-loaded with the function description, followed by parameter details. It uses a structured format with bullet points, making it easy to parse, though the bracketed headings add minor verbosity.
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 moderate complexity (2 parameters, no annotations, no output schema), the description covers the basic purpose and parameters adequately. However, it lacks details on output format, error handling, or behavioral constraints, making it incomplete for optimal agent use without additional context.
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 description adds meaningful semantics for both parameters: it specifies that table_name is required for querying and db_name is optional with a default to the current database. With 0% schema description coverage, this compensates well by providing clear parameter roles and defaults beyond the basic 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's purpose as 'Get index information for the specified table,' which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like get_table_schema or get_table_column_comments, which might retrieve related but different metadata.
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. It doesn't mention sibling tools like get_table_schema or explain what makes this tool unique for index information, leaving the agent to infer usage from context alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_schemaB
[Function Description]: Get detailed structure information of the specified table (columns, types, comments, etc.).
[Parameter Content]:
table_name (string) [Required] - Name of the table to query
db_name (string) [Optional] - Target database name, defaults to the current database
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No | ||
| table_name | 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 of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't specify whether this requires permissions, has rate limits, returns paginated results, or what format the output takes (e.g., JSON, structured data). For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves beyond basic functionality.
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 appropriately sized and structured with clear sections for function and parameters. Each sentence adds value: the first defines the purpose with examples, and the parameter section explains semantics. There's minimal waste, though the formatting with brackets and bullet points is slightly verbose but still efficient.
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 moderate complexity (2 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers purpose and parameter semantics adequately, but lacks behavioral details like output format, error handling, or usage guidelines relative to siblings. Without annotations or output schema, more context on what 'detailed structure information' entails would improve completeness.
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 description adds meaningful context beyond the input schema, which has 0% description coverage. It explains that table_name is required and specifies what it queries, and clarifies that db_name is optional with a default to the current database. This compensates well for the lack of schema descriptions, though it doesn't detail constraints like valid table name formats or database name syntax.
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 'detailed structure information of the specified table', with specific examples like 'columns, types, comments, etc.' This distinguishes it from siblings like get_db_list or get_table_indexes by focusing on comprehensive schema details rather than lists or specific components. However, it doesn't explicitly differentiate from get_table_column_comments or get_table_comment, which are more specialized siblings.
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. It doesn't mention siblings like get_table_column_comments (for only comments) or get_table_indexes (for indexes), nor does it specify prerequisites such as needing database access or when this is preferred over exec_query for schema inspection. Usage is implied by the purpose but lacks explicit context or exclusions.
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. Dates show when Glama detected each change.
8 tool updates
v1.0.0- First observed
exec_query - First observed
get_db_list - First observed
get_db_table_list - First observed
get_recent_audit_logs - First observed
get_table_column_comments - First observed
get_table_comment - First observed
get_table_indexes - First observed
get_table_schema
TDQS
Each tool has a clearly distinct purpose with no ambiguity. exec_query handles SQL execution, get_db_list retrieves database names, get_db_table_list lists tables, get_recent_audit_logs fetches logs, and the remaining tools (get_table_column_comments, get_table_comment, get_table_indexes, get_table_schema) each target specific table metadata aspects without overlap.
All tools follow a consistent verb_noun pattern using snake_case. The naming is highly predictable: exec_query, get_db_list, get_db_table_list, get_recent_audit_logs, get_table_column_comments, get_table_comment, get_table_indexes, and get_table_schema all adhere to the same convention.
With 8 tools, this server is well-scoped for database interaction and metadata exploration. Each tool earns its place by covering distinct aspects like query execution, database/table listing, audit logs, and detailed table metadata, without being overly sparse or bloated.
The toolset provides strong coverage for querying and inspecting databases, including CRUD-like operations via exec_query and comprehensive metadata retrieval. Minor gaps exist, such as no explicit tools for creating/dropping databases or tables, but agents can work around this using exec_query for such operations.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides connection to Starrocks allows you to explore this query engine with minimum effort.1MIT
- FlicenseBqualityCmaintenanceA Model Context Protocol server that enables large language models to interact with Apache Superset databases through REST API, supporting database queries, table lookups, field information retrieval, and SQL execution.45-
- FlicenseNot gradedqualityNot gradedmaintenanceA TypeScript implementation of a Model Context Protocol server that enables interaction with StarRocks databases, supporting SQL operations like queries, table creation, and data manipulation through standardized MCP tools.1-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to explore database schemas, execute read-only SQL queries, and perform data analysis on Apache Doris or MySQL-compatible databases through a standardized MCP interface with built-in analytical prompts.1MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/apache/doris-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server