Skip to main content
Glama

remove_connection

Remove a database connection from BetterDB MCP by specifying the instance ID to disconnect from Valkey or Redis monitoring.

Instructions

Remove a connection from BetterDB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceIdYesThe instance ID to remove

Implementation Reference

  • The definition and handler for the 'remove_connection' MCP tool. It makes an API request to delete a connection via the instance ID.
    server.tool(
      'remove_connection',
      'Remove a connection from BetterDB.',
      {
        instanceId: z.string().regex(/^[a-zA-Z0-9_-]+$/, 'Invalid instance ID format').describe('The instance ID to remove'),
      },
      async ({ instanceId }) => {
        try {
          const data = await apiRequest('DELETE', `/connections/${encodeURIComponent(instanceId)}`);
          if (isLicenseError(data)) {
            return { content: [{ type: 'text' as const, text: licenseErrorResult(data) }] };
          }
          return {
            content: [{ type: 'text' as const, text: `Removed connection: ${instanceId}` }],
          };
        } catch (err) {
          return {

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/BetterDB-inc/monitor'

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