Skip to main content
Glama

update_db_instrumentation

Configure database monitoring settings in Coroot to instrument and track performance metrics for MySQL, PostgreSQL, Redis, MongoDB, or Memcached databases.

Instructions

Update database instrumentation configuration.

Configures how Coroot instruments and monitors a specific database.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
db_typeYes
configYes

Implementation Reference

  • MCP tool handler function decorated with @mcp.tool(). This is the entry point for the 'update_db_instrumentation' tool, which delegates to an internal implementation.
    @mcp.tool() async def update_db_instrumentation( project_id: str, app_id: str, db_type: str, config: dict[str, Any] ) -> dict[str, Any]: """Update database instrumentation configuration. Configures how Coroot instruments and monitors a specific database. Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) db_type: Database type (mysql, postgres, redis, mongodb, memcached) config: Instrumentation configuration """ return await update_db_instrumentation_impl( # type: ignore[no-any-return] project_id, app_id, db_type, config )
  • Internal helper implementation that calls the CorootClient.update_db_instrumentation method and formats the response.
    @handle_errors async def update_db_instrumentation_impl( project_id: str, app_id: str, db_type: str, config: dict[str, Any] ) -> dict[str, Any]: """Update database instrumentation config.""" client = get_client() result = await client.update_db_instrumentation(project_id, app_id, db_type, config) return { "success": True, "message": f"{db_type} instrumentation updated successfully", "config": result, }
  • CorootClient method that performs the actual HTTP POST request to the Coroot API to update database instrumentation configuration.
    async def update_db_instrumentation( self, project_id: str, app_id: str, db_type: str, config: dict[str, Any] ) -> dict[str, Any]: """Update database instrumentation configuration. Args: project_id: Project ID. app_id: Application ID. db_type: Database type (mysql, postgres, redis, mongodb, memcached). config: Instrumentation configuration. Returns: Updated 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( "POST", f"/api/project/{project_id}/app/{encoded_app_id}/instrumentation/{db_type}", json=config, ) 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