Skip to main content
Glama

update_db_instrumentation

Configure and update database instrumentation settings for Coroot monitoring. Specify project, application, database type, and configuration to optimize performance tracking for MySQL, Postgres, Redis, MongoDB, or Memcached.

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
app_idYes
configYes
db_typeYes
project_idYes

Implementation Reference

  • Primary MCP tool handler decorated with @mcp.tool(). Delegates to implementation function which calls the client.
    @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 )
  • CorootClient helper method that makes the HTTP POST request to the Coroot API to update the 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
  • Internal implementation function for the update_db_instrumentation tool, which invokes the client method and formats the response.
    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, }
  • FastMCP tool registration decorator (@mcp.tool()) that registers the function as an MCP tool.
    @mcp.tool()

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