get_db_name
Retrieve the name of the currently active database to verify connection status and ensure queries target the correct data source.
Instructions
Get the name of the current database.
Args:
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_db_name"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- gabi.py:66-72 (handler)The handler function for the 'get_db_name' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function makes a GET request to the GABI endpoint '/dbname' to retrieve the current database name and returns it as a string.
@mcp.tool() async def get_db_name() -> str: """Get the name of the current database. Args: """ return await make_gabi_get_request(build_gabi_url("/dbname"))