Doris MCP Server
OfficialDoris MCP Server
Der Doris MCP (Model Control Panel) Server ist ein Backend-Dienst, der mit Python und FastAPI erstellt wurde. Er implementiert das MCP (Model Control Panel)-Protokoll und ermöglicht Clients die Interaktion mit ihm über definierte „Tools“. Er ist primär für die Verbindung mit Apache Doris-Datenbanken konzipiert und nutzt Large Language Models (LLMs) für Aufgaben wie die Konvertierung von Abfragen in natürlicher Sprache in SQL (NL2SQL), die Ausführung von Abfragen sowie die Verwaltung und Analyse von Metadaten.
Kernfunktionen
MCP-Protokollimplementierung : Bietet standardmäßige MCP-Schnittstellen, unterstützt Tool-Aufrufe, Ressourcenverwaltung und schnelle Interaktionen.
Mehrere Kommunikationsmodi :
SSE (Server-Sent Events) : Wird über die Endpunkte
/sse(Initialisierung) und/mcp/messages(Kommunikation) bereitgestellt (src/sse_server.py).Streamable HTTP : Wird über den einheitlichen
/mcp-Endpunkt bereitgestellt und unterstützt Anforderung/Antwort und Streaming (src/streamable_server.py).(Optional) Stdio : Interaktion über Standard-Eingabe/Ausgabe (
src/stdio_server.py) möglich, erfordert spezielle Startkonfiguration.
Toolbasierte Schnittstelle : Kernfunktionen sind als MCP-Tools gekapselt, die Clients bei Bedarf aufrufen können. Die aktuell verfügbaren Schlüsseltools konzentrieren sich auf die direkte Datenbankinteraktion:
SQL-Ausführung (
mcp_doris_exec_query)Datenbank- und Tabellenliste (
mcp_doris_get_db_list,mcp_doris_get_db_table_list)Metadatenabruf (
mcp_doris_get_table_schema,mcp_doris_get_table_comment,mcp_doris_get_table_column_comments,mcp_doris_get_table_indexes)Abrufen von Prüfprotokollen (
mcp_doris_get_recent_audit_logs) Hinweis: Aktuelle Tools konzentrieren sich hauptsächlich auf direkte DB-Operationen.
Datenbankinteraktion : Bietet Funktionen zum Herstellen einer Verbindung mit Apache Doris (oder anderen kompatiblen Datenbanken) und Ausführen von Abfragen (
src/utils/db.py).Flexible Konfiguration : Konfiguriert über eine
.envDatei, unterstützt Einstellungen für Datenbankverbindungen, LLM-Anbieter/-Modelle, API-Schlüssel, Protokollierungsebenen usw.Metadatenextraktion : Kann Metadateninformationen aus Datenbanken extrahieren (
src/utils/schema_extractor.py).
Related MCP server: Superset MCP Server
Systemanforderungen
Python 3.12+
Datenbankverbindungsdetails (z. B. Doris-Host, Port, Benutzer, Passwort, Datenbank)
Schnellstart
1. Klonen Sie das Repository
# Replace with the actual repository URL if different
git clone https://github.com/apache/doris-mcp-server.git
cd doris-mcp-server2. Abhängigkeiten installieren
pip install -r requirements.txt3. Umgebungsvariablen konfigurieren
Kopieren Sie die Datei .env.example nach .env und ändern Sie die Einstellungen entsprechend Ihrer Umgebung:
cp env.example .envWichtige Umgebungsvariablen:
Datenbankverbindung :
DB_HOST: Datenbank-HostnameDB_PORT: Datenbankport (Standard 9030)DB_USER: DatenbankbenutzernameDB_PASSWORD: DatenbankkennwortDB_DATABASE: Standarddatenbankname
Serverkonfiguration :
SERVER_HOST: Hostadresse, auf der der Server lauscht (Standard0.0.0.0)SERVER_PORT: Port, auf dem der Server lauscht (Standard3000)ALLOWED_ORIGINS: Von CORS zugelassene Ursprünge (durch Komma getrennt,*erlaubt alle)MCP_ALLOW_CREDENTIALS: Ob CORS-Anmeldeinformationen zugelassen werden sollen (Standard:false)
Protokollierungskonfiguration :
LOG_DIR: Verzeichnis für Protokolldateien (Standard./logs)LOG_LEVEL: Protokollebene (z. B.INFO,DEBUG,WARNING,ERROR, StandardINFO)CONSOLE_LOGGING: Ob Protokolle an die Konsole ausgegeben werden sollen (Standard:false)
Verfügbare MCP-Tools
In der folgenden Tabelle sind die wichtigsten Tools aufgeführt, die derzeit über einen MCP-Client aufgerufen werden können:
Werkzeugname | Beschreibung | Parameter | Status |
| Rufen Sie eine Liste aller Datenbanknamen auf dem Server ab. |
| ✅ Aktiv |
| Rufen Sie eine Liste aller Tabellennamen in der angegebenen Datenbank ab. |
| ✅ Aktiv |
| Erhalten Sie die detaillierte Struktur der angegebenen Tabelle. |
| ✅ Aktiv |
| Holen Sie sich den Kommentar für die angegebene Tabelle. |
| ✅ Aktiv |
| Ruft Kommentare für alle Spalten in der angegebenen Tabelle ab. |
| ✅ Aktiv |
| Ruft Indexinformationen für die angegebene Tabelle ab. |
| ✅ Aktiv |
| Führen Sie die SQL-Abfrage aus und geben Sie den Ergebnisbefehl zurück. |
| ✅ Aktiv |
| Rufen Sie Audit-Protokolldatensätze für einen aktuellen Zeitraum ab. |
| ✅ Aktiv |
Hinweis: Alle Tools benötigen einen random_string Parameter als Aufrufkennung, der normalerweise automatisch vom MCP-Client verarbeitet wird. „Optional“ und „Erforderlich“ beziehen sich auf die interne Logik des Tools; der Client muss je nach Implementierung möglicherweise Werte für alle Parameter angeben. Die hier aufgeführten Toolnamen sind die Basisnamen; Clients können sie je nach Verbindungsmodus mit einem Präfix versehen sehen (z. B. mcp_doris_stdio3_get_db_list ).
4. Führen Sie den Dienst aus
Wenn Sie den SSE-Modus verwenden, führen Sie den folgenden Befehl aus:
./start_server.shDieser Befehl startet die FastAPI-Anwendung und stellt standardmäßig sowohl SSE- als auch Streamable HTTP MCP-Dienste bereit.
Service-Endpunkte:
SSE-Initialisierung :
http://<host>:<port>/sseSSE-Kommunikation :
http://<host>:<port>/mcp/messages(POST)Streambares HTTP :
http://<host>:<port>/mcp(Unterstützt GET, POST, DELETE, OPTIONS)Integritätsprüfung :
http://<host>:<port>/health(Potenzielle) Statusprüfung :
http://<host>:<port>/status(Bestätigen, ob inmain.pyimplementiert)
Verwendung
Für die Interaktion mit dem Doris MCP-Server ist ein MCP-Client erforderlich. Der Client verbindet sich mit den SSE- oder Streamable-HTTP-Endpunkten des Servers und sendet Anfragen (wie tool_call ) gemäß der MCP-Spezifikation, um die Tools des Servers aufzurufen.
Hauptinteraktionsfluss:
Client-Initialisierung : Stellen Sie eine Verbindung zu
/sse(SSE) her oder senden Sie eineninitializean/mcp(Streamable).(Optional) Tools entdecken : Der Client kann
mcp/listToolsodermcp/listOfferingsaufrufen, um die Liste der unterstützten Tools, deren Beschreibungen und Parameterschemata abzurufen.Tool aufrufen : Der Client sendet eine
tool_call-Nachricht/Anforderung und gibt dabei dentool_nameundargumentsan.Beispiel: Tabellenschema abrufen
tool_name:mcp_doris_get_table_schema(oder der modusspezifische Name)arguments: Schließen Sierandom_string,table_nameunddb_nameein.
Handle-Antwort :
Nicht-Streaming : Der Client erhält eine Antwort mit
resultodererror.Streaming : Der Client erhält eine Reihe von
tools/progress, gefolgt von einer abschließenden Antwort mit demresultodererror.
Auf bestimmte Toolnamen und Parameter sollte im src/tools/ -Code verwiesen oder sie sollten über MCP-Erkennungsmechanismen abgerufen werden.
Verbinden mit Cursor
Sie können Cursor entweder im Stdio- oder im SSE-Modus mit diesem MCP-Server verbinden.
Stdio-Modus
Im Stdio-Modus kann Cursor den Serverprozess direkt verwalten. Die Konfiguration erfolgt in der MCP-Server-Einstellungsdatei von Cursor (normalerweise ~/.cursor/mcp.json oder ähnlich).
Wenn Sie den Stdio-Modus verwenden, führen Sie bitte den folgenden Befehl aus, um das Umgebungsabhängigkeitspaket herunterzuladen und zu erstellen. Beachten Sie jedoch, dass Sie den Projektpfad in die richtige Pfadadresse ändern müssen :
uv --project /your/path/doris-mcp-server run doris-mcpCursor konfigurieren: Fügen Sie Ihrer Cursor-MCP-Konfiguration einen Eintrag wie den folgenden hinzu:
{ "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 ... } }Wichtige Punkte:
Ersetzen Sie
/path/to/your/doris-mcpdurch den tatsächlichen absoluten Pfad zum Stammverzeichnis des Projekts auf Ihrem System. Das Argument--projectist entscheidend, damituvdiepyproject.tomlfindet und den richtigen Befehl ausführt.Der
commandist aufuveingestellt (vorausgesetzt, Sie verwendenuvfür die Paketverwaltung, wie inuv.lockangegeben). Dieargsumfassen--project, den Pfad,runundmcp-doris(was einem in Ihrerpyproject.tomldefinierten Skript entsprechen sollte).Die Datenbankverbindungsdaten (
DB_HOST,DB_PORT,DB_USER,DB_PASSWORD,DB_DATABASE) werden direkt imenvBlock der Konfigurationsdatei festgelegt. Cursor leitet diese an den Serverprozess weiter. Bei der Konfiguration über Cursor ist für diesen Modus keine.envDatei erforderlich.
SSE-Modus
Im SSE-Modus müssen Sie den MCP-Server zunächst unabhängig ausführen und Cursor dann mitteilen, wie eine Verbindung zu ihm hergestellt werden soll.
Konfigurieren Sie
.env: Stellen Sie sicher, dass Ihre Datenbankanmeldeinformationen und alle anderen erforderlichen Einstellungen (wieSERVER_PORT, wenn Sie nicht den Standardwert 3000 verwenden) in der.envDatei im Projektverzeichnis richtig konfiguriert sind.Starten Sie den Server: Führen Sie den Server von Ihrem Terminal im Stammverzeichnis des Projekts aus:
./start_server.shDieses Skript liest typischerweise die
.envDatei und startet den FastAPI-Server im SSE-Modus (siehe das Skript undsse_server.py/main.pyfür weitere Einzelheiten). Beachten Sie den Host und den Port, auf dem der Server lauscht (Standard ist0.0.0.0:3000).Cursor konfigurieren: Fügen Sie Ihrer Cursor-MCP-Konfiguration einen Eintrag wie den folgenden hinzu, der auf den SSE-Endpunkt des laufenden Servers verweist:
{ "mcpServers": { "doris-sse": { "url": "http://127.0.0.1:3000/sse" // Adjust host/port if your server runs elsewhere }, // ... other server configurations ... } }Hinweis: Im Beispiel wird der Standardport
3000verwendet. Wenn Ihr Server auf einem anderen Port (z. B.3010im Beispiel) läuft, passen Sie die URL entsprechend an.
Nachdem Sie einen der Modi in Cursor konfiguriert haben, sollten Sie in der Lage sein, den Server (z. B. doris-stdio oder doris-sse ) auszuwählen und seine Tools zu verwenden.
Verzeichnisstruktur
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 serverEntwicklung neuer Tools
In diesem Abschnitt wird der Prozess zum Hinzufügen neuer MCP-Tools zum Doris MCP-Server unter Berücksichtigung der aktuellen Projektstruktur beschrieben.
1. Nutzen Sie Dienstprogrammmodule
Bevor Sie eine neue Datenbankinteraktionslogik von Grund auf neu schreiben, überprüfen Sie die vorhandenen Dienstprogrammmodule:
doris_mcp_server/utils/db.py: Bietet grundlegende Funktionen zum Abrufen von Datenbankverbindungen (get_db_connection) und Ausführen von Rohabfragen (execute_query,execute_query_df).doris_mcp_server/utils/schema_extractor.py(MetadataExtractor-Klasse) : Bietet hochrangige Methoden zum Abrufen von Datenbankmetadaten, z. B. zum Auflisten von Datenbanken/Tabellen (get_all_databases,get_database_tables), zum Abrufen von Tabellenschemata/Kommentaren/Indizes (get_table_schema,get_table_comment,get_column_comments,get_table_indexes) und zum Zugriff auf Audit-Protokolle (get_recent_audit_logs). Enthält Caching-Mechanismen.doris_mcp_server/utils/sql_executor_tools.py(Funktionexecute_sql_query) : Bietet einen Wrapper fürdb.execute_query, der Sicherheitsprüfungen enthält (optional, gesteuert durch die UmgebungsvariableENABLE_SQL_SECURITY_CHECK), SELECT-Abfragen automatischLIMIThinzufügt, die Ergebnisserialisierung (Datum, Dezimalzahlen) übernimmt und die Ausgabe in die standardmäßige MCP-Erfolgs-/Fehlerstruktur formatiert. Es wird empfohlen, dies für die Ausführung von benutzerdefiniertem oder generiertem SQL zu verwenden.
Sie können Funktionen aus diesen Modulen importieren und kombinieren, um Ihr neues Tool zu erstellen.
2. Tool-Logik implementieren
Implementieren Sie die Kernlogik Ihres neuen Tools als async Funktion in doris_mcp_server/tools/mcp_doris_tools.py . Dadurch bleiben die primären Toolimplementierungen zentralisiert. Stellen Sie sicher, dass Ihre Funktion Daten in einem Format zurückgibt, das sich problemlos in die Standard-MCP-Antwortstruktur integrieren lässt (siehe _format_response in derselben Datei als Referenz).
Beispiel: Erstellen wir ein einfaches Tool 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. Registrieren Sie das Tool (Doppelregistrierung)
Aufgrund der separaten Handhabung der Modi SSE/Streamable und Stdio müssen Sie das Tool an zwei Stellen registrieren:
A. SSE/Streamable-Registrierung ( tool_initializer.py )
Importieren Sie Ihre neue Tool-Funktion aus
mcp_doris_tools.py.Fügen Sie innerhalb der Funktion
register_mcp_toolseine neue Wrapper-Funktion hinzu, die mit@mcp.tool()dekoriert ist.Die Wrapper-Funktion sollte Ihre Kerntoolfunktion aufrufen.
Definieren Sie den Werkzeugnamen und geben Sie im Dekorator eine ausführliche Beschreibung (einschließlich Parameter, falls vorhanden) an. Denken Sie daran, die obligatorische Parameterbeschreibung
random_stringaus Gründen der Clientkompatibilität einzuschließen, auch wenn Ihr Wrapper diese nicht explizit verwendet.
Beispiel ( 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. Stdio-Registrierung ( mcp_core.py )
Fügen Sie ähnlich wie bei SSE eine neue Wrapper-Funktion hinzu, die mit
@stdio_mcp.tool()dekoriert ist.Wichtig: Importieren Sie Ihre Kerntoolfunktion (
mcp_doris_get_server_time) in die Wrapper-Funktion (in dieser Datei wird ein verzögertes Importmuster verwendet).Der Wrapper ruft die Kernfunktion des Tools auf. Der Wrapper selbst muss möglicherweise
async defsein, abhängig davon, wieFastMCPTools im Stdio-Modus verarbeitet, selbst wenn die zugrunde liegende Funktion einfach ist (siehe aktuelle Dateistruktur). Stellen Sie sicher, dass der Aufruf übereinstimmt (z. B. verwenden Sieawaitwenn eine asynchrone Funktion aufgerufen wird).
Beispiel ( 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. Neustart und Test
Nachdem Sie das Tool in beiden Dateien implementiert und registriert haben, starten Sie den MCP-Server neu (sowohl im SSE-Modus über ./start_server.sh als auch stellen Sie sicher, dass der von Cursor verwendete Stdio-Befehl bei Bedarf aktualisiert wird) und testen Sie das neue Tool mit Ihrem MCP-Client (wie Cursor) in beiden Verbindungsmodi.
Beitragen
Beiträge sind über Issues oder Pull Requests willkommen.
Lizenz
Dieses Projekt ist unter der Apache 2.0-Lizenz lizenziert. Weitere Informationen finden Sie in der Datei LICENSE (sofern vorhanden).
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