Skip to main content
Glama

get_db_instrumentation

Retrieve database instrumentation settings for MySQL, PostgreSQL, Redis, MongoDB, or Memcached to configure monitoring in Coroot observability platform.

Instructions

Get database instrumentation configuration.

Retrieves instrumentation settings for a specific database type.

Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) db_type: Database type (mysql, postgres, redis, mongodb, memcached)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
db_typeYes

Implementation Reference

  • MCP tool handler for 'get_db_instrumentation'. This is the entrypoint function decorated with @mcp.tool() that executes the tool logic by delegating to the implementation helper.
    @mcp.tool() async def get_db_instrumentation( project_id: str, app_id: str, db_type: str ) -> dict[str, Any]: """Get database instrumentation configuration. Retrieves instrumentation settings for a specific database type. Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) db_type: Database type (mysql, postgres, redis, mongodb, memcached) """ return await get_db_instrumentation_impl(project_id, app_id, db_type) # type: ignore[no-any-return]
  • Helper implementation that wraps the CorootClient call and formats the response with success indicator.
    async def get_db_instrumentation_impl( project_id: str, app_id: str, db_type: str ) -> dict[str, Any]: """Get database instrumentation config.""" client = get_client() config = await client.get_db_instrumentation(project_id, app_id, db_type) return { "success": True, "config": config, }
  • Underlying CorootClient method that makes the actual HTTP API request to retrieve DB instrumentation configuration.
    async def get_db_instrumentation( self, project_id: str, app_id: str, db_type: str ) -> dict[str, Any]: """Get database instrumentation configuration. Args: project_id: Project ID. app_id: Application ID. db_type: Database type (mysql, postgres, redis, mongodb, memcached). Returns: Database instrumentation configuration. """ # URL encode the app_id since it contains slashes from urllib.parse import quote encoded_app_id = quote(app_id, safe="") response = await self._request( "GET", f"/api/project/{project_id}/app/{encoded_app_id}/instrumentation/{db_type}", ) data: dict[str, Any] = response.json() return data

Latest Blog Posts

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/jamesbrink/mcp-coroot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server